/*
 * Health Trial Hero marketing site.
 * Tokens are copied from the app: frontend/src/styles/theme.css (:root light
 * base, [data-portal='candidate'] neutrals, [data-theme='dark'] base). Hex
 * values are the sRGB the app's OKLCH tokens were derived from. Keep in sync by
 * hand when the app palette changes.
 */

/* Self-hosted fonts (SIL Open Font License): the latin subset of each family's
   variable font from Google Fonts, one file per family covering every weight used. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  --bg: #ffffff; /* --color-background */
  --bg-subtle: #fafafa; /* --color-background-subtle */
  --bg-warm: #f5f3ef; /* --color-candidate-bg */
  --surface: #ffffff; /* --color-card */
  --fg: #0a0a0a; /* --color-foreground */
  --fg-muted: #52525b; /* candidate --color-foreground-muted */
  --fg-subtle: #686f7a; /* --color-foreground-subtle */
  --border: #e5e5e5; /* --color-border */
  --ink: #09090b; /* --color-ink */
  --ink-hover: #27272a; /* --color-ink-hover */
  --on-ink: #ffffff; /* --color-on-ink */
  --primary: #008c7e; /* --color-primary (brand teal) */
  --primary-hover: #006b5f; /* --color-primary-hover */
  --primary-deep: #005249; /* --color-primary-deep */
  --primary-bright: #00a896; /* --color-primary-bright */
  --primary-subtle: #e6f5f3; /* --color-primary-subtle */
  --on-primary: #ffffff;
  --tint-border: #c0e8e4; /* --color-tint-border */
  --tint-ink: #006b5f; /* --color-tint-ink: AA-safe teal for small text */
  --gold: #be730c; /* BrandMark cross */
  --ring: #008c7e; /* --color-ring */

  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 14px;
  --radius-button: 10px; /* candidate .btn */

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 1px 3px rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 60px rgb(0 0 0 / 0.12);

  --wrap: 1120px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* The app follows the OS theme by default (frontend/public/theme-init.js), so
   the site does too. Values from the app's [data-theme='dark'] base block. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --bg-subtle: #1d2126;
    --bg-warm: #121519;
    --surface: #1d2126;
    --fg: #f2f4f6;
    --fg-muted: #a8b0b8;
    --fg-subtle: #8f979f;
    --border: #2b3138;
    --ink: #2f363d; /* the app keeps the ink fill dark in dark */
    --ink-hover: #3d454e;
    --on-ink: #f2f4f6;
    --primary: #2dd4bf;
    --primary-hover: #7fe3d5;
    --primary-subtle: #0f2f2c;
    --on-primary: #06201d;
    --tint-border: #1f4a44;
    --tint-ink: #7fe3d5;
    --ring: #2dd4bf;
    --shadow-xl: 0 20px 60px rgb(0 0 0 / 0.45);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--tint-ink);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-lg);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 38px;
  height: 32px;
}

.brand .accent {
  color: var(--primary);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.15s,
    background-color 0.15s;
}

.site-nav a:hover {
  color: var(--fg);
  background: var(--bg-subtle);
}

.site-nav a[aria-current='page'] {
  color: var(--fg);
  font-weight: 600;
}

.site-nav .btn {
  color: var(--on-ink);
  margin-left: 4px;
}

.site-nav .btn:hover {
  color: var(--on-ink);
  background: var(--ink-hover);
}

@media (max-width: 640px) {
  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    justify-content: space-between;
  }

  .site-nav a {
    padding: 8px 6px;
    font-size: 0.88rem;
  }

  .nav-home {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-ui);
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    background-color 0.18s;
}

