/* ==========================================================================
   GESDA — Anticipatory Leadership Labs · this page's sections
   §0: surface class A (landing page); light theme with a dark hero and one
   dark band; no analytical claim, so §3.3, §10.8 and §15 are not binding.
   The table figure still follows §10.8: labels are HTML, and it
   recomposes at narrow widths rather than scale.

   One mechanism per section (§11.2), in page order; the last three before
   the FAQ follow games_page/v2 (numbers, voices, the dark band):
     hero        photographs, cross-fading
     #why        the window of anticipation (one vertical timeline)
     #table      the table figure
     #partners   what participants learn, a list beside the Davos recording
     #numbers    the facts (styles.css)
     #proof      the voices (styles.css)
     #lab        one offer card (styles.css)
     #faq        accordion (styles.css)
   Bands: dark hero · canvas · tinted · canvas · tinted · canvas · dark ·
   canvas (lift) · dark footer.
   No two alike back to back.
   ========================================================================== */

/* ---------------------------------------------------------------- hero -- */

/* The photographs stack in one frame and cross-fade (script.js), with the
   experiences page's timing: 2s fade. Each caption fades with its photograph. */
.hero__media { --hero-fade: 2s; display: flex; flex-direction: column; gap: var(--space-3); }
.hero__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline-on-dark);
}
.hero__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity var(--hero-fade) ease-in-out;
}
.hero__captions { display: grid; }
.hero__caption {
  grid-area: 1 / 1;
  font: 400 var(--type-caption)/1.45 var(--font-display); color: var(--purple-300);
  opacity: 0;
  transition: opacity var(--hero-fade) ease-in-out;
}
.hero__photo.is-on, .hero__caption.is-on { opacity: 1; }

/* While script.js sets a figure's start state (#why, #table): no transition,
   so the figure never plays backwards from the finished state in the HTML. */
.is-arming, .is-arming *, .is-arming *::before, .is-arming *::after { transition: none !important; }

/* ---------------------------------------------------------------- #why -- */
/* The window of anticipation, on the band itself: no panel. Two columns over
   five equal rows, with "Future" above the rail and "Present" below it. On the
   right, the two stretches of the rail, named and bracketed; on the left, a
   process rail (§10.8) with ring nodes and HTML labels to its left, its nodes at 10, 30,
   50, 70 and 90% of the course. The future is at the top, so the steps light
   up in the direction of the scroll. Nothing moves along the rail.

   script.js writes, from the page's scroll: .is-active on the step reached,
   the four before today each lit for an equal share of the scroll from when
   the course comes into view to when the figure's top is 15% of the screen
   under the header, today at its end; .is-past on the steps above it,
   whose titles grey out once passed, as if undone; .is-shaping from the breakthrough on; .is-today the first
   time today is reached, which draws the green window, types its line and
   shows the definition, once: they then stay;
   .is-armed once it runs, so the window and the definition wait until today.
   The defaults in the HTML are
   the final state, for no JS and reduced motion (§8.3). Scroll drives it, so
   nothing auto-plays (§8.1). Purple for the step reached, green for today and
   the window, as the framework wheel's learning quadrant ({p3.green} fill,
   {p3.green-deep} text); orange ({signal.pressure}) for reacting's bracket.

   Recorded exception, flagged for the §19 review, as games_page/v2's window
   figure: §3.7 / §16 "no gradients on diagrams". The rail is tapered and
   swept purple-700 → p3-green like the games' time axis, full weight at the
   future, thin at today; both ends clear 3:1 on white. */
.window {
  --window-draw: 900ms cubic-bezier(0.65, 0, 0.35, 1);   /* the outline drawing itself */
  --window-gap: 200ms;   /* the handoff between two steps: none lit, the orange line grey */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  grid-template-rows: auto repeat(5, minmax(6.5rem, 1fr)) auto;
  column-gap: var(--space-4);
  width: 100%; max-width: 38rem; justify-self: end;
  color: var(--body);
}

/* The axis titles, centred on the rail: set at the column's end, then moved
   right by half their width less the rail's 8px inset */
