/* ============================================================
   KeyVolt design system — dark SaaS, volt accent
   ============================================================ */
:root {
  --bg: #0A0F1C;
  --bg-2: #0D1424;
  --surface: #121A2E;
  --surface-2: #16203a;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #E6EBF4;
  --muted: #9AA7BD;
  --volt: #FFD84D;
  --volt-ink: #0A0F1C;
  --electric: #4CC9F0;
  --grad: linear-gradient(92deg, #FFD84D 0%, #4CC9F0 100%);
  --radius: 14px;
  --radius-lg: 20px;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shadow: 0 20px 60px rgba(2, 6, 18, 0.55);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--electric); text-decoration: none; }
a:hover { text-decoration: underline; }
/* WCAG 1.4.1: links inside text blocks must not rely on color alone.
   Scoped to content areas — nav/footer links are standalone, not in text blocks. */
main p a, main li a, main td a, .faq-a a, .cookie-banner p a, .site-footer p a { text-decoration: underline; text-underline-offset: 2px; }
img, svg { max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--volt); color: var(--volt-ink); padding: 10px 18px; border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 4px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 15, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--volt); }
.nav-menu { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: var(--font-body);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--volt); color: var(--volt-ink); box-shadow: 0 8px 28px rgba(255, 216, 77, 0.22); }
.btn-primary:hover { box-shadow: 0 10px 34px rgba(255, 216, 77, 0.32); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); background: rgba(148, 163, 184, 0.06); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto;  height: 130%;
  background:
    radial-gradient(600px 340px at 22% 18%, rgba(255, 216, 77, 0.10), transparent 60%),
    radial-gradient(700px 420px at 78% 8%, rgba(76, 201, 240, 0.12), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--electric); background: rgba(76, 201, 240, 0.10);
  border: 1px solid rgba(76, 201, 240, 0.25);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 0.88rem; color: var(--muted); }

/* dashboard mock */
.mock {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 20px; font-size: 0.88rem;
}
.mock-bar { display: flex; align-items: center; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mock-dot:first-child { background: #f87171; } .mock-dot:nth-child(2) { background: var(--volt); } .mock-dot:nth-child(3) { background: #4ade80; }
.mock-title { margin-left: 8px; color: var(--muted); font-weight: 500; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 8px; border-bottom: 1px solid var(--line); }
.mock-row:last-child { border-bottom: 0; }
.mock-order { color: var(--muted); font-variant-numeric: tabular-nums; }
.mock-sku { font-weight: 600; }
.pill { padding: 3px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: rgba(74, 222, 128, 0.12); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }
.pill-run { background: rgba(255, 216, 77, 0.12); color: var(--volt); border: 1px solid rgba(255, 216, 77, 0.3); }
.pill-soon { background: rgba(148, 163, 184, 0.12); color: var(--muted); border: 1px solid var(--line-strong); }

/* ---------- vendor strip ---------- */
.vendors { border-block: 1px solid var(--line); background: var(--bg-2); padding: 22px 0; }
.vendors-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 34px; }
.vendors-label { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.vendor { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--text); opacity: 0.85; }
.vendor .soon { font-size: 0.72rem; color: var(--volt); vertical-align: super; margin-left: 4px; }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.06rem; }

