/* ============================================================
   ENDURANCE — a site as a trail
   ============================================================ */
:root {
  --bg:           #141417;
  --bg-2:         #1B1B1F;
  --bg-3:         #222226;
  --bg-rgb:       20, 20, 23;
  --ink-rgb:      246, 246, 243;
  --line:         rgba(255,255,255,0.08);
  --line-2:       rgba(255,255,255,0.14);
  --ink:          #F6F6F3;
  --ink-2:        rgba(246,246,243,0.72);
  --ink-3:        rgba(246,246,243,0.48);
  --ink-4:        rgba(246,246,243,0.28);
  --acid:         oklch(68% 0.22 35);
  --acid-2:       oklch(60% 0.21 35);
  --acid-glow:    oklch(68% 0.22 35 / 0.22);
  --warn:         oklch(72% 0.2 35);

  --nav-bg:       rgba(20, 20, 23, 0.55);
  --nav-bg-scrolled: rgba(20, 20, 23, 0.82);
  --nav-border:   rgba(255,255,255,0.06);
  --nav-border-2: rgba(255,255,255,0.08);
  --cursor-border: rgba(255,255,255,0.4);
  --nav-cta-border: rgba(255,255,255,0.3);
  --nav-cta-border-hover: #fff;
  --nav-cta-bg-hover: rgba(255,255,255,0.06);
  --brand-border: rgba(255,255,255,0.5);
  --brand-border-dashed: rgba(255,255,255,0.3);
  --on-acid:      #0A0A0B;
  --on-acid-soft: rgba(10,10,11,0.75);
  --on-acid-mute: rgba(10,10,11,0.55);
  --on-acid-dim:  rgba(10,10,11,0.4);
  --on-acid-line: rgba(10,10,11,0.2);
  --on-acid-tag:  rgba(10,10,11,0.12);
  --on-acid-tag-ink: rgba(10,10,11,0.7);

  --f-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-display: 'Geist', ui-sans-serif, system-ui, sans-serif;

  --max: 1440px;
  --pad-x: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
}

/* ===== LIGHT THEME ===== */
:root[data-theme="light"] {
  --bg:           #F4F1EA;      /* warm paper */
  --bg-2:         #EAE6DC;
  --bg-3:         #DFDACD;
  --bg-rgb:       244, 241, 234;
  --ink-rgb:      14, 14, 16;
  --line:         rgba(20,20,22,0.10);
  --line-2:       rgba(20,20,22,0.18);
  --ink:          #14141A;
  --ink-2:        rgba(20,20,26,0.72);
  --ink-3:        rgba(20,20,26,0.52);
  --ink-4:        rgba(20,20,26,0.30);
  --acid:         oklch(56% 0.18 35);
  --acid-2:       oklch(50% 0.17 35);
  --acid-glow:    oklch(56% 0.18 35 / 0.18);

  --nav-bg:         rgba(244, 241, 234, 0.72);
  --nav-bg-scrolled: rgba(244, 241, 234, 0.88);
  --nav-border:     rgba(20,20,22,0.12);
  --nav-border-2:   rgba(20,20,22,0.18);
  --cursor-border:  rgba(20,20,22,0.4);
  --nav-cta-border: rgba(20,20,22,0.3);
  --nav-cta-border-hover: #14141A;
  --nav-cta-bg-hover: rgba(20,20,22,0.06);
  --brand-border:   rgba(20,20,22,0.4);
  --brand-border-dashed: rgba(20,20,22,0.28);
  --on-acid:      #FFFCF4;
  --on-acid-soft: rgba(255,252,244,0.86);
  --on-acid-mute: rgba(255,252,244,0.66);
  --on-acid-dim:  rgba(255,252,244,0.46);
  --on-acid-line: rgba(255,252,244,0.28);
  --on-acid-tag:  rgba(255,252,244,0.18);
  --on-acid-tag-ink: rgba(255,252,244,0.88);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  letter-spacing: -0.01em;
  cursor: none;
}
@media (hover:none){ body { cursor: auto; } }

::selection { background: var(--acid); color: var(--on-acid); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: none; background:0; border:0; color: inherit; }
img, svg, canvas { display:block; max-width:100%; }

/* Global faux-bold on serif italic accents (Instrument Serif has only 400) */
em { font-style: italic; }
em, .hero-title em, .ticker-item em, .sec-title em, .profil-text p em,
.svc-name em, .proj-name em, .trail-quote em, .race-title em,
.contact-title em, .foot-mark em, .hero-tag em, .metric-n .u,
.hero-title .line > span {
  -webkit-text-stroke: 0.5px currentColor;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); position: relative; }

.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.02em; color: var(--ink-3); text-transform: uppercase; }

/* ============================================================
   NOISE & GRAIN
   ============================================================ */
body::before {
  content:"";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.035;
  pointer-events: none;
  z-index: 200;
  mix-blend-mode: overlay;
}

/* ============================================================
   CURSOR — magnetic
   ============================================================ */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  will-change: transform, width, height;
  mix-blend-mode: difference;
}
.cursor {
  width: 32px; height: 32px;
  border: 1px solid var(--cursor-border);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s, border-color .25s;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--ink);
}
.cursor.hover {
  width: 72px; height: 72px;
  border-color: var(--acid);
  background: var(--acid-glow);
  mix-blend-mode: normal;
}
.cursor-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acid);
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
}
.cursor.hover .cursor-label { opacity: 1; }
@media (hover:none){ .cursor, .cursor-dot { display:none; } }

