/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Color */
  --ink:          #0B1B33;
  --ink-2:        #142743;
  --ink-glow:     #1E3A63;
  --paper:        #FBF9F3;
  --paper-dim:    #F3EFE4;
  --cream:        #F6F1E4;
  --gold:         #C9A24B;
  --gold-bright:  #E1B85C;
  --slate:        #44506B;
  --slate-dim:    #6B7690;
  --line:         rgba(11, 27, 51, 0.12);
  --line-on-ink:  rgba(246, 241, 228, 0.16);

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body:    "Inter", "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "Courier New", monospace;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.4rem + 0.8vw, 2.1rem);
  --step-3:  clamp(2.1rem, 1.7rem + 1.6vw, 3rem);
  --step-4:  clamp(2.6rem, 2rem + 2.6vw, 4.2rem);
  --step-5:  clamp(3.2rem, 2.4rem + 3.6vw, 5.4rem);

  /* Layout */
  --maxw: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

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

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
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;
  }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -60px;
  background: var(--gold);
  color: var(--ink);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 999;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--space-2); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--ink);
}
h1 { font-size: var(--step-5); font-weight: 650; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { color: var(--slate); font-size: var(--step-0); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 20px; height: 1px;
  background: var(--gold);
  display: inline-block;
}

.lede {
  font-size: var(--step-1);
  color: var(--slate);
  max-width: 46ch;
}

/* ============================================================
   HAND-DRAWN ANNOTATION (signature element)
   ============================================================ */
.marked {
  position: relative;
  white-space: nowrap;
}
.marked svg {
  position: absolute;
  left: -2%;
  bottom: -0.18em;
  width: 104%;
  height: 0.5em;
  overflow: visible;
}
.marked--circle {
  position: relative;
  display: inline-block;
}
.marked--circle svg {
  position: absolute;
  left: -12%;
  top: -18%;
  width: 124%;
  height: 136%;
  bottom: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step--1);
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  box-shadow: 0 12px 30px -8px rgba(11, 27, 51, 0.45);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
}
.btn--gold:hover {
  background: var(--gold-bright);
  box-shadow: 0 12px 26px -8px rgba(201, 162, 75, 0.55);
}

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

.btn--ghost-on-ink {
  background: transparent;
  border-color: var(--line-on-ink);
  color: var(--paper);
}
.btn--ghost-on-ink:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ============================================================
   NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-2) 0;
  background: rgba(251, 249, 243, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(251, 249, 243, 0.94);
  box-shadow: 0 8px 30px -20px rgba(11, 27, 51, 0.3);
}
.brand { color: var(--ink); }
.nav-links a { color: var(--slate); }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.brand {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  bottom: 6.5px;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 1.6px;
  background: var(--gold);
  border-radius: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.nav-links a {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--slate);
  position: relative;
  padding: 0.3rem 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: var(--space-2); }
.nav-cta .btn--ghost { display: none; } /* Contact is already in the main nav */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links { 
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4) var(--space-3);
    gap: var(--space-3);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { font-size: var(--step-1); }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn--ghost { display: none; }
}

/* ============================================================
   SECTION HELPERS
   ============================================================ */
section { padding-block: var(--space-6); }
.section-tight { padding-block: var(--space-5); }
.section-head { max-width: 640px; margin-bottom: var(--space-4); }
.section-head .eyebrow { margin-bottom: var(--space-2); }

.on-ink { background: var(--ink); color: var(--paper); }
.on-ink p { color: rgba(246, 241, 228, 0.72); }
.on-ink h2, .on-ink h3, .on-ink h4 { color: var(--paper); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--space-5) var(--space-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line-on-ink);
}
.footer-grid p { color: rgba(246, 241, 228, 0.62); font-size: var(--step--1); max-width: 32ch; }
.footer-col h4 { font-size: var(--step-0); margin-bottom: var(--space-2); color: var(--paper); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { color: rgba(246, 241, 228, 0.72); font-size: var(--step--1); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  font-size: var(--step--1);
  color: rgba(246, 241, 228, 0.5);
  flex-wrap: wrap;
  gap: var(--space-2);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   CLOSING CTA (used on every page)
   ============================================================ */
.cta-band { text-align: center; }
.cta-band .container { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.cta-band h2 { max-width: 20ch; }
.cta-band .lede { text-align: center; margin-inline: auto; }
.cta-band .btn { margin-top: var(--space-1); }

/* ============================================================
   SHARED COMPONENTS (cards, badges, stars)
   ============================================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(11, 27, 51, 0.25);
  border-color: rgba(201, 162, 75, 0.4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(201, 162, 75, 0.12);
  color: var(--gold);
  border: 1px solid rgba(201, 162, 75, 0.3);
}

.stars {
  font-family: var(--font-mono);
  color: var(--gold);
  letter-spacing: 0.1em;
  font-size: 0.85rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.nav-links a{white-space:nowrap}