/* ---------- cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h3 { margin-top: 18px; }
.card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 0; }
.icon-chip {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 216, 77, 0.10); border: 1px solid rgba(255, 216, 77, 0.22);
}
.icon-chip svg { width: 24px; height: 24px; stroke: var(--volt); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- compare (differentiator) ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compare-col { border-radius: var(--radius-lg); padding: 32px 30px; border: 1px solid var(--line); background: var(--surface); }
.compare-col.win { border-color: rgba(255, 216, 77, 0.45); background: linear-gradient(180deg, rgba(255, 216, 77, 0.05), var(--surface)); }
.compare-col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.compare-col ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.compare-col li { display: flex; gap: 10px; color: var(--muted); font-size: 0.97rem; }
.compare-col li::before { content: "✕"; color: #f87171; font-weight: 700; flex: 0 0 auto; }
.compare-col.win li::before { content: "✓"; color: #4ade80; }
.compare-col.win li { color: var(--text); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; }
.step-num {
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--volt); color: var(--volt-ink); margin-bottom: 18px;
}
.step p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- split band ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .lead { color: var(--muted); font-size: 1.05rem; }
.split ul.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.split ul.checks li { display: flex; gap: 12px; align-items: baseline; }
.split ul.checks li::before { content: "✓"; color: var(--volt); font-weight: 700; }

/* portal mock */
.portal-mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; font-size: 0.88rem; }
.portal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.portal-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.portal-row:last-child { border-bottom: 0; }
.portal-key { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px 30px; }
.plan.featured { border-color: rgba(255, 216, 77, 0.55); background: linear-gradient(180deg, rgba(255, 216, 77, 0.06), var(--surface)); }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--volt); color: var(--volt-ink); font-size: 0.75rem; font-weight: 700;
  padding: 4px 14px; border-radius: 999px; letter-spacing: 0.04em; white-space: nowrap;
}
.plan h3 { font-size: 1.25rem; }
.plan-price { font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; margin: 8px 0 2px; }
.plan-price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan-tag { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 11px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 0.95rem; color: var(--muted); }
.plan li::before { content: "✓"; color: var(--volt); font-weight: 700; flex: 0 0 auto; }
.plan .btn { width: 100%; }
.pricing-note { text-align: center; color: var(--muted); font-size: 0.9rem; max-width: 56em; margin: 28px auto 0; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: none; border: 0; color: var(--text); font: 600 1rem var(--font-body);
  padding: 20px 24px; cursor: pointer; text-align: left;
}
.faq-q .chev { transition: transform 0.2s ease; color: var(--volt); flex: 0 0 auto; }
.faq-item[data-open] .faq-q .chev { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 24px 20px; color: var(--muted); }
.faq-item[data-open] .faq-a { display: block; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 90px 0; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(560px 300px at 50% 0%, rgba(255, 216, 77, 0.10), transparent 65%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.cta-band p { color: var(--muted); max-width: 38em; margin: 0 auto 30px; }

/* ---------- page hero (interior) ---------- */
.page-hero { padding: 76px 0 20px; }
.page-hero p.lead { color: var(--muted); font-size: 1.12rem; max-width: 44em; }

/* ---------- feature rows ---------- */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: 0; }
.frow p { color: var(--muted); }
.frow .visual { min-height: 200px; }

/* ---------- forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; max-width: 640px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font: 400 1rem var(--font-body);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--volt); outline-offset: 0; border-color: transparent; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.alert { border-radius: 10px; padding: 16px 20px; margin-bottom: 24px; font-weight: 500; }
.alert-ok { background: rgba(74, 222, 128, 0.10); border: 1px solid rgba(74, 222, 128, 0.35); color: #4ade80; }
.alert-err { background: rgba(248, 113, 113, 0.10); border: 1px solid rgba(248, 113, 113, 0.35); color: #f87171; }
.validation-msg { color: #f87171; font-size: 0.85rem; }

/* ---------- prose (legal) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose p, .prose li { color: var(--muted); }
.prose .updated { font-size: 0.9rem; color: var(--muted); font-style: italic; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
.footer-brand p { color: var(--muted); font-size: 0.95rem; margin-top: 14px; max-width: 30em; }
.footer-col h2 { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text); font-size: 0.95rem; }
.footer-col a:hover { color: var(--volt); text-decoration: none; }
.footer-legal { border-top: 1px solid var(--line); padding-top: 24px; }
.footer-legal p { color: var(--muted); font-size: 0.85rem; margin: 0 0 6px; }
.tm-note { opacity: 0.75; }

/* ---------- articles ---------- */
.article-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.article-card:hover { text-decoration: none; }
.article-card h3 { margin: 0; line-height: 1.35; }
.article-tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--electric); }
.article-more { color: var(--volt); font-weight: 600; font-size: 0.92rem; margin-top: auto; }
.article-meta { font-size: 0.88rem; color: var(--muted); margin-bottom: 24px; }
.article h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.article .lead-p { font-size: 1.12rem; color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--text); font-weight: 600; background: var(--surface); }
.prose td { color: var(--muted); }
.prose td:first-child { color: var(--text); }

/* ---------- builder band ---------- */
.builder-band {
  background: linear-gradient(180deg, rgba(255, 216, 77, 0.05), var(--surface));
  border: 1px solid var(--line); border-left: 3px solid var(--volt);
  border-radius: var(--radius-lg); padding: 40px 44px; max-width: 820px;
}
.builder-band h2 { margin-bottom: 0.6em; }
.builder-band p { color: var(--muted); max-width: 60ch; }
.builder-band p:last-child { margin-bottom: 0; }
.footer-builder { font-size: 0.9rem !important; }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: sticky; bottom: 0; z-index: 60;
  background: var(--surface-2); border-top: 1px solid var(--line-strong);
  box-shadow: 0 -12px 40px rgba(2, 6, 18, 0.5);
}
.cookie-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cookie-inner p { margin: 0; flex: 1 1 380px; font-size: 0.92rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 18px; font-size: 0.92rem; }
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text); font: inherit; font-size: 0.95rem;
}
.linklike:hover { color: var(--volt); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .frow { grid-template-columns: 1fr; gap: 40px; }
  .grid-3, .steps, .plans { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .grid-3, .grid-2, .steps, .plans, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 60px 0; }
}
@media (max-width: 860px) {
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; margin-left: auto;
    background: none; border: 0; padding: 10px; cursor: pointer;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); transition: transform 0.2s ease, opacity 0.2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-menu {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 12px 24px 20px;
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding: 13px 0; font-size: 1.05rem; }
  .nav-cta { margin-top: 12px; }
}
