/* ============================================
   Design tokens
   ============================================ */
:root {
  /* Colors */
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #16202C;
  --muted: #5C6773;
  --primary: #1F4E8C;
  --primary-dark: #163B6B;
  --accent: #C9962C;
  --line: #D8DEE8;

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

  /* Layout */
  --content-width: 1100px;
  --radius: 6px;
}

/* ============================================
   Reset / base
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

ul { list-style: none; }

/* ============================================
   Typography
   ============================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--ink); }
p.lead { font-size: 1.15rem; color: var(--muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* ============================================
   Layout helpers
   ============================================ */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

@media (max-width: 640px) {
  .section { padding: 48px 0; }
}

/* ============================================
   Header / nav
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--content-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: none; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============================================
   Hero (index page signature)
   ============================================ */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(0deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(90deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 64px);
  background-position: center top;
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}

.hero-inner { max-width: 680px; }

.hero h1 { margin-bottom: 20px; }

@media (max-width: 640px) {
  .hero { padding: 56px 0 48px; }
}

/* ============================================
   Cards / grid sections
   ============================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 14px;
}

/* ============================================
   CTA band
   ============================================ */
.cta-band {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 64px 24px;
  border-radius: var(--radius);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #C7CFD9; }

/* ============================================
   Contact card
   ============================================ */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: none; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.contact-value { font-weight: 600; text-align: right; }

/* ============================================
   Prose (legal / policy pages)
   ============================================ */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }
.updated-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ============================================
   Footer (title-block signature)
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 56px 0 28px;
  margin-top: 64px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
}

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

.title-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  max-width: 300px;
}
.title-block-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.title-block-row:last-child { border-bottom: none; }
.title-block-key { color: var(--muted); }
.title-block-val { color: var(--ink); text-align: right; }

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  padding: 6px 0;
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
