@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-latin-full-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-latin-full-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d0b0a;
  --bg-2: #13100e;
  --panel: rgba(27, 23, 20, 0.66);
  --panel-solid: #181513;
  --panel-2: #201b18;
  --line: rgba(255, 236, 218, 0.085);
  --line-2: rgba(255, 236, 218, 0.16);
  --text: #f4efe9;
  --text-2: #c4bbb1;
  --text-3: #8f877e;
  --melon: #ec5b52;
  --melon-2: #f9c2bc;
  --mango: #f6a945;
  --berry: #6593d2;
  --lime: #8cc174;
  --lavender: #b19cd9;
  --grad: linear-gradient(92deg, #ec5b52 0%, #f07d4c 46%, #f6a945 100%);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-variation-settings: 'opsz' 36, 'SOFT' 50, 'WONK' 0;
}

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

a {
  color: inherit;
}

::selection {
  background: rgba(236, 91, 82, 0.35);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

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

/* ---------------------------------------------------------------- layers */
#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(236, 91, 82, 0.09), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(101, 147, 210, 0.05), transparent 60%),
    var(--bg);
}
.backdrop::after {
  content: '';
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 236, 218, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 236, 218, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse at 60% 20%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 20%, #000 0%, transparent 70%);
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  animation: drift 26s var(--ease) infinite alternate;
}
.glow.g1 {
  width: 520px;
  height: 520px;
  right: -120px;
  top: 8%;
  background: #ec5b52;
  opacity: 0.18;
}
.glow.g2 {
  width: 420px;
  height: 420px;
  left: -160px;
  top: 55%;
  background: #f6a945;
  opacity: 0.08;
  animation-delay: -8s;
}
.glow.g3 {
  width: 380px;
  height: 380px;
  right: 18%;
  bottom: -160px;
  background: #6593d2;
  opacity: 0.09;
  animation-delay: -16s;
}
@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-60px, 40px, 0) scale(1.15);
  }
}

main,
.footer {
  position: relative;
  z-index: 1;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- type */
.display {
  font-family: var(--serif);
  font-weight: 480;
  letter-spacing: -0.012em;
  line-height: 1.02;
  margin: 0;
}
.display em,
.grad {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}
.h2 {
  font-size: clamp(34px, 4.6vw, 62px);
}
h3 {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
p {
  margin: 0;
}
.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.kicker,
.eyebrow,
.mini-label,
.card-index,
.stat-label,
.hud,
.step-num,
.panel-head,
.explorer-hint,
.chart-note {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mango);
  margin-bottom: 20px;
}
.kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}
.kicker span {
  color: var(--melon);
}
.lede {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
  max-width: 560px;
}