/* ============================================================
   WEBGL BACKGROUND CANVAS
   ============================================================ */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px max(var(--pad-x), calc((100vw - var(--max)) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--nav-border);
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: var(--nav-bg-scrolled);
  border-bottom-color: var(--nav-border-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px;
  border: 1px solid var(--brand-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  position: relative;
}
.brand-mark::after {
  content:"";
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--brand-border-dashed);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.nav-menu {
  display: flex;
  gap: 2px;
  list-style: none;
  font-family: var(--f-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-menu a {
  padding: 10px 16px;
  opacity: 0.72;
  color: #f1ede4;
  transition: opacity .2s, color .2s;
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.nav-menu a:hover { opacity: 1; }
:root[data-theme="light"] .nav-menu a { opacity: 1; color: var(--ink-2); }
:root[data-theme="light"] .nav-menu a:hover { opacity: 1; color: var(--ink); }
:root[data-theme="light"] .nav { backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
.nav-menu a.active { 
  opacity: 1; 
  color: var(--acid);
}
.nav-menu a.active::after {
  content:"";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 1.5px;
  background: var(--acid);
}
.nav-menu a::before {
  content: attr(data-n);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 400;
  opacity: 0.45;
  letter-spacing: 0;
}

.nav-cta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--nav-cta-border);
  border-radius: 100px;
  transition: all .2s;
}
.nav-cta:hover { border-color: var(--nav-cta-border-hover); background: var(--nav-cta-bg-hover); }
.nav-cta .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px var(--acid-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  margin-left: 12px;
  border: 1px solid var(--nav-cta-border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: color .2s, border-color .2s, background .2s, transform .4s var(--ease);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--nav-cta-border-hover);
  background: var(--nav-cta-bg-hover);
}
.theme-toggle svg { position: absolute; transition: transform .5s var(--ease), opacity .3s; }
.theme-toggle .ico-sun  { opacity: 0; transform: rotate(-90deg) scale(.5); }
.theme-toggle .ico-moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .theme-toggle .ico-sun  { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .theme-toggle .ico-moon { opacity: 0; transform: rotate(90deg) scale(.5); }

/* ============================================================
   MOBILE MENU
   ============================================================ */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  margin-left: 10px;
  border: 1px solid var(--nav-cta-border);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  position: relative;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .5s var(--ease);
  z-index: 201;
}
.nav-burger:hover { border-color: var(--nav-cta-border-hover); background: var(--nav-cta-bg-hover); }
.nav-burger span {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transform-origin: center;
  transition: transform .45s var(--ease), opacity .25s, top .45s var(--ease);
  border-radius: 2px;
}
.nav-burger span:nth-child(1) { top: 15px; margin-left: -8px; }
.nav-burger span:nth-child(2) { top: 22px; margin-left: -8px; width: 10px; }
.nav-burger[aria-expanded="true"] { transform: rotate(90deg); }
.nav-burger[aria-expanded="true"] span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
  width: 16px; margin-left: -8px;
}
.nav-burger[aria-expanded="true"] span:nth-child(2) {
  top: 19px;
  transform: rotate(-45deg);
  width: 16px; margin-left: -8px;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .45s var(--ease), transform .55s var(--ease);
  overflow: hidden;
}
.mobile-menu[data-open="true"] {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu::before {
  content:"";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--nav-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--nav-border) 1px, transparent 1px);
  background-size: 25% 25%;
  opacity: .35;
  pointer-events: none;
}
.mobile-menu::after {
  content:"";
  position: absolute;
  left: -20%; right: -20%;
  bottom: -40%;
  height: 70%;
  background: radial-gradient(ellipse at center, var(--acid-glow) 0%, transparent 60%);
  filter: blur(40px);
  opacity: .6;
  pointer-events: none;
}

.mm-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--pad-x);
  border-bottom: 1px solid var(--nav-border);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  z-index: 2;
}
.mm-head .mm-label { display: flex; align-items: center; gap: 10px; }
.mm-head .mm-label .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px var(--acid-glow);
  animation: pulse 2s infinite;
}

.mm-nav {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px var(--pad-x) 8px;
  list-style: none;
  z-index: 2;
  overflow-y: auto;
}
.mm-nav li {
  border-bottom: 1px solid var(--nav-border);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .55s var(--ease);
  transition-delay: 0ms;
}
.mobile-menu[data-open="true"] .mm-nav li {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu[data-open="true"] .mm-nav li:nth-child(1) { transition-delay: .10s; }
.mobile-menu[data-open="true"] .mm-nav li:nth-child(2) { transition-delay: .15s; }
.mobile-menu[data-open="true"] .mm-nav li:nth-child(3) { transition-delay: .20s; }
.mobile-menu[data-open="true"] .mm-nav li:nth-child(4) { transition-delay: .25s; }
.mobile-menu[data-open="true"] .mm-nav li:nth-child(5) { transition-delay: .30s; }
.mobile-menu[data-open="true"] .mm-nav li:nth-child(6) { transition-delay: .35s; }
.mobile-menu[data-open="true"] .mm-nav li:nth-child(7) { transition-delay: .40s; }

.mm-nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 4px;
  font-family: var(--f-display);
  font-size: clamp(34px, 9vw, 56px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.mm-nav a .mm-num {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  align-self: flex-start;
  padding-top: 6px;
}
.mm-nav a .mm-label-text {
  position: relative;
  display: inline-block;
  transition: transform .4s var(--ease), color .2s;
}
.mm-nav a:hover .mm-label-text,
.mm-nav a:active .mm-label-text {
  color: var(--acid);
  transform: translateX(6px);
}
.mm-nav a .mm-arrow {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translate(-12px, -50%);
  opacity: 0;
  color: var(--acid);
  font-family: var(--f-mono);
  font-size: 14px;
  transition: transform .4s var(--ease), opacity .2s;
}
.mm-nav a:hover .mm-arrow { opacity: 1; transform: translate(0, -50%); }

/* Selected item animation on tap */
.mm-nav a.is-selected .mm-label-text {
  color: var(--acid);
  transform: translateX(10px);
}
.mm-nav a.is-selected .mm-arrow {
  opacity: 1;
  transform: translate(0, -50%);
  animation: mm-arrow-dart .6s var(--ease) forwards;
}
.mm-nav a.is-selected .mm-num {
  color: var(--acid);
  animation: mm-num-flash .5s var(--ease);
}
.mm-nav a.is-selected::after {
  content:"";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--acid);
  transform-origin: left;
  animation: mm-underline .5s var(--ease) forwards;
}
@keyframes mm-arrow-dart {
  0%   { transform: translate(0, -50%); opacity: 1; }
  60%  { transform: translate(14px, -50%); opacity: 1; }
  100% { transform: translate(24px, -50%); opacity: 0; }
}
@keyframes mm-num-flash {
  0%, 100% { opacity: 1; }
  40% { opacity: .3; }
}
@keyframes mm-underline {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ===== MORPH / CURTAIN TRANSITION ===== */
/* When an item is selected: other items collapse, selected item zooms, curtain sweeps */
.mobile-menu[data-phase="morph"] .mm-head {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.mobile-menu[data-phase="morph"]::before { opacity: 0; transition: opacity .3s; }

.mobile-menu[data-phase="morph"] .mm-nav li:not(.is-target) {
  opacity: 0;
  transform: translateX(-30px) scale(.96);
  transition: opacity .35s var(--ease), transform .4s var(--ease);
}
.mobile-menu[data-phase="morph"] .mm-nav li.is-target {
  transform: translateY(calc(50vh - 50% - var(--target-offset, 0px)));
  transition: transform .5s cubic-bezier(.7,0,.2,1);
  border-bottom-color: transparent;
  z-index: 5;
}
.mobile-menu[data-phase="morph"] .mm-nav li.is-target a {
  pointer-events: none;
}
.mobile-menu[data-phase="morph"] .mm-nav li.is-target .mm-label-text {
  color: var(--acid);
  transform: translateX(0) scale(1.12);
  transition: transform .5s cubic-bezier(.7,0,.2,1), color .2s;
  transform-origin: left center;
}
.mobile-menu[data-phase="morph"] .mm-nav li.is-target .mm-num {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .4s, transform .5s var(--ease);
}
.mobile-menu[data-phase="morph"] .mm-nav li.is-target .mm-arrow {
  opacity: 1;
  transform: translate(0, -50%);
  animation: mm-arrow-pulse 1.2s ease-out infinite;
}
@keyframes mm-arrow-pulse {
  0%, 100% { transform: translate(0, -50%); opacity: 1; }
  50%      { transform: translate(8px, -50%); opacity: .5; }
}

/* Acid curtain that sweeps up then down */
.mm-curtain {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--acid);
  transform: translateY(100%);
  pointer-events: none;
  will-change: transform;
}
.mm-curtain.in {
  animation: curtain-up .38s cubic-bezier(.7,0,.2,1) forwards;
}
.mm-curtain.out {
  animation: curtain-down .42s cubic-bezier(.2,0,.2,1) forwards;
}
@keyframes curtain-up {
  0%   { transform: translateY(100%) skewY(4deg); }
  100% { transform: translateY(0)    skewY(0);   }
}
@keyframes curtain-down {
  0%   { transform: translateY(0)     skewY(-2deg); }
  100% { transform: translateY(-100%) skewY(0);   }
}
.mm-curtain .mm-curtain-label {
  position: absolute;
  left: var(--pad-x);
  bottom: 32px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0A0A0B;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: curtain-label .35s .08s ease forwards;
}
.mm-curtain .mm-curtain-label b {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 48px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #0A0A0B;
}
.mm-curtain .mm-curtain-label small {
  font-size: 10px;
  opacity: .55;
}
@keyframes curtain-label {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0);    }
}

