/*
  dev/brew — design system
  tokens.css — single source of truth
  All pages link this file. No per-page :root or duplicate nav/footer CSS.
*/

/* ─── DESIGN TOKENS ─── */
:root {
  --bg:        #0a0a0a;
  --bg-2:      #0f0e0c;
  --panel:     rgba(14,12,10,0.90);
  --glass:     rgba(10,10,10,0.94);
  --border:    rgba(217,119,6,0.10);
  --border-hi: rgba(245,158,11,0.22);
  --rule:      #1c1a17;
  --bone:      #f4f1ea;
  --bone-dim:  #b8b3a8;
  --tan:       #a89070;
  --dust:      #4a4640;
  --amber:     #d97706;
  --amber-hi:  #f59e0b;
  --amber-dim: #8a4d05;
  --amber-glow: 0 0 40px rgba(217,119,6,0.38), 0 0 80px rgba(217,119,6,0.12);
  --display:   'Fraunces', Georgia, serif;
  --mono:      'JetBrains Mono', 'Courier New', monospace;
  --r:         8px;
  --r-lg:      16px;
  --ease:      cubic-bezier(0.4,0,0.2,1);
  --spring:    cubic-bezier(0.34,1.56,0.64,1);
  --t:         0.2s var(--ease);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  background: var(--bg); color: var(--bone-dim);
  font-family: var(--mono); font-size: 14px; line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── GLOBAL TERMINAL FRAME ─── */

/* Grain */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px; opacity: 0.05; mix-blend-mode: overlay;
}

/* Vignette */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.7) 100%);
}

/* Brackets */
.bracket {
  position: fixed; width: 18px; height: 18px;
  border: 1px solid var(--dust); z-index: 1001;
  pointer-events: none; opacity: 0.5;
}
.bracket.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.bracket.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.bracket.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.bracket.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }

/* ─── SHARED COMPONENTS ─── */

/* Global Top Frame (Nav) */
.frame-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5000;
  padding: 22px 28px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  background: #0a0a0a; border-bottom: 1px solid var(--border);
}
.frame-top a { color: var(--bone-dim); text-decoration: none; transition: color 0.2s; }
.frame-top a:hover { color: var(--amber); }

.nav-links { display: flex; gap: 26px; list-style: none; align-items: center; }
.nav-links a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

@media (max-width: 700px) {
  .frame-top { padding: 18px 20px; flex-direction: column; gap: 12px; height: auto; position: absolute; }
  .nav-links { gap: 14px; flex-wrap: wrap; justify-content: center; }
  .nav-links a { font-size: 10px; }
  .status-hud { display: none; }
}

/* Nav Branding */
.brand {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: .04em; color: var(--bone); text-decoration: none;
}
.brand span { color: var(--amber); }

/* Status HUD */
.status-hud {
  position: fixed; bottom: 22px; left: 28px; z-index: 1001;
  display: flex; gap: 12px; align-items: center;
  font-family: var(--mono); font-size: 10px; color: var(--bone-dim);
  text-transform: uppercase; letter-spacing: .12em;
}
.status-hud .dot {
  width: 7px; height: 7px; background: var(--amber); border-radius: 50%;
  box-shadow: 0 0 14px var(--amber); animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .55; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Page Container */
.page-container {
  max-width: 800px; margin: 0 auto; padding: 120px 28px 100px;
  position: relative; z-index: 10;
}

/* Typo */
h1, h2, h3 { font-family: var(--display); color: var(--bone); font-style: italic; }
.mono { font-family: var(--mono); }
.amber { color: var(--amber); }
.dust { color: var(--dust); }
.label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .25em;
  color: var(--amber); text-transform: uppercase; margin-bottom: 0.5rem; display: block;
}

/* ─── LAYOUT ─── */
section, .section { position: relative; z-index: 1; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }
.page-wrap { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 5rem 2rem 8rem; }

/* ─── FOOTER ─── */
footer.foot {
  position: relative;
  z-index: 50;
  padding: 80px 28px 40px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
  background: #0a0a0a;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
footer.foot a { color: var(--bone-faint); text-decoration: none; transition: color .2s; }
footer.foot a:hover { color: var(--amber); }

footer.foot .foot-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
@media (max-width: 700px) {
  footer.foot { padding: 40px 20px; text-align: center; }
  footer.foot .foot-row { justify-content: center; text-align: center; flex-direction: column; gap: 16px; }
  .page-container { padding-top: 140px; }
}

/* ─── BUTTONS ─── */
.btn {
  font-family: var(--mono); font-weight: 700; display: inline-flex; align-items: center;
  border-radius: var(--r); transition: transform 0.2s var(--spring), box-shadow 0.2s;
  letter-spacing: 0.4px; border: none; text-decoration: none; white-space: nowrap;
}
.btn-amber {
  background: var(--amber); color: var(--bg); font-size: 0.82rem; padding: 0.88rem 2.1rem;
}
.btn-amber:hover { transform: translateY(-3px); box-shadow: var(--amber-glow); text-decoration: none; }

/* ─── TERMINAL BLOCK ─── */
.terminal {
  background: rgba(7,4,1,0.97); border: 1px solid rgba(255,255,255,0.055);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 80px rgba(0,0,0,0.55);
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px; padding: 0.62rem 1rem;
  background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.045);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.r { background: #ff5f57; }
.terminal-dot.y { background: #febc2e; }
.terminal-dot.g { background: #28c840; }
.terminal-title { font-family: var(--mono); font-size: 0.58rem; color: var(--dust); margin-left: auto; letter-spacing: 0.5px; }
.terminal-body { padding: 1.5rem 1.75rem; font-family: var(--mono); font-size: 0.76rem; line-height: 2; }

/* ─── MISSION CTA (accept mission — $30) ─── */
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 22px; background: transparent;
  border: 1px solid var(--amber); color: var(--amber);
  font-family: var(--mono); font-size: 12px; letter-spacing: .15em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: color .25s ease; position: relative; overflow: hidden;
  z-index: 1; white-space: nowrap;
}
.cta::before {
  content: ''; position: absolute; inset: 0; background: var(--amber);
  transform: translateY(101%); transition: transform .35s cubic-bezier(.7,0,.3,1); z-index: -1;
}
.cta:hover { color: var(--bg); }
.cta:hover::before { transform: translateY(0); }
.cta .arrow { transition: transform .25s ease; display: inline-block; }
.cta:hover .arrow { transform: translateX(4px); }

/* ─── UTILITIES ─── */
hr.divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
