/* =========================================================================
   The deck engine (deck/deck.css), ported from TEGO's investor deck
   (tego.influxe.agency/investor, projects/Tego/site/css/investor.css).

   A presentation, not a page: one slide fills the screen at a time and
   deck/deck.js moves between them. It is shown on a laptop, a TV or a
   meeting-room screen, so it sits on a dark stage.

   This file is the engine only: the stage and its moving glow, the chrome,
   the dock, the slides, the reveals and the parts slides are built from.
   The look comes from a theme loaded after it (deck/theme-aura.css): every
   colour and face below is a token the theme sets. A new deck = a new theme
   file + new slides; nothing here should need editing.
   ========================================================================= */

:root {
  /* Theme tokens. These defaults only keep the engine readable without a
     theme; the theme file overrides every one of them. */
  --stage: #0e1116;
  --stage-deep: #090b0f;
  --stage-lift: rgba(95, 191, 165, 0.16);
  --glow-rgb: 95, 191, 165;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --hair: rgba(255, 255, 255, 0.12);
  --hair-strong: rgba(255, 255, 255, 0.32);
  --text: #f4f6f5;
  --text-2: #c2cbc8;
  --text-3: #8e9996;
  --accent: #5fbfa5;
  --accent-ink: #0e1116;
  --accent-2: #7fd4e2;
  --font-display: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -0.03em;
  --hero-tracking: -0.04em;
  --hero-leading: 0.98;

  /* Derived from the accent, so a theme sets one colour and gets the rest. */
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --accent-faint: color-mix(in srgb, var(--accent) 22%, transparent);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Type and room scale with whichever of width and height is shorter,
     so a 1280x720 projector and a 1920x1080 screen show the same slide. */
  --fs-hero: clamp(2.2rem, min(6.6vw, 10vh), 6.2rem);
  --fs-h2: clamp(1.55rem, min(4vw, 6.4vh), 3.7rem);
  --fs-lead: clamp(0.98rem, min(1.5vw, 2.45vh), 1.38rem);
  --fs-body: clamp(0.86rem, min(1.18vw, 2vh), 1.08rem);
  --fs-small: clamp(0.72rem, min(0.92vw, 1.55vh), 0.9rem);
  --pad-x: clamp(20px, 6vw, 112px);
  --pad-top: clamp(64px, 11vh, 120px);
  --pad-bottom: clamp(62px, 10.5vh, 112px);
  --room: calc(100dvh - var(--pad-top) - var(--pad-bottom));
  /* The chrome lines up with the slides' 1440px column on wide screens. */
  --edge: max(var(--pad-x), calc((100vw - 1440px) / 2));

  --radius-panel: 18px;
}

/* ---- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; }

body {
  overflow: hidden;
  background: var(--stage);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
figure { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  margin: 0;
  text-wrap: balance;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

/* An author display rule beats the hidden attribute; this puts it back. */
[hidden] { display: none !important; }

/* One language shows at a time; deck.js sets data-lang on <html>. */
:root[data-lang="fr"] body [lang="en"],
:root[data-lang="en"] body [lang="fr"] { display: none !important; }

/* ---- The stage ------------------------------------------------------------
   One soft light that moves to a new place on every slide (data-glow), so
   going from one slide to the next reads as moving through one room. */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(130% 80% at 50% 118%, var(--stage-lift), transparent 62%), var(--stage);
}

.stage-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 84vmax;
  height: 84vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--glow-rgb), 0.32), rgba(var(--glow-rgb), 0.1) 52%, transparent 74%);
  transform: translate3d(calc(var(--gx, 70) * 1vw - 42vmax), calc(var(--gy, 30) * 1vh - 42vmax), 0);
  transition: transform 1600ms var(--ease-in-out);
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Chrome: the logo, the language switch, full screen -------------------- */

.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 3.2vh, 32px) var(--edge) 0;
  pointer-events: none;
}

