/* =========================================================
   MEASUREM — design system
   Brand tokens preserved from the existing site.
   Shape rule (documented, applied everywhere):
     buttons + inputs = 10px radius
     structural grid cells, media frames, portraits = 0 (sharp)
   ========================================================= */

:root {
  /* ground */
  --ink:        #041226;   /* primary brand navy */
  --ink-deep:   #020B18;   /* poster moments */
  --ink-alt:    #061A31;   /* alternate band */
  --panel:      #08213C;   /* raised cell */
  --panel-2:    #0A2846;   /* raised cell, hover */

  /* accent */
  --mint:       #01DCA2;
  --mint-dim:   #04B98A;
  --mint-06:    rgba(1,220,162,.06);
  --mint-12:    rgba(1,220,162,.12);
  --mint-22:    rgba(1,220,162,.22);
  --mint-40:    rgba(1,220,162,.40);

  /* type */
  --fg:         #EAF3F7;
  --fg-2:       rgba(234,243,247,.62);
  --fg-3:       rgba(234,243,247,.42);
  --fg-4:       rgba(234,243,247,.28);

  /* structure */
  --line:       rgba(96,150,190,.16);
  --line-2:     rgba(96,150,190,.30);

  --shell:      1320px;
  --gut:        clamp(20px, 4.2vw, 52px);
  --r:          10px;

  --ease:       cubic-bezier(.2,.7,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "cv11" 1, "ss01" 1;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, canvas { display: block; max-width: 100%; }

a { color: var(--mint); text-decoration: none; }

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

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* ---------- type scale ---------- */

h1, h2, h3, h4 {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 6.4vw, 88px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -.045em;
}

h2 {
  font-size: clamp(30px, 4.1vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.035em;
}

h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.022em;
}

p { margin: 0; }

.lede {
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.75;
  color: var(--fg-2);
  max-width: 58ch;
}

.body { font-size: 15px; line-height: 1.75; color: var(--fg-2); }
.body-sm { font-size: 14px; line-height: 1.72; color: var(--fg-3); }

.accent { color: var(--mint); }

/* small mono label */
.tag {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--mint);
}

.tag-mute { color: var(--fg-3); }

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

section { position: relative; }

.band       { padding-block: clamp(76px, 9.5vw, 148px); }
.band-alt   { background: var(--ink-alt); }
.band-deep  { background: var(--ink-deep); }

.rule-top::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, var(--line-2) 22%, var(--mint-22) 50%, var(--line-2) 78%, transparent);
}

/* section header: stacked, not split */
.head { max-width: 780px; margin-bottom: clamp(46px, 5vw, 76px); }
.head .tag { display: block; margin-bottom: 20px; }
.head h2 { max-width: 17ch; margin-bottom: 24px; }
.head .lede { max-width: 56ch; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  padding: 17px 34px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 180ms var(--ease), border-color 180ms var(--ease),
              color 180ms var(--ease), transform 120ms var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--mint);
  color: var(--ink);           /* 11.9:1 on mint — AA pass */
}
.btn-primary:hover { background: var(--mint-dim); color: var(--ink); }

.btn-ghost {
  color: var(--fg);
  border-color: var(--line-2);
  background: rgba(255,255,255,.02);
}
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); }

.btn-sm { padding: 12px 24px; font-size: 11px; }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 74px;
  display: flex;
  align-items: center;
  background: rgba(4,18,38,.38);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: background 260ms var(--ease), border-color 260ms var(--ease);
}

.nav[data-stuck] {
  background: rgba(3,13,28,.90);
  border-bottom-color: var(--line);
}

.nav .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-mark img { height: 48px; width: auto; }

.nav-right { display: flex; align-items: center; gap: 26px; }

