/* ==========================================================================
   Akira — akirastreaming.lol
   Black and white, high contrast, no third-party requests.
   ========================================================================== */

:root {
  --ink: #000000;
  --ink-soft: #0a0a0a;
  --ink-panel: #101010;
  --ink-raised: #161616;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --paper: #ffffff;
  --paper-dim: #d8d8d8;
  --paper-mute: #8a8a8a;
  /* Tertiary text sits on #161616 panels, so it needs ~4.5:1 against that
     rather than against pure black. */
  --paper-faint: #828282;

  --shell: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --speed: 220ms;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas,
    monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The .button/.ghost-button rules set display:inline-flex, which would beat
   the user-agent [hidden] rule. Keep `hidden` authoritative. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  /* A very faint vignette so pure black does not look flat on OLED. */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    120% 80% at 50% -10%,
    rgba(255, 255, 255, 0.06),
    transparent 60%
  );
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.04;
  text-wrap: balance;
}

p {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

::selection {
  background: var(--paper);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Layout -------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.shell--narrow {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--speed) var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* --- Buttons ------------------------------------------------------------- */

.button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease),
    border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.button {
  background: var(--paper);
  color: var(--ink);
}

.button:hover {
  background: var(--paper-dim);
}

.button:active {
  transform: translateY(1px);
}

.ghost-button {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-strong);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--paper);
}

.button--small {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}

.button--large {
  padding: 0.95rem 1.9rem;
  font-size: 1.02rem;
}

.button--full {
  width: 100%;
}

/* --- Nav ----------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease),
    backdrop-filter var(--speed) var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: contain;
}

.brand__word {
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.nav__links {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}

.nav__links a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--paper-mute);
  transition: color var(--speed) var(--ease), background var(--speed) var(--ease);
}

.nav__links a:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.07);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

@media (max-width: 860px) {
  .nav__links {
    display: none;
  }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.2rem);
}

.hero h1 .muted {
  color: var(--paper-faint);
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--paper-dim);
  max-width: 46ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__note {
  font-size: 0.86rem;
  color: var(--paper-faint);
  letter-spacing: 0.02em;
}

.hero__art {
  position: relative;
}

.shot {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-panel);
  box-shadow: 0 40px 90px -50px rgba(255, 255, 255, 0.35);
}

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.5));
}

.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
  .hero__art {
    order: -1;
  }
}

/* --- Platform strip ------------------------------------------------------ */

.strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--paper-mute);
  font-size: 0.9rem;
  font-weight: 500;
}

.strip li {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.strip li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* --- Sections ------------------------------------------------------------ */

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--line);
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head h2 {
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  margin-top: 0.9rem;
}

.section__lede {
  margin-top: 1.1rem;
  color: var(--paper-dim);
  font-size: 1.05rem;
}

/* --- Grids & cards ------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.1rem;
}

.grid--features {
  grid-template-columns: repeat(3, 1fr);
}

.grid--downloads {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 940px) {
  .grid--features,
  .grid--downloads {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .grid--features,
  .grid--downloads {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-raised), var(--ink-soft));
  transition: border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.card__index {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper-faint);
  margin-bottom: 1.6rem;
  letter-spacing: 0.08em;
}

.card h3 {
  font-size: 1.16rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--paper-mute);
  font-size: 0.94rem;
}

/* --- Download cards ------------------------------------------------------ */

.download {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-raised), var(--ink-soft));
  transition: border-color var(--speed) var(--ease);
}

.download:hover {
  border-color: var(--line-strong);
}

.download.is-flash {
  animation: flash 1500ms var(--ease);
}

@keyframes flash {
  0% {
    border-color: var(--paper);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
  }
  60% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    border-color: var(--line);
    box-shadow: none;
  }
}

.download__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.download__head h3 {
  font-size: 1.1rem;
}

.download__badge {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 26px;
  padding: 0 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
}

.download__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper-mute);
  flex-wrap: wrap;
}

.download__meta .sep {
  color: var(--paper-faint);
}

.download__note {
  font-size: 0.88rem;
  color: var(--paper-mute);
  min-height: 2.6em;
}

