/* ==========================================================================
   Viral Tone — Marketing that Moves
   One palette (midnight navy + coral gradient), one type system
   (Montserrat display / Inter text / JetBrains Mono labels).
   ========================================================================== */

:root {
  --bg: #070d1a;
  --bg-2: #0a1222;
  --surface: #0e1830;
  --surface-2: #13213d;
  --line: rgba(233, 238, 248, 0.09);
  --line-strong: rgba(233, 238, 248, 0.18);

  --text: #f3f5fa;
  --muted: #98a3b9;
  --dim: #5f6b84;
  --teal: #74a9a6; /* tagline teal from the logo */

  --coral: #ff5a5f;
  --coral-2: #ff8a5b;
  --grad: linear-gradient(100deg, #ff4d5e 0%, #ff8a5b 100%);
  --on-coral: #0a0f1c;

  --font-display: "Montserrat", system-ui, sans-serif;
  --font-text: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 18px;
  --radius-sm: 10px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--coral); color: var(--on-coral); }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.section { padding-block: clamp(96px, 14vw, 200px); position: relative; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--grad);
}
.eyebrow .dot { display: none; }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 1.2rem + 5.6vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.display--md { font-size: clamp(2.3rem, 1.2rem + 4.2vw, 5rem); }
.muted { color: var(--dim); }

.grad-text {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.section-head { margin-bottom: clamp(56px, 8vw, 110px); max-width: 1100px; }
.section-head--split {
  max-width: none;
  display: grid;
  gap: 28px;
  align-items: end;
}
.section-head__note { color: var(--muted); max-width: 44ch; font-size: 1.05rem; }

@media (min-width: 960px) {
  .section-head--split { grid-template-columns: 2fr 1fr; gap: 64px; }
}

/* ---------- Buttons ---------- */
.btn {
  --h: 56px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.3s, color 0.3s;
}
.btn--sm { --h: 46px; padding: 0 20px; font-size: 0.9rem; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--grad);
  color: var(--on-coral);
  box-shadow: 0 10px 40px -12px rgba(255, 90, 95, 0.55);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, #ff8a5b 0%, #ff4d5e 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.btn--primary:hover::after { opacity: 1; }
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(7, 13, 26, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { border-color: var(--text); transform: translateY(-2px); }

.btn__arrow { display: inline-block; transition: transform 0.4s var(--ease-out); }
.btn:hover .btn__arrow { transform: translate(2px, -2px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  color: var(--text);
  background-image: var(--grad);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 10px);
  transition: background-size 0.5s var(--ease-out);
}
.text-link:hover { background-size: 100% 1px; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: transform 0.5s var(--ease-out), background-color 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(7, 13, 26, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; }
.brand img { height: 30px; width: auto; }

.nav { display: none; }
.nav__list { display: flex; gap: 6px; }
.nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s, background-color 0.25s;
}
.nav__list a:hover,
.nav__list a.is-current { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.site-header__cta { display: none; }

.menu-toggle {
  display: inline-grid;
  place-content: center;
  gap: 6px;
  width: 48px; height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(7, 13, 26, 0.4);
  cursor: pointer;
}
.menu-toggle__bar {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-3.75px) rotate(-45deg); }

@media (min-width: 1080px) {
  .nav { display: block; }
  .site-header__cta { display: inline-flex; }
  .menu-toggle { display: none; }
}
@media (min-width: 640px) and (max-width: 1079px) {
  .site-header__cta { display: inline-flex; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  padding: calc(var(--header-h) + 24px) var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(255, 90, 95, 0.16), transparent 60%),
    var(--bg);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { display: grid; }
.mobile-menu li a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.mobile-menu li a span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--coral);
}
.mobile-menu__tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  text-align: center;
}
body.menu-open { overflow: hidden; }