.nav-domain {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.nav-domain i {
  width: 6px; height: 6px;
  background: var(--mint);
  display: block;
  animation: pulse 2.6s ease-in-out infinite;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 100% 82% at 76% 4%, #0B2E50 0%, rgba(4,18,38,0) 62%),
    var(--ink);
  padding-block: 114px clamp(64px, 8vw, 104px);
}

/* tracking-overlay canvas: weighted to the right, masked so type stays dominant */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 74% 92% at 78% 50%, #000 22%, transparent 82%);
          mask-image: radial-gradient(ellipse 74% 92% at 78% 50%, #000 22%, transparent 82%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(4,18,38,0), var(--ink));
  pointer-events: none;
}

.hero .shell { position: relative; z-index: 2; }

.hero-copy { max-width: min(660px, 62%); }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(24px, 3vw, 38px);
}
.hero-eyebrow span:last-child {
  flex: 0 0 96px;
  height: 1px;
  background: linear-gradient(90deg, var(--mint), transparent);
}

.hero h1 { max-width: 13ch; margin-bottom: clamp(24px, 2.6vw, 36px); }
.hero h1 span { display: block; }

.hero .lede { max-width: 48ch; margin-bottom: clamp(30px, 3.4vw, 44px); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- client marquee ---------- */

.clients {
  padding-block: clamp(52px, 6vw, 80px);
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink) 0%, #071B33 50%, var(--ink) 100%);
}
.clients .marquee::before { background: linear-gradient(90deg,  #071B33, rgba(7,27,51,0)); }
.clients .marquee::after  { background: linear-gradient(270deg, #071B33, rgba(7,27,51,0)); }

.clients-label {
  text-align: center;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-inline: var(--gut);
  margin-bottom: clamp(34px, 4vw, 52px);
}

.marquee {
  position: relative;
  cursor: grab;
  touch-action: pan-y;          /* let the page still scroll vertically */
  user-select: none;
  -webkit-user-select: none;
}
.marquee[data-drag] { cursor: grabbing; }
.marquee img { -webkit-user-drag: none; user-drag: none; }
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(60px, 12vw, 190px);
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg,  var(--ink), rgba(4,18,38,0)); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--ink), rgba(4,18,38,0)); }

.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(48px, 6vw, 92px);
  width: max-content;
  animation: marquee 34s linear infinite;   /* JS takes over and scrubs */
  will-change: transform;
}

.marquee-track img {
  height: clamp(78px, 7.2vw, 106px);
  width: auto;
  opacity: .9;
  filter: brightness(1.18) contrast(1.04) drop-shadow(0 0 18px rgba(255,255,255,.14));
  transition: opacity 220ms var(--ease), filter 220ms var(--ease);
}
.marquee-track img:hover {
  opacity: 1;
  filter: brightness(1.3) contrast(1.06) drop-shadow(0 0 22px rgba(1,220,162,.3));
}
.marquee-track img.wide { height: clamp(56px, 5.2vw, 76px); }

/* ---------- testimonial poster ---------- */

.poster {
  position: relative;
  overflow: hidden;
  background: var(--ink-deep);
  padding-top: clamp(76px, 9vw, 130px);
}

.poster::before {
  content: "";
  position: absolute;
  width: min(760px, 86vw);
  aspect-ratio: 1;
  right: -6%;
  bottom: -34%;
  background: radial-gradient(circle, rgba(1,220,162,.17) 0%, transparent 64%);
  pointer-events: none;
}

.poster-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: end;
}

.poster-copy { padding-bottom: clamp(76px, 9vw, 130px); }

.poster blockquote {
  margin: 0 0 clamp(34px, 4vw, 52px);
  font-size: clamp(21px, 2.5vw, 36px);
  font-weight: 300;
  line-height: 1.42;
  letter-spacing: -.03em;
  color: var(--fg);
  text-wrap: pretty;
}

.poster-by {
  padding-top: 26px;
  border-top: 1px solid var(--line);
  position: relative;
}
.poster-by::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 74px; height: 1px;
  background: var(--mint);
}
.poster-by strong { display: block; font-size: 17px; font-weight: 500; color: var(--fg); }
.poster-by span {
  display: block;
  margin-top: 6px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--mint);
}