.chrome > * { pointer-events: auto; }

.brand { display: block; line-height: 0; transition: opacity 300ms var(--ease-out), visibility 0s; }
.brand img { width: clamp(110px, min(11vw, 16vh), 170px); }

/* The cover and the close carry the big logo; the small one steps aside for them. */
body.brand-off .brand { opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms; }

.tools { display: flex; align-items: center; gap: 10px; }

.langs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: color-mix(in srgb, var(--stage) 70%, transparent);
}

.langs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.icon-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: color-mix(in srgb, var(--stage) 70%, transparent);
  color: var(--text-2);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, color 160ms ease;
}

.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }

@media (hover: hover) and (pointer: fine) {
  .icon-btn:not([disabled]):hover { border-color: var(--hair-strong); color: var(--text); }
  .langs button:not([aria-pressed="true"]):hover { color: var(--text); }
}

/* Presenting full screen, the pointer hides when it has been still a while. */
:root.is-idle, :root.is-idle * { cursor: none !important; }

/* ---- Dock: previous, a mark per slide, next --------------------------------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 18px);
  padding: 0 var(--edge) clamp(12px, 2.8vh, 28px);
  pointer-events: none;
}

.dock > * { pointer-events: auto; }

.dock-marks { display: flex; align-items: center; gap: 2px; }

.dock-marks button {
  appearance: none;
  display: block;
  padding: 10px 2px;
  border: 0;
  background: none;
  cursor: pointer;
}

.dock-marks button span {
  display: block;
  width: 12px;
  height: 5px;
  border-radius: 3px;
  background: var(--hair-strong);
  opacity: 0.5;
  transition: width 360ms var(--ease-out), background-color 240ms ease, opacity 240ms ease;
}

.dock-marks button.is-past span { background: var(--accent); opacity: 0.4; }
.dock-marks button[aria-current="step"] span { width: 28px; background: var(--accent); opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .dock-marks button:not([aria-current="step"]):hover span { opacity: 0.9; }
}

.dock-count {
  min-width: 4.6em;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---- The deck and its slides ------------------------------------------------ */

.deck { position: fixed; inset: 0; z-index: 1; touch-action: pinch-zoom; }

.slide {
  position: absolute;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  align-content: center;
  row-gap: clamp(18px, 4.6vh, 52px);
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms var(--ease-out), visibility 0s linear 420ms;
}

/* The slide being left fades out whole, faster than the next one arrives,
   so nothing on it lingers over its successor. */
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 380ms var(--ease-out), visibility 0s; z-index: 1; }

.slide > * { width: 100%; max-width: 1440px; margin-inline: auto; }

/* ---- Reveals ----------------------------------------------------------------
   An element marked .rv rises into place when its slide arrives, in the
   order its --i gives. Leaving, it fades fast and only resets its position
   once it is out of sight, so nothing ever slides backwards. */

.rv {
  --rd: calc(150ms + var(--i, 0) * 80ms);
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 200ms var(--ease-out), transform 0s linear 420ms;
}

.rv-blur { filter: blur(8px); transition: opacity 200ms var(--ease-out), transform 0s linear 420ms, filter 0s linear 420ms; }

.is-active .rv {
  opacity: 1;
  transform: none;
  transition: opacity 640ms var(--ease-out) var(--rd), transform 860ms var(--ease-out) var(--rd);
}

.is-active .rv-blur {
  filter: none;
  transition: opacity 640ms var(--ease-out) var(--rd), transform 860ms var(--ease-out) var(--rd), filter 640ms var(--ease-out) var(--rd);
}

/* Words rise out of their own line, one after another (.wm > .w, --w). */
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.06em 0 0.2em; margin: -0.06em 0 -0.2em; }

.w {
  display: inline-block;
  transform: translate3d(0, 112%, 0);
  transition: transform 0s linear 420ms;
}

.is-active .w { transform: none; transition: transform 980ms var(--ease-out) calc(260ms + var(--w) * 95ms); }

