/* ==========================================================================
   GESDA — Anticipatory Leadership Labs · base
   Surface class A (landing page), light theme with a dark hero; no
   analytical claim, so §3.3, §10.8 and §15 are not binding.
   The base of games_page/v2/assets/css/styles.css, so the two offering
   pages read as one family: type roles, buttons, header, bands, FAQ,
   footer, reveal, the numbers band, the voices carousel and the offer cards. Dropped: the
   video.
   Changed from the games file:
   - fonts are self-hosted (fonts.css), per §4.1, instead of Google Fonts;
   - every colour is a token (the inline values now live in tokens.css);
   - focus rings are 3px, per §13.2.
   This page's own sections are in labs.css.
   ========================================================================== */

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + var(--space-4)); }
/* Smooth only once the page has settled (script.js): while it loads, the
   browser restores the reader's place in more than one step, and smooth
   scrolling made its corrections play as a visible glide. */
html.is-settled { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 var(--type-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* height:auto neutralises the HTML height attribute, which would otherwise
   pin a definite height and defeat any aspect-ratio set in CSS. */
img { max-width: 100%; height: auto; display: block; }

[hidden] { display: none !important; }

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--action); text-decoration: none; }
a:hover { color: var(--action-hover); }
/* §10.1: links inside running text are underlined at rest */
p a { text-decoration: underline; text-underline-offset: 0.15em; }

:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: var(--radius-sm); }
.hero :focus-visible,
.band--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--purple-300); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-3) var(--space-6); background: var(--action);
  color: var(--on-action); border-radius: var(--radius-pill); font-weight: 600;
}
.skip-link:focus { top: var(--space-4); color: var(--on-action); }

/* The open-item marker: anything still to be supplied is marked rather than
   quietly filled in. Soft tone on dark, per the tone rule. */
.todo {
  border-bottom: 2px dotted var(--color-warning);
  color: var(--color-warning);
  font-weight: 600;
  cursor: help;
}
.hero .todo,
.band--dark .todo { color: var(--p4-orange); border-bottom-color: var(--p4-orange); }

/* ----------------------------------------------------------- type roles -- */

.eyebrow {
  font: 600 var(--type-eyebrow)/1.2 var(--font-accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--action);
}

.display {
  font: 700 clamp(2.5rem, 5vw, 4rem)/1.05 var(--font-display);
  letter-spacing: -0.02em;
}

.h1 { font: 700 var(--type-h1)/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.h2 { font: 600 var(--type-h2)/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.h3 { font: 600 clamp(1.25rem, 1.8vw, 1.5rem)/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.h4 { font: 600 var(--type-h4)/1.4 var(--font-display); color: var(--ink); }

.lead { font: 400 var(--type-lead)/1.65 var(--font-display); }
.body-sm { font: 400 var(--type-body-sm)/1.5 var(--font-display); }
.caption { font: 400 var(--type-caption)/1.45 var(--font-display); color: var(--muted); }
.measure { max-width: 65ch; }

/* ------------------------------------------------------------- buttons -- */
/* Five states each (§10.1): rest, hover, active, focus-visible (the 3px
   ring above), disabled (not used on this page). */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 28px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  font: 600 var(--type-body)/1.2 var(--font-display); cursor: pointer;
  text-decoration: none;
  transition: background-color var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.btn--primary { background: var(--action); color: var(--on-action); }
.btn--primary:hover { background: var(--action-hover); color: var(--on-action); box-shadow: var(--shadow-sm); }
.btn--primary:active { background: var(--action-active); box-shadow: none; }

.btn--onDark { background: var(--color-white); color: var(--purple-900); }
.btn--onDark:hover { background: var(--purple-050); color: var(--purple-900); }
.btn--onDark:active { background: var(--purple-100); color: var(--purple-900); }

.btn--ghostDark { color: var(--ink-on-dark); border-color: var(--ghost-border-on-dark); }
.btn--ghostDark:hover { color: var(--color-white); border-color: var(--color-white); }
.btn--ghostDark:active { background: var(--wash-on-dark); }

/* The arrow after a label that says the link leaves the page.
   .btn__end keeps it on the last word's line. */
.btn__offsite {
  width: 10px; height: 10px; margin-left: var(--space-2);
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.btn__end { white-space: nowrap; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--space-6);
  /* inline padding tracks the band gutter + centred .container edge */
  padding: 0 max(var(--space-6), calc((100% - var(--container)) / 2));
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline-soft);
  transition: box-shadow var(--motion-fast);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.logo { display: inline-flex; align-items: center; margin-right: auto; }
.logo__img { height: 52px; width: auto; }
@media (max-width: 1023px) { .logo__img { height: 44px; } }
@media (max-width: 767px)  { .logo__img { height: 36px; } }

.nav { display: flex; align-items: center; gap: var(--space-8); }
.nav a {
  font: 500 var(--type-body)/1.2 var(--font-display); color: var(--purple-900);
  padding: var(--space-2) 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--action); }
.nav a:active { color: var(--action-active); }
.nav a[aria-current="true"] { color: var(--action); border-bottom-color: var(--action); }

.header__cta { margin-left: var(--space-6); }

/* The full bar: the links centred between the logo and the CTA. */
@media (min-width: 1024px) {
  .nav { flex: 1; justify-content: center; }
  .header__cta { margin-left: 0; }
}

.nav-toggle {
  display: none; width: 44px; height: 44px;
  background: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  color: var(--purple-900); font: 500 1.25rem/1 var(--font-accent); cursor: pointer;
}
.nav-toggle:hover { background: var(--canvas-tinted); }
.nav-toggle:active { background: var(--purple-100); }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header__cta { display: none; }
  .nav {
    position: absolute; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--space-4) var(--space-6) var(--space-6);
    background: var(--canvas); border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-md);
  }
  .nav a { padding: var(--space-4) 0; border-bottom: 1px solid var(--hairline-soft); }
  .nav a[aria-current="true"] { border-bottom-color: var(--hairline-soft); }
}