/* ==========================================================================
   1. Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 24px);
  padding-bottom: 28px;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translate3d(0, calc(var(--hero-p, 0) * 12vh), 0) scale(calc(1.04 + var(--hero-p, 0) * 0.06));
  transform-origin: 50% 40%;
  will-change: transform;
}
.hero__media picture,
.hero__img,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.hero__video { opacity: 0; transition: opacity 1.2s var(--ease-out); }
.hero__video.is-playing { opacity: 1; }

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 13, 26, 0.55) 0%, rgba(7, 13, 26, 0) 22%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 13, 26, 0.7) 26%, rgba(7, 13, 26, 0) 58%);
}
.hero__shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: calc(var(--hero-p, 0) * 0.6);
}

.hero__content {
  opacity: calc(1 - var(--hero-p, 0) * 1.4);
  transform: translate3d(0, calc(var(--hero-p, 0) * -70px), 0);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.3rem, 1rem + 10.5vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .line > span { display: inline-block; }

.hero__row { display: grid; gap: 28px; }
.hero__sub {
  max-width: 46ch;
  color: #c9d0de;
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__rail {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(36px, 6vh, 72px);
  border-top: 1px solid var(--line);
}
.hero__rail a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
}
.hero__rail a:hover { color: var(--text); }
.hero__rail a span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--coral);
}
.hero__rail a:not(.hero__scroll) { display: none; }
.hero__scroll {
  justify-content: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero__scroll-line {
  position: relative;
  width: 44px; height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  transform: translateX(-100%);
  animation: scroll-cue 2.4s var(--ease-in-out) infinite;
}
@keyframes scroll-cue {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}

@media (max-width: 479px), (orientation: portrait) and (max-width: 899px) {
  .hero__eyebrow { display: none; }
}
@media (orientation: portrait) {
  .hero__media { inset: -7% 0 7% 0; }
  .hero__media picture, .hero__img { object-position: 50% 30%; }
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(7, 13, 26, 0.5) 0%, rgba(7, 13, 26, 0) 18%),
      linear-gradient(0deg, var(--bg) 4%, rgba(7, 13, 26, 0.82) 34%, rgba(7, 13, 26, 0) 62%);
  }
}

@media (min-width: 768px) {
  .hero { padding-bottom: 32px; }
  .hero__rail { grid-template-columns: repeat(3, auto) 1fr; gap: 40px; }
  .hero__rail a:not(.hero__scroll) { display: flex; }
  .hero__scroll { justify-content: flex-end; }
}
@media (min-width: 1080px) and (orientation: landscape) {
  .hero__shade {
    background:
      linear-gradient(90deg, rgba(7, 13, 26, 0.82) 0%, rgba(7, 13, 26, 0.35) 38%, rgba(7, 13, 26, 0) 60%),
      linear-gradient(180deg, rgba(7, 13, 26, 0.5) 0%, rgba(7, 13, 26, 0) 20%),
      linear-gradient(0deg, var(--bg) 0%, rgba(7, 13, 26, 0.4) 22%, rgba(7, 13, 26, 0) 45%);
  }
  .hero__title { font-size: clamp(4.5rem, 8.2vw, 10rem); }
  .hero__row { grid-template-columns: minmax(0, 46ch) auto; align-items: end; justify-content: space-between; gap: 48px; }
}

/* Intro animation (set up by JS: html.js) */
.js [data-intro] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}
.js .hero__title [data-intro] { opacity: 1; transform: translate3d(0, 105%, 0); }
.js.is-loaded [data-intro] {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms + 150ms);
}

/* ==========================================================================
   2. Ticker
   ========================================================================== */
.ticker {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__list { display: flex; flex-shrink: 0; }
.ticker__list li {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  letter-spacing: -0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.ticker__list li::after {
  content: "";
  width: 9px; height: 9px;
  background: var(--grad);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
@keyframes ticker { to { transform: translate3d(-50%, 0, 0); } }

/* ==========================================================================
   3. Approach
   ========================================================================== */
.approach__grid { display: grid; gap: 40px; }
.approach__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.approach__statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 0.9rem + 3.3vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}
.approach__statement .w {
  opacity: 0.16;
  transition: opacity 0.35s linear;
}
.approach__statement .w.is-lit { opacity: 1; }

.approach__pillars {
  display: grid;
  margin-top: clamp(64px, 9vw, 130px);
}
.pillar { padding: 32px 0; border-top: 1px solid var(--line); }
.pillar__k {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.pillar__k::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--grad);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.pillar p { color: var(--muted); max-width: 38ch; }

@media (min-width: 960px) {
  .approach__grid { grid-template-columns: 1fr 2.6fr; gap: 64px; }
  .approach__side { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
  .approach__pillars { grid-template-columns: repeat(3, 1fr); }
  .pillar { padding: 36px 36px 8px 0; }
  .pillar + .pillar { padding-left: 36px; border-left: 1px solid var(--line); }
}

/* ==========================================================================
   4. Services
   ========================================================================== */
.services { padding-bottom: clamp(60px, 8vw, 120px); }
.services__grid { display: grid; gap: 0; }
.services__stage { display: none; }

.chapter { padding-block: 48px; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; padding-top: 0; }
.chapter__media {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface);
}
.chapter__media img { width: 100%; height: 100%; object-fit: cover; }
.chapter__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--coral);
  margin-bottom: 14px;
}
.chapter__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}
.chapter__lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  letter-spacing: -0.02em;
  color: var(--teal);
  margin-bottom: 18px;
}
.chapter > p:not([class]) { color: var(--muted); max-width: 52ch; margin-bottom: 28px; }