/* A run of words that must not break apart. */
.nw { white-space: nowrap; }

/* ---- Shared type -------------------------------------------------------------- */

.hero {
  font-size: var(--fs-hero);
  line-height: var(--hero-leading);
  letter-spacing: var(--hero-tracking);
  max-width: 14ch;
  margin-bottom: clamp(14px, 3vh, 28px);
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: var(--display-tracking);
  max-width: 22ch;
}

h3 { font-weight: var(--display-weight); letter-spacing: calc(var(--display-tracking) * 0.5); line-height: 1.2; }

.eyebrow {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--text-2); max-width: 52ch; }

.head { display: grid; gap: clamp(10px, 2.2vh, 22px); }
.head h2 { max-width: 28ch; }
.head .lead { max-width: 64ch; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(28px, 5.4vw, 96px);
}

.split.wide-right { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.3fr); }

.copy { display: grid; gap: clamp(12px, 2.6vh, 26px); align-content: center; min-width: 0; }

.caption { font-size: var(--fs-small); line-height: 1.45; color: var(--text-3); }

.note {
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  font-size: var(--fs-body);
  color: var(--text-2);
  max-width: 50ch;
}

.note b { color: var(--text); font-weight: 600; }

.chip {
  justify-self: start;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
}

/* A short list, each line a bold title and a sentence. */
.points { display: grid; gap: clamp(10px, 2.2vh, 22px); }

.points li {
  position: relative;
  padding-left: 30px;
  color: var(--text-2);
  font-size: var(--fs-body);
  max-width: 48ch;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.points b {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: var(--fs-lead);
  line-height: 1.25;
  margin-bottom: 2px;
}

.text-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
  transition: border-color 160ms ease;
}

.text-link svg { width: 14px; height: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: clamp(11px, 1.8vh, 15px) clamp(18px, 1.8vw, 26px);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), filter 160ms ease;
}

.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .text-link:hover { border-color: var(--accent); }
  .btn:hover { filter: brightness(1.08); }
}

/* A number counted up by the script: tabular while it counts, so its
   digits do not jostle, proportional once it rests. */
.num.is-counting { font-variant-numeric: tabular-nums; }

/* ---- Frames for the product's own screens --------------------------------------
   .laptop holds a 16:10 desktop shot, .phone a tall phone shot, .paper an
   A4 page (a PDF). Each crops to the top of its image. */

.laptop, .phone {
  background: var(--stage-deep);
  border: 1px solid var(--hair);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 6px color-mix(in srgb, var(--accent) 4%, transparent);
}

.laptop { border-radius: 16px; padding: clamp(5px, 0.7vw, 11px); }
.laptop img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 9px; }

.phone { border-radius: clamp(18px, 2.6vw, 36px); padding: clamp(4px, 0.5vw, 8px); }
.phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: clamp(14px, 2.1vw, 29px); }

/* A full-page shot keeps its own shape: set --ar (width / height) on the figure. */
.laptop.full img { aspect-ratio: var(--ar); }

