@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&display=swap');

/* ── ROOT TOKENS ──────────────────────────────────────────── */
:root {
  --bg:          #F6F1E7;
  --surface:     #FFFFFF;
  --surface-2:   #FBF8F2;
  --surface-3:   #F2EDE0;
  --text:        #110F0C;
  --text-2:      #4A453C;
  --text-muted:  #9C968D;
  --accent:      #C7401A;
  --accent-h:    #A43212;
  --gold:        #D49308;
  --green:       #285C3E;
  --navy:        #1A3F6B;
  --border:      #DDD7CA;
  --border-2:    #EDE8DC;

  --font:        'Inter', system-ui, -apple-system, sans-serif;

  /* type scale */
  --t-xs:   0.6875rem;
  --t-sm:   0.8125rem;
  --t-base: 1rem;
  --t-lg:   1.125rem;
  --t-xl:   1.25rem;
  --t-2xl:  1.5rem;
  --t-3xl:  2rem;
  --t-4xl:  2.625rem;
  --t-5xl:  3.5rem;

  /* spacing (8pt) */
  --s1: .25rem; --s2: .5rem;  --s3: .75rem; --s4: 1rem;
  --s5: 1.25rem;--s6: 1.5rem; --s8: 2rem;   --s10: 2.5rem;
  --s12: 3rem;  --s16: 4rem;  --s20: 5rem;  --s24: 6rem;

  /* radius */
  --r-sm: 4px; --r: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;

  /* shadow */
  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 2px 6px rgba(0,0,0,.07);
  --sh:    0 4px 14px rgba(0,0,0,.09);
  --sh-md: 0 8px 28px rgba(0,0,0,.11);
  --sh-lg: 0 16px 48px rgba(0,0,0,.13);

  /* fixed heights */
  --ch-sm:  220px;
  --ch:     400px;
  --ch-lg:  480px;

  /* transitions */
  --tf: 140ms ease;
  --t:  240ms ease;
  --ts: 380ms cubic-bezier(.4,0,.2,1);

  --nav-h: 64px;
}

/* ── RESET ────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, var(--t-5xl)); }
h2 { font-size: clamp(1.5rem, 3.5vw, var(--t-4xl)); }
h3 { font-size: clamp(1.2rem, 2.5vw, var(--t-2xl)); }
h4 { font-size: var(--t-xl); }
h5 { font-size: var(--t-lg); }

p { line-height: 1.72; color: var(--text-2); }
p + p { margin-top: var(--s4); }

strong { font-weight: 700; color: var(--text); }
em     { font-style: italic; }

a { color: var(--accent); text-decoration: none; transition: color var(--tf); }
a:hover { color: var(--accent-h); text-decoration: underline; }

ul,ol { padding-left: var(--s6); }
li { margin-bottom: var(--s2); line-height: 1.65; color: var(--text-2); }
li strong { color: var(--text); }

/* nested lists */
ul ul, ol ol { margin-top: var(--s2); }

blockquote {
  position: relative;
  border-left: 3px solid var(--accent);
  padding: var(--s4) var(--s6);
  background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--s6) 0;
}
blockquote p {
  font-size: var(--t-lg);
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}
blockquote footer {
  margin-top: var(--s3);
  font-size: var(--t-sm);
  color: var(--text-muted);
  font-style: normal;
}

/* ── TABLES ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th {
  background: var(--bg);
  font-weight: 700;
  text-align: left;
  padding: var(--s3) var(--s4);
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-size: var(--t-xs);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
td {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-2);
  color: var(--text-2);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── SCROLLBARS ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── LAYOUT UTILS ─────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s6);
}
.container--narrow { max-width: 800px; }

@media (max-width: 639px) {
  .container { padding: 0 var(--s4); }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── SPACING UTILS ────────────────────────────────────────── */
.mt-auto { margin-top: auto; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }

/* ── MOTION PREF ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
