/* Motion lab, shared (Rick, 9 Oct 2026): the tokens, chrome and dock every lab page uses.
   Each set of scenes (why-pay, multi-city, christmas, modes) adds its own stylesheet on top.

   Light and dark: every colour a scene uses is a --m-* role below, flipped by html[data-theme],
   the same attribute Chakra stamps in the app. Light values follow the homepage (paper, ink-navy);
   dark values follow the app's dark mode (src/config/brand.ts: canvas #071624, surface ink-800).
   --spd is the dock's speed, so CSS-timed motion keeps pace with the scripted motion. */

:root,
html[data-theme="light"] {
  color-scheme: light;
  --spd: 1;
  --dur: calc(.42s / var(--spd));

  --m-page: #fbfcfa;
  --m-surface: #ffffff;
  --m-surface-2: #f2f5f7;
  --m-surface-3: #eef2f5;
  --m-skel-hi: #f9fbfc;
  --m-ink: #16324f;
  --m-text: #1f2937;
  --m-muted: #607083;
  --m-faint: #8a99a8;
  --m-ghost: #c6d2db;
  --m-line: #dce6e9;
  --m-line-2: #e6ecef;
  --m-line-strong: #d3dce2;
  --m-eyebrow: #0c6058;

  --m-accent: #0f766e;
  --m-accent-2: #2aa18c;
  --m-accent-3: #5dcaa5;
  --m-accent-text: #0c6058;
  --m-accent-soft: #e4f7f4;
  --m-accent-soft-2: #c5ede3;
  --m-best-bg: #e7f6f1;

  --m-pain: #c2410c;
  --m-pain-ink: #9a3412;
  --m-pain-bg: #fff1e9;
  --m-pain-line: #f8cdb6;
  --m-amber-bg: #fff6dc;
  --m-amber-ink: #92400e;

  --m-gold-1: #f8dc94;
  --m-gold-2: #ebb14a;
  --m-gold-3: #b7791f;
  --m-gold-bg: linear-gradient(135deg, #fffaf0, #fff2d3);
  --m-gold-ink: #7a4d0f;
  --m-gold-ink-strong: #5c3a08;

  --m-ink-fill: #16324f;
  --m-ink-fill-2: #091725;
  --m-on-ink: #ffffff;
  --m-on-ink-muted: #a3bcd2;

  --m-scrim: rgba(15, 36, 56, .16);
  --m-veil: rgba(251, 252, 250, .8);
  --m-stamp-bg: rgba(255, 255, 255, .85);
  --m-glass: rgba(255, 255, 255, .72);
  --m-shadow: 0 50px 90px -60px rgba(9, 23, 37, .55), 0 18px 36px -28px rgba(9, 23, 37, .25);
  --m-shadow-soft: 0 30px 70px -56px rgba(9, 23, 37, .5);
  --m-tag-border: #c4d2d9;
  --m-cursor-fill: #0f2438;
  --m-cursor-stroke: #ffffff;

  /* Maps, matching <route-map theme="light"> */
  --map-sea: #f2f8fa;
  --map-land: #c7e8df;
  --map-border: rgba(15, 118, 110, .30);
  --map-leg: #0f766e;
  --map-leg-idle: rgba(15, 118, 110, .16);
  --map-pin: #0f766e;
  --map-pin-ring: #e9f7f3;
  --map-home: #0c6058;
  --map-label: #16324f;
  --map-sub: #475569;
  --map-halo: #f2f8fa;
  --map-plane: #0c6058;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --m-page: #071624;
  --m-surface: #0f2438;
  --m-surface-2: #16324f;
  --m-surface-3: #0b1d2f;
  --m-skel-hi: #1f4061;
  --m-ink: #e9eff5;
  --m-text: #d5dfe8;
  --m-muted: #a3bcd2;
  --m-faint: #7c9cba;
  --m-ghost: #2e4b68;
  --m-line: rgba(163, 188, 210, .16);
  --m-line-2: rgba(163, 188, 210, .13);
  --m-line-strong: rgba(163, 188, 210, .26);
  --m-eyebrow: #5dcaa5;

  --m-accent: #2aa18c;
  --m-accent-2: #5dcaa5;
  --m-accent-3: #93dcc9;
  --m-accent-text: #93dcc9;
  --m-accent-soft: rgba(93, 202, 165, .12);
  --m-accent-soft-2: rgba(93, 202, 165, .22);
  --m-best-bg: rgba(93, 202, 165, .16);

  --m-pain: #fb8a4c;
  --m-pain-ink: #fdba8c;
  --m-pain-bg: rgba(251, 138, 76, .13);
  --m-pain-line: rgba(251, 138, 76, .4);
  --m-amber-bg: rgba(242, 199, 92, .14);
  --m-amber-ink: #f2c75c;

  --m-gold-bg: linear-gradient(135deg, rgba(242, 199, 92, .16), rgba(242, 199, 92, .08));
  --m-gold-ink: #f6d99a;
  --m-gold-ink-strong: #fde9b8;

  --m-ink-fill: #e9eff5;
  --m-ink-fill-2: #c5d3e0;
  --m-on-ink: #0f2438;
  --m-on-ink-muted: #47617b;

  --m-scrim: rgba(0, 0, 0, .38);
  --m-veil: rgba(7, 22, 36, .84);
  --m-stamp-bg: rgba(15, 36, 56, .86);
  --m-glass: rgba(15, 36, 56, .72);
  --m-shadow: 0 50px 90px -50px rgba(0, 0, 0, .9), 0 0 0 1px rgba(163, 188, 210, .06);
  --m-shadow-soft: 0 30px 70px -40px rgba(0, 0, 0, .85);
  --m-tag-border: rgba(163, 188, 210, .3);
  --m-cursor-fill: #ffffff;
  --m-cursor-stroke: #0f2438;

  /* Maps, matching <route-map theme="dark"> */
  --map-sea: #091a2b;
  --map-land: #0f2438;
  --map-border: rgba(163, 188, 210, .2);
  --map-leg: #34d399;
  --map-leg-idle: rgba(93, 202, 165, .18);
  --map-pin: #5dcaa5;
  --map-pin-ring: #071320;
  --map-home: #ffffff;
  --map-label: #e9eff5;
  --map-sub: #a3bcd2;
  --map-halo: #071a2a;
  --map-plane: #38bdf8;
}

html.lab-paused *, html.lab-paused *::before, html.lab-paused *::after { animation-play-state: paused !important; }

/* 13 Oct 2026: site.css's page-wide base (Geist, heading weights, no default margins) now applies only
   inside the homepage's .eu-home box, so the lab pages and the homepage's motion frames fell back to the
   browser's Times New Roman (Rick: "a really ugly font"). The same base, for the lab's own pages.
   :where() keeps it at zero specificity, as it was on the homepage. */
:where(body) {
  font: 400 17px/1.65 var(--font-sans);
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
:where(body) :is(h1, h2, h3, p, figure, blockquote) { margin: 0; }
:where(body) :is(h1, h2, h3) { font-weight: 730; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
:where(body) img { display: block; max-width: 100%; }
:where(body) a { color: inherit; text-decoration: none; }
:where(body) :is(button, input, select) { font: inherit; }

/* site.css draws the page in light only; the lab lets the tokens decide. */
body { background: var(--m-page); color: var(--m-text); transition: background-color .35s ease, color .35s ease; }
h1, h2, h3 { color: var(--m-ink); }
.eyebrow { color: var(--m-eyebrow); }
.dark .eyebrow { color: var(--brand-300); }
html[data-theme="dark"] .dark { border-block: 1px solid var(--m-line); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header: the sets ---------- */

.lab-sets { display: flex; z-index: 3; gap: 6px; }
.lab-sets a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 8px;
  border: 1px solid rgba(163, 188, 210, .16);
  border-radius: 999px;
  background: rgba(5, 21, 34, .32);
  color: var(--ink-200);
  font-size: 12.5px;
  font-weight: 620;
  white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s;
}
.lab-sets a:hover { border-color: var(--brand-300); color: var(--white); }
.lab-sets a[aria-current="page"] { border-color: var(--brand-300); background: rgba(15, 118, 110, .45); color: var(--white); }
.lab-sets i { font-style: normal; }

/* ---------- Intro ---------- */

.lab-intro { padding-block: clamp(48px, 6vw, 84px) clamp(8px, 2vw, 20px); }
.lab-intro h1 { max-width: 18ch; margin-top: 14px; font-size: clamp(40px, 5.2vw, 68px); letter-spacing: -.035em; line-height: 1.02; }
.lab-intro .lead { max-width: 780px; margin-top: 18px; color: var(--m-muted); font-size: clamp(16px, 1.4vw, 18px); }
.lab-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.lab-flags span, .lab-tag {
  border: 1px dashed var(--m-tag-border);
  border-radius: 999px;
  color: var(--m-muted);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lab-flags span { padding: 8px 12px; }
.lab-index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lab-index a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 6px;
  border: 1px solid var(--m-line);
  border-radius: 999px;
  background: var(--m-surface);
  color: var(--m-ink);
  font-size: 13px;
  font-weight: 620;
  transition: border-color .2s, transform .2s var(--ease);
}
.lab-index a:hover { border-color: var(--m-accent-2); transform: translateY(-1px); }
.lab-index b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--m-accent-soft);
  color: var(--m-accent-text);
  font: 700 11px/1 var(--font-mono);
}

/* ---------- Scenes ---------- */

.scene { position: relative; }
.scene:not(.dark) + .scene:not(.dark) { border-top: 1px solid var(--m-line); }
.scene-head h2 { max-width: 1000px; margin-top: 12px; font-size: var(--section-title); }
.scene-head > p:last-child { max-width: 820px; margin-top: 14px; color: var(--m-muted); font-size: clamp(16px, 1.4vw, 18px); }
.scene-head h3 { max-width: 1000px; margin-top: 12px; font-size: clamp(28px, 3.2vw, 42px); }
.stage { position: relative; }

.lab-tag { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 5px 5px 5px 13px; }
.lab-tag button {
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: var(--m-accent-soft);
  color: var(--m-accent-text);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.lab-tag button:hover { background: var(--m-accent-soft-2); }
.lab-len { color: var(--m-accent-text); letter-spacing: .04em; text-transform: none; }
.lab-len:empty { display: none; }
.dark .lab-len { color: var(--brand-300); }
.dark .lab-tag { border-color: rgba(163, 188, 210, .3); color: var(--ink-200); }
.dark .lab-tag button { background: rgba(93, 202, 165, .14); color: var(--brand-200); }

.lab-note {
  max-width: 920px;
  margin-top: 30px;
  padding: 10px 14px;
  border: 1px dashed var(--m-tag-border);
  border-radius: 12px;
  color: var(--m-muted);
  font-size: 14px;
  line-height: 1.55;
}
.lab-note summary { font: 600 11px/1.8 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.lab-note ul { display: grid; gap: 4px; margin: 8px 0 4px; padding-left: 18px; }
.dark .lab-note { border-color: rgba(163, 188, 210, .3); color: var(--ink-200); }

.lab-cta {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-400));
  box-shadow: 0 18px 36px -18px rgba(15, 118, 110, .9);
  color: var(--white);
  font-size: 16px;
  font-weight: 720;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.lab-cta:hover { box-shadow: 0 22px 40px -16px rgba(15, 118, 110, 1); transform: translateY(-2px); }

/* A line of copy that arrives when its moment comes. */
.cue { opacity: 0; transform: translateY(8px); transition: opacity var(--dur), transform var(--dur) var(--ease); }
.cue.on { opacity: 1; transform: none; }

/* ---------- The dock ---------- */

.lab-dock {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(147, 220, 201, .22);
  border-radius: 16px;
  background: rgba(7, 22, 36, .92);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .8);
  backdrop-filter: blur(16px);
}
.lab-group { display: flex; gap: 2px; padding: 2px; border-radius: 11px; background: rgba(255, 255, 255, .06); }
.lab-dock button {
  min-width: 38px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-200);
  font: 650 12px/1 var(--font-mono);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lab-dock > button { background: rgba(255, 255, 255, .06); }
.lab-dock button:hover { color: var(--white); }
.lab-dock button[aria-pressed="true"] { background: var(--brand-500); color: var(--white); }
.lab-dock .lab-phone { display: inline-flex; min-height: 34px; align-items: center; padding: 0 10px; border-radius: 9px; background: rgba(255, 255, 255, .06); color: var(--ink-200); font: 650 12px/1 var(--font-mono); white-space: nowrap; }
.lab-dock .lab-phone:hover { color: var(--white); }

/* ---------- The pointer scenes click with. Its tip sits on the element's origin. ---------- */

.cursor {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(.3s / var(--spd));
  will-change: transform;
}
.cursor.show { opacity: 1; }
.cursor svg {
  display: block;
  width: 24px;
  height: 24px;
  margin: -2px 0 0 -4px;
  filter: drop-shadow(0 3px 5px rgba(9, 23, 37, .35));
  transform-origin: 4px 2px;
  transition: transform .12s;
}
.cursor path { fill: var(--m-cursor-fill); stroke: var(--m-cursor-stroke); }
.cursor.down svg { transform: scale(.82); }
.cursor .ripple {
  position: absolute;
  top: -16px;
  left: -16px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--m-ink);
  border-radius: 50%;
  opacity: 0;
}
.cursor .ripple.tap { animation: ripple calc(.42s / var(--spd)) ease-out; }
@keyframes ripple { from { opacity: .5; transform: scale(.3); } to { opacity: 0; transform: scale(1.3); } }