/* Incoming section reveal — content rises as curtain lifts */
.mm-reveal {
  animation: mm-reveal-in 1.1s cubic-bezier(.2,.7,.15,1) both;
  will-change: transform, opacity, filter;
}
@keyframes mm-reveal-in {
  0%   { opacity: 0; transform: translateY(160px) scale(.96); filter: blur(10px); }
  50%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
/* Stagger children so the reveal feels like a cascade */
.mm-reveal > * {
  animation: mm-reveal-child .95s cubic-bezier(.2,.7,.15,1) both;
}
.mm-reveal > *:nth-child(1) { animation-delay: .05s; }
.mm-reveal > *:nth-child(2) { animation-delay: .12s; }
.mm-reveal > *:nth-child(3) { animation-delay: .19s; }
.mm-reveal > *:nth-child(4) { animation-delay: .26s; }
.mm-reveal > *:nth-child(5) { animation-delay: .33s; }
.mm-reveal > *:nth-child(6) { animation-delay: .40s; }
.mm-reveal > *:nth-child(n+7) { animation-delay: .45s; }
@keyframes mm-reveal-child {
  0%   { opacity: 0; transform: translateY(70px); }
  100% { opacity: 1; transform: translateY(0);   }
}

body.menu-open { overflow: hidden; }
body.menu-open .nav { z-index: 250; }
body.menu-open .mm-head { display: none; }
body.menu-open .mm-nav { padding-top: 80px; }

@media (max-width: 860px) {
  .nav { padding: 12px var(--pad-x); gap: 0; }
  .nav-menu { display:none; }
  .nav-cta { display: none; }
  .brand { margin-right: auto; }
  .theme-toggle { margin-left: 0; margin-right: 14px; order: 2; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; order: 3; }
}
@media (min-width: 861px) {
  .mobile-menu { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 160px max(var(--pad-x), calc((100vw - var(--max)) / 2)) 72px;
  z-index: 2;
  overflow: hidden;
}

/* Acid sweep line that crosses the hero on load */
.hero::before {
  content:"";
  position: absolute;
  top: 0; bottom: 0;
  left: -4px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--acid) 20%, var(--acid) 80%, transparent);
  box-shadow: 0 0 20px var(--acid), 0 0 40px var(--acid-glow);
  transform: translateX(0);
  opacity: 0;
  animation: heroSweep 1.6s cubic-bezier(.7,0,.2,1) .1s forwards;
  z-index: 3;
  pointer-events: none;
}
@keyframes heroSweep {
  0%   { opacity: 0; transform: translateX(0); }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(100vw); }
}

/* Radial acid flash that pulses once during the sweep */
.hero::after {
  content:"";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 60%, var(--acid-glow) 0%, transparent 50%);
  opacity: 0;
  animation: heroFlash 2s ease-out .3s forwards;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes heroFlash {
  0%   { opacity: 0; }
  20%  { opacity: .9; }
  100% { opacity: 0; }
}

