/* Layout: header, section rhythm, each section's composition, and motion states.
   Colors come from tokens.css only. Section order on the home page:
   hero (dark) > idea (cloud) > method (dark, sticky stage) > example (white) > program (cloud)
   > offers (white) > fit (cloud) > apply (cloud) > final call (dark) > footer (dark). */

/* Header: solid Midnight, hairline once scrolled. No blur. */
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.top.is-scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font: 700 1.0625rem/1 var(--font-head); font-stretch: 112%; letter-spacing: -0.02em; text-decoration: none; margin: 0; color: var(--ink); }
a.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-mark { width: 8px; height: 8px; border-radius: 2px; background: var(--blue); }
.nav { display: flex; align-items: center; gap: 28px; font-size: var(--fs-small); }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.nav-link:hover, .nav-link:focus-visible { color: var(--ink); }
@media (max-width: 720px) { .nav .nav-link--wide { display: none; } }
@media (max-width: 400px) { .nav { gap: 16px; } }

/* Section rhythm */
.sec { padding-block: var(--sec); }
.sec--white { background: var(--white); }
.sub, .body-copy { max-width: var(--measure); color: var(--ink-2); }
.sub { margin-top: 20px; }
.fine { margin-top: 32px; font-size: var(--fs-small); color: var(--muted); max-width: 72ch; }
.big { margin-bottom: 24px; font-size: var(--fs-lead); line-height: 1.5; font-weight: 600; color: var(--ink); max-width: 40ch; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--mark); }
.head-row { display: grid; gap: 20px; }
@media (min-width: 960px) { .head-row { grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; } .head-row .sub { margin-top: 0; } }
.split { display: grid; gap: 40px; }
@media (min-width: 960px) { .split { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.stack-head { max-width: 780px; }

/* 1. Hero */
.hero { position: relative; overflow: clip; padding-top: clamp(64px, 10vw, 136px); padding-bottom: clamp(88px, 11vw, 148px); }
.hero-grid { display: grid; gap: 56px; align-items: end; }
@media (min-width: 1040px) { .hero-grid { grid-template-columns: 7fr 5fr; gap: 72px; } }
.status { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; font-size: var(--fs-small); color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; }
.hero h1 .line { display: block; }
.hero h1 .line--accent { color: var(--ink); }
.lede { margin: 32px 0 40px; max-width: 40ch; font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.price-line { margin-top: 28px; color: var(--ink-2); font-size: var(--fs-small); }
.price-line .price { color: var(--ink); font-weight: 600; font-size: var(--fs-body); }
.price-alt { margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }
.hero-visual { display: grid; gap: 14px; }
.hero-cap { font-size: var(--fs-micro); color: var(--muted); }
/* A single hairline grid behind the hero. Static, no glow. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px; background-position: center top;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%); mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
}
.hero > .wrap { position: relative; }

/* 2. The idea */
.idea-title { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.03em; max-width: 16ch; }
.idea-body { margin-top: 28px; max-width: 52ch; font-size: var(--fs-lead); line-height: 1.55; }
.rules { list-style: none; margin: 72px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 860px) { .rules { grid-template-columns: repeat(3, 1fr); } }
.rules li { background: var(--bg); padding: 28px 28px 28px 0; display: grid; gap: 10px; }
@media (min-width: 860px) { .rules li + li { padding-left: 28px; } }
.rules .num { font: 400 var(--fs-micro)/1 var(--font-mono); color: var(--accent); }
.rules strong { font: 700 1.375rem/1.25 var(--font-head); font-stretch: 112%; letter-spacing: -0.015em; color: var(--ink); }

/* 3. Method: sticky stage on wide screens, a figure per step on narrow ones */
.method-head { max-width: 760px; }
.method-grid { display: grid; gap: 0; margin-top: 72px; }
@media (min-width: 960px) { .method-grid { grid-template-columns: 5fr 6fr; gap: 72px; } }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; gap: 14px; padding: 40px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .step { min-height: 72vh; align-content: center; padding: 48px 0; border: 0; } .step:last-child { border: 0; } }
.step-num { font: 400 var(--fs-micro)/1 var(--font-mono); color: var(--muted); transition: color var(--dur) var(--ease); }
.step h3 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.12; letter-spacing: -0.02em; }
.step p { max-width: 46ch; }
.step.is-active .step-num { color: var(--blue); }
@media (min-width: 960px) {
  .step { opacity: 0.5; transition: opacity 400ms var(--ease); }
  .step.is-active { opacity: 1; }
  .no-stage .step { opacity: 1; }
}
.step-fig { margin-top: 12px; }
@media (min-width: 960px) { .step-fig { display: none; } }
.stage { display: none; }
@media (min-width: 960px) {
  .stage { display: block; position: sticky; top: calc(64px + 6vh); height: min(78vh, 640px); align-self: start; margin-top: 6vh; }
}
.stage-card, .fig-card { position: relative; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.fig-card { height: auto; aspect-ratio: 4 / 3; }
.stage-card svg, .fig-card svg { width: 100%; height: 100%; }
.stage-label { position: absolute; left: 20px; bottom: 16px; font-size: var(--fs-micro); color: var(--muted); }
.stage-progress { position: absolute; right: 20px; bottom: 20px; display: flex; gap: 6px; }
.stage-progress span { width: 18px; height: 2px; background: var(--line-strong); transition: background-color var(--dur) var(--ease); }
.stage-progress span.on { background: var(--blue); }

/* Illustration layers. Each layer shows from its step on; data-step lives on the svg. */
.ill .layer { opacity: 0; transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
.ill .l-paper { opacity: 1; }
.ill[data-step="1"] .l-paper .ln { stroke: var(--blue); }
.ill[data-step="2"] .l-bal, .ill[data-step="3"] .l-bal, .ill[data-step="4"] .l-bal, .ill[data-step="5"] .l-bal,
.ill[data-step="2"] .l-path, .ill[data-step="3"] .l-path, .ill[data-step="4"] .l-path, .ill[data-step="5"] .l-path,
.ill[data-step="3"] .l-micro, .ill[data-step="4"] .l-micro, .ill[data-step="5"] .l-micro,
.ill[data-step="4"] .l-exec, .ill[data-step="5"] .l-exec,
.ill[data-step="5"] .l-review { opacity: 1; }
.ill[data-step="1"] .l-paper { opacity: 1; }
.ill:not([data-step="1"]) .l-paper { opacity: 0; }
.ill[data-step="5"] .l-path, .ill[data-step="5"] .l-bal, .ill[data-step="5"] .l-micro { opacity: 0.35; }
.ill .l-micro { transform: translateY(8px); }
.ill[data-step="3"] .l-micro, .ill[data-step="4"] .l-micro, .ill[data-step="5"] .l-micro { transform: none; }
.ill .s-line { stroke: var(--line-strong); }
.ill .s-ink { stroke: var(--ink-2); }
.ill .s-blue { stroke: var(--blue); }
.ill .f-bal { fill: var(--blue); fill-opacity: 0.08; stroke: var(--blue); stroke-opacity: 0.5; }
.ill .f-micro { fill: var(--ink); fill-opacity: 0.06; stroke: var(--ink-2); stroke-opacity: 0.6; }
.ill .f-edge { fill: var(--blue); fill-opacity: 0.16; stroke: var(--blue); }
.ill text { font-family: var(--font-mono); font-size: 13px; fill: var(--muted); }
.ill text.t-ink { fill: var(--ink); }
.ill text.t-blue { fill: var(--blue); }
.ill .path-draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1400ms var(--ease-out); }
.ill[data-step="2"] .path-draw, .ill[data-step="3"] .path-draw, .ill[data-step="4"] .path-draw, .ill[data-step="5"] .path-draw { stroke-dashoffset: 0; }

/* 4. A real morning */
.exhibit { margin: 56px 0 0; }
.mount { padding: clamp(8px, 1.2vw, 14px); overflow: hidden; }
.mount img { width: 100%; border-radius: 10px; background: var(--midnight); }
.museum { margin-top: 16px; font-size: var(--fs-small); color: var(--muted); }
.teach { margin-top: var(--sec); }

/* 5. Program */
.phases { list-style: none; margin: 64px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .phases { grid-template-columns: repeat(3, 1fr); } }
.phases li { display: flex; flex-direction: column; gap: 12px; }
.phase-top { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: var(--fs-small); }
.phase-top .num { font-family: var(--font-mono); color: var(--accent); }
.phases h3 { font-size: 1.875rem; margin-top: 8px; }
.cp { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink); }
.cp .label { display: block; color: var(--muted); font-size: var(--fs-small); margin-bottom: 4px; }
.week { margin-top: var(--sec); }
.timeline {
  list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 640px) { .timeline { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .timeline { grid-template-columns: repeat(3, 1fr); } }
.timeline li { display: flex; flex-direction: column; gap: 10px; padding: var(--card-pad); background: var(--surface); color: var(--ink-2); }
.timeline li.is-end { background: var(--midnight); color: #C9D0DB; }
.time { font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline li.is-end .time { color: var(--blue); }
.timeline strong { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 600; }
.timeline li.is-end strong { color: var(--white); }

/* 6. Offers */
.tier { margin-top: 72px; }
.tier-title { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.tier-meta { margin-top: 10px; color: var(--muted); max-width: 72ch; }
.group { margin-top: 28px; display: grid; gap: 32px; padding: 0; overflow: hidden; }
.group-copy { display: grid; gap: 14px; padding: var(--card-pad); }
.group-buy { display: grid; gap: 10px; justify-items: start; align-content: end; padding: var(--card-pad); }
@media (min-width: 900px) { .group { grid-template-columns: minmax(0, 1fr) 340px; gap: 0; } .group-buy { border-left: 1px solid var(--line); } }
.group-list strong, .terms strong { color: var(--ink); font-weight: 600; }
.group-fine { font-size: var(--fs-small); color: var(--muted); max-width: 62ch; }
.seats { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .seats { grid-template-columns: repeat(3, 1fr); } }
ul.terms { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; max-width: 72ch; font-size: var(--fs-small); color: var(--ink-2); }
.seat-note { font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.faq { margin-top: 28px; display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; color: var(--ink); font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.25em; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; color: var(--ink-2); max-width: 72ch; }

/* 7. Fit */
.fit { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 720px) { .fit { grid-template-columns: 1fr 1fr; } }
.fit h3 { margin-bottom: 8px; }

/* 8. Apply */
.apply-grid { display: grid; gap: 48px; }
@media (min-width: 1000px) { .apply-grid { grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; } .apply-head { position: sticky; top: 112px; } }
.apply-alt { margin-top: 12px; }

/* 9. Final call */
.final { text-align: center; }
.final h2 { font-size: var(--fs-display); max-width: 18ch; margin-inline: auto; }
.final .sub { margin-inline: auto; }
.final .actions { justify-content: center; margin-top: 40px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 56px; }
.foot-grid { display: grid; gap: 20px; font-size: var(--fs-small); color: var(--muted); }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 2fr 7fr 3fr; gap: 48px; align-items: start; } }
.foot-legal { max-width: 70ch; line-height: 1.6; }
@media (min-width: 900px) { .foot-copy { text-align: right; } }

/* Motion. Only when JS is on and the visitor hasn't asked for less motion (motion.js adds .motion).
   Content is never hidden without it, and every reveal finishes on its own. */
@media (prefers-reduced-motion: no-preference) {
  .motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .motion [data-reveal].is-in { opacity: 1; transform: none; }
  .motion .hero [data-enter] { opacity: 0; transform: translateY(24px); animation: enter 1000ms var(--ease-out) forwards; animation-delay: calc(120ms + var(--i, 0) * 110ms); }
  .motion .hero .hero-visual[data-enter] { transform: translateY(40px) scale(0.98); animation-duration: 1300ms; }
  .motion .hero-visual .plan { will-change: transform; }
  @supports (animation-timeline: view()) {
    .motion .mount img { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  }
}
@keyframes enter { to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .ill .layer, .ill .path-draw, .step { transition: none !important; }
  .ill .path-draw { stroke-dashoffset: 0; }
}