.ticks { display: grid; gap: 12px; }
.ticks li {
  position: relative;
  padding-left: 30px;
  color: #d5dbe6;
  line-height: 1.5;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 14px; height: 9px;
  border-left: 2px solid var(--coral);
  border-bottom: 2px solid var(--coral);
  transform: rotate(-45deg) scale(0.85);
  transform-origin: 30% 70%;
}
.ticks--inline { display: flex; flex-wrap: wrap; gap: 12px 28px; }

@media (min-width: 960px) {
  .services__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 110px); }
  .services__stage { display: block; }
  .stage {
    position: sticky;
    top: calc(var(--header-h) + 4vh);
    height: calc(100vh - var(--header-h) - 8vh);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 40px 120px -40px rgba(255, 90, 95, 0.25);
  }
  .stage__img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 0.9s var(--ease-out), transform 1.4s var(--ease-out);
  }
  .stage__img.is-active { opacity: 1; transform: scale(1); }
  .stage__hud {
    position: absolute;
    left: 20px; right: 20px; bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(7, 13, 26, 0.62);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .stage__count { color: var(--text); white-space: nowrap; }
  .stage__bar { flex: 1; height: 2px; background: var(--line-strong); overflow: hidden; border-radius: 2px; }
  .stage__bar span {
    display: block; height: 100%;
    background: var(--grad);
    transform-origin: 0 50%;
    transform: scaleX(0.3333);
    transition: transform 0.8s var(--ease-out);
  }
  .stage__label { white-space: nowrap; }

  .chapter {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 10vh;
    border-top: 0;
  }
  .chapter:first-child { padding-top: 10vh; }
  .chapter__media { display: none; }
  .chapter { opacity: 0.28; transition: opacity 0.6s var(--ease-out); }
  .chapter.is-active { opacity: 1; }
}

/* ==========================================================================
   5. The Loop
   ========================================================================== */
.loop { padding-top: clamp(40px, 6vw, 80px); }
.loop__frame-wrap { padding-inline: clamp(8px, 1.4vw, 20px); }
.loop__frame {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  transform: scale(var(--loop-s, 1));
  transform-origin: 50% 0%;
  will-change: transform;
}
.loop__video,
.loop__poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  z-index: -2;
}
.loop__video { z-index: -1; opacity: 0; transition: opacity 1s var(--ease-out); }
.loop__video.is-playing { opacity: 1; }
.loop__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(7, 13, 26, 0.95) 0%, rgba(7, 13, 26, 0.55) 35%, rgba(7, 13, 26, 0) 65%);
}
.loop__copy { padding-block: clamp(32px, 6vw, 80px); }
.loop__title { max-width: 14ch; margin-bottom: 20px; }
.loop__text { max-width: 52ch; color: #c9d0de; font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.18rem); }

.loop__steps {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: clamp(56px, 8vw, 110px);
}
.loop__line {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.loop__line span {
  display: block;
  width: 100%; height: 100%;
  background: var(--grad);
  transform-origin: 50% 0;
  transform: scaleY(var(--line-p, 0));
}
.loop-step { padding: 0 0 40px 28px; position: relative; }
.loop-step::before {
  content: "";
  position: absolute;
  left: -4px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--coral);
}
.loop-step__k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 10px;
}
.loop-step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.loop-step p { color: var(--muted); max-width: 32ch; }

