/* ============================================================
   WAYRA — FIELD MANUAL · HORIZONTAL SCROLLYTELLING
   Aesthetic: Wayra brand + The North Face technical print
              + Nike ACG outdoor utility.
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --bg: #ECECEC;
  --surface: #FFFFFF;
  --ink: #0A0A0A;
  --ink-soft: #2A2A2A;
  --muted: #6B6B6B;
  --rule: #C9C9C9;
  --rule-strong: #1a1a1a;
  --accent: #FF6B64;
  --accent-warm: #FFB14A;
  --invert-bg: #0A0A0A;
  --invert-ink: #ECECEC;

  --mono: "Space Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --display: "Space Grotesk", "Archivo Black", system-ui, -apple-system, sans-serif;
  --display-strong: "Archivo Black", "Space Grotesk", system-ui, sans-serif;

  --panel-pad-x: clamp(28px, 4.5vw, 80px);
  --panel-pad-y: clamp(80px, 8vh, 110px);
  --rule-w: 1px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; padding: 0; margin: 0; }
mark { background: transparent; color: var(--accent); }
em { font-style: normal; color: var(--accent); }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ---------- TRACK (HORIZONTAL SCROLL) ---------- */
.track {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }

.panel {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: grid;
  align-content: center;
  padding: var(--panel-pad-y) var(--panel-pad-x);
  border-right: var(--rule-w) solid var(--rule);
  overflow: hidden;
}

/* numbered chapter bar at the left of every panel */
.panel::before {
  content: attr(id);
  position: absolute;
  top: 50%;
  left: 14px;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
  pointer-events: none;
}