/* ---------------------------------------------------------------- reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease),
    filter 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  margin: 0 auto;
  width: min(calc(100% - 2 * var(--gutter)), 1180px);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    background 0.5s var(--ease),
    border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}
.nav.is-scrolled .nav-inner {
  background: rgba(19, 16, 14, 0.72);
  border-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  filter: drop-shadow(0 2px 6px rgba(242, 142, 43, 0.35));
  width: 28px;
  height: 28px;
  color: var(--text);
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav-links a {
  position: relative;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition:
    color 0.3s,
    background 0.3s;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a.is-active {
  color: var(--text);
  background: rgba(255, 236, 218, 0.08);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s var(--ease);
}
.nav-cta:hover {
  transform: translateY(-1px);
}
.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  padding: 9px;
  cursor: pointer;
}
.nav-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 2px;
}
.nav-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--grad);
}

/* ---------------------------------------------------------------- buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.35s var(--ease),
    background 0.35s,
    border-color 0.35s,
    box-shadow 0.35s;
}
.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--ease);
}
.btn:hover svg {
  transform: translateX(3px);
}
.btn-primary {
  background: var(--melon);
  color: #fff;
  box-shadow: 0 10px 30px rgba(236, 91, 82, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(236, 91, 82, 0.45);
}
.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--text);
  background: rgba(20, 17, 15, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: rgba(255, 236, 218, 0.36);
  transform: translateY(-2px);
}
.btn.is-static {
  color: var(--text-3);
  cursor: default;
}
.btn.is-static:hover {
  transform: none;
  border-color: var(--line-2);
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-stage {
  position: absolute;
  inset: 0;
}
.hero-fallback {
  display: none;
  position: absolute;
  right: 8%;
  top: 50%;
  width: min(42vw, 520px);
  transform: translateY(-50%);
}
.no-gl .hero-fallback {
  display: block;
}
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(13, 11, 10, 0.92) 0%, rgba(13, 11, 10, 0.6) 36%, rgba(13, 11, 10, 0) 62%),
    linear-gradient(0deg, rgba(13, 11, 10, 0.9) 0%, rgba(13, 11, 10, 0) 26%);
}
.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 236, 218, 0.5);
  border-style: solid;
  border-width: 0;
  z-index: 2;
}
.corner.tl {
  top: 86px;
  left: 28px;
  border-top-width: 1px;
  border-left-width: 1px;
}
.corner.tr {
  top: 86px;
  right: 28px;
  border-top-width: 1px;
  border-right-width: 1px;
}
.corner.bl {
  bottom: 28px;
  left: 28px;
  border-bottom-width: 1px;
  border-left-width: 1px;
}
.corner.br {
  bottom: 28px;
  right: 28px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}
.hud {
  position: relative;
  z-index: 2;
}
.hud-tag,
.hud-frame {
  position: absolute;
  top: 96px;
  color: var(--text-2);
}
.hud-tag {
  left: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hud-frame {
  right: 58px;
  font-variant-numeric: tabular-nums;
}
.rec {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--melon);
  box-shadow: 0 0 12px var(--melon);
  animation: blink 1.6s infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 150px 0 120px;
}
.hero-copy {
  max-width: 640px;
}
.eyebrow {
  color: var(--mango);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}
.hero-title {
  font-size: clamp(62px, 9.2vw, 134px);
  font-weight: 560;
  line-height: 0.95;
  letter-spacing: -0.028em;
  margin-left: -0.03em;
}
.hero-tagline {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.1vw, 29px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.22;
  color: var(--text);
  max-width: 600px;
}
.hero-intro {
  margin-top: 22px;
  max-width: 540px;
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.7;
}
.hero-author {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}
.author-name {
  font-weight: 600;
}
.author-aff {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hero .btn-row {
  margin-top: 30px;
}
/* callout on the apple's unphotographed top */
.trace-card {
  position: absolute;
  z-index: 3;
  right: 58px;
  bottom: 64px;
  width: 320px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: rgba(16, 13, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.trace-card-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lime);
}
.live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
.trace-card-body {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  align-items: center;
}
.trace-thumb {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  flex: none;
  border: 1px solid var(--line-2);
}
.trace-thumb canvas {
  width: 100%;
  height: 100%;
}
.trace-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.1;
}
.trace-photo {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.trace-xy,
.trace-foot {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.trace-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
}
.trace-card .swap {
  animation: swap 0.6s var(--ease);
}
@keyframes swap {
  from {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(4px);
  }
}
.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
}
.scroll-cue i {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--text-2), transparent);
  animation: cue 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
  }
  50% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ---------------------------------------------------------------- sections */
.section {
  padding: clamp(96px, 14vw, 180px) 0;
  position: relative;
}
.split-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px 64px;
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 84px);
}

