/* ==========================================================================
   AetherGuide — Design tokens
   ========================================================================== */
:root {
  --bg: #0D1117;
  --bg-card: #111827;
  --bg-card-alt: #1A2330;
  --line: #22303f;
  --line-soft: #1a2530;

  --accent: #2853B3;
  --accent-light: #7B9FCB;
  --success: #4C9A6A;
  --warning: #C99A52;
  --danger: #C0605A;

  --text: #F1F5F9;
  --muted: #94A3B8;
  --muted-dim: #64748B;

  /* Muted instrument-panel arc colors, distinct from the semantic tokens above */
  --gauge-bad: rgba(176, 90, 82, 0.7);
  --gauge-mid: rgba(184, 140, 78, 0.7);
  --gauge-good: rgba(90, 150, 110, 0.75);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1160px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

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

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Decorative background field
   ========================================================================== */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.bg-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 55%, transparent 85%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 55%, transparent 85%);
}
.bg-glow {
  position: absolute;
  top: -280px;
  right: -220px;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(59,99,173,0.16) 0%, rgba(59,99,173,0) 68%);
  filter: blur(10px);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,17,23,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 11px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}
.site-nav a { transition: color 0.15s ease; }
.site-nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  font-size: 14px;
}
.nav-cta:hover { color: var(--accent-light) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #3B63AD, #24447F);
  color: #F8FAFC;
  box-shadow: 0 6px 16px rgba(20,35,70,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,35,70,0.42); }
.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--muted); background: rgba(255,255,255,0.05); }

/* ==========================================================================
   Eyebrow / headings
   ========================================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin: 0 0 14px;
}
h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin-bottom: 16px;
}
.section-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 16.5px;
  margin-bottom: 12px;
}
.section-lead-muted { color: var(--muted-dim); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: 80px 0 78px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.08;
  margin: 0 0 20px;
}
.hero-sub {
  font-size: 19px;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 480px;
}
.hero-support {
  font-size: 15.5px;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 34px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- Device / gauge card ---- */
.hero-visual { display: flex; justify-content: center; }
.device-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, var(--bg-card-alt), var(--bg-card));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 26px 22px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.device-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.device-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(90,150,110,0.16);
}
.device-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gauge-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 4px;
}
.gauge { width: 100%; max-width: 260px; }
.gauge-arc { fill: none; stroke-width: 12; stroke-linecap: round; }
.gauge-arc-bad { stroke: var(--gauge-bad); }
.gauge-arc-mid { stroke: var(--gauge-mid); }
.gauge-arc-good { stroke: var(--gauge-good); }
.gauge-needle { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.gauge-hub { fill: var(--text); }

.gauge-readout {
  margin-top: -14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.gauge-value {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 600;
  color: var(--text);
}
.gauge-percent { font-size: 20px; color: var(--muted); }
.badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.badge-good { color: var(--success); background: rgba(90,150,110,0.12); border: 1px solid rgba(90,150,110,0.32); }

.device-data {
  margin: 20px 0 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.device-data div { display: flex; flex-direction: column; gap: 3px; }
.device-data dt {
  font-size: 11px;
  color: var(--muted-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.device-data dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}
.device-link {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 500;
}
.device-link:hover { text-decoration: underline; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 88px 0; border-top: 1px solid var(--line-soft); }
.section-alt { background: rgba(17,24,39,0.4); }

.card-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(59,99,173,0.14);
  color: var(--accent-light);
  font-size: 17px;
  margin-top: 1px;
}
.card-body { min-width: 0; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ---- Steps ---- */
.steps {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
.step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 24px 0 0;
}
.step:not(:first-child) { padding-left: 24px; border-left: 1px solid var(--line); }
.step-tick {
  display: inline-block;
  flex-shrink: 0;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
}
.step-body { min-width: 0; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---- Audience list ---- */
.audience-list {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.audience-list li {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
}

/* ---- FAQ ---- */
.faq-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 20px;
}
.faq-item + .faq-item { margin-top: 0; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-light); }
.faq-icon {
  flex-shrink: 0;
  position: relative;
  width: 14px;
  height: 14px;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--muted);
  border-radius: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.faq-icon::before { top: 6px; left: 0; width: 14px; height: 2px; }
.faq-icon::after { top: 0; left: 6px; width: 2px; height: 14px; }
.faq-item[open] .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-item[open] summary { color: var(--accent-light); }
.faq-item p {
  color: var(--muted);
  font-size: 14.5px;
  padding: 0 0 20px;
  max-width: 62ch;
}

/* ---- Legal / Privacy page ---- */
.legal-back {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}
.legal-back:hover { color: var(--accent-light); }
.legal-intro { padding-bottom: 48px; }
.page-title {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 14px;
}
.legal-updated {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted-dim);
  margin-top: 14px;
}
.legal-wrap { max-width: 720px; }
.legal-block {
  padding: 32px 0;
  border-top: 1px solid var(--line-soft);
}
.legal-block:first-child { border-top: none; padding-top: 0; }
.legal-block h2 { font-size: 19px; margin-bottom: 14px; }
.legal-block p {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 62ch;
  margin-bottom: 12px;
}
.legal-block p:last-child { margin-bottom: 0; }
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 14px;
}
.legal-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  font-size: 14.5px;
}
.legal-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-family: var(--font-mono);
}
.legal-contact {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--accent-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
}
.legal-contact:hover { border-color: var(--accent-light); }
.legal-contact-label { margin-top: 20px; }
.legal-outro { padding: 32px 0 64px; border-top: none; }

/* ---- Callouts ---- */
.callout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.callout {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.callout h3 { font-size: 19px; margin-bottom: 14px; }
.callout p { color: var(--muted); font-size: 14.5px; margin-bottom: 12px; }
.callout p:last-of-type { margin-bottom: 20px; }
.callout-beta {
  background: linear-gradient(160deg, rgba(59,99,173,0.08), var(--bg-card) 55%);
  border-color: rgba(59,99,173,0.25);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line-soft); padding: 48px 0 28px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-name { font-size: 15px; }
.footer-brand .brand-tag { font-family: var(--font-mono); font-size: 11px; color: var(--muted-dim); }
.footer-links { display: flex; gap: 24px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12.5px; color: var(--muted-dim); border-top: 1px solid var(--line-soft); padding-top: 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .card-grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 18px 20px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step:not(:first-child) { padding-left: 0; border-left: none; }
  .callout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line-soft);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px 20px 20px;
    display: none;
  }
  .site-nav.open { display: flex; }

  /* Normalize every nav row, including the Contact/Beta pill, to the same
     menu-row treatment while the mobile menu is expanded. */
  .site-nav.open a {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
    color: var(--text);
    font-size: 14px;
    text-align: left;
  }
  .site-nav.open a:hover {
    border-color: var(--muted);
    background: rgba(255,255,255,0.05);
  }
  .site-nav.open .nav-cta {
    color: var(--text) !important;
    width: 100%;
  }
  .site-nav.open .nav-cta:hover {
    color: var(--text) !important;
    border-color: var(--accent-light);
  }

  .nav-toggle { display: flex; }
  .hero { padding: 48px 0 52px; }
  .section { padding: 60px 0; }
  .device-data { grid-template-columns: 1fr 1fr; }
}
