/* ==========================================================================
   Airgap — design system
   Light, technical/blueprint aesthetic. System fonts only (no external
   requests for type — consistent with "nothing leaves your device").
   ========================================================================== */

:root {
  --bg: #090d16;
  --surface: rgba(20, 27, 45, 0.7);
  --ink: #ffffff;
  --ink-soft: #9ca3af;
  --ink-faint: #6b7280;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --accent: #3b82f6;
  --accent-ink: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --focus: #3b82f6;

  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 8px;
  --radius: 16px;
  --container: 1120px;
  --header-h: 76px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }
.ink { color: var(--ink); }

code, pre, kbd { font-family: var(--mono); }
code {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface); border-color: var(--ink-soft); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--accent-ink); padding: 11px 4px; }
.btn-ghost:hover { color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(9, 13, 22, 0.75); /* Switched to dark background */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px; overflow-y: auto; transform: translateX(100%); transition: transform 180ms ease; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { width: 100%; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-cta .btn-secondary { display: none; }
  .nav-toggle { display: inline-flex; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; }
}

/* ---- Hero ---- */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow-line { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-family: var(--mono); font-size: 0.82rem; margin-bottom: 18px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.hero p.lead { font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.85rem; color: var(--ink-faint); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---- Boundary diagram (signature hero element) ---- */
.boundary-diagram { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.boundary-diagram svg { width: 100%; height: auto; }

/* ---- Category / feature grid ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card, .panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.card { border-left: 3px solid var(--accent); }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.94rem; }

.cat-audio { border-left-color: #0f7c6c; }
.cat-privacy { border-left-color: #6a4fb6; }
.cat-dev { border-left-color: #b8860b; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--ink-soft); background: var(--surface);
}
.badge-live { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.badge-soon { color: var(--ink-faint); }

/* ---- Section headers ---- */
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-bottom: 0; }

/* ---- Tool cards on hub ---- */
.tool-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tool-card .btn { margin-top: auto; align-self: flex-start; }
.tool-icon { color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--radius-sm); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; flex: none; margin-bottom: 4px; }
.tool-benefit { font-size: 0.85rem; color: var(--accent-ink); font-weight: 600; margin-bottom: 0; }
.tool-quote { border-left: 2px solid var(--line-strong); padding-left: 12px; margin: 4px 0 0; font-size: 0.85rem; font-style: italic; color: var(--ink-faint); }
.tool-quote cite { display: block; font-style: normal; font-size: 0.78rem; color: var(--ink-faint); margin-top: 4px; }

/* ---- Pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price-card .plan-name { font-family: var(--mono); font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 4px; }
.price-amount { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; margin: 6px 0 2px; }
.price-amount span { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
.price-blurb { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 20px; }
.feature-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feature-list li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--ink); align-items: flex-start; }
.feature-list li svg { flex: none; margin-top: 3px; }
.price-card .btn { margin-top: auto; }
.popular-flag { position: absolute; margin-top: -46px; margin-left: -1px; background: var(--warn); color: #fff; font-family: var(--mono); font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

.compare-table { width: 100%; border-collapse: collapse; margin-top: 56px; font-size: 0.92rem; }
.compare-table th, .compare-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.compare-table th { font-family: var(--mono); font-weight: 600; color: var(--ink-soft); font-size: 0.82rem; }
.compare-table td:not(:first-child), .compare-table th:not(:first-child) { text-align: center; }
.compare-table tr td:first-child { color: var(--ink); }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--mono); font-size: 1.2rem; color: var(--ink-faint); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 18px; margin: 0; }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 0.8rem; color: var(--ink-faint); margin-top: 5px; }
.field .error-text { font-size: 0.8rem; color: var(--danger); margin-top: 5px; display: none; }
.field.invalid .error-text { display: block; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
input, textarea, select {
  width: 100%; font-family: var(--sans); font-size: 0.95rem;
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.form-status { font-size: 0.9rem; padding: 12px 14px; border-radius: var(--radius-sm); margin-top: 14px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent); }
.form-status.err { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }

/* ---- Alert / banner ---- */
.alert { border-radius: var(--radius-sm); border: 1px solid var(--line-strong); padding: 14px 16px; font-size: 0.9rem; }
.alert-info { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.alert-danger { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-col h4 { font-size: 0.8rem; text-transform: none; color: var(--ink-faint); margin-bottom: 14px; font-family: var(--mono); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-soft); font-size: 0.9rem; text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-brand p { font-size: 0.88rem; max-width: 34ch; }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a { color: var(--ink-soft); display: inline-flex; }
.footer-social a:hover { color: var(--accent-ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-faint); flex-wrap: wrap; gap: 12px; }
.footer-bottom a { color: var(--ink-faint); }

/* ---- Floating support widget ---- */
.support-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(17,22,29,0.28);
}
.support-launcher:hover { background: var(--accent-ink); }
.support-panel {
  position: fixed; right: 20px; bottom: 86px; z-index: 60;
  width: min(360px, calc(100vw - 40px)); max-height: min(520px, calc(100vh - 140px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(17,22,29,0.18);
  display: none; flex-direction: column; overflow: hidden;
}
.support-panel.open { display: flex; }
.support-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.support-head h4 { margin: 0; font-size: 0.95rem; }
.support-close { background: none; border: none; cursor: pointer; color: var(--ink-faint); padding: 4px; }
.support-tabs { display: flex; border-bottom: 1px solid var(--line); }
.support-tab { flex: 1; background: none; border: none; padding: 12px; font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--ink-faint); cursor: pointer; border-bottom: 2px solid transparent; }
.support-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.support-body { padding: 16px 18px; overflow-y: auto; }
.support-step { display: none; }
.support-step.active { display: block; }
.support-discord { text-align: center; padding: 6px 0 4px; }
.support-discord p { font-size: 0.88rem; margin-bottom: 16px; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small-print { font-size: 0.8rem; color: var(--ink-faint); }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.legal-doc h2 { margin-top: 2em; }
.legal-doc h3 { margin-top: 1.4em; }
.legal-doc { max-width: 78ch; }
.legal-meta { color: var(--ink-faint); font-size: 0.88rem; margin-bottom: 40px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 22px; margin-bottom: 40px; }
.toc h2 { font-size: 0.9rem; margin-bottom: 10px; }
.toc ul { margin: 0; padding-left: 20px; font-size: 0.9rem; }
.toc li { margin-bottom: 4px; }

/* ---- Tool workbench shared ---- */
.workbench { display: grid; grid-template-columns: 1fr; gap: 24px; }
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; background: var(--surface); cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-input-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.status-line { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-soft); }
.progress-track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 160ms ease; }
.tool-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; margin-bottom: 14px; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 0.86rem; color: var(--accent-ink); margin-bottom: 24px; }
.privacy-note svg { flex: none; margin-top: 2px; }
.output-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.output-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.9rem; gap: 12px; }
.output-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .hero { padding: 40px 0 40px; }
}