/* club lockup — replaces the templated eyebrow */
.poster-club {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(26px, 3vw, 38px);
}
.poster-club img { height: 46px; width: auto; }
.poster-club span {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* the cutout stands on the section floor and bleeds off the bottom edge */
.poster-figure {
  position: relative;
  margin: 0;
  align-self: end;
}
.poster-figure img {
  position: relative;
  width: 100%;
  height: auto;
  margin-bottom: -1px;
  filter: drop-shadow(0 34px 70px rgba(0,0,0,.62));
}
.poster-figure::before {
  content: "";
  position: absolute;
  inset: auto 4% 0 4%;
  height: 62%;
  background: linear-gradient(180deg, rgba(1,220,162,0), rgba(1,220,162,.10));
}

/* ---------- closing poster ---------- */

.close {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--ink);
}
.close::before {
  content: "";
  position: absolute;
  width: min(860px, 96vw);
  aspect-ratio: 1;
  left: 50%;
  top: -46%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(1,220,162,.15) 0%, transparent 62%);
  pointer-events: none;
}
.close .shell { position: relative; }
.close h2 {
  font-size: clamp(34px, 6.4vw, 92px);
  line-height: 1.04;
  padding-bottom: .06em;
  letter-spacing: -.04em;
  text-transform: uppercase;
  margin: 0 auto 24px;
  max-width: 14ch;
}
.close .lede { margin: 0 auto clamp(34px, 4vw, 48px); max-width: 44ch; text-align: center; }

/* ---------- footer ---------- */

.foot {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 6vw, 84px) 34px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: clamp(34px, 4vw, 56px);
  padding-bottom: clamp(44px, 5vw, 62px);
}

.foot-mark img { height: 44px; width: auto; }
.foot-mark p { margin-top: 22px; max-width: 34ch; }

.foot-col h4 {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 20px;
}
.foot-col nav { display: flex; flex-direction: column; gap: 13px; align-items: flex-start; }
.foot-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--fg-2);
  transition: color 160ms var(--ease);
}
.foot-col a:hover { color: var(--mint); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-4);
}
.foot-base span:last-child { letter-spacing: .15em; text-transform: uppercase; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(44px, 5.4vw, 88px);
  align-items: center;
}

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(26px, 3vw, 36px);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--mint);
}
.contact-mail svg { width: 16px; height: 16px; stroke: var(--mint); fill: none; stroke-width: 1.7; }

.form-panel {
  position: relative;
  background: linear-gradient(158deg, var(--panel) 0%, #04142A 100%);
  box-shadow: inset 0 0 0 1px var(--mint-22), 0 30px 70px -46px rgba(1,220,162,.5);
  padding: clamp(30px, 3.4vw, 48px);
}
.form-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 44%; height: 2px;
  background: linear-gradient(90deg, var(--mint), transparent);
}

.field { margin-bottom: 22px; }
.field label {
  display: block;
  margin-bottom: 10px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-2);      /* AA pass on panel */
}
.field input,
.field textarea {
  width: 100%;
  background: rgba(2,10,22,.55);
  border: none;
  box-shadow: inset 0 0 0 1px var(--line-2);
  border-radius: var(--r);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 400;
  padding: 15px 18px;
  transition: box-shadow 180ms var(--ease), background 180ms var(--ease);
}
.field textarea { min-height: 158px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--fg-3); }   /* AA pass on the dark input */
.field input:focus,
.field textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--mint);
  background: rgba(1,220,162,.05);
}

.form-panel .btn { width: 100%; }

.form-status {
  display: none;
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--r);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  text-align: center;
}
.form-status[data-state="ok"] {
  display: block;
  color: var(--mint);
  background: var(--mint-12);
  box-shadow: inset 0 0 0 1px var(--mint-40);
}
.form-status[data-state="err"] {
  display: block;
  color: #FF8A8A;
  background: rgba(255,80,80,.1);
  box-shadow: inset 0 0 0 1px rgba(255,120,120,.4);
}

/* ---------- legal ---------- */

.legal-head { padding-block: 150px clamp(52px, 6vw, 76px); background: var(--ink); }
.legal-head h1 { max-width: 16ch; margin-bottom: 20px; }

.legal-body { padding-bottom: clamp(76px, 9vw, 130px); background: var(--ink); }
.legal-shell { max-width: 860px; }

