/* ThreeRT visual system, as on threert.dev (site/css/threert.css in meshy-dev/ThreeRT): the tokens and the components
   the platform's pages share with the site. Keep the two in step. What differs here: the fonts are served from this
   host (no third-party requests), and the components only the landing page uses are left out.
   Dark "unlit" ink, warm bone text, one light colour (tungsten) that only ever means "traced light". */
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Ink: the unlit scene. */
  --ink-0: #060709;
  --ink-1: #0b0d11;
  --ink-2: #111419;
  --ink-3: #191c23;
  --ink-4: #262a33;
  --line: rgba(236, 232, 225, 0.1);
  --line-2: rgba(236, 232, 225, 0.2);
  /* Bone: light on plaster, the text colour. */
  --bone: #ece8e1;
  --bone-2: #bdb8af;
  --mute: #80858e;
  /* Tungsten: traced light. The only accent; never used for decoration that isn't light. */
  --ember: #ff6a13;
  --tungsten: #ffb454;
  --filament: #ffebc4;
  --ray: linear-gradient(100deg, var(--ember) 0%, var(--tungsten) 52%, var(--filament) 100%);
  --halo: rgba(255, 140, 50, 0.13);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-1: 10px;
  --r-2: 16px;
  --r-3: 24px;
  --wrap: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--bone);
  font: 400 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--tungsten); color: #111; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.mute { color: var(--mute); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.h-2 { font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -0.04em; line-height: 1.04; }
.lede { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; color: var(--bone-2); max-width: 60ch; }
p { margin: 0; }

/* ---------- Brand lockup ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 20px; letter-spacing: -0.035em; }
.logo img, .logo svg.mark { width: 28px; height: 28px; }
.logo svg.mark { display: block; overflow: visible; }
.logo .rt { background: var(--ray); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); background: color-mix(in srgb, var(--ink-0) 72%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav .links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; color: var(--bone-2); }
.nav .links a { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 0; border-bottom: 1.5px solid transparent; transition: color 0.2s; }
.nav .links a:hover { color: var(--bone); }
.nav .links a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--bone-2); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible { border-radius: 999px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 999px; font: 500 15px/1 var(--font-sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--bone); color: var(--ink-0); }
.btn.primary:hover { background: #fff; }
.btn.ghost { border-color: var(--line-2); color: var(--bone); background: transparent; }
.btn.ghost:hover { border-color: var(--bone-2); }
.btn svg { flex: none; }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; gap: 8px; }
.btn.off { border-color: var(--line); color: var(--mute); background: transparent; cursor: default; }
.btn.off:hover { transform: none; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 48px 0 64px; font-size: 13px; color: var(--mute); line-height: 1.6; }
.foot a { color: var(--bone-2); }
.foot .cols { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; }
.foot .site { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 18px; font-size: 14px; }
.foot .site a { text-decoration: none; }
.foot .site a.ic { display: inline-flex; }
.foot .site .i { width: 17px; height: 17px; }
.foot .legal { margin-top: 18px; }
.foot .legal a { text-decoration: none; }
.foot .legal a:hover, .foot .site a:hover { color: var(--bone); }
.foot .note { font: 400 12px/1.6 var(--font-mono); color: var(--mute); }
.foot .note p + p { margin-top: 12px; }

/* ---------- Pages ---------- */
.page-head { padding: 72px 0 48px; }
.page-head { display: grid; gap: 20px; }
.eyebrow { font: 500 12.5px/1 var(--font-mono); color: var(--mute); letter-spacing: 0.02em; }
.card { border: 1px solid var(--line); border-radius: 22px; background: var(--ink-1); padding: 30px; min-width: 0; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 20px; font: 400 12.5px/1.5 var(--font-mono); color: var(--mute); }
.kv b { color: var(--bone-2); font-weight: 500; }
.fine { font-size: 13.5px; line-height: 1.55; color: var(--mute); }
.fine a { color: var(--bone-2); }
code, kbd { font: 500 0.9em var(--font-mono); color: var(--bone); background: rgba(236, 232, 225, 0.07); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }

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

@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .foot .cols { grid-template-columns: 1fr; gap: 32px; }
  .page-head { padding: 48px 0 36px; }
  .card { padding: 22px; }
}