.card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(31, 26, 23, 0.72), rgba(20, 17, 15, 0.72));
  overflow: hidden;
}
.card p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
}
.card h3 {
  margin: 10px 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.card .card-index {
  color: var(--mango);
  font-size: 11.5px;
  line-height: 1.4;
}
.card .chart-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-3);
}
.glowable::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, -100%) var(--my, -100%), rgba(236, 91, 82, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.glowable:hover::before {
  opacity: 1;
}
.cards3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

/* ---------------------------------------------------------------- count demo */
.count-demo {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
}
.count-stage {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.7);
}
.count-big {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 471 / 404;
  align-self: center;
}
.count-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.count-big .hud {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(13, 11, 10, 0.78);
  color: var(--text);
  font-size: 10.5px;
}
.count-big .ring {
  width: 20%;
}
.count-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-content: center;
}
.ctile {
  position: relative;
  aspect-ratio: 471 / 404;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  opacity: 0.38;
  transition:
    opacity 0.5s,
    transform 0.15s var(--ease),
    box-shadow 0.15s;
}
.ctile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ring {
  position: absolute;
  width: 26%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #5dbb63;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(93, 187, 99, 0.7);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  transition:
    transform 0.6s var(--ease),
    opacity 0.4s;
}
.ring.on,
.ctile.is-seen .ring {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.ring.is-rim {
  border: 2px dashed rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(13, 11, 10, 0.5);
}
.ctile.is-scan {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--mango);
}
.ctile.is-seen {
  opacity: 1;
}
.count-side {
  display: grid;
  gap: 18px;
}
.count-meter {
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.7);
}
.count-value {
  margin-top: 8px;
  font-size: 54px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.count-value small {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
  margin-left: 6px;
}
.count-note {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14px;
}
.count-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.count-map {
  position: relative;
  margin-top: 16px;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 690 / 290;
  background: #0a0908;
}
.count-map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.count-map i {
  position: absolute;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #5dbb63;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(93, 187, 99, 0.7);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  transition:
    transform 0.7s var(--ease),
    opacity 0.4s;
}
.count-map i.on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------------------------------------------------------------- method */
.method {
  position: relative;
  padding-top: clamp(96px, 14vw, 180px);
}
.method-intro .split-head {
  margin-bottom: 24px;
}
.method-track {
  position: relative;
  height: 500vh;
}
.method-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.method-stage {
  position: absolute;
  inset: 0;
}
.stage-fallback {
  display: none;
  position: absolute;
  right: 6%;
  top: 50%;
  width: min(48vw, 560px);
  transform: translateY(-50%);
}
.no-gl .stage-fallback {
  display: block;
}
.method-hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 96px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 0 calc(var(--gutter) + 12px);
  pointer-events: none;
}
.method-hud .hud {
  color: var(--text-2);
}
.method-panel {
  position: absolute;
  left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  top: 50%;
  transform: translateY(-50%);
  width: min(400px, calc(100vw - 2 * var(--gutter)));
  padding: 30px 30px 26px;
  border-radius: 26px;
  border: 1px solid var(--line-2);
  background: rgba(16, 13, 11, 0.74);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.method-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  pointer-events: none;
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease),
    filter 0.45s var(--ease);
}
.step.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}
.step.is-past {
  transform: translateY(-18px);
}
.step-num {
  color: var(--melon);
}
.step h3 {
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 33px;
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.step p:last-child {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.7;
}
.method-progress {
  margin-top: 26px;
}
.method-bar {
  height: 2px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}
.method-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.method-dots {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}
.method-dots button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 50%;
  transition:
    color 0.3s,
    background 0.3s;
}
.method-dots button {
  position: relative;
}
.method-dots button.is-on {
  color: var(--text);
  background: rgba(236, 91, 82, 0.2);
}
/* ring that fills while the step waits for the automatic advance */
.method-dots button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--mango) calc(var(--fill, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  pointer-events: none;
}
.method-note {
  max-width: 720px;
  margin: 40px auto 0;
  text-align: center;
  color: var(--text-3);
  font-size: 14.5px;
  line-height: 1.7;
  padding-bottom: 20px;
}

/* ---------------------------------------------------------------- explorer */
/* map and 3D view on the left, photograph, readout and legend on the right: the three linked views share one
   screen; the 3D view takes the height left under the map, and the block narrows on short screens to fit */
.explorer {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    'map three-side'
    'three three-side';
  gap: 18px;
  margin-inline: auto;
}
@media (min-width: 901px) {
  .explorer {
    max-width: max(680px, calc(234vh - 940px));
  }
}
.explorer-map {
  grid-area: map;
}
.explorer-side {
  grid-area: three-side;
}
.explorer-map,
.explorer-side > * {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.72);
}
.explorer-map {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.explorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(13, 11, 10, 0.6);
}
.seg button {
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: 500 13.5px var(--sans);
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s;
}
.seg button.is-on {
  background: var(--text);
  color: var(--bg);
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.presets button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition:
    border-color 0.3s,
    color 0.3s;
}
.presets button:hover,
.presets button.is-on {
  color: var(--text);
  border-color: rgba(255, 236, 218, 0.4);
}
.presets i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px rgba(13, 11, 10, 0.9);
}
.map-frame {
  position: relative;
  padding: 0 0 22px 34px;
}
.map-canvas {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
  background: #0a0908;
}
.map-axis {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.map-axis.x {
  left: 34px;
  right: 0;
  bottom: 0;
}
.map-axis.y {
  left: 0;
  top: 0;
  bottom: 22px;
  width: 30px;
  flex-direction: column;
  justify-content: space-around;
  text-align: right;
}
.explorer-hint {
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 11.5px;
}
.explorer-side {
  display: grid;
  gap: 18px;
  align-content: start;
}
.photo-panel {
  padding: 16px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text-2);
}
.panel-head .mono {
  font-size: 11.5px;
  color: var(--text-3);
}
.photo-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.photo-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 440 / 470;
}
.loupe {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 108px;
  height: 108px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  background: #fff;
  opacity: 0;
  transition: opacity 0.3s;
}
.loupe.on {
  opacity: 1;
}
.readout {
  padding: 16px 18px;
}
.readout dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.readout dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.readout dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.mini3d {
  position: relative;
  grid-area: three;
  min-height: 240px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 55%, rgba(236, 91, 82, 0.06), transparent 65%);
}
.legend-card {
  padding: 14px 16px 15px;
  display: grid;
  gap: 10px;
}
.legend-card .mini-label span {
  text-transform: none;
  letter-spacing: 0.04em;
}
.legend-chips {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 3px;
}
.legend-chips button {
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--c);
  color: rgba(20, 16, 13, 0.85);
  font: 600 9.5px var(--mono);
  letter-spacing: -0.02em;
  cursor: pointer;
  opacity: 0.82;
  transition:
    opacity 0.2s,
    transform 0.2s var(--ease),
    box-shadow 0.2s;
}
.legend-chips button:hover,
.legend-chips button:focus-visible,
.legend-chips button.is-on {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px #fff;
  outline: none;
}
.legend-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.legend-note i {
  flex: none;
  width: 34px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(rgba(255, 236, 218, 0.16) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, rgba(255, 236, 218, 0.16) 1px, transparent 1px) 0 0 / 8px 8px,
    #0a0908;
}
/* short screens: tighter side cards keep the map, photograph and 3D view on one screen */
@media (min-width: 901px) and (max-height: 880px) {
  .explorer-side {
    gap: 12px;
  }
  .photo-panel {
    padding: 12px;
  }
  .panel-head {
    margin-bottom: 8px;
  }
  .readout {
    padding: 12px 16px;
  }
}
.mini3d .hud {
  position: absolute;
  left: 16px;
  top: 14px;
}