/* --------------------------------------------------------------- bands -- */

.band { padding: var(--space-section) var(--space-6); }

.band--tinted { background: var(--canvas-tinted); }

.band--dark {
  background: var(--canvas-dark);
  background-image:
    linear-gradient(var(--grid-line-on-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-on-dark) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--body-on-dark);
  /* room for the .band--lift overlap of the section below */
  padding-bottom: calc(var(--space-section) + var(--space-6));
}
.band--dark .h1, .band--dark .h2, .band--dark .h3, .band--dark .h4 { color: var(--ink-on-dark); }
.band--dark .eyebrow { color: var(--purple-300); }

/* §6.2 — a light band lifting off a dark one */
.band--lift {
  position: relative;
  margin-top: calc(-1 * var(--space-6));
  background: var(--canvas);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; }
@media (min-width: 1440px) { .band, .hero, .site-footer { padding-inline: var(--space-12); } }

.section-head { display: flex; flex-direction: column; gap: var(--space-4); max-width: 760px; }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-16); }

@media (max-width: 899px) {
  .split { grid-template-columns: 1fr; gap: var(--space-8); }
}

.stack-4 { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-6 { display: flex; flex-direction: column; gap: var(--space-6); }
.stack-8 { display: flex; flex-direction: column; gap: var(--space-8); }
.stack-12 { display: flex; flex-direction: column; gap: var(--space-12); }

/* ---------------------------------------------------------------- hero -- */

.hero {
  padding: var(--space-16) var(--space-6) calc(var(--space-16) + var(--space-6));
  background: var(--purple-900);
  background-image:
    radial-gradient(ellipse 60% 70% at 15% 20%, var(--hero-mesh-purple) 0%, var(--hero-mesh-purple-0) 70%),
    radial-gradient(ellipse 50% 60% at 90% 90%, var(--hero-mesh-green) 0%, var(--hero-mesh-green-0) 70%);
  color: var(--body-on-dark);
  position: relative;
  overflow: hidden;
}
.hero__ring {
  position: absolute; right: -120px; top: -60px;
  width: 620px; height: 620px; border-radius: var(--radius-full);
  border: 2px dotted var(--hero-ring);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: var(--space-12); align-items: center; }
.hero h1 { color: var(--ink-on-dark); }
.hero .lead { color: var(--purple-100); max-width: 60ch; }

@media (max-width: 899px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-8); align-items: start; }
  .hero__ring { width: 380px; height: 380px; right: -140px; }
}

/* ----------------------------------------------------------------- faq -- */

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-8); align-content: start; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  min-height: 44px; padding: var(--space-4) 0; cursor: pointer; list-style: none;
  font: 600 var(--type-body)/1.4 var(--font-display); color: var(--ink);
  transition: color var(--motion-fast);
}
.faq summary:hover { color: var(--action); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 500 1.25rem/1 var(--font-accent); color: var(--action); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 var(--space-4); font: 400 var(--type-body-sm)/1.55 var(--font-display); max-width: 65ch; }

