@import url("themes.css");
/* =========================================================
   CyberAIX — enterprise theme
   Light + dark · espresso + gold · Inter · crisp cards
   Selectors, breakpoints, and interactions unchanged.
   ========================================================= */
:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1240px;
  --header-h: 76px;
  --r: 8px;
  --r-lg: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --on-dark: #ffffff;
}
/* Palette tokens (Espresso & Gold, light/dark) live in themes.css, generated by build.py from palettes.py */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body { margin: 0; font-family: var(--font-body); font-size: 16px; background: var(--bg); color: var(--text); line-height: 1.65; transition: background-color .3s var(--ease), color .3s var(--ease); -webkit-font-smoothing: antialiased; overflow-x: hidden; position: relative; }
main, header, footer { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { margin: 0 0 18px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- Type ---------- */
h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 20px; color: var(--text); }
h1 { font-size: clamp(2.6rem, 5.2vw, 4.2rem); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); letter-spacing: -0.025em; }
h3 { font-size: 1.35rem; line-height: 1.3; font-weight: 600; }
h4 { font-size: 1.08rem; margin-bottom: 10px; font-weight: 600; }
.grad { color: var(--primary); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 18px; }
.lead { font-size: 1.18rem; color: var(--text-2); max-width: 620px; line-height: 1.65; }
.sub { color: var(--muted); max-width: 660px; margin: 0 auto; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: var(--r); font-weight: 600; font-size: 0.92rem; border: 1px solid transparent; white-space: nowrap; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(var(--primary-rgb), .3); }
.btn-primary::after { content: "→"; transition: transform .2s var(--ease); }
.btn-primary:hover { background: var(--primary-2); box-shadow: 0 6px 16px rgba(var(--primary-rgb), .28); }
.btn-primary:hover::after { transform: translateX(3px); }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { color: var(--text-2); padding-left: 14px; padding-right: 14px; }
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 15px 28px; font-size: 0.98rem; }
.link-arrow { color: var(--primary); font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 8px; }
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--primary-2); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: var(--header-bg); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s, box-shadow .3s; }
.site-header.scrolled { border-bottom-color: var(--line); background: var(--header-bg-solid); box-shadow: var(--shadow-sm); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-inner > .logo, .header-inner > .header-right { flex: none; }
.main-nav { display: flex; align-items: center; min-width: 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--strong); }
.logo-mark { color: var(--primary); }
.logo-mark svg { width: 28px; height: 28px; }
.logo-text strong { font-weight: 700; color: var(--primary); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav li { position: relative; }
.main-nav li > a, .main-nav li > button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; white-space: nowrap; line-height: 1.2; font-weight: 500; font-size: 0.92rem; color: var(--text-2); border-radius: var(--r); transition: color .2s, background .2s; position: relative; }
.main-nav li > a::after, .main-nav li > button::after { content: none; }
.main-nav li > a:hover, .main-nav li > button:hover, .main-nav li.open > button { color: var(--text); background: var(--bg-alt); }
.chev { width: 11px; height: 11px; opacity: .7; transition: transform .25s; }
.main-nav li.open .chev { transform: rotate(180deg); }
.dropdown { position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; display: grid; gap: 2px; }
.dropdown::before { content: none; }
.dropdown-wide { min-width: 220px; }
.has-dropdown.open .dropdown, .has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: flex; flex-direction: column; padding: 11px 14px; border-radius: var(--r); transition: background .15s; }
.dropdown a:hover { background: var(--primary-soft); }
.dropdown a strong { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.dropdown a span { font-size: 0.8rem; color: var(--muted); }
.header-ctas { display: flex; gap: 6px; align-items: center; }
.mobile-only { display: none; }
.menu-toggle { display: none; flex-direction: column; gap: 6px; padding: 8px; }
.menu-toggle span { width: 24px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.header-right { display: flex; align-items: center; gap: 10px; }

/* ---------- Hero (espresso) ---------- */
.hero { position: relative; padding: 112px 0 104px; overflow: hidden; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%); color: var(--on-dark); }
.hero h1 { color: #fff; }
.hero .grad { color: var(--accent-light); }
.hero .lead { color: var(--on-dark-2); }
.hero .eyebrow { color: var(--accent-light); }
.hero .btn-outline { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.hero .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.orb-1 { width: 720px; height: 720px; background: radial-gradient(circle, rgba(var(--primary-rgb),.9), transparent 65%); top: -320px; right: -200px; }
.orb-2 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(var(--accent-rgb),.5), transparent 65%); bottom: -300px; left: -160px; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(ellipse at 60% 20%, black 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 60% 20%, black 10%, transparent 70%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 72px; align-items: center; }
.hero-copy h1 { margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0 0; }
.hero-badges { display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.12); }
.badge-pill { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 0.88rem; color: var(--on-dark-muted); }
.badge-pill strong { color: #fff; font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-light); flex: none; }
.dot-gold { background: var(--accent-light); }

/* hero flow visual — product panel */
.flow-card { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 16px; position: relative; box-shadow: var(--shadow-lg); }
.flow-card::before { content: "LIVE · CONTROL PLANE"; position: absolute; top: -11px; left: 20px; padding: 3px 10px; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; font-weight: 600; color: var(--success); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.flow-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.flow-row span { padding: 5px 11px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-alt); font-size: .74rem; font-weight: 600; color: var(--text-2); }
.flow-dests span { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary-text); }
.flow-arrow { width: 2px; height: 30px; margin: 0 auto; background: linear-gradient(var(--primary), transparent); position: relative; }
.flow-arrow::after { content: ""; position: absolute; top: 0; left: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { 0% { top: 0; opacity: 1; } 100% { top: 26px; opacity: 0; } }
.flow-core { border: 1px solid var(--primary-line); border-radius: var(--r); padding: 20px; background: var(--primary-soft); position: relative; }
.flow-core::before, .flow-core::after { content: none; }
.core-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; text-align: center; margin-bottom: 14px; color: var(--strong); }
.core-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.core-chips span { font-size: .72rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--primary); color: #fff; }
.meter-label { display: flex; justify-content: space-between; font-size: .76rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.meter-label span:last-child { color: var(--primary); }
.meter-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; width: 48%; border-radius: 999px; background: var(--primary); animation: fill 2.6s var(--ease) both; }
@keyframes fill { from { width: 100%; } to { width: 48%; } }

/* ---------- Sections ---------- */
.section { padding: 112px 0; position: relative; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 64px; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; text-align: left; max-width: none; }
.section-head-row h2 { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
#blog .grid-3 { gap: 40px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px 32px; display: flex; flex-direction: column; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s; }
.card::before { content: none; }
.card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--line-strong); }
.card:hover::after { transform: scaleX(1); }
.card p { color: var(--muted); flex: 1; font-size: .98rem; }
.card-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--primary); margin-bottom: 22px; background: var(--primary-soft); border-radius: 10px; }
.card-icon svg { width: 20px; height: 20px; }
.card-label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; display: block; }
.card-cta { background: linear-gradient(160deg, var(--navy), var(--navy-3)) !important; border-color: transparent !important; color: #fff; }
.card-cta h3 { color: #fff; }
.card-cta p { color: var(--on-dark-2); }
.card-cta .btn { align-self: flex-start; }

/* ---------- Stack ---------- */
.stack { max-width: 880px; margin: 0 auto; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.stack-layer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: relative; transition: background .3s, padding-left .3s var(--ease); }
.stack-layer:last-child { border-bottom: 0; }
.stack-layer:hover { background: var(--bg-alt); padding-left: 40px; }
.stack-layer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); transform: scaleY(0); transition: transform .3s var(--ease); }
.stack-layer:hover::before { transform: scaleY(1); }
.layer-top { background: linear-gradient(90deg, var(--primary-soft), var(--surface)); }
.layer-bottom { background: linear-gradient(90deg, var(--surface-2), var(--surface)); }
.layer-name { font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; color: var(--text); }
.layer-desc { color: var(--muted); font-size: .9rem; }
.layer-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.layer-chips span { font-size: .74rem; font-weight: 600; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); background: var(--bg-alt); }