.hero-meta {
  position: absolute;
  top: 110px;
  left: max(var(--pad-x), calc((100vw - var(--max)) / 2));
  right: max(var(--pad-x), calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-meta > div {
  grid-column: span 3;
  opacity: 0;
  transform: translateY(-8px);
  animation: metaDrop .7s var(--ease) forwards;
}
.hero-meta > div:nth-child(1) { animation-delay: .15s; }
.hero-meta > div:nth-child(2) { animation-delay: .25s; }
.hero-meta > div:nth-child(3) { animation-delay: .35s; }
.hero-meta > div:nth-child(4) { animation-delay: .45s; }
@keyframes metaDrop {
  0%   { opacity: 0; transform: translateY(-8px); filter: blur(4px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-meta b { color: var(--ink); display: block; margin-top: 3px; font-weight: 500; }
@media (max-width: 860px) { .hero-meta { display: none; } }

.hero-intro {
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 64px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) .5s forwards;
}
.hero-intro::before {
  content:"";
  width: 0;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid-glow);
  animation: introBar .8s cubic-bezier(.7,0,.2,1) .3s forwards;
}
@keyframes introBar {
  0%   { width: 0; }
  100% { width: 40px; }
}

.hero-title {
  font-size: clamp(60px, 12vw, 200px);
  line-height: 0.78;
  letter-spacing: -0.055em;
  font-weight: 400;
  font-variation-settings: "wght" 400;
  margin-bottom: 40px;
}
.hero-title .line {
  display: block;
  overflow: hidden;
  position: relative;
  padding: 0.12em 0.12em;
  margin: -0.12em -0.12em;
}
.hero-title .line > span {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(110%);
  opacity: 0;
  animation: titleRise 1.4s cubic-bezier(.19,1,.22,1) forwards;
  font-variation-settings: "wght" 500;
}
.hero-title .line:nth-child(1) > span { animation-delay: .7s; }
.hero-title .line:nth-child(2) {
  font-size: clamp(38px, 7.5vw, 124px);
  line-height: 0.9;
}
.hero-title .line:nth-child(2) > span {
  animation-delay: .9s;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1em;
  line-height: 0.9;
  color: var(--acid);
  letter-spacing: -0.04em;
}
.hero-title .line:nth-child(3) > span {
  animation-delay: 1.1s;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--acid);
  letter-spacing: -0.04em;
}
.hero-title .line:nth-child(2) em,
.hero-title .line:nth-child(3) em {
  font-size: 0.82em;
}
.hero-title .amp {
  font-family: var(--f-sans);
  font-style: italic !important;
  font-weight: 250;
  font-variation-settings: "wght" 250 !important;
  font-size: 0.92em;
  color: var(--acid);
  padding: 0 0.18em 0 0.06em;
  display: inline-block;
  overflow: visible;
  -webkit-text-stroke: 0 !important;
  opacity: 0.9;
}

@keyframes titleRise {
  0%   { transform: translateY(110%); opacity: 0; filter: blur(8px); letter-spacing: 0.02em; }
  40%  { opacity: 1; filter: blur(0); }
  100% { transform: translateY(0); opacity: 1; filter: blur(0); letter-spacing: -0.055em; }
}
@keyframes fadeUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.6s forwards;
  position: relative;
}
.hero-foot::before {
  content:"";
  position: absolute;
  top: -1px; left: 0;
  width: 0;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 10px var(--acid-glow);
  animation: heroFootLine 1.6s cubic-bezier(.7,0,.2,1) 1.3s forwards;
}
@keyframes heroFootLine {
  0%   { width: 0; opacity: 1; }
  70%  { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}
@media (max-width: 700px){ .hero-foot { grid-template-columns: 1fr; } }

@media (max-width: 600px) {
  .hero {
    padding-top: 96px;
    padding-bottom: 48px;
    justify-content: flex-start;
    min-height: auto;
  }
  .hero-intro { margin-top: 0; margin-bottom: 24px; }
  .hero-title { line-height: 1; }
  .hero-title .line:nth-child(2) { line-height: 1; }
  .hero-title .line > span {
    white-space: normal;
    animation-name: titleRiseMobile;
    animation-timing-function: cubic-bezier(.22,.61,.36,1);
    animation-duration: 1s;
    will-change: transform, opacity;
    transform: translate3d(0, 28px, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
}
@keyframes titleRiseMobile {
  0%   { transform: translate3d(0, 28px, 0); opacity: 0; }
  100% { transform: translate3d(0, 0, 0); opacity: 1; }
}

.hero-tag {
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.4;
  max-width: 760px;
  color: var(--ink-2);
  font-weight: 400;
}
.hero-tag em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}

.hero-marks {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.8;
}
.hero-marks b { color: var(--ink); font-weight: 500; display: block; }


/* ============================================================
   MARQUEE / TICKER
   ============================================================ */
.ticker {
  position: relative;
  z-index: 3;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.ticker-track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: scroll 45s linear infinite;
  width: max-content;
  align-items: center;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink-2);
  font-variation-settings: "wght" 400;
}
.ticker-item em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}
.ticker-item .sep {
  width: 8px; height: 8px;
  background: var(--acid);
  border-radius: 50%;
  display: inline-block;
}
@keyframes scroll { to { transform: translateX(-50%); } }

.metrics-sec { padding: 60px 0 !important; }

/* ============================================================
   SECTIONS — general
   ============================================================ */
section {
  position: relative;
  z-index: 2;
  padding: 140px 0;
}
@media (max-width: 780px){ section { padding: 80px 0; } }

.sec-head {
  display: block;
  margin-bottom: 80px;
}

.sec-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--acid);
  padding-top: 16px;
  position: sticky;
  top: 100px;
}
.sec-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-label::before {
  content:""; width: 24px; height: 1px; background: var(--ink-3);
}
.sec-title {
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 400;
  font-variation-settings: "wght" 400;
  max-width: 14ch;
}
.sec-title em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
  font-variation-settings: "wght" 400;
}
.sec-lead {
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 560px;
}