/* ---------------------------------------------------------------- compare */
.compare {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.72);
  padding: 18px;
}
.compare-frame {
  position: relative;
  aspect-ratio: 2048 / 854;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0908;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.cmp-img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.cmp-clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--split, 50%));
}
.cmp-corr {
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.compare.show-corr .cmp-corr {
  opacity: 1;
}
.cmp-tag {
  position: absolute;
  top: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(13, 11, 10, 0.72);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  pointer-events: none;
}
.cmp-tag.l {
  left: 14px;
}
.cmp-tag.r {
  right: 14px;
  color: var(--melon-2);
}
.cmp-tag.c {
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  text-align: center;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 0.4s;
}
.compare.show-corr .cmp-line {
  opacity: 0;
  pointer-events: none;
}
.cmp-line {
  transition: opacity 0.4s;
}
.compare.show-corr .cmp-tag.c {
  opacity: 1;
}
.compare.show-corr .cmp-tag.l,
.compare.show-corr .cmp-tag.r {
  opacity: 0;
}
.cmp-tag.l,
.cmp-tag.r {
  transition: opacity 0.4s;
}
.cmp-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}
.cmp-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(13, 11, 10, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  cursor: ew-resize;
  backdrop-filter: blur(6px);
}
.cmp-knob svg {
  width: 20px;
  height: 20px;
}
.compare-bar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}
.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle .track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background 0.3s;
}
.toggle .track i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.35s var(--ease);
}
.toggle input:checked + .track {
  background: var(--melon);
}
.toggle input:checked + .track i {
  transform: translateX(18px);
}
.toggle input:focus-visible + .track {
  outline: 2px solid var(--mango);
  outline-offset: 3px;
}
.legend-div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  opacity: 0.35;
  transition: opacity 0.4s;
}
.compare.show-corr .legend-div {
  opacity: 1;
}
.legend-div .ramp {
  width: 120px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #4f7cc3, #a3bfe8, #f8f6f3, #f4ada5, #dd4e46);
}
.legend-div .mono {
  color: var(--text-3);
  font-size: 11px;
}