.download .button {
  margin-top: auto;
}

.ota-hint {
  font-size: 0.8rem;
  color: var(--paper-faint);
  line-height: 1.45;
}

.download.is-missing .button {
  background: transparent;
  color: var(--paper-faint);
  border-color: var(--line);
  pointer-events: none;
  cursor: not-allowed;
}

.sha {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  font-size: 0.78rem;
}

.sha summary {
  cursor: pointer;
  color: var(--paper-faint);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.sha code {
  display: block;
  margin-top: 0.6rem;
  color: var(--paper-mute);
  word-break: break-all;
  line-height: 1.5;
}

/* --- Live preview -------------------------------------------------------- */

.preview {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-panel);
  box-shadow: 0 50px 110px -60px rgba(255, 255, 255, 0.4);
}

.preview__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--ink-raised);
}

.preview__dots {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.preview__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line-strong);
}

.preview__url {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--paper-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  flex: none;
  font-size: 0.78rem;
}

.preview__reload {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--paper-mute);
  font-size: 0.78rem;
  transition: color var(--speed) var(--ease);
}

.preview__reload:hover {
  color: var(--paper);
}

.preview__open {
  color: var(--paper);
  font-weight: 600;
}

.preview__open:hover {
  text-decoration: underline;
}

.preview__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.preview__poster,
.preview__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.preview__poster {
  filter: grayscale(1) brightness(0.5);
  transition: opacity 600ms var(--ease);
}

.preview__iframe {
  opacity: 0;
  transition: opacity 600ms var(--ease);
  background: #000;
}

.preview.is-loaded .preview__poster,
.preview.is-loaded .preview__pending {
  opacity: 0;
  pointer-events: none;
}

.preview.is-loaded .preview__iframe {
  opacity: 1;
}

.preview__pending {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  color: var(--paper-dim);
  background: rgba(0, 0, 0, 0.55);
  transition: opacity 400ms var(--ease);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--paper);
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
  .card,
  .button {
    transition: none;
  }
}

.fineprint {
  margin-top: 1.1rem;
  font-size: 0.84rem;
  color: var(--paper-faint);
  max-width: 62ch;
}

/* --- Tabs ---------------------------------------------------------------- */

.tabs__list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.32rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--ink-soft);
  margin-bottom: 2rem;
}

.tabs__tab {
  border: 0;
  background: transparent;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper-mute);
  cursor: pointer;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.tabs__tab:hover {
  color: var(--paper);
}

.tabs__tab.is-active {
  background: var(--paper);
  color: var(--ink);
}

.tabs__panel[hidden] {
  display: none;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0.9rem;
  max-width: 760px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.1rem 1.2rem 1.1rem 3.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-soft);
  color: var(--paper-dim);
  font-size: 0.95rem;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.2rem;
  top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--paper-faint);
}

.steps strong {
  color: var(--paper);
  font-weight: 600;
}

.steps em {
  color: var(--paper);
  font-style: normal;
  border-bottom: 1px dashed var(--line-strong);
}

.steps code {
  color: var(--paper);
}

.steps pre {
  margin: 0.8rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
}

/* --- FAQ ----------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 0.6rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-soft);
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  padding: 1.1rem 1.3rem;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--paper-faint);
  transition: transform var(--speed) var(--ease);
}

.faq details[open] summary::after {
  content: "–";
}

.faq summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq details p {
  padding: 0 1.3rem 1.2rem;
  color: var(--paper-mute);
  font-size: 0.94rem;
}

/* --- Closing & footer ---------------------------------------------------- */

.closing {
  border-top: 1px solid var(--line);
  padding-block: clamp(4rem, 10vw, 8rem);
  text-align: center;
}

.closing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.closing h2 {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  max-width: 18ch;
}

.closing__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem;
  background: var(--ink-soft);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
  justify-content: space-between;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.footer__brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.footer__legal {
  flex: 1 1 340px;
  max-width: 52ch;
  font-size: 0.84rem;
  color: var(--paper-faint);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--paper-mute);
}

.footer__links a:hover {
  color: var(--paper);
}

/* --- Reveal on scroll ---------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
