/* ═══════════════════════════════════════════════════════════════════════════
   RXAuthorized — site styles
   Tokens first; everything else derives from them.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --accent: #F603FF;
  --accent-deep: #C400CC;
  --navy: #00183F;
  --navy-2: #061F4F;
  --ink: #1A1A1A;
  --ink-2: #4A4F5C;
  --paper: #F7F7FA;
  --paper-2: #EEEFF5;
  --white: #FFFFFF;
  --line: rgba(0,24,63,0.10);

  --font-display: 'Outfit', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --travel: 800vh;             /* set from JS (STAGE.travelVh) */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 4.3vw, 3.7rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h1 em { font-style: normal; color: var(--accent); }
p { margin: 0 0 1em; }
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ── skip links ─────────────────────────────────────────────────────────── */
.skiplink { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--white); color: var(--navy); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skiplink:focus { top: 16px; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1.5px solid transparent; transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--accent { background: var(--accent); color: var(--white); box-shadow: 0 10px 30px -10px rgba(246,3,255,0.55); }
.btn--accent:hover { background: var(--accent-deep); }
.btn--ghost { background: rgba(255,255,255,0.06); color: var(--white); border-color: rgba(255,255,255,0.28); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); }
.btn--lg { padding: 18px 34px; font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; }

/* ── eyebrow / step labels ───────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.72); margin-bottom: 1.1rem;
}
.eyebrow--dark { color: var(--ink-2); }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(246,3,255,0.22); }
.eyebrow--after { margin: 1.4rem 0 0; }
.stepnum {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--white); font-weight: 700; font-size: 0.85rem; letter-spacing: 0;
}

/* ── nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 88px;
  display: flex; align-items: center; gap: 24px; padding-inline: var(--gutter);
  color: var(--white); transition: background .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled { background: rgba(0,24,63,0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }
.nav__logo { display: block; padding: 22px 12px; position: relative; }
.nav__logo img { width: 118px; height: auto; }
.nav__links { display: flex; gap: 28px; margin-left: auto; font-weight: 500; font-size: 0.95rem; }
.nav__links a { opacity: 0.85; } .nav__links a:hover { opacity: 1; }
.nav__cta { padding: 11px 20px; }
@media (max-width: 760px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }

/* ── scroll story stage ──────────────────────────────────────────────────── */
.story {
  position: relative; height: calc(100vh + var(--travel)); height: calc(100svh + var(--travel));
  background: var(--navy);
}
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background:
    radial-gradient(60% 55% at 72% 45%, rgba(246,3,255,0.16), transparent 70%),
    radial-gradient(70% 60% at 20% 90%, rgba(30,70,160,0.35), transparent 70%),
    linear-gradient(180deg, #051A45 0%, var(--navy) 60%, #000E28 100%);
  color: var(--white);
}
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s ease; }
.stage__canvas.is-ready { opacity: 1; }
.stage__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.chapters { position: absolute; inset: 0; pointer-events: none; }
.chapter {
  position: absolute; top: 50%; transform: translateY(0); width: min(46%, 560px);
  padding-inline: var(--gutter); pointer-events: auto;
  opacity: 0; visibility: hidden; will-change: opacity, transform;
  translate: 0 -50%;
}
.chapter[data-side="left"]  { left: 3.5%; }
.chapter[data-side="right"] { right: 6.5%; }
.chapter .lede { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: rgba(255,255,255,0.78); max-width: 46ch; }
/* hero: wider column, heading on exactly two lines (the capsule is scaled down for this beat in scene.js) */
.chapter--hero { width: min(68%, 1000px); }
.chapter--hero h1 { font-size: clamp(2rem, 4vw, 4.1rem); letter-spacing: -0.02em; }
.chapter--hero h1 .line { display: block; white-space: nowrap; }
.chapter h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.scrollhint { margin-top: 2.2rem; font-size: 0.85rem; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; }
.scrollhint span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0) } 50% { transform: translateY(4px) } }

.progress { position: absolute; right: 22px; top: 50%; translate: 0 -50%; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.progress__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.28); transition: background .3s, transform .3s; }
.progress__dot.is-active { background: var(--accent); transform: scale(1.35); box-shadow: 0 0 0 4px rgba(246,3,255,0.25); }
.skipstory { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; font-size: 0.8rem; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; }
.skipstory:hover { color: var(--white); }

/* stacked layout: subject up top, copy at the bottom */
@media (max-aspect-ratio: 1/1) {
  .chapter, .chapter[data-side="left"], .chapter[data-side="right"] {
    left: 0; right: 0; top: auto; bottom: 0; translate: 0 0; width: 100%;
    padding: 30vh var(--gutter) 64px;
    background: linear-gradient(180deg, rgba(0,24,63,0) 0%, rgba(0,24,63,0.85) 38%, rgba(0,24,63,0.95) 100%);
  }
  .chapter h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); letter-spacing: -0.015em; }
  .chapter--hero h1 .line { display: inline; white-space: normal; }
  .chapter h2 { font-size: clamp(1.7rem, 7.5vw, 2.4rem); }
  .chapter .lede { font-size: 1rem; }
  .scrollhint { display: none; }
  .eyebrow--after { margin-top: 1rem; }
  .progress { right: 14px; top: 42%; }
}