/* universal scaffolding inside a panel */
.panel__body {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.panel__body--narrow { max-width: 540px; }
.panel__body--center { margin: 0 auto; text-align: center; align-items: center; }

.kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker--right { align-self: flex-end; }
.kicker--invert { color: var(--invert-ink); opacity: 0.7; }

.chapter {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 4px 8px;
  border: 1px solid var(--ink);
  align-self: flex-start;
  background: var(--bg);
}
.chapter--invert { color: var(--invert-ink); border-color: var(--invert-ink); background: transparent; }

.display {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 6.5vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.display--small { font-size: clamp(38px, 4.4vw, 64px); }
.display__accent { color: var(--accent); }

.lede {
  font-family: var(--display);
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.35;
  max-width: 560px;
  color: var(--ink-soft);
  margin: 0;
}

.bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  color: inherit;
}
.bullets li::before {
  content: "▸ ";
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   HUD — fixed top + bottom utility bars
   ============================================================ */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(236,236,236,0.92), rgba(236,236,236,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hud--top { top: 0; }
.hud--bottom {
  top: auto;
  bottom: 0;
  background: linear-gradient(to top, rgba(236,236,236,0.95), rgba(236,236,236,0));
  border-top: 1px solid var(--rule);
}

.hud__brand { display: flex; align-items: center; gap: 8px; }
.hud__mark { color: var(--accent); }
.hud__name { font-weight: 700; }
.hud__sep { color: var(--muted); }
.hud__sub { color: var(--muted); }
.hud__meta { display: flex; align-items: center; gap: 8px; color: var(--muted); }

.hud__left, .hud__right {
  display: flex; align-items: center; gap: 10px;
  min-width: 220px;
  flex: 0 0 auto;
}
.hud__right { justify-content: flex-end; }
.hud__title { color: var(--muted); }
.hud__chip {
  border: 1px solid var(--ink);
  padding: 3px 6px;
  background: var(--bg);
}
.hud__hint { color: var(--accent); }

.hud__nav {
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.hud__btn {
  width: 32px; height: 32px;
  border: 1px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: background .15s, color .15s;
}
.hud__btn:hover { background: var(--ink); color: var(--bg); }

/* ---- INVERTED HUD on dark panels (P07, P13, P17) ---- */
body.hud-on-dark .hud--top {
  background: linear-gradient(to bottom, rgba(10,10,10,0.85), rgba(10,10,10,0));
  color: var(--invert-ink);
}
body.hud-on-dark .hud--bottom {
  background: linear-gradient(to top, rgba(10,10,10,0.92), rgba(10,10,10,0));
  border-top-color: rgba(255,255,255,0.18);
  color: var(--invert-ink);
}
body.hud-on-dark .hud__sep,
body.hud-on-dark .hud__sub,
body.hud-on-dark .hud__meta,
body.hud-on-dark .hud__title { color: rgba(255,255,255,0.65); }
body.hud-on-dark .hud__chip {
  border-color: var(--invert-ink);
  background: transparent;
  color: var(--invert-ink);
}
body.hud-on-dark .hud__btn {
  border-color: var(--invert-ink);
  background: transparent;
  color: var(--invert-ink);
}
body.hud-on-dark .hud__btn:hover {
  background: var(--invert-ink);
  color: var(--invert-bg);
}
body.hud-on-dark .hud-walker { color: var(--invert-ink); }

/* ============================================================
   PANEL 01 — HERO
   ============================================================ */

.panel--hero {
  background: var(--bg);
  align-content: stretch;
}
.panel--hero .panel__grid {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 22px;
  height: 100%;
  position: relative;
  z-index: 2;
}

.hero__topo {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(10,10,10,0.05) 22px 23px),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(10,10,10,0.05) 22px 23px),
    radial-gradient(ellipse at 30% 60%, rgba(255,107,100,0.10), transparent 60%);
  pointer-events: none;
}
/* contour-line pattern overlay */
.panel--hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -10%;
  width: 80vmin;
  height: 80vmin;
  background:
    radial-gradient(circle, transparent 30%, var(--ink) 30%, var(--ink) 30.4%, transparent 30.4%),
    radial-gradient(circle, transparent 38%, var(--ink) 38%, var(--ink) 38.4%, transparent 38.4%),
    radial-gradient(circle, transparent 46%, var(--ink) 46%, var(--ink) 46.4%, transparent 46.4%),
    radial-gradient(circle, transparent 54%, var(--ink) 54%, var(--ink) 54.4%, transparent 54.4%),
    radial-gradient(circle, transparent 62%, var(--ink) 62%, var(--ink) 62.4%, transparent 62.4%);
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.hero__meta {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.tag--ghost { background: transparent; color: var(--ink); }

.hero__title {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(96px, 20vw, 300px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--ink);
  align-self: end;
}
.hero__title-accent { color: var(--accent); }

.hero__tagline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.hero__credits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  border-top: 1px solid var(--ink);
  padding-top: 14px;
  max-width: 720px;
}
.hero__credits-block p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.hero__scroll {
  position: absolute;
  right: var(--panel-pad-x);
  bottom: var(--panel-pad-y);
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.scroll-hint { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ============================================================
   PANEL 02 — IMAGE LEFT / 11 — IMAGE RIGHT
   ============================================================ */
.panel--image-left,
.panel--image-right {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-content: center;
  align-items: center;
}
.panel--image-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }

.panel__figure {
  position: relative;
  width: 100%;
  height: 70vh;
  max-height: 720px;
  overflow: hidden;
  border: 1px solid var(--ink);
}
.panel__figure img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) saturate(0.9);
}
.panel__figure--bleed { border: 0; }

.panel__figcap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.spec {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}
.spec li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.spec li span {
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   PANEL 03 — QUOTE
   ============================================================ */
.panel--quote {
  align-content: center;
  justify-items: center;
  text-align: center;
  background: var(--bg);
  position: relative;
}
.quote__crosshair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--rule) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--rule) 50%, transparent calc(50% + 0.5px));
}
.quote {
  position: relative;
  max-width: 1100px;
  margin: 0;
  z-index: 2;
}
.quote__mark {
  font-family: var(--display-strong);
  font-size: clamp(80px, 10vw, 140px);
  color: var(--accent);
  line-height: 0.5;
  display: block;
  margin-bottom: 12px;
}
.quote p {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}
.quote__break { margin-top: 16px !important; }
.quote .strike {
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--accent);
}
.quote__foot { margin-top: 32px; }