.window__axis {
  grid-column: 1; justify-self: end;
  transform: translateX(calc(50% - 8px));
  font: 600 var(--type-h2)/1.2 var(--font-accent);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); text-align: center;
}
.window__axis--future { grid-row: 1; padding-bottom: var(--space-6); }
.window__axis--present { grid-row: 7; padding-top: var(--space-3); }

.window__course { position: relative; grid-column: 1; grid-row: 2 / 7; display: flex; }

/* The rail, tapered from 10px at the future to 2px at today, centred on the
   nodes (8px in from the right); its top is pointed, to run into the head's apex */
.window__course::before {
  content: ""; position: absolute; right: 3px; top: -8px; bottom: 0;
  width: 10px;
  background: linear-gradient(to bottom, var(--purple-700), var(--p3-green));
  clip-path: polygon(50% 0, 100% 5px, 60% 100%, 40% 100%, 0 5px);
}
/* Its head, pointing to the future: an open chevron with round ends, as the
   games' backcasting arrow */
.window__head {
  position: absolute; right: -6px; top: -11px;
  width: 28px; height: 16px; overflow: visible;
  fill: none; stroke: var(--purple-700); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
}

.window__stages { flex: 1; display: grid; grid-auto-rows: 1fr; }
/* Each step two columns: its cue in a fixed one at the left, the same in
   every row, so the cues line up; its title right-aligned to the rail */
.window__stages li {
  position: relative;
  display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: center;
  column-gap: var(--space-8);   /* clears the title reached, grown 15% towards it */
  padding: var(--space-2) 2.25rem var(--space-2) 0;
  font: 600 var(--type-label)/1.3 var(--font-display); color: var(--muted);
  text-align: right;
  transition: color var(--motion-fast);
}
.window__stages li::after {
  content: ""; position: absolute; right: 0; top: 50%; margin-top: -8px;
  width: 16px; height: 16px;
  background: var(--canvas);
  border: 2px solid var(--purple-300);
  border-radius: var(--radius-full);
  transition: background-color var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
}
/* The steps passed: their titles grey out, as if undone, their nodes in
   place; the steps ahead stay solid until reached */
.window__step {
  grid-area: 1 / 2; justify-self: end;
  transform-origin: right center;
  transition: opacity var(--motion-medium), transform var(--motion-medium);
}
.window__stages li.is-past .window__step { opacity: 0.2; }
/* The title of the step reached grows a little, from its node's side:
   transform only, so the rows never reflow (§8.1) */
.window__stages li.is-active .window__step { transform: scale(1.15); }
/* The step reached */
.window__stages li.is-active { color: var(--action); }
.window__stages li.is-active::after { background: var(--action); border-color: var(--action); transform: scale(1.25); }
.window__stages li:last-child.is-active { color: var(--p3-green-deep); }
.window__stages li:last-child.is-active::after { background: var(--p3-green); border-color: var(--p3-green); }
/* The step left goes out at once; the next lights only after the handoff gap,
   while the orange line is grey (a delay on entering .is-active only) */
.window__stages li.is-active,
.window__stages li.is-active::after,
.window__stages li.is-active .window__step { transition-delay: var(--window-gap); }
/* The cues: "Too late to decide" by each step above the window, in
   {signal.consequence}; "Last call to decide" by the breakthrough, in
   {signal.pressure}; "Time to decide" by today, in the window's green. Out of
   sight until its step is reached, then there at once, as the step lights, a
   firm statement on it: no motion, no fade, its place in the column fixed;
   gone at once when the step is left (opacity only, its space held, §8.1) */
.window__cue {
  grid-area: 1 / 1; justify-self: start; text-align: left;
  font: 600 var(--type-caption)/1.3 var(--font-display);
  color: var(--signal-consequence);
  opacity: 0;
}
.window__cue--last { color: var(--color-warning); }
.window__cue--now { color: var(--p3-green-deep); }
.window__stages li.is-active .window__cue {
  opacity: 1;
  transition: opacity 0s var(--window-gap);
}

/* The window itself: today and the breakthrough, the foot two rows, its line
   level with today, at the left. Its dashed outline is an SVG rect seen
   through a mask, a solid stroke on the same path; the mask's dash runs out
   along the path, so the dashed line draws itself, as games_page/v2's
   backcasting arrow (stroke-dashoffset). Unarmed, it is drawn whole. */