/* Reveal system */
.rv { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.in { opacity: 1; transform: translateY(0); }

/* Split char animation for .split */
.split { display: inline-block; overflow: hidden; vertical-align: bottom; }
.split .ch {
  display: inline-block;
  transform: translateY(100%);
  transition: transform .8s var(--ease);
}
.split.in .ch { transform: translateY(0); }

/* ============================================================
   § 01 PROFIL — the opening mile
   ============================================================ */
.profil-body {
  display: block;
}
.profil-text {
  max-width: 900px;
}
.profil-text p {
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 40px;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.profil-text p em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}
.profil-text p .muted { color: var(--ink); }
.profil-text p strong { font-weight: 500; color: var(--ink); }

.profil-card {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
@media (max-width: 900px){ .profil-card { grid-template-columns: repeat(2, 1fr); } }
.profil-cell {
  background: var(--bg);
  padding: 24px;
  position: relative;
  transition: background .3s;
}
.profil-cell:hover { background: var(--bg-2); }
.profil-cell .k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.profil-cell .v {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.profil-cell .v small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  margin-top: 4px;
  letter-spacing: 0;
}

/* ============================================================
   § 02 METRICS — big numbers, counters
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px){ .metrics-grid { grid-template-columns: repeat(2,1fr); } }

.metric {
  padding: 48px 32px;
  border-right: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 68%, transparent);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  position: relative;
  transition: background .3s, transform .4s var(--ease);
}
.metric::after {
  content:"";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.metric:last-child { border-right: 0; }
.metric:hover {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  transform: translateY(-4px);
}
.metric:hover::after { transform: scaleX(1); }
.metric:hover .metric-idx { color: var(--acid); }
.metric:hover .metric-n .u { transform: translateX(4px); }
.metric .metric-n .u { transition: transform .3s; display: inline-block; }
@media (max-width: 900px){
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px){
  .metric { padding: 32px 20px; }
  .metric-idx { margin-bottom: 32px; }
  .metric-n { font-size: clamp(44px, 13vw, 72px); }
}
.metric-idx {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 48px;
  text-transform: uppercase;
}
.metric-n {
  font-size: clamp(64px, 8vw, 120px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 400;
  font-variation-settings: "wght" 300;
  display: flex;
  align-items: baseline;
  margin-bottom: 16px;
}
.metric-n .u {
  font-size: 0.32em;
  color: var(--acid);
  font-family: var(--f-serif);
  font-style: italic;
  margin-left: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.metric-l {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 180px;
}

/* ============================================================
   § 03 SERVICES
   ============================================================ */
.svc-list {
  border-top: 1px solid var(--line);
}
.svc-row {
  display: grid;
  grid-template-columns: 60px 1fr 2fr 140px;
  gap: 40px;
  padding: 36px 24px;
  border-bottom: 1px solid var(--line);
  align-items: start;
  position: relative;
  transition: padding .4s var(--ease), background .4s;
  cursor: none;
  overflow: hidden;
}
.svc-row::before {
  content:"";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--acid-glow) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.svc-row { transition: transform .4s var(--ease), background .3s;
  background: color-mix(in oklab, var(--bg) 68%, transparent);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
}
.svc-row:hover { transform: translateX(24px); background: color-mix(in oklab, var(--bg) 86%, transparent); }
.svc-row:hover::before { opacity: 1; }
@media (max-width: 900px){
  .svc-row { grid-template-columns: 40px 1fr; gap: 12px 20px; padding: 24px 16px; }
  .svc-row > :nth-child(3) { grid-column: 1 / -1; }
  .svc-row > :nth-child(4) { grid-column: 1 / -1; }
}

.svc-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--acid);
  padding-top: 6px;
}
.svc-name {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.svc-name em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}
.svc-desc { font-size: 15px; color: var(--ink-2); line-height: 1.55; max-width: 520px; }
.svc-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
  padding-top: 10px;
}
.svc-arrow {
  position: absolute;
  top: 36px;
  right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  transition: all .4s var(--ease);
  opacity: 0;
  pointer-events: none;
}
.svc-row:hover .svc-arrow {
  opacity: 1;
  background: var(--acid);
  color: var(--bg);
  border-color: var(--acid);
  transform: rotate(-45deg);
}

.svc-pricing {
  margin-top: 80px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
@media (max-width: 780px){ .svc-pricing { grid-template-columns: 1fr 1fr; } }
.svc-pricing > div {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 68%, transparent);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
}
.svc-pricing > div:last-child { border-right: 0; }
.svc-pricing .k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.svc-pricing .v {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.svc-pricing .accent {
  background: var(--acid);
  color: var(--bg);
  grid-column: span 1;
}
.svc-pricing .accent .k { color: var(--on-acid-mute); }
.svc-pricing .accent .v {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  font-family: var(--f-sans);
}
.svc-pricing .accent .v small {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.6;
  font-family: var(--f-mono);
}

/* ============================================================
   § 04 STACK
   ============================================================ */
.stack-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  width: fit-content;
  margin-bottom: 48px;
}
.stack-tab {
  padding: 10px 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-radius: 100px;
  transition: all .25s;
  position: relative;
}
.stack-tab:hover { color: var(--ink); }
.stack-tab.active {
  background: var(--acid);
  color: var(--bg);
}