/* ---------- Maps (drawn by Lab.europe) ---------- */

.m-map { display: block; width: 100%; height: auto; overflow: visible; }
.m-land { fill: var(--map-land); stroke: var(--map-border); stroke-width: .7; transition: fill .35s, stroke .35s; }
.m-leg-idle { fill: none; stroke: var(--map-leg-idle); stroke-linecap: round; stroke-dasharray: 2 7; }
.m-leg { fill: none; stroke: var(--map-leg); stroke-linecap: round; }
.m-plane path { fill: var(--map-plane); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.m-pin-halo { fill: var(--map-pin); opacity: .16; }
.m-pin { fill: var(--map-pin); stroke: var(--map-pin-ring); stroke-width: 2; }
.m-pin.home { fill: var(--map-home); }
.m-label {
  fill: var(--map-label);
  stroke: var(--map-halo);
  stroke-linejoin: round;
  stroke-width: 4;
  font: 800 15px var(--font-sans);
  paint-order: stroke;
}
.m-sub { fill: var(--map-sub); stroke: var(--map-halo); stroke-linejoin: round; stroke-width: 3.5; font: 600 12px var(--font-mono); paint-order: stroke; }
.m-pop { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform calc(.5s / var(--spd)) cubic-bezier(.2, .9, .3, 1.4); }
.m-pop.on { transform: none; }
.m-fade { opacity: 0; transition: opacity var(--dur); }
.m-fade.on { opacity: 1; }

/* ---------- Narrow screens ---------- */

@media (max-width: 1180px) {
  .lab-sets span { display: none; }
  .lab-sets a { padding: 0 10px; }
}

@media (max-width: 760px) {
  .lab-sets { display: none; }
  .lab-dock { right: 10px; bottom: 10px; left: 10px; justify-content: center; }
  .lab-dock button { min-width: 34px; padding: 0 8px; }
  .lab-dock .lab-phone { display: none; }
  .lab-tag { gap: 8px; font-size: 10px; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { display: none; }
}
