/* Self-hosted variable fonts (latin subset, same files Google serves).
   Removes a render-blocking third-party stylesheet and a two-origin request chain
   that gated LCP. Chrome partitions its HTTP cache per site, so every first-time
   visitor previously paid that chain in full. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-stretch: 100%; font-display: swap; src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #07090f;
  --bg-soft: #0a0d17;
  --card: #0d1120;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --text: #f1f3f9;
  --muted: #a3abbd;
  --faint: #757e93;
  --accent: #ff4444;
  --accent-2: #ff6b3d;
  --accent-soft: rgba(255,68,68,0.12);
  --accent-grad: linear-gradient(118deg, #ff4444 0%, #ff6b3d 100%);
  --radius: 14px;
  --maxw: 1140px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Bricolage Grotesque', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font-sans);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); color: #fff; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }


/* ===== Ambient bg: faint engineering grid ===== */
.bg-fx { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(900px 620px at 50% -14%, rgba(255,68,68,0.06), transparent 62%), var(--bg); }
.bg-fx::before { content:""; position:absolute; inset:0;
  background-image: linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%); }

/* ===== Engineering side-rails ===== */
.rail { position: fixed; top: 0; bottom: 0; z-index: 40; width: 1px; background: var(--line); pointer-events: none; }
.rail.left { left: max(20px, calc((100vw - var(--maxw)) / 2 - 26px)); }
.rail.right { right: max(20px, calc((100vw - var(--maxw)) / 2 - 26px)); }
.rail::before { content: ""; position: absolute; left: -3px; top: 96px; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; }
.rail-label { position: absolute; left: 50%; writing-mode: vertical-rl; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.rail.left .rail-label { bottom: 128px; transform: translateX(-50%) rotate(180deg); }
.rail.right .rail-label { top: 128px; transform: translateX(-50%); color: var(--muted); }
.rail-label .hot { color: var(--accent); }
@media (max-width: 1180px) { .rail { display: none; } }

/* ===== Reveal (calm fades only) ===== */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero-spec, .hero-mark, .hero-tag, .hero-meta, .hero-visual { opacity: 1 !important; }
  .hero-line .in-w { transform: none !important; }
  * { animation: none !important; }
}


/* ===== Nav ===== */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease; }
.nav.scrolled { background: rgba(7,9,15,0.74); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 15px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: -.2px; }
.nav-logo img { width: 27px; height: 27px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--muted); position: relative; transition: color .2s ease; }
.nav-links a:not(.nav-cta)::after { content:""; position:absolute; left:0; bottom:-5px; height:1.5px; width:0; background: var(--accent); transition: width .25s var(--ease); }
.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta { font-family: var(--font-mono); font-size: 12.5px; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); transition: border-color .2s ease, background .2s ease; }
.nav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; margin-right: -8px; position: relative; }
.nav-toggle span { position: absolute; left: 8px; height: 2px; width: 28px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s ease; }
.nav-toggle span:nth-child(1){top:13px} .nav-toggle span:nth-child(2){top:21px} .nav-toggle span:nth-child(3){top:29px}
body.menu-open .nav-toggle span:nth-child(1){transform:translateY(8px) rotate(45deg)}
body.menu-open .nav-toggle span:nth-child(2){opacity:0}
body.menu-open .nav-toggle span:nth-child(3){transform:translateY(-8px) rotate(-45deg)}
@media (max-width: 860px){
  .nav-toggle{display:block; z-index:101}
  .nav.scrolled{ backdrop-filter:none; -webkit-backdrop-filter:none; background:rgba(7,9,15,0.92); }
  .hero-line.l2{ -webkit-text-stroke-width:2px; -webkit-text-stroke-color:rgba(255,255,255,.72); }
  .nav-links{ position:fixed; inset:0; flex-direction:column; justify-content:center; background:rgba(7,9,15,.97); backdrop-filter:blur(20px); gap:26px; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .3s ease, visibility 0s linear .3s; }
  .nav-links a{font-size:22px; color:var(--text)} .nav-links .nav-cta{font-size:14px; padding:12px 22px}
  body.menu-open .nav-links{opacity:1; visibility:visible; pointer-events:auto; transition:opacity .3s ease, visibility 0s}
}


/* ===== Sections ===== */
section { padding: 100px 0; position: relative; }
.band { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.85rem, 4.6vw, 2.7rem); letter-spacing: -.02em; line-height: 1.08; }
.section-title .accent { color: var(--accent); }
.section-intro { color: var(--muted); max-width: 600px; margin-top: 16px; font-size: 1.04rem; }

/* ===== Spec-row section header ===== */
.spec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.spec-head .spec-id { color: var(--accent); }
.spec-head .spec-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2) 0%, var(--line) 60%, transparent 100%); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease) .1s; }
.spec-head.in .spec-rule { transform: scaleX(1); }
.spec-head .spec-label { color: var(--muted); }
.spec-head .spec-count { color: var(--faint); }
.spec-head .spec-count b { color: var(--accent); font-weight: 400; }