@media (max-width: 899px) { .faq { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- proof -- */
/* From games_page/v2/assets/css/styles.css: the numbers band, the voices and
   their three takeaway cards. */

.metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.metrics > div { padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.metrics > div + div { border-left: 1px solid var(--hairline); }
.metrics > div:first-child { padding-left: 0; }
.metric__value { font: 600 3rem/1 var(--font-accent); color: var(--ink); }
.metric__label { color: var(--muted); }

/* The numbers band: a Lab at a glance, four across */
.metrics--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 767px) {
  .metrics { grid-template-columns: 1fr; }
  .metrics > div { padding-inline: 0; }
  .metrics > div + div { border-left: 0; border-top: 1px solid var(--hairline); }
  .metrics > div { align-items: center; text-align: center; }
}

.quote p { font: 600 clamp(1.375rem, 2.6vw, 2rem)/1.25 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.quote figcaption { margin-top: var(--space-4); }

/* Voices: a vertical photograph on the left; on the right the quote and its
   author on top, the three takeaways along the bottom, level with the
   photograph's lower edge. Photograph, quote and author change together.

   Recorded exception, requested by the client (as for the Highlights
   slideshow): §8.1 "nothing auto-plays". The voices advance on their own;
   the loop holds on hover, on keyboard focus and while off screen, and
   under reduced motion it never starts. Flagged for the §19 review.

   Static (no JS): the first photograph shows and every quote is listed. */
.voices {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-12);
}
.voices__photos {
  /* width pinned so a taller right column stretches the photograph down
     rather than letting the ratio widen it */
  position: relative; align-self: stretch;
  width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--canvas-tinted);
}
.voices__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.voices__photo img { width: 100%; height: 100%; object-fit: cover; }
.voices__photo:first-child { opacity: 1; }
/* §14.2: a purple-ramp wash, deepest towards the lower right */
.voices__photos::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, transparent 40%, var(--color-photo-tint) 100%);
  pointer-events: none;
}

.voices__side { display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-12); }
.voices__quotes { display: grid; gap: var(--space-8); }

/* Live: one quote at a time in a single cell; out, then in. */
.voices.is-live .voices__quotes { gap: 0; }
.voices.is-live .voices__quote {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transition: opacity 260ms ease, visibility 0s 260ms;
}
.voices.is-live .voices__quote.is-on {
  opacity: 1; visibility: visible;
  transition: opacity var(--motion-slow) 260ms, visibility 0s 260ms;
}
.voices.is-live .voices__photo { opacity: 0; transition: opacity var(--motion-slow); }
.voices.is-live .voices__photo.is-on { opacity: 1; }

/* The pills, as the Highlights slideshow's: 44px targets, pill drawn inside */
.voices__nav { display: none; }
.voices.is-live .voices__nav { display: block; margin-bottom: var(--space-4); }
.voices__dots { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.voices__dots button {
  position: relative; display: block;
  width: 26px; height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer;
  transition: width var(--motion-medium);
}
.voices__dots button::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 6px; margin-top: -3px;
  border-radius: var(--radius-pill);
  background: var(--purple-100);
  transition: background-color var(--motion-fast);
}
.voices__dots button:hover::before  { background: var(--purple-300); }
.voices__dots button:active::before { background: var(--action-active); }
.voices__dots button:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: var(--radius-sm); }
.voices__dots li.is-active button { width: 44px; }
.voices__dots li.is-active button::before { background: var(--action); }

/* The three takeaways, narrower than the old full-width row: compact cards
   (§5.4), so one radius step down. */
.cards--compact { gap: var(--space-4); }
.cards--compact .card { padding: var(--space-6); gap: var(--space-3); border-radius: var(--radius-md); }

