/* Lynx landing page. Tokens mirror apps/web/src/app/globals.css so the site and the app read as
   one product: one electric-violet accent, a deep base in dark mode, a crisp off-white in light.
   Shape rule: interactive controls are full pills, surfaces are 16px, chips are pills. */

@font-face {
  font-family: "Brunson";
  src: url("assets/fonts/Brunson.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090a0f;
  --bg-elev: #0e1017;
  --panel: #12151f;
  --panel-2: #1a1f2e;
  --border: #232839;
  --border-strong: #333b56;
  --text: #e6e8f2;
  --text-strong: #f6f7fc;
  --muted: #b3bad2;
  --faint: #8890ad;
  --accent: #9d7bff;
  --accent-bright: #b79bff;
  --accent-soft: rgba(157, 123, 255, 0.14);
  --accent-line: rgba(157, 123, 255, 0.45);
  --on-accent: #0c0a18;
  --glow: radial-gradient(70% 60% at 30% 0%, rgba(157, 123, 255, 0.16), transparent 70%);
  --shot-shadow: 0 30px 80px -20px rgba(4, 3, 14, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --nav-bg: rgba(9, 10, 15, 0.72);
  --glass-bg: rgba(22, 26, 42, 0.28);
  --glass-bg-strong: rgba(16, 19, 31, 0.5);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.25);
  --hero-accent: linear-gradient(120deg, #c4adff 0%, #9d7bff 45%, #6ea8ff 100%);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7fb;
  --bg-elev: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f2f7;
  --border: #e4e6ee;
  --border-strong: #d3d6e2;
  --text: #2a2e3a;
  --text-strong: #0c0e14;
  --muted: #586075;
  --faint: #7d8499;
  --accent: #6d3ff2;
  --accent-bright: #7c4dff;
  --accent-soft: rgba(109, 63, 242, 0.09);
  --accent-line: rgba(109, 63, 242, 0.38);
  --on-accent: #ffffff;
  --glow: radial-gradient(70% 60% at 30% 0%, rgba(109, 63, 242, 0.1), transparent 70%);
  --shot-shadow: 0 30px 70px -24px rgba(40, 30, 90, 0.35), 0 0 0 1px rgba(19, 22, 40, 0.08);
  --nav-bg: rgba(247, 247, 251, 0.78);
  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-bg-strong: rgba(255, 255, 255, 0.66);
  --glass-edge: rgba(19, 22, 40, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 10px 34px -12px rgba(40, 30, 90, 0.22), 0 2px 6px rgba(19, 22, 40, 0.05);
  --hero-accent: linear-gradient(120deg, #7c4dff 0%, #6d3ff2 50%, #4f7bff 100%);
}

:root {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 16px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Clash Display", var(--sans);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text-strong);
}

h1,
h2,
h3 {
  color: var(--text-strong);
  margin: 0;
  letter-spacing: -0.025em;
}

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

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  transition: top 0.3s var(--ease);
}
.skip:focus {
  top: 12px;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  display: inline-block;
  width: 22px;
  height: 27px;
  background: var(--accent);
  -webkit-mask: url("assets/brand/lynx-mark-mono.svg") center / contain no-repeat;
  mask: url("assets/brand/lynx-mark-mono.svg") center / contain no-repeat;
}
.wordmark {
  font-family: "Brunson", var(--sans);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.wordmark .dot {
  color: var(--accent-bright);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn i {
  font-size: 17px;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-bright);
}
.btn-primary:hover .ph-arrow-right {
  transform: translateX(3px);
}
.btn-primary .ph-arrow-right {
  transition: transform 0.25s var(--ease);
}
.btn-ghost {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text-strong);
}
.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--panel-2);
}
.btn-ghost .ph-star {
  color: var(--accent);
}
.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

/* ---------- Nav: floating glass pill ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 16px;
  pointer-events: none;
}
.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1080px;
  height: 58px;
  margin: 0 auto;
  padding: 0 9px 0 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(190%) brightness(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(190%) brightness(1.08);
  box-shadow: inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 rgba(255, 255, 255, 0.04), var(--glass-shadow);
  pointer-events: auto;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.5s var(--ease);
}
.nav-inner::before {
  /* top sheen so the edge catches light like a pane of glass */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(120% 140% at 15% -40%, var(--glass-highlight), transparent 55%),
    linear-gradient(180deg, var(--glass-highlight), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}
.nav.is-scrolled .nav-inner {
  background: var(--glass-bg-strong);
  transform: translateY(-4px);
}
@media (prefers-reduced-transparency: reduce) {
  .nav-inner {
    background: var(--glass-bg-strong);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.nav-links a {
  position: relative;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--text-strong);
  background: var(--accent-soft);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme {
  display: flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: transparent;
}
.theme button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.theme button:hover {
  color: var(--text-strong);
}
.theme button:active {
  transform: scale(0.92);
}
.theme button[aria-checked="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Particle field (swarm.js) ---------- */
#swarm {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 168px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glow);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  margin: 0 0 18px;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  font-family: var(--display);
  font-size: clamp(46px, 7.6vw, 96px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
h1 .grad {
  display: inline-block;
  padding-bottom: 0.06em; /* keep the gradient clip clear of descenders */
  background: var(--hero-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 24px auto 0;
  max-width: 38ch;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--muted);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.hero .cta-row {
  justify-content: center;
}
.hero-shot {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  margin: 72px auto 0;
  perspective: 1600px;
}
.hero-shot img {
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shot-shadow);
}
.hero-shot::after {
  /* fade the screenshot into the page so it reads as a window, not a pasted image */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section {
  padding: 112px 0;
}
.section h2,
.bench-intro h2,
.qs-copy h2,
.closing h2 {
  font-family: var(--display);
  letter-spacing: -0.01em;
}
.section h2,
.bench-intro h2,
.qs-copy h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  max-width: 24ch;
}
.section-lede {
  margin: 16px 0 0;
  max-width: 58ch;
  font-size: 17px;
  color: var(--muted);
}

/* ---------- Product views ---------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 40px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 14px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s var(--ease), background-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.tabs button:hover {
  color: var(--text-strong);
}
.tabs button:active {
  transform: scale(0.97);
}
.tabs button[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.view {
  margin-top: 24px;
}
.view-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shot-shadow);
  background: var(--panel);
}
.view-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}
.view-media img.is-active {
  opacity: 1;
  transform: none;
}
.view-caption {
  position: relative;
  margin: 20px 0 0;
  min-height: 3.2em;
  max-width: 64ch;
  color: var(--muted);
}
.view-caption span {
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.view-caption span.is-active {
  position: relative;
  opacity: 1;
  transform: none;
}

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  margin-top: 48px;
}
.cell {
  position: relative;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
}
.cell h3 {
  font-size: 21px;
  font-weight: 600;
}
.cell p {
  margin: 10px 0 0;
  max-width: 46ch;
  color: var(--muted);
}
.cell-ladder {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90% 70% at 100% 100%, var(--accent-soft), transparent 70%),
    var(--panel);
}
.ladder {
  margin: auto 0 0;
  padding-top: 32px;
}
.ladder figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font: 500 13px/1 var(--mono);
  color: var(--faint);
}
.ladder figcaption i {
  font-size: 16px;
  color: var(--accent);
}
.ladder ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ladder li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.ladder li i {
  font-size: 20px;
}
.ladder .hit {
  border-color: var(--accent-line);
}
.ladder .hit i {
  color: var(--accent);
}
.ladder .miss {
  margin-left: 20px;
}
.ladder .miss i,
.ladder .miss .rung {
  color: var(--faint);
}
.ladder .rung {
  font-weight: 500;
  color: var(--text-strong);
}
.ladder .note {
  font: 400 13px/1 var(--mono);
  color: var(--faint);
}
.ladder .hit .note {
  color: var(--accent);
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
}
.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 13px;
  color: var(--text);
}
.cell-keys {
  background: linear-gradient(150deg, var(--accent-soft), transparent 65%), var(--panel);
  border-color: var(--accent-line);
}
.cell-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
}

/* ---------- Benchmarks ---------- */
.bench {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 36px;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}
.stat-num {
  font: 600 52px/1 var(--mono);
  letter-spacing: -0.04em;
  color: var(--text-strong);
}
.stat-label {
  max-width: 30ch;
  color: var(--muted);
}
.bars {
  margin: 0;
  display: grid;
  gap: 18px;
}
.bar {
  display: grid;
  grid-template-columns: 150px 1fr 70px;
  align-items: center;
  gap: 16px;
}
.bar-label {
  font-size: 14px;
  color: var(--muted);
}
.bar-track {
  display: block;
  height: 12px;
}
.bar-fill {
  display: block;
  height: 100%;
  width: calc(var(--v) / 124.4 * 100%);
  border-radius: 999px;
  background: var(--border-strong);
  transform-origin: left center;
  transition: transform 1.1s var(--ease);
}
.bar.is-accent .bar-fill {
  background: var(--accent);
}
.bar.is-accent .bar-label,
.bar.is-accent .bar-val {
  color: var(--text-strong);
}
.bar-val {
  font: 500 14px/1 var(--mono);
  text-align: right;
  color: var(--muted);
}
.bars figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--faint);
}
.bars figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  color: var(--accent);
  text-decoration: none;
}
.bars figcaption a:hover {
  text-decoration: underline;
}

/* ---------- Sources ---------- */
.sources {
  columns: 3 280px;
  column-gap: 16px;
  margin-top: 48px;
}
.group {
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
}
.group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}
.group h3 i {
  font-size: 19px;
  color: var(--accent);
}
.group .chips {
  margin-top: 14px;
}

/* ---------- Quickstart ---------- */
.qs {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.reqs {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.reqs li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
}
.reqs i {
  flex: none;
  color: var(--accent);
  transform: translateY(2px);
}
.reqs a {
  color: var(--accent);
}
.code {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow: var(--shot-shadow);
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.code-tabs {
  display: flex;
  gap: 4px;
}
.code-tabs button,
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.code-tabs button:hover,
.copy:hover {
  color: var(--text-strong);
}
.code-tabs button:active,
.copy:active {
  transform: scale(0.96);
}
.code-tabs button[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.copy.is-done {
  color: var(--accent);
}
.code pre {
  display: none;
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font: 400 14px/1.85 var(--mono);
  color: var(--text-strong);
}
.code pre.is-active {
  display: block;
}
.code pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

/* ---------- Closing ---------- */
.closing {
  padding: 40px 0 120px;
}
.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: radial-gradient(80% 90% at 50% 0%, var(--accent-soft), transparent 70%), var(--panel);
}
.closing-mark {
  width: 44px;
  height: 54px;
  margin-bottom: 24px;
}
.closing h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
  line-height: 1.12;
  max-width: 22ch;
}
.closing .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer .wordmark {
  font-size: 22px;
}
.footer .brand-mark {
  width: 18px;
  height: 22px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.footer-links a,
.credit a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-links a:hover,
.credit a:hover {
  color: var(--accent);
}
.credit {
  margin: 0 0 0 auto;
  font-size: 14px;
  color: var(--faint);
}
.credit a {
  color: var(--text-strong);
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.9s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 90ms + 60ms);
  }
  .hero-shot.rise {
    animation-name: rise-shot;
    animation-duration: 1.2s;
  }
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.8s var(--ease), transform 0.9s var(--ease);
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
  .bars:not(.is-in) .bar-fill {
    transform: scaleX(0);
  }
  .bar:nth-child(2) .bar-fill { transition-delay: 0.08s; }
  .bar:nth-child(3) .bar-fill { transition-delay: 0.16s; }
  .bar:nth-child(4) .bar-fill { transition-delay: 0.24s; }
  .bar:nth-child(5) .bar-fill { transition-delay: 0.32s; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes rise-shot {
  from {
    opacity: 0;
    transform: translateY(56px) rotateX(14deg) scale(0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .nav-actions {
    margin-left: auto;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .cell-ladder {
    grid-row: auto;
  }
  .bench,
  .qs {
    grid-template-columns: 1fr;
    gap: 48px;
  }

}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  .hide-sm {
    display: none;
  }
  .btn-sm {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .hero {
    padding-top: 128px;
  }
  .nav {
    top: 10px;
    padding: 0 12px;
  }
  .nav-inner {
    height: 54px;
    padding: 0 7px 0 16px;
  }
  .tabs {
    display: flex;
  }
  .tabs button {
    flex: 1 1 0;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    font-size: 13px;
  }
  .cta-row .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .hero-shot {
    width: calc(100% - 32px);
    margin-top: 40px;
  }
  .hero-shot img {
    border-radius: 12px 12px 0 0;
  }
  .section {
    padding: 80px 0;
  }
  .cell,
  .group {
    padding: 24px;
  }
  .ladder .miss {
    margin-left: 12px;
  }
  .ladder li {
    padding: 12px 14px;
  }
  .bar {
    grid-template-columns: 1fr 64px;
    grid-template-areas: "label val" "track track";
    gap: 8px 12px;
  }
  .bar-label { grid-area: label; }
  .bar-val { grid-area: val; }
  .bar-track { grid-area: track; }
  .stat-num {
    font-size: 44px;
  }
  .code pre {
    padding: 18px;
    font-size: 13px;
  }
  .closing {
    padding-bottom: 80px;
  }
  .closing-inner {
    padding: 56px 20px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .credit {
    margin: 0;
  }
}

#nav-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
  pointer-events: none;
}
