/* ============================================================
   FRONTIER/1 — shared stylesheet
   Tokens, reset, type scale, nav, footer, primitives.
   Page-specific layout goes in <style> tags per page.
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --bg: #000;
  --bg-card: #0a0a0c;
  --fg: #ffffff;
  --fg-dim: #c5c8cc;
  --fg-body: #b9b9bd;
  --fg-muted: #8b8e92;
  --fg-faint: #5a5d61;
  --rule: rgba(255, 255, 255, 0.16);
  --rule-dim: rgba(255, 255, 255, 0.08);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;

  --pad-x: clamp(20px, 4vw, 80px);
  --section-pad-y: clamp(80px, 10vw, 180px);
  --max-w: 1760px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- LAYOUT ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- TYPE PRIMITIVES ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.78vw, 13px);
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-block;
}
.eyebrow .sep { padding: 0 6px; opacity: 0.7; }

.h-display {
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.h-section {
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.lede {
  font-size: clamp(18px, 1.55vw, 28px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--fg-dim);
  font-weight: 400;
}
.body {
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.6;
  color: var(--fg-body);
  font-weight: 400;
}
.body strong, .lede strong { color: var(--fg); font-weight: 500; }

/* italic serif span — used for accent words like "Token." */
.italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

/* ---------- BUTTON ---------- */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 40px);
  padding: clamp(14px, 1.2vw, 18px) clamp(20px, 1.8vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.78vw, 12.5px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 150ms, border-color 150ms;
  white-space: nowrap;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.75); }
.btn-ghost .arrow { opacity: 0.85; }

/* ---------- NAV (top + bottom) ---------- */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-block: clamp(18px, 2vw, 32px);
}
.nav .brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
}
.nav .brand-logo {
  display: block;
  height: clamp(18px, 1.35vw, 21px);
  width: auto;
}
.nav .center {
  display: flex;
  gap: clamp(20px, 4vw, 72px);
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.78vw, 12.5px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
}
.nav .center a { color: var(--fg); opacity: 0.92; padding-block: 6px; transition: opacity 150ms; }
.nav .center a:hover { opacity: 1; }
.nav .center a.active {
  color: var(--fg);
  opacity: 1;
  border-bottom: 1px solid var(--fg);
}
.nav .right {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.78vw, 12.5px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 28px;
  padding: 6px 0;
}
.nav-toggle span { display: block; height: 1px; background: var(--fg); }

.nav.top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}
.nav.bottom {
  background: var(--bg-card);
  border-top: 1px solid var(--rule-dim);
}

/* ---------- RESPONSIVE NAV ---------- */
@media (max-width: 1024px) {
  .nav.top { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
}
@media (max-width: 640px) {
  .nav {
    grid-template-columns: 1fr auto;
    gap: 16px 24px;
    padding-block: 16px;
  }
  .nav-toggle { display: inline-flex; }

  /* ----- TOP NAV: hamburger reveals a dropdown ----- */
  .nav.top .center { display: none; }
  .nav.top .right { display: none; }

  .nav.top.is-open {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-bottom: 12px;
  }
  /* no active-page underline on mobile */
  .nav .center a.active { border-bottom: none; }
  .nav.top.is-open .center {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    order: 3;
    gap: 0;
    margin-top: 6px;
  }
  .nav.top.is-open .center a {
    width: 100%;
    padding: 16px 0;
    border-top: 1px solid var(--rule-dim);
    opacity: 1;
  }
  .nav.top.is-open .right {
    display: inline-flex;
    align-items: center;
    grid-column: 1 / -1;
    order: 4;
    justify-self: stretch;
    margin-top: 22px;
    padding: 20px 26px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--fg);
    letter-spacing: 0.22em;
    transition: background 150ms, border-color 150ms;
  }
  .nav.top.is-open .right:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.7);
  }

  /* ----- FOOTER: keep links visible, no menu toggle ----- */
  .nav.bottom {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: 36px;
  }
  .nav.bottom .center {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-self: start;
  }
  .nav.bottom .right { justify-self: start; }
  .nav.bottom .nav-toggle { display: none; }
}

/* ---------- RESPONSIVE TOKENS ---------- */
@media (max-width: 1024px) {
  :root { --section-pad-y: clamp(60px, 8vw, 120px); }
}
