/* ---------- fonts (self-hosted: no request to Google, so nothing to block rendering or to disclose under UK GDPR) ----------
   Geist and Geist Mono (variable) and Instrument Serif, latin + latin-ext subsets, from Google Fonts (SIL Open Font Licence). */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("../fonts/geist-latin-ext.4841e590e2a9.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("../fonts/geist-latin.a147f99cd533.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: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/geist-mono-latin-ext.693cf932fe6b.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/geist-mono-latin.a15f9d568fb0.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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-italic-latin-ext.148ffff0cacc.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-italic-latin.bc891bdd08ad.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: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-ext.b160c869d0b2.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin.9b8dd1ecf641.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; }

/* ==========================================================================
   Founcy Solutions MVP — core design system
   Brand DNA kept from the live site: deep navy, electric blue, Geist,
   <code/> brackets and // comment labels. Pushed further with depth,
   light, motion and a serif accent for emotion.
   ========================================================================== */

/* Night (default) tokens. In the day theme they are re-declared on "dark islands"
   (product mockups, the CTA band, the exit card) so those keep their night look. */
:root,
html[data-theme="light"] :is(.window, .cta-band, .exit-card, [data-dark]) {
  color-scheme: dark;
  --bg: #050a1c;
  --bg-2: #0a1230;
  --bg-3: #0e1840;
  --surface: rgba(140, 165, 255, 0.045);
  --surface-2: rgba(140, 165, 255, 0.08);
  --line: rgba(150, 172, 255, 0.13);
  --line-2: rgba(150, 172, 255, 0.26);
  --text: #f3f5fc;
  --muted: #a3aed0;
  --dim: #7b87ad; /* ≥4.5:1 on every night surface (WCAG AA) */
  --accent: #5b8cff;
  --accent-rgb: 91, 140, 255;
  --violet: #9a83ff;
  --cyan: #46e1ff;
  --mint: #57f2b0;
  --amber: #ffbe5c;
  --rose: #ff6f86;
  --grad: linear-gradient(100deg, #5b8cff 0%, #9a83ff 48%, #46e1ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(91, 140, 255, 0.22), rgba(154, 131, 255, 0.14) 50%, rgba(70, 225, 255, 0.1));
  --f-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --f-serif: "Instrument Serif", Georgia, serif;
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --hue-shift: 0deg; /* industries re-tint the aurora */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(var(--accent-rgb), 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--accent); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 16px; }

/* ---------- ambient background ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; filter: hue-rotate(var(--hue-shift)); transition: filter 1.2s var(--ease); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.aurora i:nth-child(1) { width: 55vw; height: 55vw; left: -12vw; top: -18vw; background: radial-gradient(circle, rgba(91, 140, 255, 0.42), transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 45vw; height: 45vw; right: -14vw; top: 22vh; background: radial-gradient(circle, rgba(154, 131, 255, 0.32), transparent 65%); animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 40vw; height: 40vw; left: 25vw; bottom: -22vw; background: radial-gradient(circle, rgba(70, 225, 255, 0.2), transparent 65%); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(8vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-10vw, -6vh) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-6vw, -12vh) scale(1.2); } }
.grain { position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 8s steps(6) infinite; }
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.section-tight { padding: clamp(56px, 8vw, 100px) 0; }
.section-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 20px; }
.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; margin: 0; }

/* ---------- type ---------- */
.mono, .mono-label { font-family: var(--f-mono); }
.mono-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18), 0 0 14px var(--accent); }
.eyebrow .caret, .caret-blink { display: inline-block; width: 0.55em; height: 1.05em; background: currentColor; margin-left: 2px; vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.h-display { font-size: clamp(44px, 7.4vw, 104px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 600; }
.h-1 { font-size: clamp(38px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.045em; }
.h-2 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.04em; }
.h-3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -0.025em; }
.lead { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.6; color: var(--muted); max-width: 640px; }
.lead strong { color: var(--text); font-weight: 600; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.grad-text { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.underline-glow { position: relative; white-space: nowrap; }
.underline-glow::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.04em; height: 0.12em; border-radius: 4px; background: var(--grad); transform-origin: left; transform: scaleX(var(--u, 1)); box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.7); }

/* split-word reveal (JS wraps words) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.w > span { display: inline-block; will-change: transform; }

/* ---------- buttons ---------- */
.btn { --bh: 54px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--bh); padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; isolation: isolate; overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s; }
.btn-sm { --bh: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-lg { --bh: 64px; padding: 0 34px; font-size: 17.5px; }
.btn-primary { background: var(--accent); color: #050a1c; box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%); transform: translateX(-120%); transition: transform 0.8s var(--ease); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover { box-shadow: 0 16px 44px -10px rgba(var(--accent-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(var(--accent-rgb), 0.7); background: rgba(var(--accent-rgb), 0.08); }
.btn-arrow { display: inline-block; transition: transform 0.35s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
/* small phones: a long button label wraps instead of widening the page (e.g. 320px screens) */
@media (max-width: 400px) {
  .btn-lg { padding: 0 24px; font-size: 16.5px; }
  .btn { max-width: 100%; height: auto; min-height: var(--bh); padding-block: 8px; white-space: normal; text-align: center; line-height: 1.2; }
}
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line-2); padding-bottom: 3px; transition: border-color 0.3s, color 0.3s, gap 0.3s var(--ease); }
.link-arrow:hover { color: var(--cyan); border-color: var(--cyan); gap: 12px; }

/* ---------- chips, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; color: var(--muted); transition: all 0.3s var(--ease); }
.chip:hover, .chip.is-on { color: var(--text); border-color: rgba(var(--accent-rgb), 0.7); background: rgba(var(--accent-rgb), 0.12); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(var(--accent-rgb), 0.14); color: #b9cbff; border: 1px solid rgba(var(--accent-rgb), 0.3); }
.badge-mint { background: rgba(87, 242, 176, 0.12); color: var(--mint); border-color: rgba(87, 242, 176, 0.3); }
.illus-tag { position: absolute; top: 12px; right: 14px; z-index: 3; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 6px; padding: 3px 7px; background: rgba(5, 10, 28, 0.6); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(87, 242, 176, 0.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(87, 242, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(87, 242, 176, 0); } }

/* ---------- cards ---------- */
.card { --mx: 50%; --my: 50%; position: relative; border-radius: var(--r); padding: clamp(22px, 2.6vw, 32px); background: linear-gradient(180deg, rgba(20, 32, 78, 0.55), rgba(10, 18, 48, 0.55)); border: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: border-color 0.4s var(--ease), transform 0.5s var(--ease); }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.16), transparent 45%); opacity: 0; transition: opacity 0.4s; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(300px circle at var(--mx) var(--my), rgba(140, 180, 255, 0.75), transparent 45%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card:hover { border-color: var(--line-2); }
.card h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.025em; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card .code { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--accent); }
.icon-box { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.3); color: #b9cbff; margin-bottom: 20px; }
.icon-box svg { width: 22px; height: 22px; }
.glass { background: rgba(10, 18, 48, 0.55); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-radius: var(--r); }