.window__open {
  position: absolute; bottom: 0; right: calc(-1 * var(--space-2));
  width: calc(100% + var(--space-2) * 2); height: 40%;
}
.window__outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.window__dash { fill: none; stroke: var(--p3-green); stroke-width: 2; stroke-dasharray: 6 5; }
/* Mask luminance, not a colour: white shows the dashes through */
.window__draw {
  fill: none; stroke: white; stroke-width: 6;
  stroke-dasharray: 1 2; stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--motion-medium);
}
.window.is-armed:not(.is-today) .window__draw { stroke-dashoffset: 1; }
.window.is-armed.is-today .window__draw { transition: stroke-dashoffset var(--window-draw); }

/* Under today's cue, in the cues' column, its words running on: "Time to
   decide / early enough to shape". 75% is today's node, in the window's
   height. */
.window__say {
  position: absolute; left: var(--space-2); top: 75%; margin-top: var(--space-3);
  font: 600 var(--type-caption)/1.3 var(--font-display); color: var(--p3-green-deep);
  white-space: nowrap;
}
/* Typed lines (this one), by script.js: one letter
   at a time, the caret after the last one typed. The letters are in place
   from the start (opacity only, §8.1), so a line never reflows as it types. */
[data-letter] { position: relative; opacity: 0; }
[data-letter].is-typed { opacity: 1; }
[data-letter].is-caret::after {
  content: ""; position: absolute; right: -3px; top: 0.1em; bottom: 0.05em;
  width: 2px; background: currentColor;
}

/* The two halves of the H2, each bracketing its stretch of the rail: reacting
   the three steps above the window, shaping the window. */
.window__zone {
  padding-left: var(--space-4);
  border-left: 2px solid var(--hairline);
  font: 400 var(--type-body-sm)/1.55 var(--font-display);
  transition: border-color var(--motion-fast);
}
.window__zone--react { grid-column: 2; grid-row: 2 / 5; margin-bottom: var(--space-2); }
.window__zone--shape { grid-column: 2; grid-row: 5 / 7; margin-top: var(--space-2); }
/* Each name greyed out until its stretch is the one being read, then a
   little larger, from its line's side (transform only, §8.1) */
.window__zone strong {
  display: block; width: fit-content;   /* scaled from its text, not the zone's full width, so it never spills past a phone's edge */
  font: 600 var(--type-label)/1.3 var(--font-display); color: var(--muted);
  opacity: 0.35;
  transform-origin: left center;
  transition: color var(--motion-fast), opacity var(--motion-fast), transform var(--motion-fast);
}
/* Reacting's bracket in {signal.pressure} (its strong tone, 5.0:1 on white),
   the pole to shaping's green: the stretch where the room to choose narrows */
.window:not(.is-shaping) .window__zone--react { border-color: var(--color-warning); }
.window.is-shaping .window__zone--shape { border-color: var(--p3-green); }
.window.is-shaping .window__zone--shape strong,
.window:not(.is-shaping) .window__zone--react strong { color: var(--ink); opacity: 1; transform: scale(1.1); }
/* Between two steps above the window the orange line goes grey for the
   handoff gap, and turns orange again as the next step lights (script.js
   restarts it) */
.window__zone--react.is-blinking { animation: window-gap var(--window-gap) steps(1, end); }
@keyframes window-gap { from { border-color: var(--hairline); } }

/* The definition stays out of sight, with no half-faded stage on the way,
   until today is reached; then it rises in whole with the window: opacity
   and transform only, its space held throughout (§8.1). Once shown, it greys
   out with its name whenever the reading moves back above the window. */
.window__definition {
  display: block; margin-top: var(--space-2);
  transition: opacity var(--motion-slow), transform var(--motion-slow);
}
.window.is-armed:not(.is-today) .window__definition { opacity: 0; transform: translateY(0.75rem); }
.window.is-today:not(.is-shaping) .window__definition { opacity: 0.35; }

/* Too narrow for the two columns beside the copy: the timeline goes under it */
@media (max-width: 1199px) {
  .window { justify-self: start; }
}
/* Phone: no room for a third column, so each name sits at its end of the rail
   (§13.1): reacting over it, shaping under the window. */