.btn:hover {
  background: var(--ink-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.btn .arrow {
  transition: transform 0.18s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.88rem;
}

.btn-teal {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn-teal:hover {
  background: var(--primary-deep);
}

@media (prefers-color-scheme: dark) {
  .btn-teal {
    background: var(--primary);
    color: var(--on-primary);
  }

  .btn-teal:hover {
    background: var(--primary-hover);
  }
}

.btn-outline {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--bg-subtle);
}

.btn-on-dark {
  background: #ffffff;
  color: #005249;
}

.btn-on-dark:hover {
  background: #e6f5f3;
  color: #005249;
}

.btn-ghost-on-dark {
  background: transparent;
  color: #ffffff;
  border-color: rgb(255 255 255 / 0.7);
}

.btn-ghost-on-dark:hover {
  background: rgb(255 255 255 / 0.06);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  background: var(--bg-warm);
}

.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  will-change: transform;
}

.orb-1 {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -80px;
  background: radial-gradient(circle, var(--primary-bright), transparent 70%);
  animation: drift 18s var(--ease) infinite alternate;
}

.orb-2 {
  width: 360px;
  height: 360px;
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  animation: drift 22s var(--ease) infinite alternate-reverse;
}

.orb-3 {
  width: 220px;
  height: 220px;
  top: 40%;
  left: 45%;
  background: radial-gradient(circle, var(--gold), transparent 70%);
  opacity: 0.14;
  animation: drift 26s var(--ease) infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(40px, 30px, 0) scale(1.12);
  }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 5px 12px;
  border: 1px solid var(--tint-border);
  border-radius: 999px;
  background: var(--primary-subtle);
  color: var(--tint-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 .accent,
.section-head .accent {
  color: var(--primary);
}

.lede {
  max-width: 34em;
  margin-bottom: 28px;
  color: var(--fg-muted);
  font-size: 1.15rem;
  line-height: 1.65;
}

.hero-note {
  margin: 18px 0 0;
  color: var(--fg-subtle);
  font-size: 0.88rem;
}

.hero-note a {
  font-weight: 600;
}

/* Entrance: staggered fade/slide. Pure CSS, runs once, content never hidden
   once finished (fill-mode both only covers the delay window). */
.enter {
  animation: rise 0.7s var(--ease) both;
}

.enter-1 {
  animation-delay: 0.05s;
}

.enter-2 {
  animation-delay: 0.15s;
}

.enter-3 {
  animation-delay: 0.25s;
}

.enter-4 {
  animation-delay: 0.35s;
}

.enter-5 {
  animation-delay: 0.45s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Hero visual: profile matched to studies ---------- */
.match-visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.1fr);
  align-items: center;
}

.mv-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
}

.mv-profile {
  animation: float 7s ease-in-out infinite;
}

.mv-profile img {
  width: 54px;
  height: 46px;
  margin-bottom: 10px;
}

.mv-label {
  margin: 0 0 10px;
  color: var(--fg-subtle);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mv-chips li {
  padding: 3px 9px;
  border: 1px solid var(--tint-border);
  border-radius: 999px;
  background: var(--primary-subtle);
  color: var(--tint-ink);
  font-size: 0.72rem;
  font-weight: 600;
}

.mv-lines {
  position: relative;
  height: 100%;
}

.mv-lines svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mv-lines path {
  stroke: var(--primary);
  stroke-width: 2;
  stroke-dasharray: 4 6;
  fill: none;
  opacity: 0.55;
}

.mv-lines circle {
  fill: var(--primary);
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s ease-in-out infinite;
}

.mv-lines circle:nth-of-type(2) {
  animation-delay: 0.8s;
}

.mv-lines circle:nth-of-type(3) {
  animation-delay: 1.6s;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.mv-studies {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mv-study {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  animation: float 8s ease-in-out infinite;
}

.mv-study:nth-child(2) {
  animation-delay: -2.6s;
  transform: translateX(14px);
}

.mv-study:nth-child(3) {
  animation-delay: -5.2s;
}

.mv-study strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.mv-study span {
  color: var(--fg-subtle);
  font-size: 0.75rem;
}

.pill {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.pill-match {
  background: var(--primary-subtle);
  color: var(--tint-ink);
}

.pill-screen {
  background: #fdf5e0;
  color: #915006;
}

.pill-apply {
  background: var(--ink);
  color: var(--on-ink);
}

@media (prefers-color-scheme: dark) {
  .pill-screen {
    background: #3a2c0c;
    color: #ffd866;
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
}

.section-tight {
  padding-top: 0;
}

.section-alt {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 44px;
}

.section-head p {
  color: var(--fg-muted);
  font-size: 1.08rem;
}

.kicker {
  margin: 0 0 10px;
  color: var(--tint-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* How it works: two tracks */
.tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.track {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
}

.track-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.track-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.track-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--primary-subtle);
  color: var(--tint-ink);
}

.steps {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

/* The rail grows down the list when the steps reveal (scaleY, not height). */
.steps::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 15px;
  width: 2px;
  background: var(--tint-border);
  transform-origin: top;
}

.js .steps.reveal::before {
  transform: scaleY(0);
  transition: transform 1.2s var(--ease) 0.2s;
}

.js .steps.reveal.is-visible::before {
  transform: scaleY(1);
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-hover);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
}

@media (prefers-color-scheme: dark) {
  .steps li::before {
    background: var(--primary);
    color: var(--on-primary);
  }
}

.steps h4 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

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

/* Capability cards */
.cards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    border-color 0.22s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--tint-border);
  box-shadow: var(--shadow-xl);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  background: var(--primary-subtle);
  color: var(--tint-ink);
  transition: transform 0.22s var(--ease);
}

.card:hover .card-icon {
  transform: rotate(-6deg) scale(1.06);
}

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

/* Privacy band */
.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.checklist {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  color: var(--fg-muted);
}

.checklist strong {
  color: var(--fg);
}

.check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--tint-ink);
}

