/* zeroflaw.io styles: the only stylesheet (CSP style-src 'self').
   Tokens and components transcribed from the Claude Design project
   "ZeroFlaw Frontend Design System" (tokens/*.css, components/components.css),
   page layout from "Zeroflaw landing page" (ZeroFlaw Landing.dc.html). */

@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/space-grotesk-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-body: 14px; --fs-body-l: 16px; --fs-small: 13px;
  --space-3: 6px; --space-5: 12px; --space-7: 20px;
  --control-h: 34px; --control-h-lg: 40px;
  --radius-sm: 6px; --radius-control: 8px; --radius-card: 10px;
  --border-w: 1px;
  --ease-standard: cubic-bezier(.4,0,.2,1); --dur-instant: 80ms; --dur-fast: 130ms;
  --transition-control: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
  --ring-focus: 0 0 0 3px var(--focus-ring);
  --zf-cyan-200: #6BE3F6;

  color-scheme: dark;
  --bg-page: #080B0F; --bg-canvas: #05070A;
  --surface-1: #0B0F14; --surface-2: #10151B; --surface-3: #161D25; --surface-card: #0B0F14;
  --surface-hover: rgba(255,255,255,.04);
  --border-subtle: rgba(255,255,255,.06); --border-default: rgba(255,255,255,.10); --border-strong: rgba(255,255,255,.18);
  --text-primary: #E4EAF0; --text-body: #B9C6D2; --text-muted: #8A9AA9; --text-faint: #5A6B7B;
  --text-accent: #2FD3EE; --text-on-accent: #04262E;
  --accent: #00B8DB; --accent-hover: #2FD3EE; --accent-press: #009BBC;
  --accent-quiet: rgba(0,184,219,.12); --accent-line: rgba(0,184,219,.28);
  --focus-ring: rgba(0,184,219,.55);
  --grid-line: rgba(255,255,255,.045);
  --glow: rgba(0,184,219,.16);
  --shadow-inset-top: inset 0 1px 0 rgba(255,255,255,.05);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg-page: #F7F9FA; --bg-canvas: #FFFFFF;
    --surface-1: #FFFFFF; --surface-2: #F4F6F8; --surface-3: #EAEEF2; --surface-card: #FFFFFF;
    --surface-hover: rgba(8,11,15,.045);
    --border-subtle: rgba(8,11,15,.09); --border-default: rgba(8,11,15,.14); --border-strong: rgba(8,11,15,.26);
    --text-primary: #080B0F; --text-body: #27333F; --text-muted: #5A6B7B; --text-faint: #8A9AA9;
    --text-accent: #017C97; --text-on-accent: #04262E;
    --accent-quiet: rgba(0,155,188,.10); --accent-line: rgba(1,124,151,.32);
    --focus-ring: rgba(1,124,151,.35);
    --grid-line: rgba(8,11,15,.055);
    --glow: rgba(0,184,219,.10);
    --shadow-inset-top: inset 0 1px 0 rgba(255,255,255,.35);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg-page: #F7F9FA; --bg-canvas: #FFFFFF;
  --surface-1: #FFFFFF; --surface-2: #F4F6F8; --surface-3: #EAEEF2; --surface-card: #FFFFFF;
  --surface-hover: rgba(8,11,15,.045);
  --border-subtle: rgba(8,11,15,.09); --border-default: rgba(8,11,15,.14); --border-strong: rgba(8,11,15,.26);
  --text-primary: #080B0F; --text-body: #27333F; --text-muted: #5A6B7B; --text-faint: #8A9AA9;
  --text-accent: #017C97; --text-on-accent: #04262E;
  --accent-quiet: rgba(0,155,188,.10); --accent-line: rgba(1,124,151,.32);
  --focus-ring: rgba(1,124,151,.35);
  --grid-line: rgba(8,11,15,.055);
  --glow: rgba(0,184,219,.10);
  --shadow-inset-top: inset 0 1px 0 rgba(255,255,255,.35);
}

/* ---------- Base (design system tokens/base.css) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html, body { margin: 0; background: var(--bg-canvas); }
body { color: var(--text-body); font: 400 var(--fs-body)/1.45 var(--font-sans); }
h1, h2, h3 { font-family: var(--font-display); color: var(--text-primary); font-weight: 600; margin: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--text-accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-standard); }
a:hover { color: var(--accent-hover); text-decoration: underline; }
::selection { background: rgba(0,184,219,.28); color: #FFFFFF; }
:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: var(--radius-sm); }

/* ---------- Components (design system components.css) ---------- */
.zf-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3); height: var(--control-h); padding: 0 var(--space-5); border-radius: var(--radius-control); border: var(--border-w) solid transparent; font: 500 var(--fs-body)/1 var(--font-sans); letter-spacing: -.005em; cursor: pointer; white-space: nowrap; transition: var(--transition-control), transform var(--dur-instant) var(--ease-standard); text-decoration: none; }
.zf-btn:active { transform: translateY(.5px); }
.zf-btn--lg { height: var(--control-h-lg); padding: 0 var(--space-7); font-size: var(--fs-body-l); }
.zf-btn--primary, .zf-btn--primary:hover { color: var(--text-on-accent); text-decoration: none; }
.zf-btn--primary { background: var(--accent); font-weight: 600; box-shadow: var(--shadow-inset-top); }
.zf-btn--primary:hover { background: var(--accent-hover); }
.zf-btn--primary:active { background: var(--accent-press); }
.zf-btn--secondary, .zf-btn--secondary:hover { color: var(--text-primary); text-decoration: none; }
.zf-btn--secondary { background: var(--surface-3); border-color: var(--border-default); }
.zf-btn--secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }
.zf-btn:focus-visible, .zf-iconbtn:focus-visible { box-shadow: var(--ring-focus); } /* after the variants: their box-shadow would hide the ring */
.zf-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: var(--control-h); height: var(--control-h); padding: 0; border-radius: var(--radius-control); border: var(--border-w) solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; transition: var(--transition-control); }
.zf-iconbtn:hover { background: var(--surface-hover); color: var(--text-primary); }
.zf-grid-bg { background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 32px 32px; }