/* ── static / reduced-motion mode: no pin, chapters flow ─────────────────── */
body.is-static .story { height: auto; }
body.is-static .stage { position: relative; height: auto; min-height: 0; overflow: visible; padding-top: 88px; }
body.is-static .stage__poster { position: relative; inset: auto; height: min(70vh, 640px); }
body.is-static .chapters { position: relative; inset: auto; pointer-events: auto; display: grid; gap: 8px; padding-block: 24px 48px; }
body.is-static .chapter, body.is-static .chapter[data-side="right"] {
  position: relative; top: auto; bottom: auto; left: auto; right: auto; translate: 0 0; width: min(760px, 100%);
  margin-inline: auto; opacity: 1 !important; visibility: visible !important; transform: none !important; background: none; padding: 28px var(--gutter);
}
body.is-static .progress, body.is-static .skipstory, body.is-static .scrollhint { display: none; }

/* ── generic sections ────────────────────────────────────────────────────── */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section--light { background: var(--paper); }
.section--care { background: var(--white); }
.section--dark { background: var(--navy); color: var(--white); }
.section--cta { background: var(--paper-2); }
.section__title { max-width: 22ch; }
.section--dark .section__title { color: var(--white); }

/* treatments */
.cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 860px; }
.card {
  display: grid; grid-template-columns: 220px 1fr; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -30px rgba(0,24,63,0.35); }
.card__art { display: grid; place-items: center; background: linear-gradient(160deg, #061F4F, var(--navy)); padding: 32px; }
.card__body { padding: 30px 30px 28px; }
.card__kicker { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; margin-bottom: 8px; }
.card__meta { color: var(--ink-2); font-size: 0.9rem; }
.card__link { color: var(--accent-deep); font-weight: 600; }
@media (max-width: 560px) { .card { grid-template-columns: 1fr; } .card__art { padding: 26px; } }

/* CSS pill (matches the 3D capsule finish) */
.pill { position: relative; display: block; width: 156px; height: 56px; border-radius: 999px; rotate: -18deg;
  background: linear-gradient(90deg, var(--accent) 0 50%, #F6F4F9 50% 100%); box-shadow: inset 0 -8px 14px rgba(0,0,0,0.18), inset 0 8px 14px rgba(255,255,255,0.35), 0 18px 30px -12px rgba(0,0,0,0.6); }
.pill img { position: absolute; right: 16px; top: 50%; translate: 0 -50%; width: 50px; }
.pill > span { position: absolute; inset: 6px 50% 40% 10px; border-radius: 999px; background: rgba(255,255,255,0.32); filter: blur(3px); }

/* care & integrity */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split__copy p { color: var(--ink-2); max-width: 58ch; }
.split__media { position: relative; min-height: 420px; }
.photo { margin: 0; position: absolute; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,24,63,0.5); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--a { width: 66%; aspect-ratio: 3/2; left: 0; top: 0; }
.photo--b { width: 56%; aspect-ratio: 3/2; right: 0; bottom: 0; outline: 6px solid var(--white); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split__media { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .photo { position: static; width: auto; outline: none; }
}

/* why */
.why { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.why li { padding: 26px 24px; border-radius: 18px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); }
.why__icon { display: inline-block; font-family: var(--font-display); font-weight: 600; color: var(--accent); font-size: 0.9rem; letter-spacing: 0.1em; margin-bottom: 14px; }
.why h3 { font-size: 1.15rem; margin: 0; }

/* cta */
.cta { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.cta__copy p { color: var(--ink-2); max-width: 52ch; }
.cta__photo { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 5/4; box-shadow: 0 30px 60px -30px rgba(0,24,63,0.5); }
.cta__photo img { width: 100%; height: 100%; object-fit: cover; }
.fineprint { font-size: 0.85rem; color: var(--ink-2); margin-top: 1.2rem; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } }

/* footer */
.footer { background: #000E28; color: rgba(255,255,255,0.8); padding-block: 64px 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 32px; }
.footer__brand img { width: 160px; margin-bottom: 14px; }
.footer__brand p { color: rgba(255,255,255,0.55); max-width: 30ch; }
.footer__col { display: grid; gap: 8px; align-content: start; }
.footer__col h4 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.footer__col a:hover { color: var(--white); }
.footer__seal img { width: 90px; }
.footer__legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.82rem; color: rgba(255,255,255,0.45); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .scrollhint span { animation: none; } .btn { transition: none; } }