.paper {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.paper img { width: 100%; aspect-ratio: 1 / 1.414; object-fit: cover; object-position: top; }

/* A tag pinned to a frame: "Example data". */
.tag {
  position: absolute;
  z-index: 2;
  top: clamp(10px, 1.6vh, 16px);
  right: clamp(10px, 1.2vw, 16px);
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--stage) 86%, transparent);
  border: 1px solid var(--hair-strong);
  color: var(--text-2);
  font-size: clamp(0.62rem, min(0.78vw, 1.3vh), 0.76rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* On a website shot the top right is the site's own menu: the tag goes low. */
.tag.low { top: auto; bottom: clamp(10px, 1.6vh, 16px); }

figure { position: relative; }

/* A laptop shot with a phone or a page laid over its lower left corner. */
.duo { position: relative; display: grid; padding-left: 9%; }
.duo .laptop { width: 100%; max-width: calc((var(--room) - 40px) * 1.6); justify-self: end; }
.duo .phone, .duo .paper {
  position: absolute;
  left: 0;
  bottom: clamp(-18px, -2vh, -8px);
  width: 24%;
}
.duo .paper { width: 30%; transform: rotate(-3deg); }

/* Two phones and a page side by side, each at its own slight angle. `rotate`
   composes with the reveal's `transform`, so the tilt survives the entrance. */
.trio { display: flex; align-items: center; justify-content: center; gap: 3%; width: 100%; max-width: calc(var(--room) * 1.6); justify-self: center; }
.trio > figure { rotate: var(--r, 0deg); }
.trio .phone { flex: 0 0 27%; }
.trio .paper { flex: 0 0 36%; }

.shot { display: grid; gap: clamp(8px, 1.6vh, 14px); justify-items: end; }
.shot .laptop { width: 100%; max-width: calc((var(--room) - 40px) * 1.6); }
.shot .laptop.full { max-width: calc((var(--room) - 40px) * var(--ar)); }
.shot .caption { text-align: right; max-width: 52ch; }

/* ---- Stepped slides --------------------------------------------------------------
   A slide with data-steps="N" walks N steps on Next before it moves on.
   deck.js writes data-step on the slide, presses the [data-pick] button of
   the current step, and gives .is-shown to every [data-screen] whose list of
   steps contains it ("0", or "1 2" for an element shown on two steps). */

.picker { display: grid; gap: 8px; }

.picker button {
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  width: 100%;
  padding: clamp(9px, 1.6vh, 14px) clamp(12px, 1.2vw, 18px);
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: transparent;
  color: var(--text-3);
  text-align: left;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}

.picker .n {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: clamp(26px, min(2.4vw, 4vh), 34px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--hair-strong);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-2);
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.picker b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--fs-lead); color: var(--text); line-height: 1.25; }
.picker button > span:last-child { font-size: var(--fs-small); line-height: 1.4; }
.picker button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text-2); }
.picker button[aria-pressed="true"] .n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.picker button:active { transform: scale(0.985); }

@media (hover: hover) and (pointer: fine) {
  .picker button[aria-pressed="false"]:hover { border-color: var(--hair-strong); }
}

/* The screens a stepped slide swaps between: stacked in one cell, one shown. */
.screens { display: grid; justify-items: center; align-items: center; min-height: 0; }

.screens > figure {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.985);
  filter: blur(6px);
  transition: opacity 220ms ease, transform 420ms var(--ease-out), filter 220ms ease;
  pointer-events: none;
}

.screens > figure.is-shown { opacity: 1; transform: none; filter: none; transition: opacity 420ms var(--ease-out), transform 620ms var(--ease-out), filter 420ms var(--ease-out); }

.screens .laptop { width: 100%; max-width: calc((var(--room) - 50px) * 1.6); }
.screens .laptop.full { max-width: calc((var(--room) - 50px) * var(--ar)); }
.screens .phone { width: min(52%, calc((var(--room) - 40px) / 2.16)); }
.screens .paper { width: min(62%, calc((var(--room) - 40px) / 1.414)); }

/* Numbered marks laid over a screenshot, placed in percent of the image
   (--x, --y): inset by the frame's padding so the percentages land on it. */
.marks { position: absolute; inset: 0; pointer-events: none; }
.laptop .marks { inset: clamp(5px, 0.7vw, 11px); }

.mark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: clamp(26px, min(2.4vw, 4vh), 36px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-small);
  font-weight: 700;
  box-shadow: 0 0 0 6px var(--accent-faint), 0 10px 24px -8px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  transition: opacity 160ms ease, transform 0s linear 200ms;
}

.mark.is-shown { opacity: 1; transform: translate(-50%, -50%); transition: opacity 260ms ease, transform 520ms var(--ease-spring); }