/* ---------- Stats ---------- */
.stats-section { padding: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.stat { padding: 56px 32px; border-right: 1px solid var(--line); position: relative; }
.stat:last-child { border-right: 0; }
.stat-num { display: block; font-family: var(--font-head); font-size: clamp(2.6rem, 4vw, 3.8rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--strong); margin-bottom: 14px; }
.stat-label { color: var(--muted); font-size: .92rem; display: block; max-width: 220px; }
.stat::before { content: ""; position: absolute; top: 0; left: 32px; width: 40px; height: 3px; background: var(--primary); }

/* ---------- Products ---------- */
.products { display: grid; gap: 0; }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; padding: 72px 0; border-top: 1px solid var(--line); }
.product:last-child { border-bottom: 1px solid var(--line); }
.product-flip .product-visual { order: 2; }
.product-visual { aspect-ratio: 5 / 4; border-radius: var(--r-lg); display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.product-visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 40px 40px; }
.product-visual::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.18), transparent 55%); }
.product-visual span { position: relative; font-family: var(--font-head); font-size: clamp(2.2rem, 3.6vw, 3.4rem); font-weight: 700; color: #fff; letter-spacing: -0.03em; }
.pv-1 { background: var(--pv-1); }
.pv-2 { background: var(--pv-2); }
.pv-3 { background: var(--pv-3); }
.pv-4 { background: var(--pv-4); }
.pv-1::after, .pv-2::after, .pv-3::after, .pv-4::after { background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.18), transparent 55%); }
.product-copy p { color: var(--muted); font-size: 1.02rem; }
.product-copy h3 { font-size: 1.8rem; font-weight: 700; }
.feature-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; }
.feature-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; font-size: .95rem; color: var(--text-2); }
.feature-list li::before { content: "✓"; color: var(--primary); font-weight: 700; flex: none; }