/* ---------- Page (Zeroflaw landing page) ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 24px 24px; position: relative; overflow: hidden; }
.glow { position: absolute; top: -260px; left: 50%; transform: translateX(-50%); width: 900px; height: 620px; background: radial-gradient(50% 50% at 50% 50%, var(--glow), rgba(0,184,219,0) 70%); pointer-events: none; }
.site-header { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.theme-toggle[hidden] { display: none; } /* author display beats the UA [hidden] rule */
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: inline; }
}
.site-header--brand { justify-content: space-between; max-width: 760px; width: 100%; margin: 0 auto; }
.header-lockup { display: flex; align-items: center; gap: 12px; color: inherit; }
.header-lockup:hover { text-decoration: none; }
.header-mark { width: 28px; height: 28px; }
.header-wordmark { font: 600 18px/1 var(--font-display); letter-spacing: -.02em; color: var(--text-primary); }
.header-wordmark .flaw { color: var(--text-accent); }
.header-wordmark .tld { font-size: .6em; }
.column { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 760px; width: 100%; margin: 0 auto; padding: 72px 0; }
.brand { position: relative; width: 100%; height: 148px; overflow: hidden; margin-bottom: 52px; display: flex; align-items: center; --zf-sweep-d: 147px; }
.brand-lockup { display: flex; align-items: center; gap: 34px; color: inherit; }
.brand-lockup:hover { text-decoration: none; }
.brand-mark { width: 100px; height: 100px; flex: 0 0 auto; }
.wordmark { font: 600 62px/1 var(--font-display); letter-spacing: -.025em; color: var(--text-primary); }
.wordmark .flaw { color: var(--text-accent); }
.wordmark .tld { font-size: .48em; }
.brand-line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--border-subtle); }
.scanline { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, rgba(0,184,219,0), #00B8DB 50%, rgba(0,184,219,0)); box-shadow: 0 0 12px rgba(0,184,219,.55); animation: zf-sweep 7s linear infinite; }
@keyframes zf-sweep { 0% { transform: translateY(0); opacity: 0 } 8% { opacity: 1 } 92% { opacity: 1 } 100% { transform: translateY(var(--zf-sweep-d, 320px)); opacity: 0 } }
.brand--code { margin-bottom: 44px; }
.big-code { font: 600 128px/1 var(--font-display); letter-spacing: -.04em; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.big-code .flaw { color: var(--text-accent); }
.h1-small { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.08; }
.lead--tight { margin-top: 16px; }
.site-footer--plain { justify-content: flex-start; }
.brand--small { height: 104px; margin-bottom: 40px; --zf-sweep-d: 103px; }
.brand--small .brand-lockup { gap: 22px; }
.brand--small .brand-mark { width: 64px; height: 64px; }
.brand--small .wordmark { font-size: 40px; }
h1 { font: 600 clamp(38px, 6vw, 62px)/1.04 var(--font-display); letter-spacing: -.03em; color: var(--text-primary); text-wrap: pretty; }
.lead { margin: 20px 0 0; max-width: 60ch; font: 400 16px/1.55 var(--font-sans); color: var(--text-body); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; width: 100%; margin-top: 40px; }
.card { border: 1px solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); padding: 18px 20px; }
.card-eyebrow { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-accent); }
.card p { margin: 10px 0 0; font: 400 13px/1.5 var(--font-sans); color: var(--text-body); }
.card .zf-btn { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.note { font: 400 13px/1.5 var(--font-sans); color: var(--text-muted); }
.section { width: 100%; margin-top: 48px; }
.section h2 { font: 600 22px/1.2 var(--font-display); letter-spacing: -.015em; }
.section > p { margin-top: 12px; max-width: 64ch; font: 400 15px/1.6 var(--font-sans); }
.list { margin: 14px 0 0; padding-left: 18px; font: 400 15px/1.6 var(--font-sans); max-width: 64ch; }
.list li + li { margin-top: 6px; }
.list strong { color: var(--text-primary); font-weight: 500; }
.site-footer { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; padding-top: 20px; border-top: 1px solid var(--border-subtle); font: 400 12px/1 var(--font-mono); color: var(--text-muted); }
.site-footer nav { display: flex; gap: 18px; }

@media (max-width: 560px) {
  .brand { height: 104px; margin-bottom: 36px; --zf-sweep-d: 103px; }
  .brand-lockup { gap: 20px; }
  .brand-mark { width: 60px; height: 60px; }
  .wordmark { font-size: 38px; }
  .column { padding: 40px 0; }
  .brand--code { height: 104px; }
  .big-code { font-size: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .scanline { animation: none; display: none; }
  .zf-btn, .zf-iconbtn, a { transition: none; }
}