.legal-shell .intro {
  font-size: 16px;
  line-height: 1.9;
  color: var(--fg-2);
  margin: 0 0 clamp(46px, 5vw, 66px);
  padding-bottom: clamp(34px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
}

.legal-shell .section { margin-bottom: clamp(46px, 5vw, 68px); scroll-margin-top: 110px; }

.legal-shell .section-title {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.legal-shell .section-title::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 56px; height: 1px;
  background: var(--mint);
}

.legal-shell .clause { margin-bottom: 22px; }
.legal-shell .clause-heading {
  margin: 0 0 8px;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mint);
}
.legal-shell .clause-text,
.legal-shell .clause p { margin: 0 0 12px; font-size: 15px; line-height: 1.88; color: var(--fg-2); }
.legal-shell .clause ol,
.legal-shell .clause ul { padding-left: 24px; margin: 8px 0 14px; }
.legal-shell .clause li { font-size: 15px; line-height: 1.88; color: var(--fg-2); margin-bottom: 8px; }
.legal-shell .clause li::marker { color: var(--mint-40); }
.legal-shell strong { color: var(--fg); font-weight: 500; }

/* sticky contents rail */
.legal-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(40px, 5vw, 76px);
  align-items: start;
}
.legal-toc { position: sticky; top: 110px; }
.legal-toc h4 {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 18px;
}
.legal-toc nav { display: flex; flex-direction: column; gap: 9px; max-height: 62vh; overflow-y: auto; }
.legal-toc a {
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-3);
  padding-left: 12px;
  border-left: 1px solid var(--line);
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.legal-toc a:hover { color: var(--mint); border-left-color: var(--mint); }

/* ---------- motion ---------- */

