/* =========================================================
   QUADLOGY — Design Tokens
   ========================================================= */
:root {
  /* Color */
  --ink:        #0B1220;   /* deep navy — primary bg */
  --ink-2:      #131D2E;   /* secondary panel bg */
  --slate:      #1C2733;   /* card / border bg */
  --slate-2:    #283546;   /* hover / elevated */
  --line:       #2B384A;   /* hairline borders on dark */
  --paper:      #F5F6F4;   /* off-white bg (light sections) */
  --paper-2:    #ECEEEA;   /* light panel */
  --ink-on-paper: #0E1726;
  --muted:      #8C9AAE;   /* secondary text on dark */
  --muted-2:    #5B6677;   /* secondary text on light */
  --signal:     #3D7FFF;   /* primary accent — blue */
  --signal-dim: #2C5FC2;
  --amber:      #E8A33D;   /* signature accent — status/progress only */
  --green:      #4FB477;   /* on-track status */
  --white:      #FFFFFF;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Scale */
  --fs-9: clamp(2.6rem, 5vw + 1rem, 5.2rem);
  --fs-8: clamp(2.1rem, 3.4vw + 1rem, 3.4rem);
  --fs-7: clamp(1.6rem, 2vw + 1rem, 2.2rem);
  --fs-6: 1.5rem;
  --fs-5: 1.25rem;
  --fs-4: 1.05rem;
  --fs-3: 0.95rem;
  --fs-2: 0.85rem;
  --fs-1: 0.75rem;

  /* Layout */
  --maxw: 1240px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* =========================================================
   Eyebrow / status-tag motif — the signature element
   ========================================================= */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tag::before { content: '['; color: var(--amber); }
.tag::after { content: ']'; color: var(--amber); }
.tag.on-light { color: var(--muted-2); }

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}
.dot.amber { background: var(--amber); }
.dot.blue { background: var(--signal); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo .mark { color: var(--signal); }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-desktop a {
  font-size: var(--fs-3);
  color: var(--muted);
  transition: color 0.15s ease;
  position: relative;
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--paper); }
.nav-desktop a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -26px;
  height: 2px;
  background: var(--amber);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-3);
  font-weight: 600;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--signal);
  color: var(--white);
}
.btn-primary:hover { background: var(--signal-dim); }
.btn-ghost {
  border-color: var(--line);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--signal); }
.btn-ghost.on-light {
  border-color: #D8DAD4;
  color: var(--ink-on-paper);
}
.btn-ghost.on-light:hover { border-color: var(--signal); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 76px 0 0 0;
  background: var(--ink);
  z-index: 99;
  padding: 2rem var(--pad);
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.site-header.menu-open {
  background: var(--ink);
  backdrop-filter: none;
}
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

@media (max-width: 880px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 500;
}
.footer-grid a, .footer-grid p {
  display: block;
  color: var(--muted);
  font-size: var(--fs-3);
  margin-bottom: 0.6rem;
  transition: color 0.15s ease;
}
.footer-grid a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--fs-2);
  color: var(--muted);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Generic section utilities
   ========================================================= */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section-light {
  background: var(--paper);
  color: var(--ink-on-paper);
}
.section-panel {
  background: var(--ink-2);
}
.section-head {
  max-width: 680px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head .tag { margin-bottom: 1rem; }
.section-head h2 { font-size: var(--fs-8); margin-bottom: 1rem; }
.section-head p { color: var(--muted); font-size: var(--fs-4); }
.section-light .section-head p { color: var(--muted-2); }

.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Page hero (sub-pages) */
.page-hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.page-hero .tag { margin-bottom: 1.25rem; }
.page-hero h1 { font-size: var(--fs-9); max-width: 920px; }
.page-hero .lede {
  margin-top: 1.5rem;
  max-width: 620px;
  font-size: var(--fs-5);
  color: var(--muted);
}

/* Breadcrumb coordinate string — reused motif */
.coord {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--muted);
  letter-spacing: 0.04em;
}
.coord .sep { color: var(--amber); margin: 0 0.4em; }
