/* ═══════════════════════════════════════════════════════════════
   Quarterdeck Labs — Shared Design System
   All pages link to this file. Page-specific styles remain inline.
═══════════════════════════════════════════════════════════════ */

/* ── RESET & VARIABLES ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #07102A;
  --navy-mid:   #0B1A3E;
  --navy-card:  #0F2150;
  --ocean:      #1A4D8C;
  --teal:       #00C9B7;
  --teal-dim:   #00A898;
  --amber:      #E8A03A;
  --offwhite:   #F5F7FF;
  --white:      #FFFFFF;
  --black:      #0D0D0D;
  --slate:      #4A5E7A;
  --mid-grey:   #8899AA;
  --light-bg:   #EDF1FA;
  --border:     rgba(255,255,255,0.07);
}

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { font-family: 'Inter', sans-serif; background: var(--navy); color: var(--white); overflow-x: hidden; }
a    { text-decoration: none; color: inherit; }

/* ── UTILITIES ───────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 32px; }

.label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--teal);
}
.section-heading {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.025em;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── SCROLL REVEAL ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  background: var(--amber); color: var(--navy);
  font-weight: 700; font-size: 14px; padding: 12px 24px;
  border-radius: 3px; border: none; cursor: pointer; display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #f0b040; transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--white);
  font-weight: 600; font-size: 14px; padding: 12px 24px;
  border-radius: 3px; border: 1.5px solid rgba(255,255,255,0.22);
  cursor: pointer; display: inline-block;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.05); }

.btn-amber {
  background: var(--amber); color: var(--navy);
  font-weight: 800; font-size: 15px; padding: 14px 30px;
  border-radius: 3px; border: none; cursor: pointer; display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn-amber:hover { background: #f0b040; transform: translateY(-1px); }

.btn-teal {
  background: var(--teal); color: var(--navy);
  font-weight: 800; font-size: 15px; padding: 14px 30px;
  border-radius: 3px; border: none; cursor: pointer; display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn-teal:hover { background: var(--teal-dim); transform: translateY(-1px); }

/* ── NAV ─────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(7,16,42,0.9); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16px; letter-spacing: -0.02em; flex-shrink: 0;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 3px;
  background: linear-gradient(135deg, var(--ocean) 0%, var(--teal) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: var(--white);
}

/* Nav links */
.nav-links {
  display: flex; gap: 4px; list-style: none;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.65);
  align-items: center;
}
.nav-links > li > a,
.nav-drop-btn {
  padding: 8px 14px; border-radius: 5px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color 0.15s, background 0.15s; white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-drop-btn:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.nav-links .active-page { color: var(--teal); }
.nav-links .quiz-link  { color: var(--teal); }

/* Dropdown trigger */
.has-dropdown { position: relative; }
.nav-drop-btn {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.65);
}
.drop-arrow {
  font-size: 9px; display: inline-block;
  transition: transform 0.2s; margin-left: 1px;
}
.has-dropdown:hover .drop-arrow,
.has-dropdown.open .drop-arrow { transform: rotate(180deg); }

/* Dropdown panel */
.nav-dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 6px; min-width: 292px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 300;
  box-shadow: 0 20px 48px rgba(0,0,0,0.5);
}
.nav-dropdown::before {
  content: ''; position: absolute;
  top: -12px; left: 0; right: 0; height: 12px;
}
.has-dropdown:hover .nav-dropdown,
.has-dropdown.open  .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown items */
.drop-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 13px; border-radius: 5px;
  transition: background 0.15s; color: var(--white);
}
.drop-item:hover { background: rgba(255,255,255,0.06); }
.drop-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.drop-item strong { font-size: 13px; font-weight: 700; display: block; margin-bottom: 2px; }
.drop-item small { font-size: 11px; color: rgba(255,255,255,0.38); line-height: 1.4; }
.drop-divider { height: 1px; background: var(--border); margin: 4px 8px; }
.drop-item.active strong { color: var(--teal); }

/* Nav CTA + back link */
.nav-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-audit {
  font-size: 13px; font-weight: 600; color: var(--amber);
  padding: 8px 14px; border-radius: 6px;
  border: 1px solid rgba(232,160,58,0.3); white-space: nowrap;
}
.nav-audit:hover { background: rgba(232,160,58,0.08); transition: background 0.2s; }
.nav-back {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.45);
  display: flex; align-items: center; gap: 6px; padding: 8px 14px;
}
.nav-back:hover { color: var(--white); transition: color 0.2s; }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  background: #040B1C;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.footer-links { display: flex; gap: 24px; font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-links a:hover { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-note { font-size: 12px; color: rgba(255,255,255,0.2); }

/* ── SHARED RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
}
