/* Homepage sequence. The default rules are the full static layout; .motion adds the pinned versions. */
.stick { position: relative; }
.motion .m-hero .stick, .motion .m-signal .stick, .motion .m-turn .stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* 1. The mark assembles */
.m-hero .stick { display: grid; align-items: center; padding-block: clamp(32px, 6vw, 72px); }
.motion .m-hero { height: 240vh; }
.motion .m-hero .stick { padding-block: calc(var(--header-h) + 12px) 24px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy .lede { margin-top: 22px; max-width: 44ch; }
.hero-copy .actions { margin-top: 28px; }
.hero-stage { display: grid; justify-items: center; gap: 18px; }
.hero-mark { width: min(100%, 62vh); height: auto; overflow: visible; }
.hero-caps { position: relative; display: grid; justify-items: center; text-align: center; min-height: 2.9em; width: 100%; }
.hero-caps > * { grid-area: 1 / 1; max-width: 38ch; }
[data-cap-apart] { display: none; }
.motion [data-cap-apart] { display: block; }
.motion:not(.motion-live) #hero-bar { transform: translateX(-22px); }
.motion:not(.motion-live) #hero-ring { transform: translate(14px, 22px); }
.motion:not(.motion-live) [data-cap-seated] { visibility: hidden; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .motion .m-hero .stick { align-items: start; padding-top: calc(var(--header-h) + 16px); }
  .hero-mark { width: min(62vw, 34svh); }
  .hero-copy .lede { margin-top: 14px; }
  .hero-copy .actions { margin-top: 18px; }
}
@media (max-height: 700px) and (min-width: 861px) { .hero-mark { width: min(100%, 52vh); } }

/* 2. From two numbers to a signal */
.m-signal .stick { display: flex; flex-direction: column; justify-content: center; gap: clamp(16px, 3vh, 36px); padding-block: clamp(56px, 8vw, 96px); }
.motion .m-signal { height: 320vh; }
.motion .m-signal .stick { padding-block: calc(var(--header-h) + 16px) 24px; }
.claims { display: grid; }
.claims > * { grid-area: 1 / 1; }
.claims h2 { max-width: 20ch; }
.claims p { margin-top: 12px; max-width: 54ch; }
.trial-block { display: grid; gap: 6px; width: max-content; max-width: 100%; }
.trial-card { display: flex; gap: clamp(24px, 5vw, 72px); margin: 0; }
.trial-card dt { color: var(--psyon-mist); font: 400 var(--step-1)/1.4 var(--mono); }
.trial-card dd { margin: 0; font: 500 clamp(2rem, 1.2rem + 3vw, 3.75rem)/1.1 var(--mono); }
.trial-wrap { display: grid; gap: 8px; }
.plot { width: 100%; }
.plot svg { width: 100%; height: min(36svh, 400px); overflow: visible; }
.plot .wave { fill: none; stroke: var(--psyon-vermilion); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plot .axis { stroke: #2B5A65; stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot .event { stroke: var(--psyon-mist); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.plot-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 24px; color: var(--psyon-mist); }
@media (max-width: 860px) { .plot svg { height: 24svh; } }
@media (max-height: 720px) { .motion .m-signal h2 { font-size: var(--step2); } .motion .trial-card dd { font-size: 2rem; } }
.motion:not(.motion-live) [data-claim-full] { visibility: hidden; }
.m-signal [data-claim-full] { margin-top: 0; }
html:not(.motion) .claims > * { grid-area: auto; }
html:not(.motion) .claims { gap: 32px; }

/* 3. Turn to match */
.m-turn .stick { display: flex; align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.motion .m-turn { height: 340vh; }
.motion .m-turn .stick { padding-block: calc(var(--header-h) + 12px) 16px; }
.turn-head { margin-bottom: clamp(16px, 2.4vh, 32px); }
.turn-head h2 { max-width: 16ch; }
.turn-head p { margin-top: 10px; max-width: 58ch; }
.turn-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(16px, 3vw, 40px); align-items: stretch; }
.panel-plate { position: relative; margin: 0; background: var(--plate); border-radius: var(--radius); overflow: hidden; }
.panel-plate .panel-base { width: 100%; }
.panel-knob { position: absolute; left: calc(71.4375% - 16.1875%); top: calc(55.856% - 23.335%); width: 32.375%; height: auto; will-change: transform; }
.screen { position: relative; display: grid; gap: 12px; padding: clamp(12px, 2vw, 24px); background: var(--psyon-petrol); color: #fff; border-radius: var(--radius); }
.pane-title { color: var(--psyon-mist); }
.pane-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pane-figures figure { margin: 0; }
.pane-figures svg { width: 100%; height: auto; max-height: 30svh; }
.pane-figures polygon { stroke: var(--psyon-petrol); stroke-width: 1.2; stroke-linejoin: round; }
.readout { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.readout strong { font: 500 var(--step1) var(--mono); }
.pane-letter-stage { display: grid; place-items: center; min-height: 160px; }
.pane-letter-stage img { width: clamp(64px, 15vh, 130px); will-change: transform; }
html:not(.motion) .screen-panes { display: grid; gap: 24px; }
.motion .screen-panes { display: grid; }
.motion .screen-panes > * { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; }
.motion .pane-letter-stage { flex: 1; min-height: 0; }
.motion:not(.motion-live) [data-pane-letter] { visibility: hidden; }
.turn-slider { margin-top: 18px; }
.turn-slider label { display: block; font-weight: 600; margin-bottom: 6px; }
.turn-slider input { width: 100%; min-height: 32px; accent-color: var(--psyon-petrol); }
@media (max-width: 860px) {
  .turn-grid { grid-template-columns: minmax(0, 1fr); }
  .turn-grid .screen { order: -1; }
  .motion .m-turn .stick { align-items: flex-start; }
  .motion .panel-plate { max-width: min(100%, 44svh); margin-inline: auto; }
  .motion .pane-figures svg { max-height: 19svh; }
  .motion .pane-letter-stage { min-height: 19svh; }
  .motion .turn-head p { display: none; }
  .motion .turn-head h2 { font-size: var(--step2); }
}
@media (max-height: 760px) and (min-width: 861px) {
  .motion .turn-head p { display: none; }
  .motion .turn-head h2 { font-size: var(--step2); }
  .motion .panel-plate { max-width: 58vh; }
  .motion .pane-figures svg { max-height: 24svh; }
}

/* 4. Three instruments */
.m-rail { background: #fff; }
.rail-head { padding-block: clamp(56px, 8vw, 96px) 24px; }
.rail-head p { margin-top: 12px; max-width: 54ch; }
.rail-track { display: grid; gap: clamp(32px, 6vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.rail-panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
.rail-panel h3 { font-size: var(--step3); line-height: 1.06; letter-spacing: -0.022em; }
.rail-panel .lede { margin-block: 12px 18px; }
.rail-panel .facts { margin-bottom: 18px; }
.rail-link { font-weight: 600; }
@media (max-width: 899px) { .rail-panel { grid-template-columns: minmax(0, 1fr); } }
.rail-live .m-rail .stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; display: flex; flex-direction: column; justify-content: center; padding-top: var(--header-h); }
.rail-live .rail-head { padding-block: 8px 12px; padding-inline: var(--gutter); max-width: none; }
.rail-live .rail-head p { display: none; }
.rail-live .rail-head h2 { font-size: var(--step2); }
.rail-live .rail-track { display: flex; flex-wrap: nowrap; width: max-content; gap: 0; padding: 0 var(--gutter) 12px; max-width: none; margin: 0; will-change: transform; }
.rail-live .rail-panel { width: calc(100vw - 2 * var(--gutter) - 72px); flex: none; padding-right: clamp(32px, 5vw, 80px); max-height: calc(100svh - var(--header-h) - 96px); }
.rail-live .rail-panel:last-child { padding-right: 0; width: calc(100vw - 2 * var(--gutter) - 72px - clamp(32px, 5vw, 80px)); }
.rail-live .rail-panel .plate { max-height: calc(100svh - var(--header-h) - 112px); }
.rail-live .rail-panel .plate img { max-height: calc(100svh - var(--header-h) - 112px); object-fit: cover; }
@media (max-height: 720px) { .rail-live .rail-panel .facts > div { padding-block: 7px; } .rail-live .rail-panel h3 { font-size: var(--step2); } .rail-live .rail-panel .lede { font-size: 1rem; } }

/* 5. Run, capture, export */
.m-stack { padding-block: clamp(56px, 8vw, 96px); }
.stack-head { margin-bottom: clamp(24px, 3vw, 40px); }
.stack-head p { margin-top: 12px; max-width: 54ch; }
.stack { display: grid; gap: 20px; }
.stack-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); align-items: center; min-height: min(68svh, 620px); padding: clamp(20px, 4vw, 56px); border-radius: var(--radius); background: #fff; box-shadow: 0 -1px 0 var(--psyon-mist); }
.stack-panel:nth-child(2) { background: var(--psyon-mist); }
.stack-panel:nth-child(3) { background: var(--psyon-petrol); color: #fff; }
.stack-num { display: block; font: 500 var(--step1)/1 var(--mono); margin-bottom: 14px; }
.stack-panel h3 { font-size: var(--step3); line-height: 1.06; letter-spacing: -0.022em; }
.stack-panel p { margin-top: 12px; max-width: 42ch; }
@media (prefers-reduced-motion: no-preference) {
  .stack-panel { position: sticky; top: calc(var(--header-h) + 16px); }
  .stack-panel:nth-child(2) { top: calc(var(--header-h) + 40px); }
  .stack-panel:nth-child(3) { top: calc(var(--header-h) + 64px); }
}
@media (max-width: 860px) {
  .stack-panel { grid-template-columns: minmax(0, 1fr); min-height: 0; align-items: start; }
  .stack-panel { position: static !important; }
}
.run-mock { display: grid; gap: 10px; padding: 16px; background: var(--psyon-paper); border-radius: var(--radius); }
.run-mock ol { display: grid; gap: 8px; counter-reset: r; }
.run-mock li { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-top: 1px solid var(--psyon-mist); }
.live { display: grid; gap: 14px; }
.live svg { width: 100%; height: auto; }
.live path { fill: none; stroke: var(--psyon-petrol); stroke-width: 2; vector-effect: non-scaling-stroke; }
.live .accent { stroke: var(--psyon-vermilion); stroke-width: 2.5; }
.live-row { display: grid; gap: 2px; }
.live-note { color: var(--psyon-petrol); }
.export-wrap { min-width: 0; }
.export-table { width: 100%; border-collapse: collapse; font: 400 0.8125rem/1.4 var(--mono); }
.export-table th, .export-table td { padding: 7px 10px 7px 0; text-align: left; border-top: 1px solid #2B5A65; white-space: nowrap; }
.export-table th { color: var(--psyon-mist); font-weight: 400; border-top: 0; }
.export-scroll { overflow-x: auto; }
.export-targets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.export-targets li { padding: 8px 16px; background: #fff; color: var(--psyon-petrol); font: 500 1rem var(--mono); border-radius: 2px; }

/* 6. Roadmap and call to action */
.m-road { background: #fff; padding-block: clamp(56px, 8vw, 112px); }
.road-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.road-head { position: sticky; top: calc(var(--header-h) + 32px); }
.road-head p { margin-top: 12px; max-width: 40ch; }
.road-box { position: relative; }
.road { display: grid; gap: clamp(28px, 4vh, 48px); padding-left: 40px; }
.road-rail, .road-line { position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px; }
.road-rail { background: var(--psyon-mist); }
.road-line { width: 3px; left: 8.5px; background: var(--psyon-vermilion); }
.road li { position: relative; }
.road li::before { content: ""; position: absolute; left: -40px; top: 7px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--psyon-vermilion); background: #fff; }
.road li.is-here::before { background: var(--psyon-vermilion); }
.road h3 { font-size: var(--step2); }
.road .here { display: inline-block; margin-left: 10px; vertical-align: middle; }
.road p { margin-top: 6px; max-width: 52ch; }
html:not(.motion) .road-line { display: block; }
@media (max-width: 860px) { .road-grid { grid-template-columns: minmax(0, 1fr); } .road-head { position: static; } }
.m-cta { padding-block: clamp(64px, 10vw, 136px) clamp(40px, 6vw, 72px); }
.m-cta h2 { max-width: 18ch; }
.m-cta p { margin-top: 16px; max-width: 48ch; }
.m-cta .actions { margin-top: 28px; }

/* Small phones: keep the pinned frames within the screen. */
@media (max-width: 860px) and (max-height: 760px) {
  .motion .m-hero h1 { font-size: clamp(1.75rem, 8.6vw, 2.25rem); }
  .motion .hero-copy .lede { font-size: 1rem; line-height: 1.38; margin-top: 8px; }
  .motion .hero-copy .actions { margin-top: 12px; gap: 8px; }
  .motion .hero-copy .btn { min-height: 44px; padding: 8px 12px; font-size: 0.9375rem; }
  .motion .hero-mark { width: min(44vw, 21svh); }
  .motion .hero-grid { gap: 10px; }
  .motion .hero-stage { gap: 6px; }
  .motion .m-signal h2 { font-size: var(--step2); }
  .motion .m-signal .claims p { font-size: 1rem; line-height: 1.4; margin-top: 8px; }
  .motion .plot svg { height: 17svh; }
  .motion .m-signal .stick { gap: 10px; }
}