/* terminal / window chrome used by illustrations */
.window { position: relative; border-radius: var(--r); background: linear-gradient(180deg, rgba(14, 24, 64, 0.9), rgba(7, 13, 36, 0.92)); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 0 80px -30px rgba(var(--accent-rgb), 0.5); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 11.5px; color: var(--dim); letter-spacing: 0.06em; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.window-bar .wb-title { margin: 0 auto; color: var(--accent); text-transform: uppercase; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) { .window-bar { gap: 6px; padding: 0 12px; } }
.window-bar .wb-status { color: var(--mint); }
.wb-status.is-illus { color: var(--dim); border: 1px dashed var(--line-2); border-radius: 6px; padding: 2px 7px; font-size: 10.5px; text-transform: uppercase; }

/* ---------- header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: var(--header-h); transition: transform 0.5s var(--ease), background 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgba(5, 10, 28, 0.72); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.nav-row { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; line-height: 1; flex: none; }
.logo-mark { width: 36px; height: auto; flex: none; transition: transform 0.6s var(--ease); filter: drop-shadow(0 0 10px rgba(43, 179, 192, 0.35)); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-word { display: flex; flex-direction: column; gap: 4px; }
.logo-word b { font-size: 19px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.logo-word span { font-size: 9.5px; font-weight: 600; letter-spacing: 0.36em; text-transform: uppercase; color: #3cc4d0; }
.logo-lg .logo-mark { width: 48px; }
.logo-lg .logo-word b { font-size: 25px; }
.logo-lg .logo-word span { font-size: 11.5px; }
@media (max-width: 400px) { .logo-word span { letter-spacing: 0.22em; } .idx-meter .idx-text { display: none; } }
.nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; white-space: nowrap; border-radius: 999px; font-size: 15px; color: var(--muted); transition: color 0.3s, background 0.3s; }
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.3s var(--ease); }
.nav-link[aria-expanded="true"] .caret { transform: rotate(-135deg) translateY(-1px); }
.nav-item { position: static; } /* megas centre on the fixed header, not on their button */
.mega { position: absolute; left: 50%; top: calc(100% - 6px); width: min(1000px, calc(100vw - 48px)); transform: translate(-50%, 8px); opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0.3s; background: rgba(8, 14, 40, 0.94); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border: 1px solid var(--line-2); border-radius: 22px; padding: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); }
.mega-dev, .mega-ai { width: min(1200px, calc(100vw - 48px)); }
.nav-item.is-open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
/* visible at once on open (no fade on visibility), so Tab reaches the links even before the first animation frame */
.nav-item.is-open .mega { transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s; }
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; }
.mega-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 18px; }
.mega-cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.08fr); }
.mega-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mega-group { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding: 8px 12px 10px; }
.mega-code { flex: none; display: inline-grid; place-items: center; min-width: 46px; height: 30px; padding: 0 8px; border-radius: 8px; background: rgba(var(--accent-rgb), 0.16); border: 1px solid rgba(var(--accent-rgb), 0.3); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: #8fb0ff; transition: background 0.3s, color 0.3s; }
.mega-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 14px; transition: background 0.3s; }
.mega-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mega-txt strong { font-size: 15.5px; letter-spacing: -0.01em; color: var(--text); }
.mega-txt span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.mega-link { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 12px; font-size: 14.5px; color: var(--muted); transition: background 0.3s, color 0.3s; }
.mega-link .mega-code { min-width: 42px; height: 24px; font-size: 10.5px; }
.mega-row:hover, .mega-link:hover, .mega-row:focus-visible, .mega-link:focus-visible { background: rgba(var(--accent-rgb), 0.1); color: var(--text); }
.mega-row:hover .mega-code, .mega-link:hover .mega-code { background: rgba(var(--accent-rgb), 0.32); color: #fff; }
.mega-promo { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; padding: 16px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--line); transition: border-color 0.3s; }
.mega-promo:hover { border-color: var(--line-2); }
.mega-promo strong { font-size: 19px; letter-spacing: -0.02em; }
.mega-promo span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.mega-go { color: var(--cyan) !important; font-weight: 600; margin-top: 6px; }
@media (max-width: 1240px) {
  .mega-cols { gap: 4px 10px; }
  .mega-link { gap: 9px; padding: 6px 8px; font-size: 13.5px; }
  .mega-link .mega-code { min-width: 36px; height: 22px; padding: 0 5px; font-size: 9.5px; }
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.idx-meter { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.idx-meter svg { width: 26px; height: 26px; transform: rotate(-90deg); }
.idx-track { fill: none; stroke: var(--line-2); stroke-width: 3; }
.idx-fill { fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset 0.6s var(--ease); filter: drop-shadow(0 0 4px rgba(87, 242, 176, 0.7)); }
.idx-text b { color: var(--text); font-weight: 600; }
.idx-text em { font-style: normal; color: var(--dim); }
.idx-meter.is-bump .idx-text b { animation: bump 0.5s var(--ease); }
@keyframes bump { 40% { color: var(--mint); transform: scale(1.3); } }
.idx-text b { display: inline-block; }
.scroll-line { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
/* scrolls on its own (data-lenis-prevent lets swipes through while the page behind is locked) */
.mobile-menu { position: fixed; inset: 0; z-index: 85; background: rgba(5, 10, 28, 0.97); backdrop-filter: blur(20px); padding-top: calc(var(--header-h) + 24px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.mobile-nav { display: flex; flex-direction: column; gap: 4px; padding-bottom: 40px; }
.mobile-nav a:not(.btn) { font-size: clamp(28px, 8vw, 40px); font-weight: 600; letter-spacing: -0.04em; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 24px; }
.mobile-nav .mono-label { margin-bottom: 10px; }
.m-group { border-bottom: 1px solid var(--line); }
.m-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: clamp(28px, 8vw, 40px); font-weight: 600; letter-spacing: -0.04em; padding: 8px 0; }
.m-group summary::-webkit-details-marker { display: none; }
.m-group summary::after { content: "+"; font-weight: 300; color: var(--accent); transition: transform 0.35s var(--ease); }
.m-group[open] summary::after { transform: rotate(45deg); }
.m-links { display: flex; flex-direction: column; padding: 0 0 16px; }
.mobile-nav .m-links a:not(.btn) { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; padding: 8px 0 8px 16px; border-bottom: 0; border-left: 1px solid var(--line-2); color: var(--muted); }
.m-sub { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding: 14px 0 4px 16px; border-left: 1px solid var(--line-2); }
@media (max-width: 1360px) { .idx-meter .idx-text { display: none; } }
@media (max-width: 1200px) {
  .nav-row { gap: 16px; }
  .nav { gap: 0; }
  .nav-link { padding: 0 8px; font-size: 14.5px; }
}
@media (max-width: 1060px) {
  .nav { display: none; }
  .burger { display: inline-block; }
  .nav-right { margin-left: auto; }
}
@media (max-width: 560px) {
  .nav-right .btn { display: none; }
  .idx-meter .idx-text em { display: none; }
}
body.menu-open { overflow: hidden; }
/* phone menu open: a solid header, so the menu's links don't show through behind the logo as the menu scrolls */
body.menu-open .site-header { background: var(--bg); border-bottom-color: var(--line); }

/* section dot-nav (desktop) */
.dot-nav { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 70; display: flex; flex-direction: column; gap: 14px; }
.dot-nav a { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--dim); transition: all 0.4s var(--ease); }
.dot-nav a.is-seen { border-color: var(--mint); background: rgba(87, 242, 176, 0.25); }
.dot-nav a.is-active { border-color: var(--text); background: var(--text); transform: scale(1.25); box-shadow: 0 0 12px rgba(255, 255, 255, 0.6); }
.dot-nav a span { position: absolute; right: 22px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; font-family: var(--f-mono); font-size: 11.5px; color: var(--text); background: rgba(8, 14, 40, 0.9); border: 1px solid var(--line-2); padding: 4px 9px; border-radius: 6px; opacity: 0; pointer-events: none; transition: all 0.3s var(--ease); }
.dot-nav a:hover span { opacity: 1; transform: translate(0, -50%); }
.dot-nav a.is-active span { animation: dotlabel 2.4s var(--ease) forwards; }
@keyframes dotlabel { 0% { opacity: 0; transform: translate(6px, -50%); } 12%, 70% { opacity: 1; transform: translate(0, -50%); } 100% { opacity: 0; transform: translate(0, -50%); } }
@media (max-width: 1180px) { .dot-nav { display: none !important; } }
.idx-meter[hidden], .dot-nav[hidden] { display: none; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(60px, 9vw, 120px)) 0 clamp(60px, 8vw, 110px); }
.page-hero .h-display { max-width: 15ch; }
.page-hero .lead { margin-top: 26px; }
.page-hero .btn-row { margin-top: 36px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-family: var(--f-mono); font-size: 12px; color: var(--dim); margin-bottom: 26px; letter-spacing: 0.04em; }
.crumbs a { padding: 5px 0; margin: -5px 0; }
.crumbs a:hover { color: var(--text); }
.crumbs a, .crumbs > span { white-space: nowrap; }
.crumbs span[aria-hidden] { opacity: 0.5; }

/* ---------- stats ---------- */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-size: clamp(40px, 5vw, 68px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 0.42em; color: var(--muted); letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 15px; max-width: 24ch; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats-row .stat { background: var(--bg); padding: clamp(22px, 3vw, 36px); }
@media (max-width: 860px) { .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- marquee ---------- */
.marquee { --speed: 38s; position: relative; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; gap: clamp(36px, 5vw, 72px); animation: marquee var(--speed) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.03em; color: rgba(243, 245, 252, 0.55); white-space: nowrap; transition: color 0.3s; }
.marquee-item:hover { color: #fff; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; padding: 26px 0; font-size: clamp(18px, 1.7vw, 22px); font-weight: 500; letter-spacing: -0.02em; transition: color 0.3s; }
.faq-q:hover { color: #c7d6ff; }
.faq-plus { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); transition: transform 0.5s var(--ease), background 0.3s, border-color 0.3s; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.4s var(--ease); }
.faq-item.is-open .faq-plus { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: rotate(180deg); }
.faq-item.is-open .faq-plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-a { overflow: hidden; height: 0; transition: height 0.5s var(--ease); }
.faq-link { color: var(--cyan); font-weight: 600; white-space: nowrap; }
.faq-link:hover { text-decoration: underline; }
.faq-a > div { padding: 0 60px 28px 0; color: var(--muted); font-size: 16.5px; max-width: 820px; }
html:not(.js) .faq-a { height: auto; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(48px, 8vw, 110px) clamp(24px, 6vw, 80px); background: radial-gradient(120% 140% at 50% 120%, rgba(var(--accent-rgb), 0.38), transparent 60%), linear-gradient(180deg, rgba(16, 28, 74, 0.8), rgba(7, 13, 36, 0.9)); border: 1px solid var(--line-2); text-align: center; isolation: isolate; }
.cta-band .h-1 { max-width: 16ch; margin: 0 auto; }
.cta-band .lead { margin: 22px auto 0; }
.cta-band .domain-form { margin: 38px auto 0; }
.sonar { position: absolute; left: 50%; bottom: -260px; width: 520px; height: 520px; margin-left: -260px; z-index: -1; pointer-events: none; }
.sonar i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--accent-rgb), 0.5); animation: sonar 4.5s var(--ease) infinite; opacity: 0; }
.sonar i:nth-child(2) { animation-delay: 1.5s; }
.sonar i:nth-child(3) { animation-delay: 3s; }
@keyframes sonar { 0% { transform: scale(0.2); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } }
.cta-proof { margin-top: 26px; font-size: 13.5px; color: var(--dim); font-family: var(--f-mono); }

/* domain capture */
.domain-form { display: flex; align-items: center; gap: 6px; max-width: 560px; padding: 6px 6px 6px 20px; border-radius: 999px; background: rgba(5, 10, 28, 0.7); border: 1px solid var(--line-2); transition: border-color 0.3s, box-shadow 0.3s; }
.domain-form:focus-within { border-color: rgba(var(--accent-rgb), 0.8); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.14); }
.domain-prefix { color: var(--dim); font-size: 14px; }
.domain-form input { flex: 1; min-width: 0; height: 50px; background: transparent; border: 0; outline: none; font-size: 16px; }
.domain-form input::placeholder { color: var(--dim); }
.domain-form .btn { --bh: 50px; }
@media (max-width: 560px) {
  .domain-form { flex-wrap: wrap; border-radius: 22px; padding: 10px; }
  .domain-prefix { padding-left: 8px; }
  .domain-form .btn { width: 100%; }
}

/* ---------- footer ---------- */
.site-footer { position: relative; padding: clamp(70px, 9vw, 120px) 0 30px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(5, 10, 28, 0.9)); overflow: hidden; }
.foot-top { display: grid; grid-template-columns: 0.9fr 2fr; gap: 56px; }
.foot-brand p { color: var(--muted); margin: 20px 0 22px; max-width: 42ch; font-size: 15.5px; }
.foot-status { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.foot-cols h3 { margin-bottom: 16px; font-size: 12px; }
.foot-cols a, .foot-cols address { display: block; color: var(--muted); font-size: 15px; font-style: normal; padding: 5px 0; transition: color 0.3s; }
.foot-cols a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--dim); font-size: 13px; margin-top: clamp(44px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--line); }
.foot-bottom a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.foot-bottom a:hover { color: var(--text); }
@media (max-width: 1100px) { .foot-top { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } }

/* ---------- long-form text (blog posts, privacy policy): Markdown typed in the admin ---------- */
.prose { font-size: 18px; line-height: 1.75; color: #d5dcf2; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); color: var(--text); margin-top: 1.8em; letter-spacing: -0.03em; line-height: 1.15; }
.prose h3 { font-size: clamp(21px, 2vw, 25px); color: var(--text); margin-top: 1.5em; letter-spacing: -0.02em; line-height: 1.2; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.prose code { font-family: var(--f-mono); font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.prose pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: #0a1131; border: 1px solid var(--line); }
.prose pre code { padding: 0; background: none; color: #c8d2f0; }
.prose img { border-radius: 12px; height: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose hr { border: 0; height: 1px; background: var(--line-2); margin: 2.2em 0; }
html[data-theme="light"] .prose { color: #26304f; }
html[data-theme="light"] .prose pre { background: #0a1131; }

/* ---------- page wipe ---------- */
/* Only covers the page when arriving from a link on the site (html.wipe-enter, set in <head>); direct visits
   (search, ads, bookmarks) paint straight away. */
.page-wipe { position: fixed; inset: 0; z-index: 250; pointer-events: none; display: grid; place-items: center; background: var(--bg); clip-path: inset(0 0 100% 0); transition: clip-path 0.5s var(--ease-in-out); }
html.wipe-enter .page-wipe { clip-path: inset(0 0 0 0); animation: wipe-auto 0.5s 1.2s var(--ease-in-out) forwards; /* safety net if core.js never runs; JS clears it */ }
@keyframes wipe-auto { to { clip-path: inset(0 0 100% 0); } }
html .page-wipe.is-out { clip-path: inset(0 0 100% 0); }
.page-wipe.is-in { clip-path: inset(0 0 0 0); transition-duration: 0.45s; pointer-events: all; }
.wipe-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--accent); font-size: 13px; letter-spacing: 0.06em; }
.wipe-bar { width: 180px; height: 2px; border-radius: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.wipe-bar::after { content: ""; position: absolute; inset: 0; background: var(--grad); transform-origin: left; animation: wipebar 0.9s var(--ease) infinite; }
@keyframes wipebar { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
html:not(.js) .page-wipe { display: none; }

/* ---------- exit modal & toast ---------- */
.exit-modal { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.exit-modal[hidden] { display: none; }
.exit-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 18, 0.72); backdrop-filter: blur(6px); animation: fadein 0.4s var(--ease); }
.exit-card { position: relative; width: min(600px, 100%); padding: clamp(28px, 5vw, 48px); border-radius: var(--r-lg); background: radial-gradient(100% 90% at 100% 0%, rgba(154, 131, 255, 0.22), transparent 60%), linear-gradient(180deg, #0e1840, #070d24); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9); animation: popin 0.6s var(--ease); }
.exit-card h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 14px; }
.exit-card p { color: var(--muted); margin-bottom: 26px; }
.exit-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; color: var(--muted); }
.exit-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.exit-skip { margin-top: 18px; font-size: 14px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
.exit-skip:hover { color: var(--muted); }
@keyframes fadein { from { opacity: 0; } }
@keyframes popin { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
.toast { position: fixed; left: 20px; bottom: 20px; z-index: 120; width: min(380px, calc(100vw - 40px)); padding: 16px 44px 16px 18px; border-radius: 16px; background: rgba(10, 18, 48, 0.92); border: 1px solid var(--line-2); backdrop-filter: blur(16px); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8); animation: popin 0.6s var(--ease); }
.toast[hidden] { display: none; }
.toast p { font-size: 14.5px; color: var(--muted); margin-top: 6px; }
.toast p a { color: var(--cyan); font-weight: 600; }
.toast-x { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; font-size: 18px; color: var(--dim); }

/* ---------- reveal states (only when JS is on) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(34px); }
html.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal="scale"] { transform: scale(0.94); }
html.js [data-reveal="left"] { transform: translateX(-40px); }
html.js [data-reveal="right"] { transform: translateX(40px); }
/* phones: side reveals rise instead, so an unrevealed card never widens the page */
@media (max-width: 760px) { html.js [data-reveal="left"], html.js [data-reveal="right"] { transform: translateY(34px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
}

/* ==========================================================================
   Day theme — html[data-theme="light"], toggled by the moon/sun button in the
   header (core.js). Dark islands above keep their night tokens.
   ========================================================================== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fc;
  --bg-2: #eaeffa;
  --bg-3: #dee6f7;
  --surface: rgba(40, 70, 160, 0.04);
  --surface-2: rgba(40, 70, 160, 0.075);
  --line: rgba(30, 50, 120, 0.12);
  --line-2: rgba(30, 50, 120, 0.22);
  --text: #0a1130;
  --muted: #4a5577;
  --dim: #5a6482; /* ≥4.5:1 on every day surface (WCAG AA) */
  --accent: #2d55e0;
  --accent-rgb: 45, 85, 224;
  --violet: #7356ee;
  /* accents are also used for small text and links: each is ≥4.5:1 on the day surfaces (WCAG AA) */
  --cyan: #06728d;
  --mint: #077a53;
  --amber: #925807;
  --rose: #bd2c49;
  --grad: linear-gradient(100deg, #3461f0 0%, #7356ee 48%, #0a9cc4 100%);
  --grad-soft: linear-gradient(135deg, rgba(52, 97, 240, 0.12), rgba(115, 86, 238, 0.08) 50%, rgba(10, 156, 196, 0.07));
}
html[data-theme="light"] :is(.window, .cta-band, .exit-card, [data-dark]) { color: var(--text); }

/* ambient */
html[data-theme="light"] .aurora i { opacity: 0.3; }
html[data-theme="light"] .grain { opacity: 0.03; }

/* buttons, badges, cards */
html[data-theme="light"] .btn-primary:not(:where(.window, .cta-band, .exit-card, [data-dark]) *) { color: #fff; box-shadow: 0 10px 26px -12px rgba(var(--accent-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
html[data-theme="light"] .btn-ghost:not(:where(.window, .cta-band, .exit-card, [data-dark]) *) { background: rgba(255, 255, 255, 0.75); }
html[data-theme="light"] .badge:not(:where(.window, .cta-band, .exit-card, [data-dark]) *) { color: var(--accent); }
html[data-theme="light"] .illus-tag:not(:where(.window, .cta-band, .exit-card, [data-dark]) *) { background: rgba(255, 255, 255, 0.85); }
html[data-theme="light"] .card { background: linear-gradient(180deg, #ffffff, #f7f9ff); box-shadow: 0 1px 2px rgba(10, 20, 60, 0.04), 0 14px 34px -22px rgba(20, 40, 110, 0.28); }
html[data-theme="light"] .card::after { background: radial-gradient(300px circle at var(--mx) var(--my), rgba(var(--accent-rgb), 0.55), transparent 45%); }
html[data-theme="light"] .glass { background: rgba(255, 255, 255, 0.72); }
html[data-theme="light"] .window { background: linear-gradient(180deg, #121c48, #0a1131); box-shadow: 0 40px 100px -40px rgba(20, 40, 110, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 0 70px -34px rgba(52, 97, 240, 0.45); }

/* header, menus */
html[data-theme="light"] .site-header.is-scrolled { background: rgba(245, 247, 252, 0.82); }
html[data-theme="light"] body.menu-open .site-header { background: var(--bg); }
html[data-theme="light"] .logo-word span { color: #0f8f9c; }
html[data-theme="light"] .logo-mark { filter: none; }
html[data-theme="light"] .nav-link:hover, html[data-theme="light"] .nav-link[aria-expanded="true"] { background: rgba(30, 50, 120, 0.06); }
html[data-theme="light"] .mega { background: rgba(255, 255, 255, 0.97); box-shadow: 0 30px 80px -24px rgba(20, 40, 110, 0.3); }
html[data-theme="light"] .mega-code { color: var(--accent); background: rgba(var(--accent-rgb), 0.08); border-color: rgba(var(--accent-rgb), 0.22); }
html[data-theme="light"] .mega-row:hover .mega-code, html[data-theme="light"] .mega-link:hover .mega-code { background: var(--accent); color: #fff; }
html[data-theme="light"] .mobile-menu { background: rgba(245, 247, 252, 0.97); }
html[data-theme="light"] .dot-nav a span { background: rgba(255, 255, 255, 0.96); box-shadow: 0 6px 18px -8px rgba(20, 40, 110, 0.35); }
html[data-theme="light"] .dot-nav a.is-active { box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45); }

/* sections */
html[data-theme="light"] .marquee-item { color: rgba(10, 17, 48, 0.6); }
html[data-theme="light"] .marquee-item:hover { color: var(--text); }
html[data-theme="light"] .faq-q:hover { color: var(--accent); }
html[data-theme="light"] .cta-band { background: radial-gradient(120% 140% at 50% 120%, rgba(91, 140, 255, 0.38), transparent 60%), linear-gradient(180deg, #111b47, #0a1131); box-shadow: 0 40px 90px -50px rgba(20, 40, 110, 0.6); }
html[data-theme="light"] .domain-form:not(:where(.window, .cta-band, .exit-card, [data-dark]) *) { background: #fff; }
html[data-theme="light"] .site-footer { background: linear-gradient(180deg, transparent, rgba(222, 230, 247, 0.85)); }
html[data-theme="light"] .toast { background: rgba(255, 255, 255, 0.96); box-shadow: 0 20px 50px -22px rgba(20, 40, 110, 0.4); }
html[data-theme="light"] .exit-backdrop { background: rgba(10, 17, 48, 0.45); }

/* ---------- theme toggle (moon = night, sun = day) ---------- */
.theme-toggle { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text); background: var(--surface); transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease); }
.theme-toggle:hover { border-color: rgba(var(--accent-rgb), 0.7); background: rgba(var(--accent-rgb), 0.1); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { position: absolute; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.6s var(--ease), opacity 0.35s; }
.theme-toggle .tt-moon { fill: currentColor; stroke: none; }
.theme-toggle .tt-sun circle { fill: currentColor; }
.theme-toggle .tt-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
html[data-theme="light"] .theme-toggle .tt-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }
html[data-theme="light"] .theme-toggle .tt-sun { opacity: 1; transform: none; color: var(--amber); }
html[data-theme="light"] .theme-toggle { background: #fff; }
@media (max-width: 560px) { .theme-toggle { width: 40px; height: 40px; } }

/* circular reveal when switching (View Transitions API, where supported) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* plain cross-fade fallback */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after { transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, fill 0.45s ease, box-shadow 0.45s ease !important; }

/* ---------- 404 page ---------- */
.error-hero .h-display { max-width: 16ch; font-size: clamp(40px, 5.6vw, 80px); }
.error-links { padding-top: 0; }
.error-card { display: flex; flex-direction: column; gap: 6px; }
.error-card .code { margin-bottom: 14px; }
.error-contact { margin-top: 40px; font-size: 13.5px; color: var(--muted); }
.error-contact a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