/* ---- Cards that drop in and click into place (TEGO's bricks, flattened) ---------- */

.tiles { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 22px); }

.tile {
  display: grid;
  align-content: start;
  gap: clamp(6px, 1.2vh, 12px);
  padding: clamp(14px, 2vw, 28px);
  border: 1px solid var(--hair);
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  opacity: 0;
  transform: translate3d(0, -46px, 0);
  transition: opacity 200ms ease, transform 0s linear 420ms;
}

.is-active .tile {
  opacity: 1;
  transform: none;
  transition: transform 720ms var(--ease-spring) calc(420ms + var(--t) * 120ms), opacity 160ms linear calc(420ms + var(--t) * 120ms);
}

.tile .ico {
  width: clamp(34px, min(3.2vw, 5.4vh), 48px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile .ico svg { width: 56%; height: 56%; }
.tile h3 { font-size: clamp(1.1rem, min(1.9vw, 3.2vh), 1.75rem); }
.tile p { font-size: var(--fs-body); color: var(--text-2); }
.tile .chip { margin-top: auto; }
.tile-link { border-style: dashed; background: transparent; }

/* ---- A track of steps along a line that draws itself (TEGO's phases) ------------- */

.track {
  --mark: clamp(16px, min(1.5vw, 2.6vh), 22px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 36px);
  padding-top: calc(var(--mark) + 22px);
}

.track::before,
.track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--mark) * 0.5 - 1px);
  height: 2px;
  border-radius: 2px;
}

.track::before { background: var(--hair); }

.track::after {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0s linear 420ms;
}

.is-active .track::after { transform: scaleX(1); transition: transform 1300ms var(--ease-in-out) 500ms; }

.track li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 160ms ease, transform 0s linear 420ms;
}

.track li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(-1 * (var(--mark) + 22px));
  width: var(--mark);
  height: var(--mark);
  border-radius: 50%;
  background: var(--stage);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.is-active .track li { opacity: 1; transform: none; transition: opacity 460ms var(--ease-out) calc(560ms + var(--p) * 170ms), transform 640ms var(--ease-out) calc(560ms + var(--p) * 170ms); }