@media (min-width: 900px) {
  .loop__steps { grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 40px; }
  .loop__line { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }
  .loop__line span { transform-origin: 0 50%; transform: scaleX(var(--line-p, 0)); }
  .loop-step { padding: 0; }
  .loop-step::before { left: 0; top: -45px; }
}

/* ==========================================================================
   6. Process (pinned horizontal track on desktop)
   ========================================================================== */
.process {
  position: relative;
  padding-block: clamp(96px, 12vw, 160px);
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(255, 90, 95, 0.08), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
.process__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.process__meter { display: none; }

.process__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.process__viewport::-webkit-scrollbar { display: none; }
.process__track { display: flex; gap: 16px; width: max-content; padding-right: var(--gutter); }

.step {
  scroll-snap-align: start;
  width: min(82vw, 420px);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(14, 24, 48, 0.4) 100%);
  position: relative;
  overflow: hidden;
}
.step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0.12);
  transition: transform 0.8s var(--ease-out);
}
.step:hover::before,
.step.is-active::before { transform: scaleX(1); }
.step__top { display: flex; align-items: center; justify-content: space-between; padding-bottom: clamp(56px, 9vh, 110px); }
.step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 3rem + 3vw, 6rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(243, 245, 250, 0.35);
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--teal);
  white-space: nowrap;
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.step p { color: var(--muted); }
.step--cta {
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(255, 90, 95, 0.22), transparent 70%),
    var(--surface);
}
.step--cta::before { transform: scaleX(1); }
.step__cta-k {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text) !important;
}

/* Pinned mode (enabled by JS on wide screens) */
.process.is-pinned { padding-block: 0; height: var(--process-h, 300vh); }
.process.is-pinned .process__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  padding-top: var(--header-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.process.is-pinned .process__meter { display: block; width: min(320px, 30vw); padding-bottom: 12px; }
.process__meter-bar { display: block; height: 2px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.process__meter-bar span {
  display: block; height: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--process-p, 0));
}
.process.is-pinned .process__viewport { overflow: visible; scroll-snap-type: none; }
.process.is-pinned .process__track {
  gap: 24px;
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  transform: translate3d(calc(var(--process-x, 0) * -1px), 0, 0);
  will-change: transform;
}
.process.is-pinned .process__viewport { padding-inline: 0; }
.process.is-pinned .step { width: clamp(340px, 30vw, 440px); min-height: min(460px, 52vh); padding: 36px; }

/* ==========================================================================
   7. Reporting
   ========================================================================== */
.reporting__grid { display: grid; gap: 56px; align-items: center; }
.reporting__media figcaption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--dim);
}
.reporting__frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 2;
  background: var(--surface);
}
.reporting__frame img {
  width: 100%; height: 110%;
  object-fit: cover;
  transform: translate3d(0, calc(var(--parallax, 0) * -5%), 0);
  will-change: transform;
}
.reporting__copy .display { margin-bottom: 24px; }
.reporting__lead { color: var(--muted); max-width: 46ch; margin-bottom: 40px; font-size: 1.05rem; }
.kpis { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.kpi { background: var(--bg); padding: 20px 0; }
.kpi dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.kpi dt::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--grad);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.kpi dd { color: var(--muted); font-size: 0.95rem; }

@media (min-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; background: none; border: 0; gap: 0 32px; }
  .kpi { border-top: 1px solid var(--line); }
}
@media (min-width: 1080px) {
  .reporting__grid { grid-template-columns: 1.35fr 1fr; gap: clamp(56px, 6vw, 96px); }
}

/* ==========================================================================
   8. Comparison
   ========================================================================== */
.compare { background: var(--bg-2); border-top: 1px solid var(--line); }
.compare__table { border-top: 1px solid var(--line); }
.compare__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.compare__row [role="cell"]:first-child {
  color: var(--dim);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 90, 95, 0.55);
  text-decoration-thickness: 1px;
}
.compare__row [role="cell"]:last-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.compare__row--head { display: none; }

@media (min-width: 820px) {
  .compare__row { grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; padding: 28px 0; }
  .compare__row [role="cell"]:first-child { font-size: 1.05rem; }
  .compare__row--head {
    display: grid;
    padding: 16px 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
  }
  .compare__row--head span:last-child { color: var(--coral); }
}

/* ==========================================================================
   9. FAQ
   ========================================================================== */
