/* ===========================================================================
   O4.8 — lightweight editorial theme
   Light = "Cream"  ·  Dark = "Cosmic" (calm, static)
   No blur, no 3D, no scroll animation. Flat, fast, distinctive.
   =========================================================================== */

:root {
  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
}

/* LIGHT — Cream */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f4f0e7;
  --surface: #fffdf8;
  --surface-2: #f7f2e8;
  --text: #1b1a17;
  --text-sub: #6a665c;
  --text-mute: #9c968a;
  --hairline: #e3ddcf;
  --accent: #c0462f;        /* rust — single editorial accent */
  --accent-ink: #a23a26;
  --accent-soft: #c0462f1a;
  --shadow: 0 12px 28px -18px rgba(40, 30, 20, .45);
  --star: transparent;
}

/* DARK — Cosmic (calm) */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c14;
  --surface: #14161f;
  --surface-2: #181b26;
  --text: #ecebe6;
  --text-sub: #a7a59c;
  --text-mute: #6f6d66;
  --hairline: #262934;
  --accent: #e2674d;        /* warm accent reads well over deep navy */
  --accent-ink: #f08368;
  --accent-soft: #e2674d22;
  --shadow: 0 16px 36px -22px rgba(0, 0, 0, .8);
  --star: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- Background: subtle static texture / stars (no animation) ------------- */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.orb { display: none; }   /* removed for performance */

/* faint paper grain — cream only, static */
.bg-fx::after {
  content: ""; position: absolute; inset: 0; opacity: 0; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.25 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="light"] .bg-fx::after { opacity: .35; }

/* static starfield — dark only, no movement */
.stars { position: absolute; inset: 0; opacity: 0; }
[data-theme="dark"] .stars { opacity: 1; }
.stars .s1, .stars .s2 { position: absolute; inset: 0; display: block; }
.stars .s1 {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, #cfe0ff, transparent),
    radial-gradient(1.4px 1.4px at 80px 160px, #fff, transparent),
    radial-gradient(1px 1px at 220px 120px, #e7e0ff, transparent),
    radial-gradient(1px 1px at 300px 60px, #fff, transparent);
  background-size: 360px 360px; opacity: .5;
}
.stars .s2 {
  background-image:
    radial-gradient(1px 1px at 60px 100px, #bcd0ff, transparent),
    radial-gradient(1.4px 1.4px at 180px 40px, #fff, transparent),
    radial-gradient(1px 1px at 360px 140px, #fff, transparent);
  background-size: 500px 500px; opacity: .35;
}

main, header, footer, .app, .topbar { position: relative; z-index: 1; }

/* ---- Typography ----------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; line-height: 1; color: var(--text); margin: 0; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.micro { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--text-sub); font-weight: 500; }

/* the one bit of color emphasis */
.mark { color: var(--accent); font-style: italic; }
.gradient-text { color: var(--accent); }   /* alias — flat accent, no gradient */

/* ---- Layout --------------------------------------------------------------- */
.shell { max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); }
.shell--narrow { max-width: 500px; }
.row { display: flex; gap: .75rem; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.center { text-align: center; }
.muted { color: var(--text-sub); }
[hidden] { display: none !important; }

/* ---- Top bar -------------------------------------------------------------- */
.topbar { display: flex; align-items: center; gap: 1rem; max-width: 1080px; margin-inline: auto; padding: 1.1rem var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -.015em; color: var(--text); }
.brand__logo { height: 30px; width: auto; display: block; }
.brand__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; font-family: var(--font-body); }
.brand b { color: var(--accent); }
.brand.has-logo .brand__mark, .brand.has-logo .brand__text { display: none; }
.topnav { display: flex; gap: 1.1rem; align-items: center; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-sub); }
.topnav a:hover { color: var(--accent); }

/* ---- Theme toggle --------------------------------------------------------- */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s, color .15s; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---- Icons ---------------------------------------------------------------- */
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Buttons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; font-family: var(--font-body); font-size: .95rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-align: center; transition: background .15s, border-color .15s, color .15s; }
.btn .icon { width: 1.05em; height: 1.05em; }
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; font-weight: 600; }
.btn-google:hover { background: #f7f8fa; border-color: #c7cad1; }
.btn-google svg { width: 18px; height: 18px; }

/* ---- Cards / tiles -------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: var(--shadow); }

.tile { display: flex; align-items: center; gap: 1rem; justify-content: space-between; flex-wrap: wrap; padding: 1.1rem 1.3rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--hairline); transition: border-color .15s; }
.tile:hover { border-color: var(--accent); }
.tile__icn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.tile__icn .icon { width: 21px; height: 21px; }
.tile h3 { font-size: 1.35rem; }
.tile p { margin: .2rem 0 0; color: var(--text-sub); font-size: .92rem; }

.pill { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--hairline); white-space: nowrap; color: var(--text); }
.pill--accent { background: var(--accent); color: #fff; border-color: transparent; }
.pill--soon { border-style: dashed; color: var(--text-mute); }

/* ---- Static stats strip (replaces marquee) -------------------------------- */
.stats { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stats div { flex: 1 1 150px; padding: 1.1rem 1.3rem; border-right: 1px solid var(--hairline); }
.stats div:last-child { border-right: none; }
.stats b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--text); font-weight: 400; }
.stats span { font-size: .82rem; color: var(--text-sub); }

/* ---- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-sub); margin-bottom: .4rem; }
.field .inp { position: relative; display: flex; align-items: center; }
.field .inp .icon { position: absolute; left: .85rem; width: 18px; height: 18px; color: var(--text-mute); pointer-events: none; }
.field input, .field select { width: 100%; padding: .8rem .9rem; font-family: var(--font-body); font-size: 1rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius-sm); transition: border-color .15s; }
.field .inp input { padding-left: 2.6rem; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }

.notice { font-family: var(--font-mono); font-size: .8rem; line-height: 1.5; padding: .7rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--hairline); margin-bottom: 1rem; }
.notice--error { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---- Hero ----------------------------------------------------------------- */
.hero { padding-top: 2.5rem; padding-bottom: 1rem; }
.hero h1 { font-size: clamp(3rem, 11vw, 8rem); line-height: .92; letter-spacing: -.03em; }
.badge-live { display: inline-flex; align-items: center; gap: .5rem; }
.live-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #3fae6b; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 4rem; padding: 3rem var(--gutter); }
.wordmark { font-family: var(--font-display); font-style: italic; font-size: clamp(3.5rem, 14vw, 10rem); line-height: .85; letter-spacing: -.03em; color: var(--text); user-select: none; }
.wordmark b { color: var(--accent); }
