/* ════════════════════════════════════════════════════════
   Kymata Consulting — shared design system
   ════════════════════════════════════════════════════════ */
:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #181C2C;
  --ink-muted: #5C5F6A;
  --ink-faint: #767672; /* was #A8A8A4 — bumped for WCAG AA */
  --accent: #2B4DC8;
  --accent-dark: #1D3BA8;
  --teal: #1B7A6E;
  --teal-light: #E6F3F1;
  --danger: #B83010;
  --border: #D8D5CC;
  --radius: 4px;
  --radius-lg: 12px;
  --maxw: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,244,239,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

/* Hamburger button — shown via CSS in mobile breakpoint */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.nav-toggle:hover { background: var(--teal-light); }
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
nav a.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: var(--bg);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
nav a.btn:hover { background: var(--accent-dark); }

/* ── BUTTONS ─────────────────────────────────── */
a.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
a.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
a.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink-muted);
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
a.btn-ghost:hover { border-color: var(--ink-muted); color: var(--ink); }

/* ── SECTION PRIMITIVES ──────────────────────── */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
  display: block;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 3rem;
}

/* ── PAGE HERO (interior pages) ──────────────── */
.page-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}
.page-hero .hero-label {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-light);
  padding: 5px 12px;
  border-radius: 2px;
  margin-bottom: 1.25rem;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.1rem;
  max-width: 760px;
}
.page-hero h1 em { font-style: italic; color: var(--accent); }
.page-hero .lede {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 620px;
  font-weight: 300;
  line-height: 1.7;
}

/* ── FOOTER ───────────────────────────────────── */
footer {
  padding: 3.5rem 2rem 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand .logo { font-size: 1.4rem; margin-bottom: 0.6rem; display: inline-block; }
.footer-brand p { font-size: 0.85rem; color: var(--ink-muted); max-width: 300px; line-height: 1.6; }
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p { font-size: 0.78rem; color: var(--ink-faint); }
.footer-bottom a { color: var(--teal); text-decoration: none; font-weight: 600; }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── MOBILE NAV BREAKPOINT ─────────────────────── */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }

  nav {
    padding: 0 1.25rem;
    background: rgba(247,244,239,0.98) !important;
    box-shadow: 0 2px 16px rgba(26,23,20,0.10);
  }
  .nav-inner { gap: 1rem; }

  /* Show hamburger, drawer nav links hidden by default */
  .nav-toggle { display: flex; order: 1; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
    flex-direction: column;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    color: var(--ink-muted);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a:hover { color: var(--ink); }
  nav a.btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.82rem;
  }

  .page-hero { padding: 3.5rem 1.25rem 2.25rem; }
  a.btn-primary, a.btn-ghost { min-height: 44px; }
  footer { padding: 3rem 1.25rem 2rem; }
}

@media (max-width: 420px) {
  .logo { font-size: 1.2rem; }
  nav a.btn { font-size: 0.8rem; padding: 10px 13px; }
}

/* ── ANIMATIONS ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