/* ============================================================
   PANEL 04 — DATA
   ============================================================ */
.panel--data {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 32px;
  align-content: start;
  padding-top: calc(var(--panel-pad-y) + 10px);
}
.datagrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0;
  border: 1px solid var(--ink);
  min-height: 0;
  height: 100%;
}
.datacard {
  padding: 24px;
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
  background: var(--bg);
}
.datacard:last-child { border-right: 0; }
.datacard--invert { background: var(--ink); color: var(--bg); }
.datacard--invert .kicker { color: var(--bg); opacity: 0.7; }
.datacard__num {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(48px, 5vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.datacard--invert .datacard__num { color: var(--accent); }
.datacard p { margin: 0; font-size: 13px; color: var(--ink); }
.datacard--invert p { color: var(--bg); }

/* ============================================================
   PANEL 05 — FRAGMENTS
   ============================================================ */
.panel--fragments {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 32px;
  align-content: center;
  align-items: center;
}
.fragments {
  position: relative;
  width: 100%;
  height: min(70vh, 640px);
  border: 1px solid var(--ink);
  background: var(--bg);
  overflow: hidden;
}
.fragments::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(10,10,10,0.06) 30px 31px),
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(10,10,10,0.06) 30px 31px);
}
.frag {
  position: absolute;
  top: var(--y);
  left: var(--x);
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(20px, 2.2vw, 36px);
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--bg);
  padding: 4px 10px;
  border: 1px solid var(--ink);
  white-space: nowrap;
  /* baseline tilt + continuous drift */
  transform: rotate(var(--r));
  animation: fragDrift 9s cubic-bezier(.45,.05,.55,.95) infinite;
  animation-delay: var(--d, 0s);
  will-change: transform;
}
.frag:nth-child(3n) { color: var(--accent); border-color: var(--accent); }
.frag:nth-child(4n) { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* spread the drift cycle so capsules don't pulse in unison */
.frag:nth-child(1)  { --d: -0.0s;  animation-duration: 8.4s; }
.frag:nth-child(2)  { --d: -1.7s;  animation-duration: 10.1s; }
.frag:nth-child(3)  { --d: -3.2s;  animation-duration: 9.0s; }
.frag:nth-child(4)  { --d: -0.9s;  animation-duration: 11.2s; }
.frag:nth-child(5)  { --d: -4.4s;  animation-duration: 8.7s; }
.frag:nth-child(6)  { --d: -2.1s;  animation-duration: 9.6s; }
.frag:nth-child(7)  { --d: -5.5s;  animation-duration: 10.8s; }
.frag:nth-child(8)  { --d: -1.1s;  animation-duration: 9.2s; }
.frag:nth-child(9)  { --d: -3.8s;  animation-duration: 8.9s; }
.frag:nth-child(10) { --d: -6.0s;  animation-duration: 11.0s; }
.frag:nth-child(11) { --d: -2.6s;  animation-duration: 9.8s; }
.frag:nth-child(12) { --d: -4.9s;  animation-duration: 10.3s; }

@keyframes fragDrift {
  0%   { transform: rotate(var(--r))                       translate3d(0,    0,    0); }
  25%  { transform: rotate(calc(var(--r) + 1.8deg))        translate3d(10px, -6px, 0); }
  50%  { transform: rotate(calc(var(--r) - 1.2deg))        translate3d(-8px,  8px, 0); }
  75%  { transform: rotate(calc(var(--r) + 0.8deg))        translate3d(6px,   4px, 0); }
  100% { transform: rotate(var(--r))                       translate3d(0,    0,    0); }
}

/* pause drift on small viewports where it's less readable */
@media (prefers-reduced-motion: reduce) {
  .frag { animation: none; }
}

/* ============================================================
   PANEL 06 — CRITICAL MOMENTS
   ============================================================ */
.panel--criticals {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 48px;
  align-content: center;
  align-items: center;
}
.display__accent { color: var(--accent); }
.criticals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--ink);
}
.criticals li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  font-family: var(--display);
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 700;
  background: var(--bg);
}
.criticals li:nth-child(2n) { border-right: 0; }
.criticals li:nth-last-child(-n+2) { border-bottom: 0; }
.criticals__id {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 400;
}