.light-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 18px;
}
.light-card {
  display: flex;
  flex-direction: column;
}
.light-card .chart {
  margin: 18px 0 0;
  flex: 1;
  min-height: 150px;
}
.chart-note {
  margin-top: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 11px;
  line-height: 1.5;
}
.spheres {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.spheres figure {
  margin: 0;
  flex: 1;
  text-align: center;
}
.spheres canvas {
  width: 100%;
  max-width: 150px;
  margin: 0 auto;
  aspect-ratio: 1;
}
.spheres figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  line-height: 1.4;
}
.spheres .op {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--text-3);
  margin-bottom: 26px;
}
.svgchart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.svgchart text {
  font-family: var(--sans);
  font-size: 13px;
  fill: var(--text-2);
}
.svgchart .tick text {
  fill: var(--text-3);
  font-size: 12px;
}
.svgchart .grid {
  stroke: rgba(255, 236, 218, 0.09);
  stroke-width: 1;
}
.svgchart .value {
  font-weight: 600;
  fill: var(--text);
  font-size: 13.5px;
}
.tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(16, 13, 11, 0.92);
  font-size: 12.5px;
  color: var(--text);
  transform: translate(-50%, calc(-100% - 12px));
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.tip.on {
  opacity: 1;
}
.tip b {
  font-weight: 600;
}