@media (max-width: 599px) {
  .window {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    row-gap: var(--space-2);
  }
  .window__axis, .window__course { grid-column: auto; grid-row: auto; }
  .window__axis--future, .window__axis--present { padding: 0; }
  .window__axis--future { padding-bottom: var(--space-4); }
  /* The rail held in from the edge, so the axis titles centred on it stay on
     screen */
  .window__axis { font-size: var(--type-h4); margin-right: var(--space-12); }
  .window__course { margin-right: var(--space-12); }
  .window__stages li { min-height: 4.5rem; column-gap: var(--space-4); }
  .window__zone { padding-left: 0; border-left: 0; margin: 0; grid-column: auto; grid-row: auto; }
  .window__zone--react { padding-bottom: var(--space-3); margin-bottom: var(--space-2); border-bottom: 2px solid var(--hairline); }
  .window__zone--shape { padding-top: var(--space-3); margin-top: var(--space-2); border-top: 2px solid var(--hairline); }
}

/* -------------------------------------------------------------- #table -- */
/* Copy left, the table right. */

.why {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--space-16); align-items: center;
}
@media (max-width: 1023px) {
  .why { grid-template-columns: 1fr; gap: var(--space-12); }
}

/* The table figure. A round table (§6.3: the logo's circles) with six
   seats evenly round it, on the ring (r 38%, every 60° from the top).
   Tier-3 tokens: the seat positions, as percentages of the square stage;
   the lines in the HTML's SVG use the same numbers.

   script.js plays it once, when the stage is centred on screen (its centre
   at mid-screen): .is-drawing draws the ring
   clockwise from the top at an even pace (its mask's stroke-dashoffset);
   .is-ahead on the seats the ring has not reached, which stay faint;
   .is-current on the seat just taken; .is-seated on the lines of the seats
   taken, which draw themselves in; .is-complete once the ring closes, which
   lights the table; .is-armed once it runs. Unarmed,
   it is shown whole, for no JS and reduced motion (§8.3).

   Recorded exception, flagged for the §19 review, as games_page/v2's window
   figure: §8.2 explanatory motion outside Class D. Once the reader reaches
   it, the figure plays through on its own, about three seconds, then stays
   whole; it never loops or replays. */
.seats {
  --seats-draw: 2400ms linear;   /* the ring, at an even pace, so each seat is taken as it is reached */
  --seat-near: 17.1%; /* x of the side seats, from their edge */
  --seat-high: 31%;   /* y of the upper side seats */
  --seat-low: 69%;    /* y of the lower side seats */
  width: 100%; max-width: 480px; justify-self: center;
  display: flex; flex-direction: column; gap: var(--space-6);
}
.why--stretch { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: stretch; }
@media (max-width: 1199px) {
  .why--stretch { grid-template-columns: minmax(0, 1fr); }
}

/* The table section, flipped: the figure on the left, the title and text on
   the right. Order only, so the heading stays first for screen readers, and
   first again once the two stack. */
.why--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.why--flip > :first-child { order: 2; }
@media (max-width: 1023px) {
  .why--flip { grid-template-columns: 1fr; }
  .why--flip > :first-child { order: 0; }
}

.seats__stage { position: relative; aspect-ratio: 1; }

/* The ring and the seats' lines to the table. The dashed ring is seen
   through a mask, a solid stroke on the same circle, so the dashes draw
   themselves (as the timeline's window); the mask starts at the top. */
.seats__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.seats__ring { fill: none; stroke: var(--purple-300); stroke-width: 1.5; stroke-dasharray: 5 5; }
/* Mask luminance, not a colour: white shows the dashes through */
.seats__draw {
  fill: none; stroke: white; stroke-width: 6;
  stroke-dasharray: 1 2; stroke-dashoffset: 0;
  transform: rotate(-90deg); transform-box: fill-box; transform-origin: center;
}
.seats.is-armed:not(.is-drawing) .seats__draw { stroke-dashoffset: 1; }
.seats.is-drawing .seats__draw { transition: stroke-dashoffset var(--seats-draw); }
.seats__spoke {
  stroke: var(--purple-300); stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 1 2; stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--motion-slow);
}
.seats.is-armed .seats__spoke:not(.is-seated) { stroke-dashoffset: 1; }