/* ============================================================
   PANEL 07 — MANIFESTO (INVERSE)
   ============================================================ */
.panel--manifesto {
  background: var(--invert-bg);
  color: var(--invert-ink);
  align-content: center;
  justify-content: start;
  position: relative;
}
.manifesto__topo {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(255,255,255,0.04) 24px 25px),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(255,255,255,0.04) 24px 25px);
}
.manifesto__inner { position: relative; z-index: 2; max-width: 1200px; }
.manifesto__title {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(56px, 12vw, 200px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin: 18px 0 0;
  max-width: 100%;
}
.manifesto__accent { color: var(--accent); }
.manifesto__sub {
  margin-top: 28px;
  font-family: var(--display);
  font-size: clamp(18px, 1.6vw, 26px);
  max-width: 560px;
  color: var(--invert-ink);
  opacity: 0.85;
}
.panel--manifesto::before { color: rgba(255,255,255,0.45); }

/* ============================================================
   PANEL 08 — ATTRIBUTES
   ============================================================ */
.panel--attributes {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-content: center;
  align-items: center;
}
.attrs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}
.attrs li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.5fr) minmax(0, 1.8fr);
  align-items: baseline;
  gap: 24px;
  padding: 22px 12px;
  border-bottom: 1px solid var(--ink);
  transition: background .25s;
}
.attrs__w { hyphens: auto; }
.attrs li:hover { background: var(--ink); color: var(--bg); }
.attrs li:hover .attrs__n { color: var(--accent); }
.attrs__n {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.attrs__w {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 52px);
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.attrs__d {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.attrs li:hover .attrs__d { color: var(--bg); opacity: 0.85; }

/* ============================================================
   PANEL 09 — DEFINITION
   ============================================================ */
.panel--definition {
  background: var(--bg);
  align-content: center;
  justify-items: center;
}
.definition {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(48px, 7vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 28px 0;
}
.definition mark {
  background: linear-gradient(180deg, transparent 65%, rgba(255,107,100,0.35) 65% 95%, transparent 95%);
  color: var(--ink);
  padding: 0 0.05em;
}

/* ============================================================
   PANEL 10 — PILLARS
   ============================================================ */
.panel--principles {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 32px;
  align-content: start;
  padding-top: calc(var(--panel-pad-y) + 10px);
}
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  border: 1px solid var(--ink);
  min-height: 0;
  height: 100%;
}
.pillar {
  padding: 22px;
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pillar:last-child { border-right: 0; }
.pillar:nth-child(2) { background: var(--ink); color: var(--bg); }
.pillar:nth-child(2) .pillar__num { color: var(--accent); }
.pillar__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.pillar h3 {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(24px, 2.4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0;
}
.pillar p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  margin-top: auto;
}
.pillar:nth-child(2) p { color: var(--bg); opacity: 0.8; }

/* ============================================================
   PANEL 12 — CARDS
   ============================================================ */
.panel--cards {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
  align-content: center;
  align-items: center;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  grid-template-rows: repeat(2, minmax(0,1fr));
  gap: 16px;
  height: min(70vh, 640px);
  min-height: 0;
}
.card {
  border: 1px solid var(--ink);
  padding: 20px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--ink);
}
.card--warn::before { background: var(--accent-warm); }
.card--alert::before { background: var(--accent); }
.card header {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.card__id { color: var(--muted); }
.card__tag {
  border: 1px solid var(--ink);
  padding: 2px 6px;
}
.card--alert .card__tag { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.card--warn .card__tag { background: var(--accent-warm); color: var(--ink); border-color: var(--accent-warm); }
.card__msg {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 26px);
  line-height: 1.25;
  margin: 0;
  flex: 1;
}

/* ============================================================
   PANEL 13 — STATEMENT (INVERSE)
   ============================================================ */
.panel--statement {
  background: var(--invert-bg);
  color: var(--invert-ink);
  align-content: center;
  position: relative;
}
.panel--statement::before { color: rgba(255,255,255,0.45); }
.statement__topo {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(255,107,100,0.20), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,0.05) 28px 29px),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,0.05) 28px 29px);
}
.statement__inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
}
.statement__text {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(48px, 7.2vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 18px 0 0;
  max-width: 100%;
}
.statement__word {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.06em;
}

/* ============================================================
   PANEL 14 — WAYRA FREE
   ============================================================ */
.panel--free {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-content: center;
  align-items: center;
}
.speclist {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
}
.speclist th,
.speclist td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.speclist th {
  width: 80px;
  color: var(--accent);
  font-weight: 700;
}
.speclist td { font-weight: 400; color: var(--ink); }

.panel__figure.phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
}
.phone .phone__frame {
  width: min(250px, 26vw);
  aspect-ratio: 9 / 19;
  background: var(--ink);
  border-radius: 30px;
  padding: 9px;
  position: relative;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45);
  flex: 0 0 auto;
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 24px;
  padding: 44px 12px 12px;
  overflow: hidden;
}
.phone__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 22px;
  background: var(--ink);
  border-radius: 14px;
}
.phone__time {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
}
.phone__alert {
  background: var(--surface);
  border: 1px solid var(--ink);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-family: var(--mono);
}
.phone__alert-id {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.phone__alert p {
  font-family: var(--display);
  font-weight: 500;
  font-size: 13px;
  margin: 0;
  line-height: 1.3;
}
.phone__alert--ghost { opacity: 0.5; }
.phone .panel__figcap { position: static; margin-top: 16px; }

/* ============================================================
   PANEL 15 — PREMIUM
   ============================================================ */
.panel--premium {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 32px;
  align-content: start;
  padding-top: calc(var(--panel-pad-y) + 10px);
}
.premium {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--ink);
  min-height: 0;
  height: 100%;
}
.premium__col {
  padding: 24px;
  border-right: 1px solid var(--ink);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  position: relative;
}
.premium__col:last-child { border-right: 0; background: var(--ink); color: var(--bg); }
.premium__col:last-child .kicker { color: var(--bg); opacity: 0.7; }
.premium__col h3 {
  font-family: var(--display-strong);
  font-size: clamp(32px, 3vw, 56px);
  letter-spacing: -0.02em;
  margin: 4px 0 0;
}
.premium__col:last-child .bullets li::before { color: var(--accent); }

