/* ===== Kersev AI — modern industrial palette ===== */
:root {
  --bg: #0e1116; --bg-alt: #141821; --surface: #1a1f2b; --border: #2a3140;
  --text: #e6eaf0; --text-dim: #9aa4b2;
  --primary: #4a90c2; --primary-bright: #6aa9d6;
  --accent: #e8a13a; --accent-dim: #b87d28; --maxw: 1120px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1,h2,h3,h4 { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; letter-spacing: -0.02em; }
a { color: var(--primary-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
.grid-backdrop { position: fixed; inset: 0; z-index: -1; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 64px 64px; opacity: 0.12; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%); }
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; background: rgba(14,17,22,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-svg { width: 28px; height: 28px; flex-shrink: 0; }
.logo-dot { color: var(--primary-bright); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; }
.nav-links a { color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); }
.nav-cta { padding: 8px 18px; border: 1px solid var(--primary); border-radius: 6px; color: var(--primary-bright) !important; }
.nav-cta:hover { background: rgba(74,144,194,0.12); text-decoration: none; }
.hero { padding: 120px 32px 100px; text-align: center; }
.hero-inner { max-width: 820px; margin: 0 auto; }
.eyebrow { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 28px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.05; margin-bottom: 24px; }
.accent { color: var(--primary-bright); }
.lede { font-size: 1.2rem; color: var(--text-dim); max-width: 640px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 64px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 28px; border-radius: 6px; font-weight: 600; font-size: 0.98rem; transition: all 0.2s; border: 1px solid transparent; cursor: pointer; font-family: 'Inter', sans-serif; }
.btn-primary { background: var(--primary); color: #0a0d12; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-bright); border-color: var(--primary-bright); text-decoration: none; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-bright); text-decoration: none; }
.hero-stats { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat-num { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 96px 32px; }
.section.alt { max-width: none; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--primary-bright); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 16px; }
.section-sub { font-size: 1.1rem; color: var(--text-dim); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 36px 28px; transition: border-color 0.25s, transform 0.25s; }
.card:hover { border-color: var(--primary); transform: translateY(-4px); }
.card-icon { font-size: 1.6rem; color: var(--accent); margin-bottom: 18px; }
.card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.card p { color: var(--text-dim); font-size: 0.98rem; }
.loop-diagram-wrap { margin-top: 56px; width: 100vw; max-width: 1480px; position: relative; left: 50%; transform: translateX(-50%); padding: 0 24px; }
.loop-caption { text-align: center; color: var(--text-dim); font-size: 0.98rem; margin-bottom: 28px; max-width: 780px; margin-left: auto; margin-right: auto; }
.diagram-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.diagram-tab { padding: 9px 22px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.diagram-tab:hover { border-color: var(--primary); color: var(--text); }
.diagram-tab.active { background: var(--primary); border-color: var(--primary); color: #0a0d12; }
.loop-diagram { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.blueprint-frame { position: relative; width: 100%; container-type: inline-size; overflow: hidden; border-radius: 8px; }
.blueprint-frame.frame-full { aspect-ratio: 1400 / 950; }
.blueprint-frame.frame-overview { aspect-ratio: 1360 / 420; }
.blueprint-canvas { position: absolute; top: 0; left: 0; transform-origin: top left; }
.blueprint-canvas.canvas-full { width: 1400px; height: 950px; transform: scale(calc(100cqw / 1400px)); }
.blueprint-canvas.canvas-overview { width: 1360px; height: 420px; transform: scale(calc(100cqw / 1360px)); }
@media (max-width: 700px) {
  .loop-diagram { overflow-x: auto; }
  .blueprint-frame { aspect-ratio: unset; overflow: visible; width: max-content; }
  .blueprint-canvas { position: static; transform: none !important; }
}
.blueprint-connectors { position: absolute; inset: 0; width: 100%; height: 100%; }
.conn-path { fill: none; stroke: var(--primary); stroke-width: 1.75; stroke-dasharray: 5 5; opacity: 0.8; animation: dash-flow 1.1s linear infinite; }
.conn-fanin { opacity: 0.55; }
.conn-return { stroke: var(--primary-bright); }
.conn-feedback { stroke: var(--accent); stroke-dasharray: 4 4; animation: dash-flow 0.9s linear infinite; }
.marker-primary { fill: var(--primary-bright); }
.marker-accent { fill: var(--accent); }
@keyframes dash-flow { to { stroke-dashoffset: -18; } }
.row-kicker { position: absolute; text-align: center; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary-bright); font-weight: 600; }
.platform-frame { position: absolute; border: 1px dashed var(--border); border-radius: 16px; background: rgba(74, 144, 194, 0.03); }
.dnode { position: absolute; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.dnode h5 { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.dnode p { font-family: 'Inter', sans-serif; font-size: 11.5px; color: var(--text-dim); line-height: 1.35; margin-top: 1px; }
.dnode.external { background: var(--surface); border-style: dashed; }
.dnode.tier-ml { border-left: 3px solid var(--primary-bright); }
.dnode.tier-slm { border-left: 3px solid var(--primary); }
.dnode.tier-llm { border-left: 3px solid var(--accent); }
.dnode.hub { border-color: var(--accent); background: rgba(232, 161, 58, 0.08); align-items: center; text-align: center; }
.dnode.pulse { animation: node-pulse 2.6s ease-in-out infinite; }
@keyframes node-pulse { 0%, 100% { box-shadow: 0 0 0 rgba(106, 169, 214, 0); } 50% { box-shadow: 0 0 14px rgba(106, 169, 214, 0.45); } }
.node-badge { position: absolute; top: -10px; right: 8px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--primary-bright); background: var(--surface); border: 1px solid var(--primary); border-radius: 10px; padding: 1px 7px; }
.conn-label { position: absolute; font-size: 11px; color: var(--text-dim); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: 0.03em; background: var(--surface); padding: 2px 6px; white-space: nowrap; }
.conn-label.vertical { writing-mode: vertical-rl; transform: rotate(180deg); }
.incident-badge { position: absolute; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: var(--accent); background: rgba(232, 161, 58, 0.1); border: 1px solid var(--accent-dim); border-radius: 12px; padding: 4px 10px; white-space: nowrap; }
.loop-legend { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; margin-top: 24px; font-size: 0.9rem; color: var(--text-dim); }
.legend-item { display: flex; align-items: center; gap: 10px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-dot.proactive { background: var(--primary-bright); box-shadow: 0 0 8px rgba(106, 169, 214, 0.7); }
.legend-dot.reactive { background: var(--accent); box-shadow: 0 0 8px rgba(232, 161, 58, 0.7); }
.legend-dot.external { background: transparent; border: 1.5px dashed var(--text-dim); }
@media (prefers-reduced-motion: reduce) {
  .conn-path, .dnode.pulse { animation: none !important; }
}
.compare-wrap { overflow-x: auto; margin-bottom: 56px; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.compare-table th, .compare-table td { padding: 16px 22px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; color: var(--text-dim); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table thead th { font-family: 'Space Grotesk', sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-weight: 600; border-bottom: 1px solid var(--border); }
.compare-table th[scope="row"] { color: var(--text); font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.compare-table .col-kersev { background: rgba(74, 144, 194, 0.07); border-left: 2px solid var(--primary); color: var(--text); }
.compare-table thead th.col-kersev { color: var(--primary-bright); }
.pricing-block { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 48px 40px; margin-top: 56px; }
.pricing-block .kicker { margin-bottom: 10px; }
.pricing-block h3 { font-size: 1.5rem; margin-bottom: 16px; }
.pricing-block p { color: var(--text-dim); max-width: 640px; margin: 0 auto 28px; font-size: 1.02rem; }
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.about-grid h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; }
.about-body p { margin-bottom: 20px; color: var(--text-dim); font-size: 1.05rem; }
.about-body strong { color: var(--text); }
.contact { text-align: center; background: var(--bg-alt); border-top: 1px solid var(--border); max-width: none; padding: 96px 32px; }
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact .section-sub { margin-bottom: 40px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.85rem; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.form-field input, .form-field textarea { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.98rem; transition: border-color 0.2s; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #5a6473; }
.contact-form .btn { align-self: flex-start; margin-top: 4px; }
.contact-alt { margin-top: 28px; color: var(--text-dim); font-size: 0.95rem; }
.contact-alt a { font-weight: 600; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; transition: border-color 0.25s, transform 0.25s; }
.post-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.post-card a { display: block; padding: 28px; color: inherit; text-decoration: none; }
.post-card a:hover { text-decoration: none; }
.post-meta { font-size: 0.82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.post-card h3 { font-size: 1.25rem; margin-bottom: 10px; color: var(--text); }
.post-excerpt { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 16px; }
.post-read { color: var(--primary-bright); font-weight: 600; font-size: 0.9rem; }
.post-article { max-width: 720px; margin: 0 auto; padding: 80px 32px 96px; }
.back-link { display: inline-block; margin-bottom: 24px; font-size: 0.9rem; color: var(--text-dim); }
.back-link:hover { color: var(--primary-bright); text-decoration: none; }
.post-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 12px 0 16px; line-height: 1.15; }
.post-lede { font-size: 1.15rem; color: var(--text-dim); margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.post-body { font-size: 1.05rem; line-height: 1.75; color: var(--text); }
.post-body h2 { font-size: 1.5rem; margin: 36px 0 14px; color: var(--accent); }
.post-body p { margin-bottom: 20px; color: var(--text-dim); }
.post-body em { color: var(--text); }
.post-footer-cta { margin-top: 56px; padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-align: center; }
.post-footer-cta h3 { font-size: 1.2rem; margin-bottom: 20px; }
.legal { max-width: 760px; padding-top: 80px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 8px; }
.legal-updated { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal h2 { font-size: 1.35rem; margin: 36px 0 14px; color: var(--accent); }
.legal h3 { font-size: 1.05rem; margin: 24px 0 10px; color: var(--text); }
.legal p { margin-bottom: 16px; color: var(--text-dim); font-size: 1rem; }
.legal ul { margin: 0 0 16px 20px; color: var(--text-dim); }
.legal li { margin-bottom: 8px; }
.legal a { font-weight: 600; }
.footer { border-top: 1px solid var(--border); padding: 40px 32px; background: var(--bg); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
.footer-tag { color: var(--primary-bright); font-size: 0.95rem; }
.footer-links { display: flex; gap: 24px; font-size: 0.9rem; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--primary-bright); }
.footer-copy { color: var(--text-dim); font-size: 0.85rem; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } .about-grid { grid-template-columns: 1fr; gap: 24px; } .hero-stats { gap: 32px; } .form-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .nav { padding: 14px 18px; } .nav-links { gap: 16px; font-size: 0.85rem; } .nav-links a:not(.nav-cta) { display: none; } .section { padding: 64px 20px; } .hero { padding: 80px 20px 64px; } .post-article { padding: 48px 20px 64px; } .loop-diagram-wrap { margin-top: 40px; } .loop-diagram { padding: 18px 12px; } .loop-legend { gap: 18px 28px; } }