/* The table: a disc, lit once every seat is taken */
.seats__table {
  position: absolute; inset: 31%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--canvas-tinted);
  border: 1.5px solid var(--action);
  border-radius: var(--radius-full);
  font: 400 var(--type-body-sm)/1.3 var(--font-display); color: var(--muted);
  text-align: center;
  transition: border-color var(--motion-slow);
}
.band--tinted .seats__table { background: var(--canvas); }
.seats__count {
  font: 600 2.25rem/1 var(--font-accent); color: var(--action); margin-bottom: var(--space-1);
  transition: color var(--motion-slow);
}
.seats.is-armed:not(.is-complete) .seats__table { border-color: var(--hairline); }
.seats.is-armed:not(.is-complete) .seats__count { color: var(--muted); }

.seats__seat {
  position: absolute; transform: translate(-50%, -50%);
  max-width: 9.5em;
  padding: var(--space-2) var(--space-4);
  background: var(--canvas);
  border: 1px solid var(--action);
  border-radius: var(--radius-md);
  font: 600 var(--type-label)/1.3 var(--font-display); color: var(--ink);
  text-align: center;
  transition: opacity var(--motion-medium), background-color var(--motion-medium), color var(--motion-medium);
}
/* The seats the ring has not reached */
.seats__seat.is-ahead { opacity: 0.25; }
/* The seat just taken */
.seats__seat.is-current { background: var(--action); color: var(--ink-on-dark); }
.seats__seat--1 { left: 50%; top: 12%; }
.seats__seat--2 { left: calc(100% - var(--seat-near)); top: var(--seat-high); }
.seats__seat--3 { left: calc(100% - var(--seat-near)); top: var(--seat-low); }
.seats__seat--4 { left: 50%; top: 88%; }
.seats__seat--5 { left: var(--seat-near); top: var(--seat-low); }
.seats__seat--6 { left: var(--seat-near); top: var(--seat-high); }

/* Phone: the seats would crowd the table, so the figure recomposes
   (§13.1): the table on its own, the seats as a two-column list below. */
@media (max-width: 559px) {
  .seats__stage { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-6); }
  .seats__lines { display: none; }
  .seats__table { position: static; width: 9rem; height: 9rem; }
  .seats__list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); width: 100%; }
  .seats__seat { position: static; transform: none; max-width: none; }
}

/* ----------------------------------------------------------- #partners -- */

.partners {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--space-16); align-items: start;
}
@media (max-width: 1023px) {
  .partners { grid-template-columns: 1fr; gap: var(--space-12); }
}

/* What participants learn: an editorial list with a ring marker per row */
.gains { border-top: 1px solid var(--hairline); }
.gains li {
  position: relative;
  padding: var(--space-4) 0 var(--space-4) var(--space-8);
  border-bottom: 1px solid var(--hairline);
  font: 500 var(--type-body)/1.5 var(--font-display); color: var(--ink);
}
.gains li::before {
  content: ""; position: absolute; left: 0; top: calc(var(--space-4) + 0.3em);
  width: 14px; height: 14px;
  border: 2px solid var(--action); border-radius: var(--radius-full);
}

.partners__media { display: flex; flex-direction: column; gap: var(--space-3); }

/* The Davos recording, playing muted from the middle. The player runs
   taller than its frame, so the video letterboxes and YouTube's title bar
   and controls fall in bands the frame crops off. Hover or focus drops the
   crop and they show, the video unmoved. Without hover (touch), they always show. */
.past__video {
  --yt-chrome: 64px;   /* tier 3: the depth of YouTube's title bar, and of its controls */
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-md);
}
.past__video iframe {
  position: absolute; left: 0; width: 100%; border: 0;
  top: calc(-1 * var(--yt-chrome)); height: calc(100% + 2 * var(--yt-chrome));
}
.past__video:hover iframe,
.past__video:focus-within iframe { top: 0; height: 100%; }
@media (hover: none) {
  .past__video iframe { top: 0; height: 100%; }
}