.premium__diagram {
  align-self: end;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}
.watch {
  width: 130px;
  height: 160px;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 24px;
  padding: 8px;
  position: relative;
}
.watch::before, .watch::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 18px;
  background: var(--ink);
  border-radius: 4px;
}
.watch::before { top: -16px; }
.watch::after { bottom: -16px; }
.watch__screen {
  width: 100%; height: 100%;
  background: var(--ink); color: var(--bg);
  border-radius: 16px;
  padding: 14px 12px;
  font-family: var(--mono);
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.watch__screen span {
  font-family: var(--display-strong);
  font-size: 24px;
  letter-spacing: -0.01em;
}
.watch__screen small {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

/* AirPods Pro pair — inherits currentColor (light on dark column) */
.premium__diagram--bud {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  align-self: end;
  justify-self: end;
}
.airpod {
  width: clamp(54px, 8vw, 84px);
  height: auto;
  color: var(--bg);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  display: block;
}
.airpod--left  { transform: rotate(-10deg); }
.airpod--right { transform: scaleX(-1) rotate(-10deg); }
.premium__diagram--bud:hover .airpod--left  { transform: rotate(-16deg) translateY(-4px); }
.premium__diagram--bud:hover .airpod--right { transform: scaleX(-1) rotate(-16deg) translateY(-4px); }

/* ============================================================
   PANEL 16 — ALWAYS WORKING SPLIT
   ============================================================ */
.panel--alwayson {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 32px;
  align-content: start;
  padding-top: calc(var(--panel-pad-y) + 10px);
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ink);
  min-height: 0;
  height: 100%;
  max-height: 480px;
}
.split__col {
  padding: 24px;
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.split__col:last-child { border-right: 0; background: var(--ink); color: var(--bg); }
.split__col:last-child .kicker { color: var(--bg); opacity: 0.7; }
.split__col:last-child .bullets li::before { color: var(--accent); }
.split__col header { display: flex; align-items: center; gap: 10px; }
.split__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--rule);
  border: 1px solid var(--ink);
}
.split__dot.is-on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,100,0.25);
}

