/* Apex Zone — shared brand styles for the public pages (landing + legal).
 * Tokens lifted verbatim from the brand guide
 * (design_handoff_apex_zone_brand). Dark Obsidian base, Voltage accent
 * used sparingly (<=6% of surface), sharp 2px radii, Archivo Black
 * wordmark / Archivo headings / Inter body / JetBrains Mono eyebrows. */

:root {
  --obsidian: #07080a;
  --carbon: #0e1014;
  --steel: #15181f;
  --gunmetal: #1c2029;
  --slate: #2a2f3b;
  --ash: #454b5a;
  --fog: #8b92a5;
  --mist: #b8bec9;
  --cloud: #e6e9f0;
  --summit: #ffffff;

  --voltage: #d4ff3a;
  --voltage-deep: #9fcc1f;
  --ion: #00e5ff;
  --ember: #ffb400;
  --plasma: #ff4d1f;

  --grad-apex-spectrum: linear-gradient(
    90deg,
    #0e1014 0%,
    #00e5ff 22%,
    #d4ff3a 50%,
    #ffb400 78%,
    #ff4d1f 100%
  );

  --font-display: 'Archivo Black', 'Archivo', system-ui, sans-serif;
  --font-sans: 'Archivo', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--cloud);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--voltage);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---- Shared site header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand svg {
  display: block;
  height: 24px;
  width: auto;
}
.brand .wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--summit);
  line-height: 1;
}
.brand .wordmark .zone {
  color: var(--voltage);
}
.site-nav {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--fog);
}
.site-nav a:hover {
  color: var(--voltage);
  text-decoration: none;
}

/* ---- Eyebrow / labels ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--voltage);
  margin: 0 0 12px;
}

/* ---- Hero (landing) ---- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 24px 56px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--summit);
  margin: 0 0 20px;
}
.hero h1 .dot {
  color: var(--voltage);
}
.hero .lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--mist);
  max-width: 620px;
  margin: 0 0 32px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.btn-volt {
  display: inline-block;
  background: var(--voltage);
  color: var(--obsidian);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  padding: 14px 24px;
  border-radius: 4px;
}
.btn-volt:hover {
  background: var(--voltage-deep);
  text-decoration: none;
}
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fog);
  border: 1px solid var(--slate);
  border-radius: 999px;
  padding: 10px 16px;
}
.badge-soon::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--voltage);
}

/* ---- Apex spectrum zone bar ---- */
.spectrum {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 0 24px;
}
.spectrum .bar {
  height: 8px;
  border-radius: 2px;
  background: var(--grad-apex-spectrum);
}
.spectrum .zones {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
}

/* ---- Pillars / features ---- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px;
}
.pillars {
  display: grid;
  /* 300px min → 3 comfortable columns in the 1080 frame (was 220px →
   * 4 skinny columns where titles wrapped to 3 lines). Collapses to
   * 2-up on tablets, 1-up on phones. */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--steel);
  border: 1px solid var(--slate);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.card-preview {
  /* Inline-SVG mockup that mirrors the in-app surface for the card's
   * feature. Sits above the headline so the eye registers visual + text
   * together. The dark inner background isolates the mockup from the
   * card's steel surface — gives the same "device frame" feeling the
   * app itself has against the obsidian background. */
  background: var(--carbon);
  border: 1px solid var(--gunmetal);
  border-radius: 6px;
  padding: 14px 16px;
  margin: -4px -4px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.card-preview svg {
  width: 100%;
  height: auto;
  max-height: 140px;
  display: block;
}
.card h3 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--summit);
  margin: 0 0 8px;
}
.card p {
  color: var(--fog);
  font-size: 15px;
  margin: 0;
}

/* ---- Shared footer ---- */
.site-footer {
  border-top: 1px solid var(--slate);
  margin-top: 32px;
}
.site-footer .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: baseline;
}
.site-footer .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer .legal-links a {
  color: var(--fog);
}
.site-footer .copy {
  color: var(--ash);
  font-size: 13px;
}

/* ---- Legal document pages ---- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.legal h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.02em;
  color: var(--summit);
  margin: 0 0 6px;
}
.legal h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--summit);
  margin: 40px 0 0;
}
.legal h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--mist);
  margin: 24px 0 0;
}
.legal p,
.legal li {
  color: var(--mist);
  font-size: 15.5px;
}
.legal ul {
  padding-left: 22px;
}
.legal .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fog);
  margin: 0 0 28px;
}
.legal strong {
  color: var(--cloud);
}
.legal code {
  font-family: var(--font-mono);
  background: var(--carbon);
  border: 1px solid var(--slate);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}
.legal .placeholder {
  background: rgba(255, 180, 0, 0.14);
  border-bottom: 1px dashed var(--ember);
  color: var(--ember);
  padding: 0 4px;
}

/* ---- Blog ---- */
.blog-head {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 8px;
}
.blog-head h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.02em;
  color: var(--summit);
  margin: 8px 0 10px;
}
.blog-head p {
  color: var(--mist);
  font-size: 17px;
  max-width: 620px;
  margin: 0;
}
.blog-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--steel);
  border: 1px solid var(--slate);
  border-radius: 8px;
  padding: 24px;
}
.post-card:hover {
  border-color: var(--ash);
  text-decoration: none;
}
.post-card .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--voltage-deep);
}
.post-card h2 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--summit);
  margin: 0;
  line-height: 1.25;
}
.post-card p {
  color: var(--fog);
  font-size: 14.5px;
  margin: 0;
}
.post-card .read {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--voltage);
}

/* Article page (reuses .legal prose column) */
.post .post-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fog);
  margin: 0 0 28px;
}
.post .post-meta .tag {
  color: var(--voltage-deep);
}
.post .lede {
  font-size: 18px;
  color: var(--cloud);
  margin: 0 0 24px;
}
.post-cta {
  background: var(--steel);
  border: 1px solid var(--slate);
  border-left: 3px solid var(--voltage);
  border-radius: 8px;
  padding: 24px;
  margin: 40px 0 8px;
}
.post-cta h3 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 18px;
  color: var(--summit);
  margin: 0 0 6px;
}
.post-cta p {
  color: var(--mist);
  font-size: 15px;
  margin: 0 0 14px;
}
.related {
  border-top: 1px solid var(--slate);
  margin-top: 48px;
  padding-top: 24px;
}
.related .eyebrow {
  margin-bottom: 14px;
}
.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.related a {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
}

/* ── Mobile nav (hamburger) ───────────────────────────────────────
   nav.js injects a .nav-toggle into .site-header and adds .has-nav-js to
   <html>. With JS, on phones the nav collapses into a dropdown behind the
   hamburger. Without JS it falls back to wrapping (links stay visible). */
.nav-toggle { display: none; }
@media (max-width: 640px) {
  .site-header { position: relative; padding: 16px 18px; }

  /* No-JS fallback: let the nav wrap so links never overflow. */
  .site-nav { flex-wrap: wrap; gap: 10px 16px; font-size: 11px; letter-spacing: 0.1em; }

  /* With JS: hamburger button + dropdown nav. */
  .has-nav-js .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: transparent;
    border: 0;
    cursor: pointer;
  }
  .has-nav-js .nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--mist);
    transition: transform 0.2s, opacity 0.2s;
  }
  .has-nav-js .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .has-nav-js .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .has-nav-js .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .has-nav-js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--carbon);
    border-bottom: 1px solid var(--slate);
    padding: 6px 18px 14px;
    z-index: 50;
  }
  .has-nav-js .site-nav.open { display: flex; }
  .has-nav-js .site-nav a {
    padding: 13px 0;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}
