/* ============================================================
   STARCHITECT — Website Redesign · shared base
   Hybrid dark-first system. Gold + cyan on the void, with
   light "document" panels for whitepaper-grade legibility.
   Loaded by all three direction prototypes.
   ============================================================ */

:root {
  /* Surfaces — the void & the panels */
  --void:        #060B17;
  --deep-navy:   #0A1322;
  --navy:        #0E1A2E;
  --panel:       #111E33;
  --panel-hi:    #1A2A45;
  --structure:   #2A3A57;

  /* Light "document" surfaces */
  --paper:       #ECE7DB;  /* warm bone document field */
  --paper-card:  #F4F1E9;
  --paper-rule:  #CFC8B6;
  --ink:         #16202E;  /* text on paper */
  --ink-soft:    #4A5564;

  /* Text on dark */
  --bone:        #EFE9DD;
  --slate:       #9FA9B8;
  --mute:        #67718440;
  --mute-text:   #6B7588;

  /* Accents */
  --gold:        #D4A03B;
  --gold-bright: #E6C172;
  --gold-deep:   #A87B22;
  --cyan:        #2EB5C9;
  --cyan-bright: #5BD0E0;

  /* Status */
  --go:    #4F8F6F;
  --alert: #C8442E;

  /* Lines */
  --hair:      #243450;
  --hair-soft: rgba(239,233,221,0.09);
  --hair-gold: rgba(212,160,59,0.30);

  --font-display: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --font-sans:    'Rajdhani', 'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'Consolas', monospace;

  --maxw: 1280px;
  --pad-x: 32px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--slate);
  background: var(--deep-navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--void); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- Typographic primitives ---- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; line-height: 0.92; text-transform: uppercase; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--gold); flex: none; }
.eyebrow.cyan { color: var(--cyan); }
.eyebrow.cyan::before { background: var(--cyan); }
.eyebrow.bare::before { display: none; }

/* ---- Coordinate grid motif ---- */
.grid-bg {
  background-image:
    linear-gradient(rgba(67,75,92,0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67,75,92,0.13) 1px, transparent 1px);
  background-size: 56px 56px;
}
.grid-bg.fine { background-size: 28px 28px; background-image:
    linear-gradient(rgba(67,75,92,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67,75,92,0.08) 1px, transparent 1px); }

/* ---- Corner registration ticks ---- */
.reg { position: relative; }
.reg::before, .reg::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 0 solid var(--gold); pointer-events: none;
}
.reg::before { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.reg::after { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

/* ---- Classification strip ---- */
.classification {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--void); color: var(--mute-text);
  text-align: center; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; padding: 7px 16px;
  border-bottom: 1px solid var(--hair);
}

/* ---- Nav ---- */
.nav {
  position: fixed; top: 27px; left: 0; right: 0; z-index: 90;
  height: 70px; display: flex; align-items: center; padding: 0 var(--pad-x);
  background: rgba(8,14,26,0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color var(--ease) .3s, background var(--ease) .3s;
}
.nav.scrolled { border-bottom-color: var(--hair); background: rgba(8,14,26,0.92); }
.nav-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { height: 36px; width: auto; }
.nav-logo .pill {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--slate); border-left: 1px solid var(--structure); padding-left: 12px; line-height: 1.3;
}
.nav-logo .pill b { color: var(--gold); font-weight: 600; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a {
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--slate);
  text-transform: uppercase; transition: color .15s; position: relative; padding: 4px 0;
}
.nav-links > a:hover, .nav-links > a.active { color: var(--bone); }
.nav-links > a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold);
}
.nav-toggle { display: none; background: none; border: 0; color: var(--gold); font-size: 24px; cursor: pointer; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 13px 24px; border-radius: 4px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s var(--ease), box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--gold); color: var(--void); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(212,160,59,0.32); }
.btn-outline { border-color: var(--structure); color: var(--bone); background: transparent; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost { color: var(--slate); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--cyan); }
.btn-lg { padding: 16px 32px; font-size: 15px; }

/* ---- Layout ---- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.container.narrow { max-width: 940px; }
section { padding: 112px 0; position: relative; }
.sec-dark { background: var(--deep-navy); color: var(--slate); }
.sec-void { background: var(--void); color: var(--slate); }
.sec-paper { background: var(--paper); color: var(--ink-soft); }
.sec-paper .eyebrow { color: var(--gold-deep); }
.sec-paper .eyebrow::before { background: var(--gold-deep); }
.sec-paper h1, .sec-paper h2, .sec-paper h3 { color: var(--ink); }

h1, h2, h3, h4 { color: var(--bone); }
h2.display { font-size: clamp(38px, 5vw, 62px); }
h3 { font-family: var(--font-sans); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: 0.01em; }
.lead { font-size: 19px; line-height: 1.65; }
.sec-paper .lead { color: var(--ink-soft); }

/* hairline + tick rule */
.rule { display: flex; align-items: center; gap: 14px; margin: 0; }
.rule::before { content: ""; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; }
.rule::after { content: ""; flex: 1; height: 1px; background: var(--structure); }
.sec-paper .rule::after { background: var(--paper-rule); }

/* ---- Footer ---- */
.footer { background: var(--void); border-top: 1px solid var(--hair); padding: 72px var(--pad-x) 28px; color: var(--slate); }
.footer-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand img { height: 46px; margin-bottom: 18px; }
.footer-brand p { font-size: 14px; max-width: 280px; line-height: 1.55; }
.footer-brand .contact { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; line-height: 1.9; color: var(--mute-text); }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; line-height: 1.9; color: var(--slate); transition: color .15s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: var(--maxw); margin: 48px auto 0; padding-top: 22px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--mute-text); }
.itar { max-width: var(--maxw); margin: 18px auto 0; font-family: var(--font-mono); font-size: 10px; line-height: 1.6; color: #45505f; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* ---- Stat figure ---- */
.statnum { font-family: var(--font-display); font-size: clamp(40px, 5vw, 60px); color: var(--gold); line-height: 1; letter-spacing: 0.02em; }
.statlabel { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); margin-top: 10px; }

/* ---- Mobile ---- */
@media (max-width: 920px) {
  :root { --pad-x: 20px; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: fixed; top: 97px; left: 0; right: 0; background: var(--navy);
    padding: 18px 20px 24px; border-bottom: 1px solid var(--hair); }
  .nav-links.open > a { padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