.stack-panel { display: none; }
.stack-panel.active { display: block; animation: fadePanel .4s var(--ease); }
@keyframes fadePanel {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stack-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.stack-item {
  background: var(--bg);
  padding: 20px;
  transition: all .25s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 120px;
}
.stack-item:hover { background: var(--bg-2); }
.stack-item:hover .stack-item-name { color: var(--acid); }
.stack-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stack-item-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
  transition: background .25s;
}
.stack-item.pri .stack-item-dot { background: var(--acid); box-shadow: 0 0 12px var(--acid); }
.stack-item-lv {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.stack-item-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .25s;
  margin-top: auto;
}
.stack-item-bar {
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.stack-item-bar::after {
  content:"";
  position: absolute;
  inset: 0;
  width: var(--lv, 50%);
  background: linear-gradient(90deg, var(--acid), var(--acid-2));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s var(--ease);
}
.stack-item.in .stack-item-bar::after { transform: scaleX(1); }

/* ============================================================
   § 05 PARCOURS / CV — with elevation chart
   ============================================================ */
.elev-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  background: var(--bg-2);
  margin-bottom: 64px;
  position: relative;
  overflow: hidden;
}
.elev-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}
.elev-head h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.elev-legend {
  display: flex;
  gap: 18px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.elev-legend span { display:flex; align-items:center; gap: 8px; }
.elev-legend span::before {
  content:""; width: 14px; height: 1px; background: var(--acid);
}
.elev-svg { width: 100%; height: 220px; }
.elev-svg .area { fill: var(--acid); fill-opacity: 0.08; }
.elev-svg .path { fill: none; stroke: var(--acid); stroke-width: 1.5; stroke-dasharray: 4000; stroke-dashoffset: 4000; transition: stroke-dashoffset 3s var(--ease); }
.elev-svg.in .path { stroke-dashoffset: 0; }
.elev-svg .dot { fill: var(--bg); stroke: var(--acid); stroke-width: 2; cursor: pointer; transition: stroke-width .2s; }
.elev-svg .dot:hover { stroke-width: 3.5; }
.elev-svg .dot.now { fill: var(--acid); r: 6; filter: drop-shadow(0 0 8px var(--acid)); }
.elev-svg text { font-family: var(--f-mono); font-size: 10px; fill: var(--ink-3); letter-spacing: 0.05em; text-transform: uppercase; }
.elev-svg .lbl-now { fill: var(--acid); }
.elev-svg .grid-line { stroke: var(--line); stroke-width: 0.5; }

/* Elevation chart tooltip */
.elev-wrap { position: relative; }
.elev-tip {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -130%);
  background: var(--bg-2);
  border: 1px solid var(--acid);
  border-radius: 8px;
  padding: 10px 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  z-index: 5;
  white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.elev-tip.show { opacity: 1; }
.elev-tip::after {
  content:"";
  position: absolute;
  left: 50%; bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--bg-2);
  border-right: 1px solid var(--acid);
  border-bottom: 1px solid var(--acid);
}
.elev-tip-y {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--acid);
  font-weight: 600;
}
.elev-tip-t {
  font-size: 13px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.cv-list { border-top: 1px solid var(--line); }
.cv-item {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  gap: 40px;
  padding: 32px 24px;
  margin: 0 -12px;
  background: color-mix(in oklab, var(--bg) 68%, transparent);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  align-items: start;
  transition: padding .4s var(--ease), background .3s;
  position: relative;
}
.cv-item:hover { background: color-mix(in oklab, var(--bg) 82%, transparent); }
.cv-item::before {
  content:"";
  position: absolute;
  top: 40px; left: 200px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-2);
  transition: all .3s;
  z-index: 1;
}
.cv-item.now::before { background: var(--acid); box-shadow: 0 0 0 4px var(--acid-glow), 0 0 16px var(--acid); animation: pulse 2s infinite; }
.cv-item::after {
  content:"";
  position: absolute;
  left: 203px; top: 0; bottom: 0;
  width: 1px;
  background: var(--line-2);
  z-index: 0;
}
.cv-item:first-child::after { top: 40px; }
.cv-item:last-child::after { bottom: auto; height: 40px; }
.cv-item:hover { background: color-mix(in oklab, var(--bg) 86%, transparent); }
.cv-item:hover::before { background: var(--acid); }
@media (max-width: 900px){
  .cv-item { grid-template-columns: 1fr; gap: 12px; }
  .cv-item::before, .cv-item::after { display: none; }
}

.cv-date {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  padding-top: 4px;
}
.cv-date .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  background: var(--acid-glow);
  color: var(--acid);
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cv-date .pill::before {
  content:""; width: 5px; height: 5px; background: var(--acid); border-radius: 50%;
}
.cv-role {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.cv-company {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 16px;
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
}
.cv-company strong { color: var(--ink); font-weight: 500; }
.cv-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cv-bullets li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: 20px;
  position: relative;
}
.cv-bullets li::before {
  content:"—";
  position: absolute;
  left: 0;
  color: var(--acid);
}
.cv-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
@media (max-width: 900px){ .cv-tags { align-items: flex-start; flex-direction: row; flex-wrap: wrap; } }

/* ============================================================
   § 06 PORTFOLIO
   ============================================================ */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-flow: dense;
  grid-auto-rows: minmax(260px, auto);
  gap: 16px;
}
@media (max-width: 900px){ .proj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .proj-grid { grid-template-columns: 1fr; } }

.proj {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all .4s var(--ease);
  cursor: none;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.proj::before {
  content:"";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,50%), var(--acid-glow), transparent 50%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.proj:hover { border-color: var(--acid); transform: translateY(-4px); }
.proj:hover::before { opacity: 1; }

.proj.s1 { grid-column: span 3; grid-row: span 2; min-height: 400px; }
.proj.s2 { grid-column: span 3; }
.proj.s3 { grid-column: span 2; }
.proj.s4 { grid-column: span 4; }
@media (max-width: 900px){
  .proj.s1, .proj.s2, .proj.s3, .proj.s4 { grid-column: span 2; grid-row: auto; min-height: 260px; }
}
@media (max-width: 560px){
  .proj.s1, .proj.s2, .proj.s3, .proj.s4 { grid-column: span 1; }
}

.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: auto;
}
.proj-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
}
.proj-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  transition: all .4s var(--ease);
  font-size: 13px;
  color: var(--ink-3);
}
.proj:hover .proj-arrow {
  background: var(--acid); color: var(--bg); border-color: var(--acid);
  transform: rotate(-45deg) scale(1.1);
}
.proj-body {
  margin-top: 80px;
}
.proj-name {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.1;
}
.proj-name em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}
.proj-desc {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 420px;
  margin-bottom: 16px;
}
.proj-meta {
  display: flex;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.proj-meta span::before { content:"·"; margin-right: 10px; color: var(--ink-4); }
.proj-meta span:first-child::before { display: none; }

.proj.s1 .proj-name { font-size: clamp(32px, 3.4vw, 48px); }
.proj.featured { background: var(--acid); color: var(--bg); border-color: var(--acid); }
.proj.featured .proj-tag { background: var(--on-acid-tag); border-color: transparent; color: var(--on-acid-tag-ink); }
.proj.featured .proj-arrow { border-color: var(--on-acid-dim); color: var(--bg); }
.proj.featured:hover .proj-arrow { background: var(--bg); color: var(--acid); }
.proj.featured .proj-name em { color: var(--bg); }
.proj.featured .proj-desc { color: var(--on-acid-soft); }
.proj.featured .proj-meta { color: var(--on-acid-mute); border-top-color: var(--on-acid-line); }
.proj.featured .proj-meta span::before { color: var(--on-acid-dim); }

/* ============================================================
   § 07 TRAIL — the secondary thread made visible
   ============================================================ */
.trail {
  position: relative;
}
.trail::before {
  content:"";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, var(--acid-glow), transparent 60%);
  opacity: 0.3;
  pointer-events: none;
}

.trail-quote {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 var(--pad-x);
  font-size: clamp(24px, 3.6vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 300;
  text-align: center;
  text-wrap: balance;
}
.trail-quote em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}
.trail-quote .muted { color: var(--ink-3); }
@media (max-width: 900px) { .break-md { display: none; } }