@keyframes pulse   { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.3; transform:scale(.65); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes flow    { to { stroke-dashoffset: -220; } }
@keyframes sweep   { to { transform: rotate(360deg); } }
@keyframes bar     { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes scan    { 0% { transform: translateY(0); opacity:0; } 12% { opacity:1; } 88% { opacity:1; } 100% { transform: translateY(150px); opacity:0; } }
@keyframes ring    { 0% { transform: scale(.4); opacity:.8; } 100% { transform: scale(1.6); opacity:0; } }
@keyframes node    { 0%,100% { transform: translate(0,0); } 50% { transform: translate(6px,-8px); } }
@keyframes box     { 0%,18% { opacity:0; } 26%,74% { opacity:1; } 92%,100% { opacity:0; } }
@keyframes track   { 0%,100% { transform: translate(0,0); } 33% { transform: translate(14px,-10px); } 66% { transform: translate(-8px,12px); } }
@keyframes plate   { 0%,100% { opacity:.18; } 50% { opacity:1; } }

/* scroll reveal — staggered float-up */
html[data-js] [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
html[data-js] [data-reveal].in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-copy      { max-width: 100%; }
  .poster-grid    { grid-template-columns: 1fr; gap: 0; }
  .poster-copy    { padding-bottom: clamp(44px, 6vw, 64px); }
  .poster-figure  { max-width: 400px; margin-inline: auto; }
  .contact-grid   { grid-template-columns: 1fr; gap: 44px; }
  .legal-layout   { grid-template-columns: 1fr; }
  .legal-toc      { position: static; }
  .legal-toc nav  { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; max-height: none; }
  .foot-grid      { grid-template-columns: 1fr 1fr; }
  .foot-mark      { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .hero           { min-height: auto; padding-block: 104px 64px; }
  /* the field would otherwise run straight through the headline */
  .hero-canvas    { opacity: .5;
    -webkit-mask-image: radial-gradient(ellipse 96% 42% at 66% 84%, #000 8%, transparent 78%);
            mask-image: radial-gradient(ellipse 96% 42% at 66% 84%, #000 8%, transparent 78%); }
  .clients-label  { font-size: 10px; letter-spacing: .16em; }
  .hero h1        { max-width: 100%; }
  .hero-cta       { flex-direction: column; align-items: stretch; }
  .nav-domain     { display: none; }
  .foot-grid      { grid-template-columns: 1fr; }
  .foot-base      { flex-direction: column; align-items: flex-start; gap: 10px; }
  .poster-figure  { max-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html[data-js] [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* fixed-nav anchor clearance */
[id] { scroll-margin-top: 100px; }

/* =========================================================
   CAPABILITY — orbit
   The platform sits at the centre; every area of sport is a
   node wired back to it. Positions come from JS so the canvas
   spokes and the DOM nodes share one source of truth.
   ========================================================= */

.orbit {
  position: relative;
  width: 100%;
  height: clamp(560px, 46vw, 660px);
  margin-top: clamp(20px, 3vw, 40px);
}

/* desktop keeps the old flat structure; the wrapper only becomes a real
   box at the mobile breakpoint, where the ring needs its own height */
.orbit-ring { display: contents; }
.orbit-detail { display: none; }

.orbit-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---- core ---- */

.orbit-core {
  position: absolute;
  left: 50%;
  top: 52%;
  translate: -50% -50%;
  width: clamp(112px, 11vw, 148px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.orbit-core img {
  width: 54%;
  height: auto;
  filter: drop-shadow(0 0 26px rgba(1,220,162,.5));
}
.orbit-core::before {
  content: "";
  position: absolute;
  inset: -46%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(1,220,162,.20) 0%, transparent 66%);
}
.orbit-core-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--mint-40);
  animation: coreRing 4.4s cubic-bezier(.3,.6,.4,1) infinite;
}
.orbit-core-ring:nth-child(2) { animation-delay: 2.2s; }

@keyframes coreRing {
  0%   { transform: scale(.7);  opacity: .85; }
  100% { transform: scale(2.3); opacity: 0; }
}

/* ---- nodes ---- */

.orbit-nodes { list-style: none; margin: 0; padding: 0; }

.orbit-node {
  position: absolute;
  left: 0; top: 0;                       /* JS sets --nx / --ny */
  translate: calc(var(--nx, 0px) - 50%) calc(var(--ny, 0px) - 50%);
  width: 212px;
  padding: 20px 22px 22px;
  background: linear-gradient(158deg, rgba(10,40,70,.92) 0%, rgba(4,20,42,.94) 100%);
  box-shadow: inset 0 0 0 1px var(--mint-12), 0 20px 44px -30px rgba(0,0,0,.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: default;
  transition: width 420ms var(--ease), box-shadow 320ms var(--ease),
              background 320ms var(--ease), opacity 320ms var(--ease);
}

.orbit-node svg {
  width: 24px; height: 24px;
  stroke: var(--mint); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 16px;
  transition: transform 320ms var(--ease);
}

.orbit-node h3 { font-size: 17px; line-height: 1.26; }

/* the body is the reward for reaching for a node */
.orbit-node p {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 420ms var(--ease), opacity 300ms var(--ease),
              margin-top 420ms var(--ease);
}

.orbit-node::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}

.orbit-node:hover,
.orbit-node:focus-visible,
.orbit-node[data-on] {
  width: 320px;
  background: linear-gradient(158deg, var(--panel-2) 0%, #06203C 100%);
  box-shadow: inset 0 0 0 1px var(--mint-40), 0 30px 60px -28px rgba(1,220,162,.42);
  z-index: 5;
}
.orbit-node:hover svg,
.orbit-node:focus-visible svg,
.orbit-node[data-on] svg { transform: translateY(-3px); }

.orbit-node:hover p,
.orbit-node:focus-visible p,
.orbit-node[data-on] p { max-height: 180px; opacity: 1; margin-top: 12px; }

.orbit-node:hover::after,
.orbit-node:focus-visible::after,
.orbit-node[data-on]::after { transform: scaleX(1); }

/* dim the rest so the active node reads as the subject */
.orbit[data-lit] .orbit-node:not(:hover):not(:focus-visible):not([data-on]) { opacity: .5; }


/* =========================================================
   SOLUTION — stage
   Six chapters, one frame. Auto-advances; any interaction
   takes the wheel.
   ========================================================= */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 34px);
  align-items: stretch;
}

/* ---- chapter rail ---- */

.stage-rail { display: flex; flex-direction: column; gap: 2px; }

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 18px 20px 19px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px transparent;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background 300ms var(--ease), box-shadow 300ms var(--ease);
}
.chapter + .chapter { border-top: 1px solid var(--line); }
.chapter:hover { background: rgba(255,255,255,.03); }

.chapter-n {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .1em;
  line-height: 1.6;
  color: var(--fg-4);
  transition: color 300ms var(--ease);
}

.chapter-body { display: block; min-width: 0; }

.chapter-t {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  color: var(--fg-2);
  transition: color 300ms var(--ease);
}

/* only the open chapter carries its description */
.chapter-d {
  display: block;
  max-height: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-3);
  opacity: 0;
  transition: max-height 460ms var(--ease), opacity 320ms var(--ease),
              margin-top 460ms var(--ease);
}

.chapter-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--line-2);
  overflow: hidden;
}
.chapter-bar i {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  background: var(--mint);
  transform: scaleY(0);
  transform-origin: top;
}

.chapter[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(1,220,162,.09), transparent 72%);
  box-shadow: inset 0 0 0 1px var(--mint-12);
}
.chapter[aria-selected="true"] .chapter-n { color: var(--mint); }
.chapter[aria-selected="true"] .chapter-t { color: var(--fg); }
.chapter[aria-selected="true"] .chapter-d { max-height: 160px; opacity: 1; margin-top: 8px; }
.chapter[aria-selected="true"] .chapter-bar i { animation: chapterFill var(--dwell, 7s) linear forwards; }

.stage[data-held] .chapter[aria-selected="true"] .chapter-bar i {
  animation: none;
  transform: scaleY(1);
}

@keyframes chapterFill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---- frame ---- */

.stage-frame {
  position: relative;
  overflow: hidden;
  min-height: clamp(340px, 38vw, 520px);
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(10,44,76,.85) 0%, rgba(2,10,22,.95) 70%),
    #02101F;
  box-shadow: inset 0 0 0 1px var(--mint-12);
}

.stage-corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid var(--mint-40);
  z-index: 3;
  pointer-events: none;
}
.stage-corner.tl { top: 14px;    left: 14px;  border-right: 0; border-bottom: 0; }
.stage-corner.tr { top: 14px;    right: 14px; border-left: 0;  border-bottom: 0; }
.stage-corner.bl { bottom: 14px; left: 14px;  border-right: 0; border-top: 0; }
.stage-corner.br { bottom: 14px; right: 14px; border-left: 0;  border-top: 0; }