/* Onboarding timeline (for-sites) */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.timeline li {
  position: relative;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  counter-increment: step;
}

.timeline li::before {
  content: 'Step ' counter(step);
  display: block;
  margin-bottom: 8px;
  color: var(--tint-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.93rem;
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 56px 48px;
  border-radius: var(--radius-2xl);
  /* Dark teal stops only: white text is >= 6.43:1 at the lightest stop (#006b5f). */
  background: linear-gradient(135deg, #004a42, #005249 55%, #006b5f);
  color: #ffffff;
}

.cta-band h2 {
  max-width: 22ch;
}

.cta-band p {
  max-width: 40rem;
  color: #ffffff;
  font-size: 1.08rem;
}

.cta-band .orb {
  background: radial-gradient(circle, rgb(255 255 255 / 0.3), transparent 70%);
  width: 320px;
  height: 320px;
  top: -120px;
  right: -60px;
  opacity: 0.35;
  animation: drift 16s var(--ease) infinite alternate;
}

.cta-band > :not(.orb) {
  position: relative;
}

/* Simple content pages (404) */
.page-hero {
  padding: 96px 0;
  text-align: center;
}

.page-hero .lede {
  margin-left: auto;
  margin-right: auto;
}

.page-hero .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 44px 0 36px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 26rem;
  margin: 10px 0 0;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.footer-legal {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--fg-subtle);
  font-size: 0.82rem;
}

/* ---------- Scroll reveal ----------
   Only active when site.js has added .js to <html>; without JS nothing is
   hidden. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .stagger > .reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.js .stagger > .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.js .stagger > .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

.js .stagger > .reveal:nth-child(5) {
  transition-delay: 0.32s;
}

.js .stagger > .reveal:nth-child(6) {
  transition-delay: 0.4s;
}

/* ---------- Draft banner (privacy/terms drafts only) ---------- */
.draft-banner {
  padding: 12px 20px;
  background: #fdf5e0;
  color: #915006;
  border-bottom: 1px solid #f0d9a0;
  font-weight: 700;
  text-align: center;
}

.legal {
  max-width: 46rem;
  padding: 56px 20px 88px;
  margin: 0 auto;
}

.legal h2 {
  margin-top: 2em;
  font-size: 1.4rem;
}

.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: #fdf5e0;
  color: #915006;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid,
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tracks,
  .cards,
  .timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding: 48px 0 64px;
  }

  .section {
    padding: 64px 0;
  }

  .cta-band {
    padding: 40px 24px;
  }

  .track {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .match-visual {
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.25fr);
  }

  .mv-card {
    padding: 12px;
  }

  .mv-study {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .mv-study:nth-child(2) {
    transform: none;
  }

  .cta-row .btn {
    width: 100%;
  }
}

/* Infinite loops pause while their section is off screen (site.js). */
.is-offscreen * {
  animation-play-state: paused !important;
}

@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Reduced motion: everything static, everything visible ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .js .steps.reveal::before {
    transform: none;
  }
}