/* ===== Contact ===== */
.contact { padding: 110px 0 96px; position: relative; }
.contact h2 { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.1rem, 6vw, 3.8rem); letter-spacing: -.03em; line-height: 1; }
.contact h2 .accent { color: var(--accent); }
.contact-email { display: inline-block; margin-top: 30px; font-family: var(--font-mono); font-size: clamp(1rem, 3vw, 1.35rem); padding: 16px 28px; border: 1px solid var(--line-2); border-radius: 8px; transition: border-color .2s ease, background .2s ease; }
.contact-email:hover { border-color: var(--accent); background: var(--accent-soft); }
.contact-meta { margin-top: 20px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); }

footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 25px; height: 25px; object-fit: contain; opacity: .85; }
.footer-brand span { font-family: var(--font-head); font-weight: 500; font-size: 14px; }
.footer-meta { color: var(--faint); font-size: 13px; }
.footer-meta a { color: var(--muted); transition: color .2s ease; }
.footer-meta a:hover { color: var(--text); }


/* ===== Back to top ===== */
.totop { position: fixed; right: 22px; bottom: 22px; z-index: 200; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(13,17,32,.82); backdrop-filter: blur(10px); color: var(--text); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; transition: opacity .3s ease, transform .3s var(--ease), border-color .2s ease, visibility 0s linear .3s; cursor: pointer; }
.totop.show { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .3s ease, transform .3s var(--ease), border-color .2s ease, visibility 0s; }
.totop:hover { border-color: var(--accent); }
/* ============================================================================
   Sub-page components. The homepage keeps its own inline copy of the shared
   rules above for LCP; this file serves every other page. Keep the two in sync
   if the tokens ever change.
   ========================================================================= */

/* ===== Sub-page hero ===== */
.page-hero { padding: 152px 0 56px; }
.page-hero h1 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(2.1rem, 5.6vw, 3.7rem); line-height: 1.04; max-width: 17ch; }
.page-hero .lede { margin-top: 24px; max-width: 62ch; color: var(--muted);
  font-size: clamp(1.02rem, 2.2vw, 1.18rem); line-height: 1.62; }
.crumbs { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--faint); margin-bottom: 22px; }
.crumbs a { color: var(--muted); transition: color .2s ease; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--line-2); margin: 0 8px; }

/* ===== Prose ===== */
.prose { max-width: 68ch; }
.prose h2 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem); line-height: 1.14; margin: 54px 0 14px; }
.prose h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.14rem;
  margin: 32px 0 8px; }
.prose p { color: var(--muted); margin: 14px 0; }
.prose ul { margin: 16px 0; padding-left: 0; list-style: none; }
.prose li { color: var(--muted); position: relative; padding-left: 22px; margin: 10px 0; }
.prose li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 1px;
  background: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a:not(.btn) { color: var(--text); border-bottom: 1px solid var(--line-2);
  transition: border-color .2s ease, color .2s ease; }
.prose a:not(.btn):hover { color: var(--accent); border-color: var(--accent); }

/* ===== Proof panel ===== */
.proof { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--card); margin: 40px 0; }
.proof img { width: 100%; height: auto; }
.proof-body { padding: 20px 22px 22px; }
.proof-body .num { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--accent); }
.proof-body h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.16rem; margin: 6px 0 6px; }
.proof-body p { color: var(--muted); font-size: .95rem; margin: 0 0 12px; }
.proof-body a { font-family: var(--font-mono); font-size: 12.5px; color: var(--text);
  border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s ease, color .2s ease; }
.proof-body a:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Spec list (two-column facts) ===== */
.speclist { border-top: 1px solid var(--line); margin: 34px 0; }
.speclist div { display: grid; grid-template-columns: 190px 1fr; gap: 20px;
  border-bottom: 1px solid var(--line); padding: 14px 0; }
.speclist dt, .speclist .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--faint); }
.speclist dd, .speclist .v { color: var(--muted); margin: 0; }
@media (max-width: 640px){ .speclist div { grid-template-columns: 1fr; gap: 4px; } }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 13px 22px; border-radius: 8px; font-size: 14px;
  font-weight: 500; border: 1px solid var(--line-2);
  transition: border-color .2s ease, background .2s ease, color .2s ease; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #e02e2e; border-color: #e02e2e; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ===== Closing CTA band ===== */
.cta-band { border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 76px 0 80px; margin-top: 76px; }
.cta-band h2 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(1.8rem, 4.6vw, 2.8rem); line-height: 1.06; }
.cta-band h2 .accent { color: var(--accent); }
.cta-band p { color: var(--muted); margin-top: 16px; max-width: 56ch; }

/* ===== Footer sitemap ===== */
.footer-nav { max-width: var(--maxw); margin: 0 auto; padding: 0 28px 34px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.footer-nav h4 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--faint); font-weight: 400; margin-bottom: 12px; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin: 7px 0; }
.footer-nav a { font-size: 13.5px; color: var(--muted); transition: color .2s ease; }
.footer-nav a:hover { color: var(--text); }
@media (max-width: 720px){ .footer-nav { grid-template-columns: 1fr 1fr; gap: 22px; } }