@media (max-width: 1023px) {
  .voices { gap: var(--space-8); }
  .voices .cards--compact { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  /* one column: the quote and its author first, then the photograph, then
     the takeaways (the side column's two parts join the grid) */
  .voices { grid-template-columns: 1fr; }
  .voices__side { display: contents; }
  .voices__side > :first-child { order: -1; }
  .voices__photos { width: 100%; max-width: 440px; }
  .voices .cards--compact { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 599px) {
  .voices .cards--compact { grid-template-columns: 1fr; }
}

/* The takeaway cards (games_page/v2 "payoff") */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.card {
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-8);
  background: var(--canvas); border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card__index { font: 500 0.875rem/1.3 var(--font-accent); color: var(--muted); }
@media (max-width: 899px) { .cards { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- offers -- */
/* games_page/v2's offer card, one alone, so it runs across the band: its
   head with the button right under it on the left, its three criteria on
   the right, ruled top and bottom. Below 900px they stack. */

.offer {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--space-16);
  padding: var(--space-8);
  background: var(--purple-800);
  border: 1px solid var(--purple-300);
  border-radius: var(--radius-lg);
}

.offer__head { grid-column: 1; display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: var(--space-6); }
.offer__lead { color: var(--body-on-dark); }

.offer__terms { grid-column: 2; grid-row: 1 / 3; }
.offer__terms > div {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--hairline-on-dark);
}
.offer__terms > div:last-child { border-bottom: 1px solid var(--hairline-on-dark); }
.offer__terms dt { font: 600 0.6875rem/1.3 var(--font-accent); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-on-dark); }
.offer__terms dd { font: 400 1rem/1.5 var(--font-display); color: var(--ink-on-dark); }

.offer__cta { grid-column: 1; grid-row: 2; align-self: start; justify-self: start; }

@media (max-width: 899px) {
  .offer { display: flex; flex-direction: column; padding: var(--space-6); }
  .offer__terms { padding-bottom: var(--space-6); }
  .offer__terms > div:last-child { border-bottom: 0; }
  .offer__cta { align-self: flex-start; }
}

/* -------------------------------------------------------------- footer -- */
/* The games v2 footer, unchanged. */

.site-footer { padding: var(--space-16) var(--space-6); background: var(--canvas-dark); color: var(--body-on-dark); }
.site-footer__grid {
  display: grid; gap: var(--space-12) var(--space-16); align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}
.site-footer__brand img { display: block; height: calc(var(--space-12) * 1.3); width: auto; max-width: 100%; }
.site-footer__funders { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) var(--space-8); margin-left: auto; }
/* Heights are set per mark so the three read at an even visual size. */
.site-footer__funders img { display: block; width: auto; max-width: 100%; }
.site-footer__funders .site-footer__swiss  { height: calc(var(--space-8) + var(--space-2)); }
.site-footer__funders .site-footer__canton { height: var(--space-16); }
.site-footer__funders .site-footer__ville  { height: var(--space-16); }
.site-footer__group h3 { margin: 0 0 var(--space-3); font: 600 var(--type-h4) / 1.4 var(--font-body); color: var(--ink-on-dark); }
.site-footer__group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__group a,
.site-footer__legal a {
  color: var(--muted-on-dark);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast);
}
.site-footer__group a { font: 400 var(--type-body-sm) / 1.5 var(--font-body); }
.site-footer__group a:hover,
.site-footer__legal a:hover  { color: var(--ink-on-dark); text-decoration: underline; }
.site-footer__group a:active,
.site-footer__legal a:active { color: var(--purple-100); }

.site-footer__group .site-footer__social { flex-direction: row; gap: var(--space-3); }
.site-footer__social a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--hairline-on-dark);
  border-radius: var(--radius-full);
}
.site-footer__social svg { fill: currentColor; }
.site-footer__social a:hover { text-decoration: none; border-color: var(--muted-on-dark); background: var(--wash-on-dark); }
.site-footer__social a:active { background: var(--wash-on-dark-strong); }

.site-footer__legal {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6);
  margin-top: var(--space-12); padding-top: var(--space-6);
  border-top: 1px solid var(--hairline-on-dark);
}
.site-footer__legal p,
.site-footer__legal a { margin: 0; font: 400 var(--type-caption) / 1.45 var(--font-body); color: var(--muted-on-dark); }
.site-footer__legal ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }

@media (max-width: 979px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-12); justify-items: center; text-align: center; }
  .site-footer__group .site-footer__social { justify-content: center; }
  .site-footer__legal { flex-direction: column; text-align: center; }
  .site-footer__legal ul { justify-content: center; }
  .site-footer__funders { margin-left: 0; justify-content: center; }
}

/* ------------------------------------------------------------- reveal -- */
/* Script adds .is-visible on first view. Without script, or under reduced
   motion, script.js marks everything visible at once (§8.3 as an outcome);
   the media query below guarantees it either way. */

.js .reveal {
  opacity: 0;
  transform: translateY(var(--space-4));
  transition: opacity var(--motion-slow), transform var(--motion-slow);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