/* ---------- Split / terminal ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.split-copy p { color: var(--muted); font-size: 1.05rem; }
.terminal { background: var(--navy); color: var(--on-dark); border: 1px solid var(--navy-3); border-radius: var(--r-lg); overflow: hidden; font-family: var(--font-mono); font-size: .82rem; box-shadow: var(--shadow-lg); }
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); }
.terminal-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.terminal-bar em { margin-left: auto; color: var(--on-dark-muted); font-style: normal; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.terminal-body { padding: 22px; display: grid; gap: 10px; }
.terminal-body p { margin: 0; line-height: 1.6; }
.t-prompt { color: #fff; }
.t-line { color: var(--on-dark-2); padding-left: 16px; }
.t-tag { display: inline-block; min-width: 52px; color: var(--accent-light); }
.t-result { color: #4ade80; margin-top: 8px !important; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }

/* ---------- Tabs / fabrics ---------- */
.tab-list { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 0 auto 48px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); width: max-content; max-width: 100%; box-shadow: var(--shadow-sm); }
.tab-list button { padding: 10px 20px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); position: relative; transition: color .2s, background .2s; }
.tab-list button::after { content: none; }
.tab-list button[aria-selected="true"] { color: #fff; background: var(--primary); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeUp .45s var(--ease); }
.fab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.fab h4 { font-size: 1.08rem; }
.fab p { color: var(--muted); font-size: .9rem; flex: 1; }
.fab-stats { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; font-size: .84rem; color: var(--muted); }
.fab-stats b { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--strong); margin-right: 6px; }