.faq__grid { display: grid; gap: 48px; }
.faq__side .display { margin-bottom: 20px; }
.faq__note { color: var(--muted); max-width: 34ch; margin-bottom: 16px; }

.faq__list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 18px 56px 18px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  transition: color 0.25s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after,
.qa summary::before {
  content: "";
  position: absolute;
  right: 12px; top: 50%;
  width: 16px; height: 2px;
  background: var(--coral);
  transition: transform 0.45s var(--ease-out);
}
.qa summary::before { transform: rotate(90deg); }
.qa[open] summary::before { transform: rotate(0deg); }
.qa summary:hover { color: #fff; }
.qa p {
  padding: 0 56px 26px 0;
  color: var(--muted);
  max-width: 62ch;
  animation: qa-in 0.5s var(--ease-out);
}
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) {
  .faq__grid { grid-template-columns: 1fr 1.6fr; gap: 96px; }
  .faq__side { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
}

/* ==========================================================================
   10. Book
   ========================================================================== */
.book { position: relative; padding-bottom: clamp(96px, 12vw, 180px); overflow: hidden; }
.book__visual { position: relative; }
.book__bg {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.book__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 30% 50%;
}
.book__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(7, 13, 26, 0) 45%);
}
.book__head { position: relative; margin-top: -40px; }
.book__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 1rem + 10vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}
.book__inner { display: grid; gap: 48px; margin-top: clamp(32px, 5vw, 64px); }
.book__lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: #d0d6e2; max-width: 40ch; margin-bottom: 28px; }

.book__form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(255, 90, 95, 0.12), transparent 70%),
    rgba(14, 24, 48, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 120px -50px rgba(0, 0, 0, 0.8);
}
.book__form-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label,
.field legend {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 8px;
}
.field label { margin-bottom: 0; }
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(7, 13, 26, 0.6);
  font-size: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input::placeholder { color: var(--dim); }
.field input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.2); }
.field[hidden] { display: none; }
.field--other { margin-top: 16px; animation: qa-in 0.4s var(--ease-out); }
.field input[aria-invalid="true"] { border-color: var(--coral); }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.choice input:checked + span { background: var(--grad); border-color: transparent; color: var(--on-coral); }
.choice input:focus-visible + span { outline: 2px solid var(--coral-2); outline-offset: 3px; }
.book__status { min-height: 1.5em; font-size: 0.92rem; color: var(--teal); }
.book__status.is-error { color: var(--coral-2); }
.book__status a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.book__form button[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 900px) {
  .book__bg { aspect-ratio: 21 / 9; }
  .book__head {
    position: absolute;
    inset: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
  }
  .book__head .eyebrow { flex-direction: row-reverse; }
  .book__bg::after {
    background:
      linear-gradient(270deg, rgba(7, 13, 26, 0.7) 0%, rgba(7, 13, 26, 0) 45%),
      linear-gradient(0deg, var(--bg) 0%, rgba(7, 13, 26, 0) 35%);
  }
  .book__title { font-size: clamp(3.6rem, 6.6vw, 8.6rem); }
  .book__inner { grid-template-columns: 1fr minmax(380px, 520px); gap: 80px; align-items: start; margin-top: 0; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-top: clamp(64px, 8vw, 110px);
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
.footer__top { display: grid; gap: 56px; padding-bottom: 56px; }
.footer__brand img { height: 40px; width: auto; margin-bottom: 14px; }
.footer__tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}
.footer__blurb { color: var(--muted); max-width: 36ch; }
.footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 36px; }
.footer__h {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}
.footer__cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #d0d6e2;
  transition: color 0.25s;
  overflow-wrap: anywhere;
}
.footer__cols a:hover { color: var(--coral-2); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.9rem;
}
@media (min-width: 960px) {
  .footer__top { grid-template-columns: 1fr 1.4fr; }
}

/* ==========================================================================
   Reveal
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal],
  .js [data-intro],
  .js .hero__title [data-intro] { opacity: 1; transform: none; }
  .hero__media, .hero__content, .loop__frame, .reporting__frame img { transform: none !important; }
  .hero__content { opacity: 1 !important; }
  .hero__shade::after { opacity: 0; }
  .ticker__track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker__list[aria-hidden="true"] { display: none; }
  .ticker__list { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
  .approach__statement .w { opacity: 1; }
  .chapter { opacity: 1 !important; }
}
