/* LD Coda: tokens, type, buttons, nav, footer. Shared by every page.
   The layout language comes from the PrismX and AuroraX sites, recoloured to the LD Coda blue → violet → cyan.
   Page sections are in home.css and pages.css; the world, reveals and pointer effects in motion.css. */
@font-face {
  font-family: "Inter"; src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #09090b;
  --bg-well: #0c0c0e;
  --surface: #111113;
  --surface-2: #18181b;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .11);
  --line-3: rgba(255, 255, 255, .18);
  --text: #fafafa;
  --sub: #a1a1aa;
  --muted: #8d8d96;               /* 5.9:1 on --bg */

  --blue: #3b82f6;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --pink: #ec4899;

  --accent: #7c6cf6;              /* the violet of the mark */
  --accent-rgb: 124, 108, 246;
  --accent-2: #22d3ee;
  --accent-2-rgb: 34, 211, 238;
  --accent-text: #a5b4fc;         /* links and labels, 10:1 on --bg */
  --cta-from: #60a5fa;
  --cta-to: #a78bfa;
  --cta-ink: #0b0a1f;             /* text on the CTA gradient, >= 7:1 */
  --grad: linear-gradient(110deg, #60a5fa 0%, #8b5cf6 52%, #22d3ee 100%);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --r: 14px;
  --r-lg: 22px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px);
}
body {
  min-height: 100vh; overflow-x: hidden; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--sub);
  background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11";
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(var(--accent-rgb), .45); color: #fff; }
h1, h2, h3 { color: var(--text); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }
strong { color: var(--text); font-weight: 600; }
.mono { font-family: var(--mono); }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.wrap { position: relative; width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.drag-surface img, .drag-surface svg { -webkit-user-drag: none; user-select: none; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 600;
}
.skip:focus { top: 12px; color: var(--bg); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Labels and kickers ──────────────────────────────── */
.label {
  display: inline-flex; align-items: center; gap: 10px; color: var(--accent-text);
  font-family: var(--mono); font-size: .76rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
.label::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(9, 9, 11, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sub);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); flex: none;
  box-shadow: 0 0 0 4px rgba(var(--accent-2-rgb), .14), 0 0 12px rgba(var(--accent-2-rgb), .9);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(var(--accent-2-rgb), .05), 0 0 18px rgba(var(--accent-2-rgb), .6); } }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px;
  border-radius: 999px; border: 0; font: inherit; font-size: .98rem; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .25s var(--ease); }
.btn-primary {
  color: var(--cta-ink); background: linear-gradient(100deg, var(--cta-from), var(--cta-to));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 12px 32px -12px rgba(var(--accent-rgb), .9), 0 0 44px -14px rgba(var(--accent-2-rgb), .7);
}
.btn-primary:hover {
  color: var(--cta-ink); transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 16px 40px -12px rgba(var(--accent-rgb), 1), 0 0 60px -12px rgba(var(--accent-2-rgb), .9);
}
.btn-ghost { color: var(--text); background: rgba(9, 9, 11, .35); box-shadow: inset 0 0 0 1px var(--line-3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); }
.btn:hover svg.go { transform: translateX(3px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .86rem; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(9, 9, 11, .55); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand img { width: 30px; height: 30px; flex: none; } /* the mark is a bitmap: some phones drop SVG strokes */
.brand .ld { font-weight: 300; }
.brand .coda { font-weight: 700; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: .9rem; }
.nav-links a { position: relative; padding: 6px 0; color: var(--sub); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-links a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--grad); box-shadow: 0 0 10px rgba(var(--accent-rgb), .8);
}
.menu-btn {
  display: none; position: relative; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 12px;
  background: transparent; color: var(--text); cursor: pointer;
}
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .2s; }
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 21.5px; }
.menu-btn span:nth-child(3) { top: 27px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.menu {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 99; display: flex; flex-direction: column; justify-content: center;
  gap: 6px; padding: 0 var(--gutter) 12vh; background: rgba(9, 9, 11, .94);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s .35s;
}
.menu a {
  display: flex; align-items: baseline; gap: 16px; padding: 10px 0; color: var(--text);
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.1;
  transform: translateY(14px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.menu a small { font-family: var(--mono); font-size: .8rem; font-weight: 400; letter-spacing: .08em; color: var(--muted); }
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.menu-open .menu a { transform: none; opacity: 1; }
.menu-open .menu a:nth-child(2) { transition-delay: .04s; }
.menu-open .menu a:nth-child(3) { transition-delay: .08s; }
.menu-open .menu a:nth-child(4) { transition-delay: .12s; }
.menu-open .menu a:nth-child(5) { transition-delay: .16s; }
.menu-open { overflow: hidden; }

/* ── Footer ──────────────────────────────────────────── */
.footer { position: relative; z-index: 1; padding: 0 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 36px clamp(24px, 4vw, 56px);
  padding: clamp(40px, 6vw, 64px) 0 40px; border-top: 1px solid var(--line);
}
.footer .brand { font-size: 1.3rem; }
.footer-tag { margin-top: 14px; max-width: 30ch; font-size: .95rem; }
.footer h2 { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.footer ul { display: grid; gap: 4px; margin-top: 14px; list-style: none; }
.footer ul a { display: inline-block; padding: 3px 0; color: var(--sub); font-size: .94rem; }
.footer ul a:hover { color: var(--text); }
.footer-cols { columns: 2; column-gap: 20px; }
.footer-cols li { break-inside: avoid; }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 22px;
  border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted);
}
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--text); }
.footer-legal .links { display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 920px) {
  .nav-links, .nav .btn { display: none; }
  .menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 921px) { .menu { display: none; } }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .footer-grid { gap: 32px 20px; }
  .footer-cols { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
