/* ============================================================
   SPYPLATES — ATLAS INTELLIGENCE DESIGN SYSTEM
   Modern tactical atlas · dark mode · serif/sans/mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Surfaces — deep navy field */
  --bg-900: #060a12;
  --bg-850: #080d18;
  --bg-800: #0a111f;
  --bg-700: #0e1626;
  --bg-650: #111c30;
  --bg-600: #15213a;
  --bg-card: #0f1929;

  /* Lines */
  --line: rgba(150,172,210,0.11);
  --line-2: rgba(150,172,210,0.18);
  --line-3: rgba(150,172,210,0.30);

  /* Ink */
  --ink-100: #eef3fb;
  --ink-200: #d3dcec;
  --ink-300: #aab6cc;
  --ink-400: #7e8da8;
  --ink-500: #5d6c86;
  --ink-600: #44516a;

  /* Accents */
  --amber: #f4b73c;
  --amber-2: #ffce63;
  --amber-deep: #c98a17;
  --amber-glow: rgba(244,183,60,0.16);
  --green: #4cd991;
  --green-2: #7ff0b4;
  --green-deep: #1c8a55;
  --green-glow: rgba(76,217,145,0.14);
  --red: #e35640;
  --cyan: #5fc8ec;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 18px 40px -24px rgba(0,0,0,0.9);
  --shadow-pop: 0 30px 70px -30px rgba(0,0,0,0.95);

  /* Type */
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg-800);
  color: var(--ink-300);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--amber); color: #1a1206; }

/* ---------- Atmosphere ---------- */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 80%);
}
.glow-amber, .glow-green {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(90px); opacity: 0.5;
}
.glow-amber { top: -180px; left: 50%; width: 700px; height: 500px;
  transform: translateX(-50%); background: radial-gradient(circle, var(--amber-glow), transparent 70%); }
.glow-green { top: 60vh; right: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, var(--green-glow), transparent 70%); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); position: relative; z-index: 1; }
section { position: relative; z-index: 1; }
.section { padding: clamp(72px, 11vw, 130px) 0; }

/* ---------- Type ---------- */
h1,h2,h3,h4 { font-family: var(--serif); color: var(--ink-100); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--amber);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--amber); opacity: 0.7;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow .tag {
  color: var(--ink-500); border: 1px solid var(--line-2); border-radius: 3px;
  padding: 1px 6px; letter-spacing: 0.14em; white-space: nowrap;
}

.section-title { font-size: clamp(30px, 4.6vw, 52px); color: var(--ink-100); max-width: 18ch; }
.section-title.center { margin-inline: auto; text-align: center; max-width: 22ch; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-300); max-width: 60ch; line-height: 1.6; }
.section-head { margin-bottom: clamp(40px, 6vw, 68px); }
.section-head.center { text-align: center; }
.section-head .eyebrow { margin-bottom: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 15.5px;
  padding: 14px 22px; border-radius: 11px; line-height: 1;
  transition: transform .18s ease, box-shadow .25s ease, background .2s, border-color .2s, color .2s;
  white-space: nowrap; position: relative;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--amber-2), var(--amber));
  color: #20160a; box-shadow: 0 10px 26px -10px var(--amber-glow), 0 0 0 1px rgba(244,183,60,0.4);
}
.btn-primary:hover { box-shadow: 0 14px 34px -8px rgba(244,183,60,0.45), 0 0 0 1px rgba(255,206,99,0.6); transform: translateY(-2px); }
.btn-ghost { color: var(--ink-200); border: 1px solid var(--line-2); background: rgba(255,255,255,0.015); }
.btn-ghost:hover { border-color: var(--line-3); color: var(--ink-100); background: rgba(255,255,255,0.04); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn .apple { width: 17px; height: 20px; fill: currentColor; }
.btn .sub { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1; text-align: left; }
.btn .sub .s1 { font-size: 10px; font-weight: 500; opacity: 0.8; letter-spacing: 0.02em; }
.btn .sub .s2 { font-size: 16px; font-weight: 700; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)) , var(--bg-card);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card); position: relative;
}