/* UTMB official-style card */
.utmb-card {
  position: relative;
  display: block;
  margin: 0 auto 100px;
  padding: 44px 48px 32px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  color: var(--ink);
  transition: border-color .3s, transform .4s var(--ease);
}
.utmb-card:hover { border-color: var(--acid); transform: translateY(-2px); }
.utmb-card-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .35;
  pointer-events: none;
}
.utmb-card-top,
.utmb-card-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.utmb-card-label {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.2em;
}
.utmb-card-label em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--acid);
  letter-spacing: -0.01em;
  text-transform: none;
  font-size: 13px;
  margin-left: 4px;
}
.utmb-card-middle {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 48px;
  padding: 36px 0 32px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin: 20px 0;
}
.utmb-card-score {
  display: flex;
  font-family: var(--f-display);
  font-weight: 200;
  font-size: clamp(120px, 22vw, 260px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.utmb-digit {
  display: inline-block;
  transform: translateY(0);
  transition: transform .5s var(--ease), color .3s;
}
.utmb-card:hover .utmb-digit:nth-child(1) { transform: translateY(-6px); color: var(--acid); transition-delay: 0s; }
.utmb-card:hover .utmb-digit:nth-child(2) { transform: translateY(-10px); color: var(--acid); transition-delay: .06s; }
.utmb-card:hover .utmb-digit:nth-child(3) { transform: translateY(-6px); color: var(--acid); transition-delay: .12s; }
.utmb-card-meta {
  display: grid;
  gap: 14px;
}
.utmb-card-meta > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.utmb-card-meta span {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.utmb-card-meta b {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.utmb-arrow {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--acid);
  color: #0A0A0B;
  font-size: 13px;
  transition: transform .3s var(--ease);
}
.utmb-card:hover .utmb-arrow { transform: translate(4px, -4px); }

@media (max-width: 720px) {
  .utmb-card { padding: 28px 24px 24px; }
  .utmb-card-middle { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
  .utmb-card-score { font-size: 150px; }
  .utmb-card-meta > div { border-left: 2px solid var(--acid); }
}

.race-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
@media (max-width: 780px){ .race-grid { grid-template-columns: 1fr; } }
.race {
  padding: 40px;
  background: var(--bg);
  position: relative;
  transition: background .3s;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 340px;
}
.race:hover { background: var(--bg-2); }
.race.now { background: var(--bg-2); }
.race.now::before {
  content:"";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--acid), transparent);
}

.race-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.race-status::before {
  content:""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4);
}
.race.now .race-status { color: var(--acid); }
.race.now .race-status::before { background: var(--acid); animation: pulse 2s infinite; }

.race-title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 500;
}
.race-title em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}

.race-profile { width: 100%; height: 60px; margin: 8px 0; }
.race-profile svg { width: 100%; height: 100%; overflow: visible; }
.race-profile .fill { fill: var(--acid); fill-opacity: 0.1; }
.race-profile .stroke { fill: none; stroke: var(--acid); stroke-width: 1.5; stroke-linejoin: round; }

.race-desc { font-size: 15px; color: var(--ink-2); line-height: 1.55; }

.race-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.race-stat .k {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.race-stat .v {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.trail-events {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 780px){ .trail-events { grid-template-columns: 1fr; } }
.trail-event {
  padding: 28px 28px 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition: transform .35s var(--ease), background .3s, border-color .3s;
  position: relative;
  overflow: hidden;
  counter-increment: trailEvt;
}
.trail-events { counter-reset: trailEvt; }
.trail-event::before {
  content: counter(trailEvt, decimal-leading-zero) " / 06";
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  transition: color .3s;
}
.trail-event::after {
  content:"";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--acid);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease);
}
.trail-event:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
}
.trail-event:hover::before { color: var(--acid); }
.trail-event:hover::after  { transform: scaleY(1); }

.trail-event h5 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-top: 24px;
  margin-bottom: 12px;
  padding-right: 60px;
  transition: color .25s;
}
.trail-event:hover h5 { color: var(--acid); }
.trail-event p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}
.trail-event p strong {
  color: var(--ink);
  font-weight: 500;
}

/* ============================================================
   § 08 CONTACT
   ============================================================ */
.contact-wrap {
}
.contact-title {
  font-size: clamp(56px, 10vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  font-weight: 300;
  margin-bottom: 60px;
  max-width: 18ch;
}
.contact-title em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px){ .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-link {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  padding: 20px 16px;
  margin: 0 -8px 2px;
  background: color-mix(in oklab, var(--bg) 68%, transparent);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
  transition: transform .3s var(--ease), background .3s;
  position: relative;
}
.contact-link:hover { transform: translateX(16px); background: color-mix(in oklab, var(--bg) 86%, transparent); }
.contact-link::before {
  content:"";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: var(--acid);
  transition: width .4s var(--ease);
}
.contact-link:hover::before { width: 8px; }
.contact-link .k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.contact-link .v {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.contact-link:hover .v { color: var(--acid); }
.contact-link .arrow {
  color: var(--ink-3);
  transition: transform .3s, color .3s;
}
.contact-link:hover .arrow { transform: translate(4px,-4px); color: var(--acid); }

.form-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  background: var(--bg-2);
}
.form-group { margin-bottom: 20px; }
/* Honeypot — invisible to humans, tempting to bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile-wrap { min-height: 65px; }
.form-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.form-label .req { color: var(--acid); }
.form-input, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  transition: all .2s;
}
.form-input:focus, .form-textarea:focus {
  outline: 0;
  border-color: var(--acid);
  box-shadow: 0 0 0 3px var(--acid-glow);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-submit {
  width: 100%;
  padding: 20px;
  background: var(--acid);
  color: var(--bg);
  border-radius: 8px;
  font-family: var(--f-mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all .25s;
  margin-top: 8px;
}
.form-submit:hover { gap: 20px; background: var(--acid-2); }

@media (max-width: 600px){
  .contact-title { font-size: clamp(40px, 11vw, 56px); margin-bottom: 40px; }
  .form-card { padding: 20px; }
  .contact-link { grid-template-columns: 56px 1fr auto; gap: 12px; padding: 16px 12px; margin: 0 0 2px; }
  .contact-link:hover { transform: none; }
  .contact-link .v { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  position: relative;
  z-index: 3;
  padding: 0 var(--pad-x) 40px;
  overflow: hidden;
}
.foot-mark {
  font-size: clamp(80px, 18vw, 320px);
  line-height: 0.82;
  letter-spacing: -0.06em;
  font-weight: 200;
  font-variation-settings: "wght" 200;
  margin-bottom: 40px;
  white-space: nowrap;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.foot-mark em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--acid);
  font-weight: 400;
}
.foot-mark .num {
  font-family: var(--f-mono);
  font-size: 0.08em;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  align-self: flex-end;
  padding-bottom: 20px;
}

.foot-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: 16px;
}
.foot-bar b { color: var(--ink); font-weight: 500; }

/* Progress bar — page scroll */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--acid);
  width: 0;
  z-index: 101;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--acid);
}