/* ---------------------------------------------------------------- results */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat {
  position: relative;
  padding: 26px 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(31, 26, 23, 0.74), rgba(20, 17, 15, 0.74));
  overflow: hidden;
}
.stat-wide {
  grid-column: span 2;
}
.stat-label {
  color: var(--text-3);
}
.stat-value {
  margin-top: 14px;
  font-size: clamp(52px, 5.6vw, 76px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-value small {
  font-size: 0.34em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-2);
}
.stat-text {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
  max-width: 520px;
}
.stat-text strong {
  color: var(--text);
  font-weight: 600;
}
.cmp-bars {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}
.cmp-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) 2fr auto;
  gap: 14px;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-2);
}
.cmp-row .key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cmp-row .key i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}
.cmp-row .bar {
  position: relative;
  height: 14px;
  border-radius: 0 4px 4px 0;
  background: rgba(255, 236, 218, 0.05);
}
.cmp-row .bar b {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--v) * 1%);
  border-radius: 0 4px 4px 0;
  background: var(--c);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1.6s var(--ease);
}
.cmp-bars.in .bar b {
  transform: scaleX(1);
}
.cmp-row .num {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}
.sources {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.source {
  position: relative;
  padding: 16px 16px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.72);
  overflow: hidden;
}
.source-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}
.source-tiles img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.6s var(--ease);
}
.source:hover .source-tiles img {
  transform: scale(1.03);
}
.source h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
}
.source h3 i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 12px var(--c);
}
.source .mono {
  margin-top: 6px;
  color: var(--text-2);
}
.source p:last-child {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- ticker */
.ticker {
  position: relative;
  overflow: hidden;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: ticker 90s linear infinite;
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker figure {
  margin: 0;
  flex: none;
}
.ticker img {
  height: 86px;
  width: auto;
  aspect-ratio: 2.6;
  border-radius: 10px;
  background: #0a0908;
}
.ticker figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---------------------------------------------------------------- gallery */
.gallery-tabs {
  margin-bottom: 22px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.gcard {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.72);
  overflow: hidden;
  animation: gin 0.8s var(--ease) both;
  animation-delay: var(--d, 0s);
}
@keyframes gin {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
}
.gcard-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gcard-top figure {
  margin: 0;
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0a0908;
}
.gcard-top figure.photo.light {
  background: #fff;
}
.gcard-top img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gcard-top figure.wrap img {
  width: 86%;
  height: 86%;
  transition: transform 1.2s var(--ease);
}
.gcard:hover figure.wrap img {
  transform: scale(1.06) rotate(-2deg);
}
.gcard-top figcaption,
.gmap .tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(13, 11, 10, 0.72);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.gmap {
  position: relative;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: var(--ar, 2.6);
  background: #0a0908;
}
.gmap-strip {
  position: absolute;
  inset: 0;
  display: flex;
  width: 200%;
  animation: pan 38s linear infinite;
  animation-play-state: paused;
}
.gcard:hover .gmap-strip,
.gcard.is-auto .gmap-strip {
  animation-play-state: running;
}
.gmap-strip img {
  width: 50%;
  height: 100%;
  object-fit: cover;
}
@keyframes pan {
  to {
    transform: translateX(-50%);
  }
}
.gcard-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.gcard-foot h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.gcard-foot span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------------------------------------------------------------- cite */
.cite-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
}
.cite-title {
  font-size: clamp(28px, 3.3vw, 44px);
  line-height: 1.12;
}
.cite-author {
  margin-top: 26px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}
.cite-author strong {
  color: var(--text);
}
.cite .btn-row {
  margin-top: 26px;
}
.cite-side {
  display: grid;
  gap: 18px;
  align-content: start;
}
.abstract {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18, 15, 13, 0.72);
  padding: 18px 22px;
}
.abstract summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mango);
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.abstract summary::-webkit-details-marker {
  display: none;
}
.abstract summary::after {
  content: '+';
  font-size: 16px;
  transition: transform 0.3s;
}
.abstract[open] summary::after {
  transform: rotate(45deg);
}
.abstract p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
}
.bibtex {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0a0908;
  overflow: hidden;
}
.bibtex-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px 12px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.copy-btn {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font: 500 12px var(--sans);
  cursor: pointer;
}
.copy-btn:hover {
  border-color: rgba(255, 236, 218, 0.4);
}
.bibtex pre {
  margin: 0;
  padding: 18px 20px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 34px;
  background: linear-gradient(180deg, rgba(13, 11, 10, 0), rgba(13, 11, 10, 0.9));
}
.footer-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1;
}
.footer-brand img {
  width: 40px;
  height: 40px;
}
.footer-text {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 14px;
  max-width: 340px;
}
.credits p:last-child {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
}
.credits a {
  text-decoration-color: rgba(143, 135, 126, 0.55);
  text-underline-offset: 2px;
  transition:
    color 0.2s,
    text-decoration-color 0.2s;
}
.credits a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}
.credits a,
.credits .nowrap {
  white-space: nowrap;
}
.footer-base {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.4s var(--ease);
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .nav-links a {
    padding: 8px 9px;
    font-size: 13.5px;
  }
  .light-grid {
    grid-template-columns: 1fr 1fr;
  }
  .light-card.wide {
    grid-column: 1 / -1;
    order: -1;
  }
  .sources {
    grid-template-columns: repeat(2, 1fr);
  }
  .trace-card {
    right: 32px;
    width: 290px;
  }
}