.track .when { font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.track h3 { font-size: clamp(1.15rem, min(2.1vw, 3.6vh), 2rem); }
.track p { font-size: var(--fs-body); color: var(--text-2); max-width: 34ch; }

/* ---- Cards for people or roles ------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(12px, 2vw, 32px); }

.card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: clamp(16px, 2.4vw, 34px);
  border: 1px solid var(--hair);
  border-radius: var(--radius-panel);
  background: var(--panel);
}

.card h3 { font-size: clamp(1.2rem, min(2.2vw, 3.7vh), 2.1rem); }
.card .role { color: var(--accent); font-weight: 600; font-size: var(--fs-small); letter-spacing: 0.1em; text-transform: uppercase; }
.card p { color: var(--text-2); font-size: var(--fs-body); max-width: 40ch; }
.card ul { display: grid; gap: 6px; margin-top: 6px; }
.card li { position: relative; padding-left: 18px; color: var(--text-2); font-size: var(--fs-body); }
.card li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---- Figures counted up -------------------------------------------------------- */

.kpis { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: clamp(16px, 3vw, 52px); margin: 0; }
.kpi { display: grid; align-content: start; gap: 10px; padding-top: clamp(12px, 2vh, 18px); border-top: 1px solid var(--hair); }
.kpi dt { font-family: var(--font-display); font-size: clamp(2.4rem, min(5.6vw, 9.6vh), 5.2rem); line-height: 0.9; letter-spacing: var(--hero-tracking); color: var(--accent); }
.kpi dd { margin: 0; font-size: var(--fs-body); color: var(--text-2); max-width: 24ch; }

/* ---- Cover and close -------------------------------------------------------------- */

.s-cover {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(20px, 4vw, 72px);
}

.s-cover > * { max-width: none; margin: 0; }
.cover-copy { display: grid; justify-items: start; }
.cover-logo { width: clamp(170px, min(24vw, 30vh), 420px); margin-bottom: clamp(20px, 4.4vh, 48px); }
/* A notch under --fs-hero: the cover shares its width with the pile of screens. */
.s-cover .hero { font-size: clamp(2.2rem, min(5.7vw, 9.4vh), 5.5rem); }
.s-cover .lead { max-width: 36ch; }

.cover-meta {
  margin-top: clamp(18px, 4vh, 40px);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* The cover's screens drop in one after another and settle at an angle. */
.pile { position: relative; width: 100%; height: min(78vh, calc(var(--room) + 40px)); }

.pile > figure {
  position: absolute;
  opacity: 0;
  transform: translate3d(0, -60vh, 0) rotate(var(--r, 0deg));
  transition: opacity 200ms ease, transform 0s linear 420ms;
}

.is-active .pile > figure {
  opacity: 1;
  transform: rotate(var(--r, 0deg));
  transition: transform 900ms var(--ease-spring) calc(420ms + var(--d) * 140ms), opacity 160ms linear calc(420ms + var(--d) * 140ms);
}

.s-close { justify-items: center; align-content: center; gap: clamp(10px, 2.6vh, 26px); text-align: center; }
.s-close > * { width: auto; }
.close-logo { width: clamp(150px, min(20vw, 26vh), 320px); }
.s-close h2 { font-size: var(--fs-hero); line-height: var(--hero-leading); letter-spacing: var(--hero-tracking); max-width: 16ch; }
.s-close .track { margin-top: clamp(10px, 3vh, 34px); }
.legal { font-size: var(--fs-small); color: var(--text-3); }

/* =========================================================================
   Portrait screens (a tablet held upright, a phone): one column.
   The screen-size rules say "screen": Chrome sizes print media queries from
   its default portrait paper, not the 16:9 @page.
   ========================================================================= */

@media screen and (orientation: portrait) and (max-width: 1024px) {
  :root {
    --pad-x: clamp(16px, 5vw, 48px);
    --pad-top: clamp(64px, 9vh, 96px);
    --pad-bottom: clamp(60px, 8.5vh, 90px);
    --fs-h2: clamp(1.45rem, 6.4vw, 2.6rem);
    --fs-lead: clamp(0.95rem, 2.6vw, 1.25rem);
    --fs-body: clamp(0.84rem, 2.2vw, 1.05rem);
    --fs-small: clamp(0.72rem, 1.8vw, 0.88rem);
  }

  .split, .split.wide-right, .s-cover { grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 3.4vh, 36px); }
  .hero { font-size: clamp(2.3rem, 10vw, 4.4rem); }
  .pile { display: none; }

  .duo, .shot { padding-left: 0; justify-items: start; }
  .duo .laptop, .shot .laptop { justify-self: start; width: min(100%, calc((var(--room) - 470px) * 1.6)); max-width: none; }
  .duo .phone, .duo .paper, .shot .caption, .trio .paper { display: none; }
  .trio { justify-content: flex-start; max-width: calc((var(--room) - 430px) * 1.2); }
  .trio .phone { flex-basis: 46%; }

  .screens { --stage-h: max(150px, calc(var(--room) - 430px)); }
  .screens .laptop { width: min(100%, calc(var(--stage-h) * 1.55)); max-width: none; }
  .screens .phone { width: calc(var(--stage-h) / 2.2); }
  .screens .paper { width: calc(var(--stage-h) / 1.45); }

  .tiles, .cards, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track { grid-template-columns: minmax(0, 1fr); gap: clamp(10px, 2vh, 18px); padding-top: 0; padding-left: calc(var(--mark) + 16px); }
  .track::before, .track::after { display: none; }
  .track li::before { top: 0.15em; left: calc(-1 * (var(--mark) + 16px)); }
  .track p { max-width: none; }
}

/* Phones held upright: the slides keep their message and drop their extras. */
@media screen and (orientation: portrait) and (max-width: 600px) {
  .lead.extra, .points li > span, .picker button > span:last-child, .caption { display: none; }
  .points { gap: 8px; }
  .points b { font-size: var(--fs-body); }
  .tile p, .card p { font-size: var(--fs-small); }
  .tiles { gap: 8px; }
  .tile { padding: 12px 14px; }
  .dock-marks { display: none; }
}

/* =========================================================================
   A laptop's browser window that is not full screen (1366x625, 1280x600):
   thinner bars. Full screen (F) gives the deck its room back.
   ========================================================================= */

@media screen and (orientation: landscape) and (min-height: 561px) and (max-height: 680px) {
  :root { --pad-top: 58px; --pad-bottom: 56px; }
  .chrome { padding-top: 12px; }
  .icon-btn { width: 34px; height: 34px; }
  .langs button { padding: 6px 11px; }
  .dock { padding-bottom: 8px; }
  .lead.extra { display: none; }
}

/* Short landscape screens (a phone on its side, a small window): two columns
   stay, the extras go, and the bars at the top and bottom get thinner. */
@media screen and (orientation: landscape) and (max-height: 560px) {
  :root {
    --pad-top: 56px;
    --pad-bottom: 48px;
    --pad-x: clamp(18px, 5vw, 48px);
    --fs-h2: clamp(1.25rem, 4.2vw, 1.9rem);
    --fs-hero: clamp(1.9rem, 6.4vw, 3.2rem);
    --fs-lead: clamp(0.82rem, 1.9vw, 1rem);
    --fs-body: clamp(0.76rem, 1.7vw, 0.92rem);
    --fs-small: clamp(0.66rem, 1.4vw, 0.78rem);
  }

  .chrome { padding-top: 10px; }
  .brand img { width: 96px; }
  .dock { padding-bottom: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .lead, .caption, .note, .points li > span, .picker button > span:last-child { display: none; }
  .s-cover .lead { display: block; }
  .cover-logo { width: clamp(120px, 18vw, 180px); margin-bottom: 12px; }
  .tile p { display: none; }
  .track p { font-size: var(--fs-small); }
}

/* =========================================================================
   Reduced motion: things appear, nothing travels.
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  .rv, .w, .tile, .track li, .screens > figure, .mark { transform: none !important; }
  .mark.is-shown { transform: translate(-50%, -50%) !important; }
  .pile > figure { transform: rotate(var(--r, 0deg)) !important; }
  .rv-blur, .screens > figure { filter: none !important; }
  .track::after { transform: none !important; }
  .stage-glow { transition: none; }
}

/* =========================================================================
   Print (Save as PDF): one slide to a 16:9 page, everything in place.
   ========================================================================= */

@media print {
  @page { size: 338.67mm 190.5mm; margin: 0; }

  html, body { height: auto; overflow: visible; background: var(--stage); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .stage { position: fixed; }
  .chrome, .dock, .stage-glow { display: none; }
  .deck { position: static; }

  .slide {
    position: relative;
    width: 338.67mm;
    height: 190.5mm;
    opacity: 1;
    visibility: visible;
    transition: none;
    break-after: page;
    --room: calc(190.5mm - var(--pad-top) - var(--pad-bottom));
  }

  .slide:last-child { break-after: auto; }

  .rv, .w, .tile, .track li, .pile > figure { opacity: 1 !important; transition: none !important; }
  .rv, .w, .tile, .track li { transform: none !important; }
  .pile > figure { transform: rotate(var(--r, 0deg)) !important; }
  .rv-blur { filter: none !important; }
  .track::after { transform: none !important; }
  .screens > figure:not(.print-shown) { display: none; }
  .screens > figure.print-shown { opacity: 1 !important; transform: none !important; filter: none !important; }
}