.scene {
  position: absolute;
  inset: clamp(24px, 3vw, 42px);
  margin: 0;
  opacity: 0;
  transform: scale(.985);
  visibility: hidden;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease), visibility 620ms;
}
.scene.is-on { opacity: 1; transform: none; visibility: visible; }
.scene svg { width: 100%; height: 100%; }

@keyframes playhead {
  0%   { transform: translateX(56px);  opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateX(584px); opacity: 0; }
}
@keyframes scanline {
  0%   { transform: translateY(42px);  opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(358px); opacity: 0; }
}

/* ---- responsive ---- */

@media (max-width: 1080px) {
  .stage { grid-template-columns: 1fr; }
  .stage-frame { order: -1; min-height: clamp(280px, 52vw, 400px); }
}

@media (max-width: 1080px) {
  /* Compact ring: icon nodes only, labels revealed on tap. */
  .orbit {
    height: auto;
    margin-top: 28px;
    padding-inline: var(--gut);
  }

  .orbit-ring {
    display: block;
    position: relative;
    width: 100%;
    height: clamp(320px, 88vw, 400px);
  }

  .orbit-canvas { display: block; }
  .orbit-core   { display: grid; }   /* grid, not block — place-items does the centring */
  .orbit-canvas { inset: 0; }
  .orbit-core { width: clamp(84px, 24vw, 104px); top: 50%; }

  .orbit-nodes { position: absolute; inset: 0; }

  .orbit-node {
    position: absolute;
    left: 0; top: 0;
    translate: calc(var(--nx, 0px) - 50%) calc(var(--ny, 0px) - 50%);
    width: 56px !important;
    height: 56px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 260ms var(--ease), background 260ms var(--ease),
                opacity 260ms var(--ease), scale 260ms var(--ease);
  }

  /* the ring is icons only — text lives in the panel below */
  .orbit-node h3,
  .orbit-node p { display: none; }
  .orbit-node::after { display: none; }
  .orbit-node svg { width: 23px; height: 23px; margin: 0; }

  .orbit-node[data-on] {
    background: linear-gradient(158deg, var(--panel-2) 0%, #06203C 100%);
    box-shadow: inset 0 0 0 1px var(--mint), 0 16px 38px -18px rgba(1,220,162,.6);
    scale: 1.1;
  }
  .orbit-node[data-on] svg { transform: none; }

  /* hover is meaningless on touch; don't let it fire on tap */
  .orbit-node:hover { width: 56px !important; background: linear-gradient(158deg, rgba(10,40,70,.92) 0%, rgba(4,20,42,.94) 100%); box-shadow: inset 0 0 0 1px var(--mint-12), 0 20px 44px -30px rgba(0,0,0,.9); }
  .orbit-node[data-on]:hover { background: linear-gradient(158deg, var(--panel-2) 0%, #06203C 100%); box-shadow: inset 0 0 0 1px var(--mint), 0 16px 38px -18px rgba(1,220,162,.6); }

  .orbit[data-lit] .orbit-node:not([data-on]) { opacity: .45; }

  /* ---- detail panel ---- */
  .orbit-detail {
    display: block;
    position: relative;
    margin-top: 14px;
    min-height: 152px;
    padding: 22px 22px 24px;
    background: linear-gradient(158deg, rgba(10,40,70,.92) 0%, rgba(4,20,42,.94) 100%);
    box-shadow: inset 0 0 0 1px var(--mint-12);
    overflow: hidden;
  }

  /* mint filament along the top edge */
  .orbit-detail::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mint), transparent);
    opacity: .6;
  }

  /* faint blueprint grid, faded out toward the lower right */
  .orbit-detail::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(var(--mint-12) 1px, transparent 1px) 0 0 / 100% 34px,
      linear-gradient(90deg, var(--mint-12) 1px, transparent 1px) 0 0 / 34px 100%;
    opacity: .3;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(130% 110% at 0% 0%, #000 0%, transparent 72%);
    mask-image: radial-gradient(130% 110% at 0% 0%, #000 0%, transparent 72%);
  }

  .orbit-detail > * { position: relative; z-index: 1; }

  /* resting state */
  .orbit-detail-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding-top: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
  }
  .orbit-detail-hint::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--mint);
    animation: hintPulse 1.9s ease-out infinite;
  }
  .orbit-detail-hint::after {
    content: "_";
    color: var(--mint);
    animation: hintCaret 1.05s steps(1) infinite;
  }

  /* selected state */
  .orbit-detail-eyebrow {
    margin: 0 0 12px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--mint);
  }
  .orbit-detail h3 {
    position: relative;
    margin: 0;
    padding-bottom: 13px;
    font-size: 19px;
    line-height: 1.24;
  }
  .orbit-detail h3::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 48px; height: 2px;
    background: linear-gradient(90deg, var(--mint), transparent);
    transform-origin: left;
    animation: detailRule 480ms var(--ease) 120ms both;
  }
  .orbit-detail p { margin: 13px 0 0; }

  .orbit-detail > *            { animation: orbitDetail 340ms var(--ease) both; }
  .orbit-detail > *:nth-child(2) { animation-delay: 60ms; }
  .orbit-detail > *:nth-child(3) { animation-delay: 120ms; }
}

@keyframes orbitDetail {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}
@keyframes detailRule {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes hintPulse {
  0%   { box-shadow: 0 0 0 0 rgba(1,220,162,.5); }
  70%  { box-shadow: 0 0 0 11px rgba(1,220,162,0); }
  100% { box-shadow: 0 0 0 0 rgba(1,220,162,0); }
}
@keyframes hintCaret {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@media (max-width: 680px) {
  .chapter { grid-template-columns: 28px 1fr; gap: 12px; padding: 16px 16px 17px; }
  .chapter-t { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-node p,
  .chapter-d { max-height: 180px; opacity: 1; }
  .scene { transition: none; }
  .chapter[aria-selected="true"] .chapter-bar i { animation: none; transform: scaleY(1); }
}