/* bracket corners */
.brackets::before, .brackets::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border-color: var(--amber); opacity: 0.55;
}
.brackets::before { top: 10px; left: 10px; border-top: 1.5px solid; border-left: 1.5px solid; }
.brackets::after { bottom: 10px; right: 10px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-300); border: 1px solid var(--line-2); border-radius: 100px; padding: 5px 11px;
  background: rgba(255,255,255,0.02);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* ---------- Dotted highway divider ---------- */
.highway {
  height: 2px; width: 100%; border: none;
  background: repeating-linear-gradient(90deg, var(--line-3) 0 16px, transparent 16px 32px);
  opacity: 0.6;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav.scrolled { background: rgba(8,13,24,0.78); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .name { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ink-100); letter-spacing: 0.01em; }
.brand .name b { color: var(--amber); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14.5px; color: var(--ink-400); transition: color .2s; font-weight: 500; }
.nav-links a:hover { color: var(--ink-100); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 10px;
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle span { width: 17px; height: 1.7px; background: var(--ink-200); border-radius: 2px; }

/* Mobile slide-down menu (shared across all pages) */
.mobile-menu { position: fixed; inset: 68px 0 0; z-index: 55; background: var(--bg-850); padding: 28px var(--pad); display: none; flex-direction: column; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--serif); font-size: 24px; color: var(--ink-200); padding: 14px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 22px; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(56px,7vw,80px) 0 40px; background: var(--bg-850); position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 16px; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer a { font-size: 14.5px; color: var(--ink-400); transition: color .2s; }
.footer a:hover { color: var(--amber); }
.footer .blurb { font-size: 14px; color: var(--ink-500); max-width: 34ch; margin: 16px 0 0; line-height: 1.6; }
.footer-coords { font-family: var(--mono); font-size: 12px; color: var(--ink-600); margin-top: 18px; letter-spacing: 0.05em; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line); }
.footer-bottom p { font-size: 13px; color: var(--ink-600); }
.footer-bottom .mono { font-size: 12px; letter-spacing: 0.08em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ============================================================
   DOC PAGES (privacy / terms / support)
   ============================================================ */
.doc-hero { padding: clamp(56px,8vw,96px) 0 clamp(32px,4vw,48px); border-bottom: 1px solid var(--line); }
.doc-hero .eyebrow { margin-bottom: 18px; }
.doc-hero h1 { font-size: clamp(34px, 5vw, 56px); }
.doc-hero .meta { font-family: var(--mono); font-size: 13px; color: var(--ink-500); margin-top: 18px; letter-spacing: 0.04em; }
.doc-layout { display: grid; grid-template-columns: 230px 1fr; gap: 56px; align-items: start; padding: clamp(40px,6vw,72px) 0 clamp(72px,10vw,120px); }
.doc-toc { position: sticky; top: 92px; }
.doc-toc h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 14px; }
.doc-toc ul { list-style: none; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--line); }
.doc-toc a { display: block; font-size: 13.5px; color: var(--ink-400); padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; transition: color .2s, border-color .2s; }
.doc-toc a:hover, .doc-toc a.active { color: var(--ink-100); border-left-color: var(--amber); }
.doc-body { max-width: 70ch; }
.doc-body h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 48px 0 14px; padding-top: 8px; scroll-margin-top: 92px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 18px; font-family: var(--sans); font-weight: 700; color: var(--ink-100); margin: 28px 0 8px; }
.doc-body p { margin-bottom: 16px; color: var(--ink-300); }
.doc-body ul, .doc-body ol { margin: 0 0 18px 0; padding-left: 22px; color: var(--ink-300); }
.doc-body li { margin-bottom: 9px; }
.doc-body strong { color: var(--ink-100); font-weight: 600; }
.doc-body a.link { color: var(--amber); border-bottom: 1px solid rgba(244,183,60,0.3); }
.doc-body a.link:hover { border-bottom-color: var(--amber); }
.doc-note { border: 1px solid var(--line-2); border-left: 3px solid var(--amber); background: rgba(244,183,60,0.04); border-radius: 8px; padding: 16px 20px; margin: 22px 0; }
.doc-note p { margin: 0; font-size: 15px; color: var(--ink-200); }
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; gap: 0; } .doc-toc { display: none; } }