/* ============================================================
   PANEL 17 — FUTURE
   ============================================================ */
.panel--future {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  align-content: stretch;
}
.panel--future .panel__figure--bleed {
  width: 100%; height: 100%;
}
.panel--future .panel__figure--bleed img {
  filter: grayscale(0.4) contrast(1.1);
}
.future__inner {
  background: var(--invert-bg);
  color: var(--invert-ink);
  padding: var(--panel-pad-y) var(--panel-pad-x);
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
}
.future__title {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(48px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
}
.future__list {
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--display);
  font-size: clamp(18px, 1.6vw, 24px);
}
.future__list li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.future__list li span {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}

/* ============================================================
   PANEL 18 — OUTRO
   ============================================================ */
.panel--outro {
  background: var(--bg);
  align-content: center;
  position: relative;
}
.outro__topo {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 80%, rgba(255,107,100,0.18), transparent 50%),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(10,10,10,0.04) 16px 17px);
}
.outro__inner { position: relative; z-index: 2; max-width: 1200px; }
.outro__title {
  font-family: var(--display-strong);
  font-weight: 900;
  font-size: clamp(72px, 11vw, 200px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  margin: 16px 0 0;
}
.outro__accent { color: var(--accent); }
.outro__byline {
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.outro__credits {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.outro__credits span { padding: 4px 8px; border: 1px solid var(--ink); }
.outro__restart {
  margin-top: 28px;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  background: var(--bg);
  transition: background .15s, color .15s;
}
.outro__restart:hover { background: var(--ink); color: var(--bg); }

/* ============================================================
   REVEAL ON ENTRY (driven by IntersectionObserver in JS)
   Easing: ease-out-expo for a confident, decelerating arrival.
   Stagger up to 8 children with finer steps; movement starts
   from below + slight scale for depth.
   ============================================================ */
.panel > * {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.985);
  transition:
    opacity .8s cubic-bezier(.16, 1, .3, 1),
    transform .9s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, opacity;
}
.panel.is-in > * {
  opacity: 1;
  transform: none;
}
.panel.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.panel.is-in > *:nth-child(2) { transition-delay: 0.12s; }
.panel.is-in > *:nth-child(3) { transition-delay: 0.19s; }
.panel.is-in > *:nth-child(4) { transition-delay: 0.26s; }
.panel.is-in > *:nth-child(5) { transition-delay: 0.33s; }
.panel.is-in > *:nth-child(6) { transition-delay: 0.40s; }
.panel.is-in > *:nth-child(7) { transition-delay: 0.47s; }
.panel.is-in > *:nth-child(8) { transition-delay: 0.54s; }

/* initial hash-target panel shows instantly — no reveal */
.panel.no-anim > * {
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* keep absolutely-positioned background art visible during reveal */
.panel > .hero__topo,
.panel > .manifesto__topo,
.panel > .statement__topo,
.panel > .outro__topo,
.panel > .quote__crosshair {
  opacity: 1 !important;
  transform: none !important;
  will-change: auto;
}

/* ============================================================
   RESPONSIVE: tighter narrow / mobile
   ============================================================ */
@media (max-width: 920px) {
  .panel--image-left,
  .panel--image-right,
  .panel--fragments,
  .panel--criticals,
  .panel--cards,
  .panel--free,
  .panel--attributes,
  .panel--future {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: center;
  }
  .panel__figure { height: 38vh; max-height: 320px; }
  .datagrid, .pillars, .premium { grid-template-columns: repeat(2, 1fr); }
  .datacard, .pillar, .premium__col { border-bottom: 1px solid var(--ink); }
  .datagrid { height: auto; max-height: none; }
  .pillars { height: auto; max-height: none; }
  .cards { height: auto; max-height: none; grid-template-rows: repeat(4, minmax(0,1fr)); grid-template-columns: 1fr; }
  .criticals { grid-template-columns: 1fr; }
  .criticals li:nth-child(2n) { border-right: 1px solid var(--ink); }
  .hud__sub { display: none; }
  .hud__left { min-width: 0; }
  .hud__right { display: none; }
}

@media (max-width: 560px) {
  .hud__meta { display: none; }
  .hero__credits { grid-template-columns: 1fr; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .panel > * { transition: none; opacity: 1; transform: none; }
  .track { scroll-behavior: auto; }
  .scroll-hint { animation: none; }
}

/* ============================================================
   HUD WALKER — black silhouette of a backpacker that walks
   left-to-right across the top border of the bottom HUD.
   ============================================================ */
.hud-walker {
  position: absolute;
  bottom: 100%;            /* feet rest on the HUD top edge */
  left: 0;
  width: 24px;
  height: 35px;
  color: var(--ink);
  pointer-events: none;
  z-index: 1;
  /* X tracks scroll progress — JS sets --walker-progress 0..1 */
  --walker-progress: 0;
  transform: translateX(calc((100vw - 24px) * var(--walker-progress)));
  transition: transform 320ms cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
/* vertical bob to give walking weight */
.hud-walker__bob {
  animation: walkerBob 0.55s ease-in-out infinite;
}
/* limbs: each <g> is positioned via translate then pivoted via rotate.
   Default SVG transform-origin (0,0) means the rotation pivots at the
   translation point — i.e. the shoulder / hip. */
.hud-walker__leg--back  { animation: walkerLegBack  0.55s ease-in-out infinite; }
.hud-walker__leg--front { animation: walkerLegFront 0.55s ease-in-out infinite; }
.hud-walker__arm--back  { animation: walkerArmBack  0.55s ease-in-out infinite; }
.hud-walker__arm--front { animation: walkerArmFront 0.55s ease-in-out infinite; }

@keyframes walkerBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.5px); }
}
/* legs swing opposite to each other */
@keyframes walkerLegBack {
  0%, 100% { transform: translate(15px, 42px) rotate(22deg); }
  50%      { transform: translate(15px, 42px) rotate(-22deg); }
}
@keyframes walkerLegFront {
  0%, 100% { transform: translate(20px, 42px) rotate(-22deg); }
  50%      { transform: translate(20px, 42px) rotate(22deg); }
}
/* arms swing opposite to the leg on the same side */
@keyframes walkerArmBack {
  0%, 100% { transform: translate(22px, 22px) rotate(-18deg); }
  50%      { transform: translate(22px, 22px) rotate(18deg); }
}
@keyframes walkerArmFront {
  0%, 100% { transform: translate(13px, 22px) rotate(18deg); }
  50%      { transform: translate(13px, 22px) rotate(-18deg); }
}

/* pause walker when motion is reduced */
@media (prefers-reduced-motion: reduce) {
  .hud-walker,
  .hud-walker__bob,
  .hud-walker__arm,
  .hud-walker__leg { animation: none; }
}
