:root {
  --bg: #070b14;
  --bg-soft: #0d1422;
  --bg-card: #121b2c;
  --fg: #f2f5fb;
  --fg-muted: #9fb0cc;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #7aa2ff;
  --accent-2: #4de3c1;
  --accent-contrast: #04101f;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --measure: 34rem;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(122, 162, 255, 0.22), transparent 60%),
    radial-gradient(760px 480px at 92% 4%, rgba(77, 227, 193, 0.14), transparent 62%),
    var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav {
  display: none;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--fg-muted);
}

.nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

@media (min-width: 860px) {
  .nav {
    display: flex;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  padding-block: 5rem 4rem;
}

.hero__inner {
  max-width: 54rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.9rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero__title span {
  display: block;
  background: linear-gradient(100deg, var(--fg) 10%, var(--accent) 55%, var(--accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  margin: 1.75rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--fg-muted);
  max-width: 40rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-contrast);
}

.btn--ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.hero__scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 42px;
  margin: 0.6rem auto 0;
  background: linear-gradient(var(--accent), transparent);
}

/* ---------- sections ---------- */

.section {
  padding-block: 5rem;
}

.section__head {
  max-width: 46rem;
  margin-bottom: 3rem;
}

.section__title {
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section__text {
  color: var(--fg-muted);
  margin-top: 1rem;
}

/* ---------- scrollytelling chapter ---------- */

.chapter {
  position: relative;
  padding-block: 3rem 5rem;
}

.chapter__visual {
  margin-bottom: 2rem;
}

.chapter__sticky {
  position: relative;
}

.frames {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(140deg, #0e1727, #060910);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.frame {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.frame.is-active {
  opacity: 1;
  transform: scale(1);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background:
    radial-gradient(500px 300px at 30% 20%, rgba(122, 162, 255, 0.22), transparent 70%),
    linear-gradient(140deg, #0e1727, #060910);
}

.caption {
  margin-top: 1rem;
  min-height: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.chapter__steps {
  display: grid;
  gap: 1rem;
}

.step {
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 27, 44, 0.55);
  backdrop-filter: blur(6px);
  transition: border-color 0.35s ease, background-color 0.35s ease, opacity 0.35s ease;
  opacity: 0.55;
}

.step.is-active {
  opacity: 1;
  border-color: rgba(122, 162, 255, 0.55);
  background: rgba(21, 33, 54, 0.85);
}

.step__index {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.step__title {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.step__body > *:first-child {
  margin-top: 0;
}

.step__body > *:last-child {
  margin-bottom: 0;
}

.step__body p {
  color: var(--fg-muted);
}

.step__body ul {
  padding-left: 1.1rem;
  color: var(--fg-muted);
}

.step__body li {
  margin-bottom: 0.35rem;
}

.step__body figure {
  margin: 1.25rem 0 0;
}

.step__body figure img {
  border-radius: 12px;
  border: 1px solid var(--line);
  width: 100%;
}

.step__body figcaption {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.strip img {
  border-radius: 10px;
  border: 1px solid var(--line);
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.quote {
  margin: 0;
  padding: 0;
  border: 0;
}

.quote blockquote {
  margin: 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.05rem;
  color: var(--fg);
}

.quote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}

.video-embed {
  position: relative;
  padding-top: 56.25%;
  margin: 1.5rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 900px) {
  .chapter {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }

  .chapter__visual {
    margin-bottom: 0;
  }

  .chapter__sticky {
    position: sticky;
    top: 5.5rem;
    height: calc(100vh - 7rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .chapter__steps {
    gap: 22vh;
    padding-block: 12vh 18vh;
  }

  .step {
    max-width: var(--measure);
  }
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 27, 44, 0.9), rgba(12, 18, 30, 0.9));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(122, 162, 255, 0.5);
}

.card h3,
.card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: var(--fg-muted);
}

.stat {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 27, 44, 0.6);
  text-align: center;
}

.stat__value {
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--fg), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--fg-muted);
}

/* ---------- legal ---------- */

.legal {
  display: grid;
  gap: 1rem;
}

.legal details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 27, 44, 0.5);
  padding: 0.25rem 1.4rem;
}

.legal summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
}

.legal .legal__body {
  padding-bottom: 1.5rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.legal .legal__body h2 {
  font-size: 1.1rem;
  color: var(--fg);
  margin: 1.5rem 0 0.5rem;
}

.legal .legal__body h3 {
  font-size: 1rem;
  color: var(--fg);
  margin: 1.25rem 0 0.4rem;
}

.legal .legal__body p {
  margin: 0.6rem 0;
}

/* ---------- cta + footer ---------- */

.cta {
  margin-block: 4rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 320px at 15% 0%, rgba(122, 162, 255, 0.25), transparent 70%),
    radial-gradient(600px 320px at 90% 100%, rgba(77, 227, 193, 0.18), transparent 70%),
    rgba(13, 20, 34, 0.9);
  text-align: center;
}

.cta h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  letter-spacing: -0.03em;
}

.cta p {
  margin: 1rem auto 2rem;
  max-width: 38rem;
  color: var(--fg-muted);
}

.footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.5rem;
  background: rgba(6, 9, 16, 0.6);
}

.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.footer h4 {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-family: var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.footer a {
  color: var(--fg);
  font-size: 0.95rem;
}

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.social {
  display: flex;
  gap: 1rem;
}

.social a {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.social a:hover {
  color: var(--accent-2);
  text-decoration: none;
}

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* Fallback without JavaScript: show every frame as a plain gallery. */
.no-js .frames {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  aspect-ratio: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.no-js .frame {
  position: static;
  opacity: 1;
  transform: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.no-js .frame img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .frame {
    transform: none;
  }
}

/* ---------- layout helpers ---------- */

.hero__actions--center {
  justify-content: center;
}

.footer__text {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}