/* ---------- Independence ---------- */
.independence { background: radial-gradient(ellipse at 50% 0%, var(--primary-soft), transparent 60%), var(--bg); }
.independence-inner { text-align: center; max-width: 860px; }
.independence p { color: var(--muted); font-size: 1.12rem; }
.indie-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.indie-row div { padding: 26px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); }
.indie-k { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.indie-v { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }

/* ---------- Resources / blog ---------- */
.res { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px 28px; position: relative; box-shadow: var(--shadow-sm); transition: box-shadow .3s, transform .3s var(--ease); }
.res::after { content: "→"; position: absolute; top: 28px; right: 26px; color: var(--primary); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--ease); }
.res:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.res:hover::after { opacity: 1; transform: none; }
.res h4 { font-size: 1.2rem; }
.res p { color: var(--muted); font-size: .9rem; margin: 0; }
.post { display: flex; flex-direction: column; gap: 14px; cursor: pointer; }
.post-thumb { aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--r-lg); position: relative; overflow: hidden; background: var(--bg-alt); transition: border-color .3s, box-shadow .3s; }
.post-thumb::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 28px 28px; }
.post-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 40%, var(--c, var(--primary-soft))); }
.post:hover .post-thumb { border-color: var(--line-strong); box-shadow: var(--shadow); }
.pt-1 { --c: var(--tint-1); } .pt-2 { --c: var(--tint-2); } .pt-3 { --c: var(--tint-3); } .pt-4 { --c: var(--tint-4); } .pt-5 { --c: var(--tint-5); } .pt-6 { --c: var(--tint-6); }
.post-cat { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.post h3 { font-size: 1.25rem; margin: 0; line-height: 1.35; transition: color .2s; }
.post:hover h3 { color: var(--primary); }
.post-meta { color: var(--muted); font-size: .84rem; }

/* ---------- CTA (espresso) ---------- */
.cta { padding: 0 0 128px; }
.cta-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding: 72px 64px; border-radius: 20px; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.cta-inner::before { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--primary-rgb),.55), transparent 65%); filter: blur(30px); }
.cta h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); color: #fff; }
.cta p { color: var(--on-dark-2); margin: 0; }
.cta-form { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.cta-form input { flex: 1; min-width: 220px; padding: 15px 18px; border-radius: var(--r); border: 1px solid transparent; background: #fff; color: #121a16; font: inherit; outline: none; transition: box-shadow .2s; }
.cta-form input:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.5); }
.cta-form input::placeholder { color: #5f6d66; }
.form-msg { width: 100%; font-size: .86rem; margin: 8px 0 0 4px; min-height: 1.4em; color: #86efac; font-weight: 500; }
.form-msg.error { color: #fca5a5; }

/* ---------- Footer (espresso) ---------- */
.site-footer { background: var(--navy); color: var(--on-dark-2); border-top: 1px solid var(--line); padding: 80px 0 32px; position: relative; overflow: hidden; }
.site-footer::after { content: none; }
.site-footer .logo { color: #fff; }
.site-footer .logo-text strong { color: var(--accent-light); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; position: relative; z-index: 1; }
.footer-brand p { color: var(--on-dark-muted); margin: 18px 0 22px; max-width: 300px; font-size: .95rem; }
.footer-grid h5 { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-grid div > a { display: block; color: var(--on-dark-muted); font-size: .92rem; padding: 6px 0; transition: color .2s; }
.footer-grid div > a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); color: var(--on-dark-muted); font-size: .84rem; position: relative; z-index: 1; }
.footer-bottom div { display: flex; gap: 24px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Resource pages ---------- */
.article-hero { padding: 88px 0 64px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.article-hero .container { max-width: 860px; }
.article-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); margin-bottom: 22px; }
.article-hero .lead { max-width: 720px; }
.crumb { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 26px; transition: color .2s; }
.crumb:hover { color: var(--primary); }
.article-meta { display: flex; gap: 20px; font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: 8px; }
.hub-nav { display: flex; gap: 0; margin-top: 32px; border: 1px solid var(--line); border-radius: var(--r); width: max-content; max-width: 100%; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.hub-nav a { padding: 12px 22px; font-size: .86rem; font-weight: 600; color: var(--text-2); border-right: 1px solid var(--line); transition: background .2s, color .2s; }
.hub-nav a:last-child { border-right: 0; }
.hub-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.article-body { padding: 72px 0 120px; }
.article-grid { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 64px; justify-content: center; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 32px); border-left: 2px solid var(--line); padding-left: 20px; }
.toc-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.toc a { font-size: .88rem; color: var(--muted); transition: color .2s; }
.toc a:hover { color: var(--text); }
.prose { font-size: 1.05rem; line-height: 1.8; color: var(--text-2); }
.prose h2 { font-size: 1.7rem; margin: 52px 0 18px; color: var(--text); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin: 36px 0 14px; color: var(--text); }
.prose p { margin-bottom: 22px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 24px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--primary); font-weight: 600; }
.prose code { font-family: var(--font-mono); font-size: .86em; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--primary-2); background: var(--bg-alt); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 48px; }
.facts div { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.facts dt { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--text); font-size: .95rem; font-weight: 500; }
.article-cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; margin-top: 72px; padding: 40px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; box-shadow: var(--shadow); }
.article-cta h3 { margin: 0 0 8px; font-size: 1.4rem; color: #fff; }
.article-cta p { margin: 0; color: var(--on-dark-2); font-size: .95rem; }
.post-thumb::after { background: linear-gradient(160deg, transparent 40%, var(--c, var(--primary-soft))); }
@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .article-cta { flex-direction: column; align-items: flex-start; }
}

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .flow-arrow::after, .meter-fill { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1340px) {
  .header-ctas .btn-ghost { display: none; }
  .main-nav li > a, .main-nav li > button { padding: 10px 11px; font-size: 0.9rem; }
  .header-inner { gap: 16px; }
}
@media (max-width: 1199px) {
  /* backdrop-filter would make the header the containing block for the fixed nav panel */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--header-bg-solid); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .header-ctas { display: none; }
  .mobile-only { display: flex; }
  .menu-toggle { display: flex; }
  .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--bg); padding: 16px 32px 40px; overflow-y: auto; transform: translateX(100%); transition: transform .3s var(--ease); display: flex; flex-direction: column; align-items: stretch; gap: 20px; z-index: 99; }
  .main-nav.open { transform: none; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li > a, .main-nav li > button { width: 100%; justify-content: space-between; padding: 16px 0; font-size: 1.1rem; font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
  .main-nav li > a::after, .main-nav li > button::after { display: none; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 4px 0 8px 12px; display: none; }
  .dropdown::before { display: none; }
  .has-dropdown.open .dropdown { display: grid; }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open:hover .dropdown { display: grid; }
  .nav-ctas { flex-direction: column; gap: 10px; }
  .nav-ctas .btn { width: 100%; }
}
@media (max-width: 820px) {
  .container { padding: 0 22px; }
  .section { padding: 80px 0; }
  .hero { padding: 72px 0 64px; }
  .hero-inner, .split, .product, .cta-inner { grid-template-columns: 1fr; gap: 44px; }
  .product { padding: 48px 0; }
  .product-flip .product-visual { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .indie-row { grid-template-columns: repeat(2, 1fr); }
  .section-head-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cta-inner { padding: 44px 26px; }
  .cta { padding-bottom: 96px; }
}
@media (max-width: 560px) {
  .grid-4, .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stack-layer { padding: 20px 22px; }
  .card, .fab, .res { padding: 26px 22px; }
}

/* ---------- Company & legal pages ---------- */
.news-stack .stack-layer { padding: 32px; }
.news-stack .stack-layer > div { display: grid; gap: 10px; }
.news-date { margin-bottom: 0; }
.news-stack .layer-name { font-size: 1.35rem; }
.news-stack .layer-desc { font-size: .98rem; margin: 0; max-width: 720px; }
.boiler { color: var(--text-2); font-size: .95rem; line-height: 1.7; margin: 0; }
.subpage .article-hero + .section .section-head, .subpage .section .section-head { margin-bottom: 56px; }
/* ---------- Resource icons ---------- */
.post-thumb { display: grid; place-items: center; }
.thumb-icon { position: relative; z-index: 1; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; }
.thumb-icon svg { width: 28px; height: 28px; }
.post:hover .thumb-icon { transform: scale(1.06); box-shadow: var(--shadow); }
.thumb-type { position: absolute; z-index: 1; left: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.thumb-type svg { width: 12px; height: 12px; color: var(--primary); }
.eyebrow-icon svg { width: 16px; height: 16px; margin-right: -2px; }

/* ---------- Stacked forms ---------- */
.stack-form { display: grid; gap: 12px; padding: 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; padding: 13px 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--input-bg); color: var(--text); font: inherit; font-size: .95rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.15); }
.stack-form input::placeholder, .stack-form textarea::placeholder { color: var(--muted); }
.stack-form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%235f6d66' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px; padding-right: 40px; }
.stack-form select:invalid, .stack-form select option[value=""] { color: var(--muted); }
.stack-form textarea { resize: vertical; min-height: 110px; }
.stack-form .btn { justify-self: start; margin-top: 4px; }
.stack-form .form-msg { margin: 0; color: var(--success); }
.stack-form .form-msg.error { color: var(--danger); }
.invalid { border-color: var(--danger) !important; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } .stack-form { padding: 22px; } }