/* Time + live counter HUD */
.hud {
  position: fixed;
  bottom: 24px;
  left: var(--pad-x);
  z-index: 90;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 2s forwards;
  transition: opacity .4s;
}
.hud.fade { opacity: 0.25 !important; }
.hud-row { display: flex; gap: 14px; align-items: center; }
.hud-row b { color: var(--ink); font-weight: 500; }
.hud-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: pulse 2s infinite;
}
@media (max-width: 700px){ .hud { display: none; } }

/* Right-side section index */
.sec-index {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 2s forwards;
  padding: 10px 6px;
  pointer-events: auto;
  align-items: flex-end;
}
.sec-index a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 3px 4px;
  opacity: 0.45;
  transition: opacity .25s, color .25s;
  white-space: nowrap;
}
.sec-index a > span {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  color: var(--ink-2);
}
.sec-index a > small {
  font-size: 9px;
  color: var(--acid);
  opacity: 0.85;
  font-weight: 500;
}
.sec-index:hover a { opacity: 1; }
.sec-index:hover a > span { opacity: 1; transform: translateX(0); }
.sec-index a::after {
  content:""; width: 16px; height: 1px;
  background: currentColor;
  transition: width .25s;
  order: 2;
}
.sec-index a.active { opacity: 1; color: var(--acid); }
.sec-index a.active::after { width: 28px; }
.sec-index a.active > span { opacity: 1; transform: translateX(0); }
@media (max-width: 900px){ .sec-index { display: none; } }
@media (max-width: 1200px){ .hud { display: none; } }

/* ============================================================
   FOOTER — liens légaux
   ============================================================ */
.foot-legal { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.foot-legal a, .foot-cookie-link {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color .2s;
  background: none; border: 0; cursor: none; padding: 0;
}
.foot-legal a:hover, .foot-cookie-link:hover { color: var(--acid); }

/* ============================================================
   COOKIE CONSENT — banner + FAB
   ============================================================ */
.cc {
  position: fixed;
  left: var(--pad-x);
  bottom: var(--pad-x);
  z-index: 9000;
  width: min(400px, calc(100vw - 2 * var(--pad-x)));
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.cc.cc-in { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.cc-inner {
  background: color-mix(in oklab, var(--bg-2) 92%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.5);
}
.cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cc-head strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.cc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--acid); box-shadow: 0 0 0 4px var(--acid-glow);
}
.cc-text { font-size: 13px; line-height: 1.55; color: var(--ink-2); margin-bottom: 16px; }
.cc-text a { color: var(--acid); text-decoration: underline; text-underline-offset: 2px; }

.cc-panel { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.cc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in oklab, var(--bg) 50%, transparent);
}
.cc-row b { font-size: 13px; font-weight: 600; display: block; }
.cc-row small { font-size: 11px; color: var(--ink-3); display: block; margin-top: 2px; }
.cc-row input { width: 18px; height: 18px; accent-color: var(--acid); cursor: none; flex-shrink: 0; }
.cc-row--locked { opacity: .7; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-btn {
  flex: 1; min-width: 100px;
  padding: 11px 14px;
  border-radius: 100px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: none;
  transition: all .2s;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .cc-btn { flex: 1 1 auto; min-width: 0; padding: 10px 10px; font-size: 10px; letter-spacing: 0.02em; }
}
.cc-btn--ghost { background: transparent; border: 1px solid var(--nav-cta-border); color: var(--ink-2); }
.cc-btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.cc-btn--solid { background: var(--acid); border: 1px solid var(--acid); color: var(--on-acid); font-weight: 600; }
.cc-btn--solid:hover { background: var(--acid-2); border-color: var(--acid-2); }

.cc-fab {
  position: fixed;
  left: var(--pad-x);
  bottom: var(--pad-x);
  z-index: 8900;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--bg-2) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  cursor: none;
  transition: color .2s, border-color .2s, transform .3s var(--ease);
}
.cc-fab:hover { color: var(--acid); border-color: var(--acid); transform: rotate(-12deg) scale(1.05); }

@media (max-width: 520px) {
  .cc { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .cc-fab { left: 12px; bottom: 12px; }
}

/* ============================================================
   PAGES LÉGALES (mentions, confidentialité, 404)
   ============================================================ */
.legal { position: relative; z-index: 2; padding: 160px 0 120px; min-height: 70vh; }
.legal .wrap { max-width: 820px; }
.legal-title {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 400;
  margin: 12px 0 48px;
}
.legal-title em { font-family: var(--f-serif); font-style: italic; color: var(--acid); }
.legal-block { margin-bottom: 10px; padding: 15px 0; }
.legal-block h2 {
  font-size: 13px;
  font-family: var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.legal-block p, .legal-block li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.legal-block p { margin-bottom: 12px; }
.legal-block strong { color: var(--ink); font-weight: 600; }
.legal-block em { font-style: italic; color: var(--ink-3); }
.legal-block a { color: var(--acid); text-decoration: underline; text-underline-offset: 2px; }
.legal-block ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legal-block li { padding-left: 20px; position: relative; }
.legal-block li::before { content: "—"; position: absolute; left: 0; color: var(--acid); }
.legal-cc-link {
  background: none; border: 0; padding: 0; cursor: none;
  color: var(--acid); text-decoration: underline; text-underline-offset: 2px;
  font: inherit;
}
.legal-back { margin-top: 56px; }
.legal-back a { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); transition: color .2s; }
.legal-back a:hover { color: var(--acid); }

.err404 { text-align: center; display: flex; align-items: center; min-height: 80vh; }
.err404 .wrap { margin: 0 auto; }
.err404-code {
  font-size: clamp(120px, 26vw, 320px);
  line-height: 0.8;
  margin: 8px 0 24px;
}
.err404-msg { font-size: 18px; color: var(--ink-2); max-width: 460px; margin: 0 auto; }
.err404 .legal-back { margin-top: 40px; }