@media (max-width: 900px) {
  .menu-btn {
    display: inline-block;
    margin-left: auto;
  }
  .nav-cta {
    display: none;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--line-2);
    background: rgba(16, 13, 11, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity 0.3s,
      transform 0.3s var(--ease);
  }
  .nav.is-open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav.is-open .nav-inner {
    background: rgba(19, 16, 14, 0.9);
    border-color: var(--line);
  }
  .nav-links a {
    padding: 12px 14px;
    font-size: 15px;
  }
  .split-head,
  .count-demo,
  .explorer,
  .cite-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cards3,
  .stats,
  .gallery {
    grid-template-columns: 1fr;
  }
  .stat-wide {
    grid-column: auto;
  }
  .hero {
    align-items: flex-end;
  }
  .hero-content {
    padding: 56vh 0 220px;
  }
  .eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }
  .hero-shade {
    background: linear-gradient(0deg, rgba(13, 11, 10, 0.96) 0%, rgba(13, 11, 10, 0.82) 48%, rgba(13, 11, 10, 0) 72%);
  }
  .hud-tag {
    left: 34px;
    top: 84px;
    font-size: 10px;
  }
  .hud-frame {
    display: none;
  }
  .corner.tl,
  .corner.tr {
    top: 76px;
  }
  .trace-card {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    bottom: 40px;
  }
  .scroll-cue {
    display: none;
  }
  .method-panel {
    top: auto;
    bottom: 18px;
    transform: none;
    left: var(--gutter);
    width: auto;
    right: var(--gutter);
    padding: 20px 20px 16px;
  }
  .step h3 {
    font-size: 30px;
  }
  .step p:last-child {
    font-size: 14px;
  }
  .method-hud {
    top: 78px;
  }
  .method-hud [data-method-chip] {
    display: none;
  }
  .glow.g1 {
    width: 300px;
    height: 300px;
    opacity: 0.1;
  }
  .glow.g3 {
    opacity: 0.05;
  }
  .count-stage {
    gap: 10px;
    padding: 12px;
  }
  .count-grid {
    gap: 4px;
  }
  .count-big .hud {
    left: 6px;
    bottom: 6px;
    font-size: 8.5px;
    letter-spacing: 0.08em;
  }
  .light-grid {
    grid-template-columns: 1fr;
  }
  .explorer {
    grid-template-areas:
      'map'
      'three-side'
      'three';
    grid-template-rows: auto;
  }
  .mini3d {
    height: auto;
    aspect-ratio: 1.2;
  }
  .legend-chips {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 5px;
  }
  .legend-chips button {
    height: 26px;
    font-size: 10.5px;
  }
}

@media (max-width: 560px) {
  .sources {
    grid-template-columns: 1fr;
  }
  .count-stage {
    grid-template-columns: 1fr;
  }
  .count-pair {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .readout dl {
    grid-template-columns: 1fr;
  }
  .cmp-row {
    grid-template-columns: 1fr auto;
  }
  .cmp-row .bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .map-frame {
    padding-left: 0;
  }
  .map-axis.y {
    display: none;
  }
  .map-axis.x {
    left: 0;
  }
  .spheres .op {
    font-size: 24px;
  }
  .brand-sub {
    display: none;
  }
}

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