/* ──────────────────────────────────────────────────────────────
   V8Y · base.css
   Shared chrome (tokens, reset, typography, skip-link, nav, footer)
   Loaded by every page. Page-specific styles live in landing.css /
   legal.css and assume base.css is loaded first.
   ────────────────────────────────────────────────────────────── */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── TOKENS ── */
:root {
  --teal:        #1D9E75;
  --teal-dark:   #0F6E56;
  --teal-light:  #E1F5EE;
  --teal-mid:    #9FE1CB;
  --teal-glow:   rgba(29, 158, 117, 0.14);
  --gold:        #BA7517;
  --gold-mid:    #EF9F27;
  --gold-light:  #FAEEDA;
  --blue:        #185FA5;
  --blue-mid:    #378ADD;
  --blue-light:  #E6F1FB;
  --red:         #A32D2D;
  --red-light:   #FCEBEB;
  --purple:      #534AB7;
  --purple-light:#EEEDFE;
  --green:       #3B6D11;
  --green-light: #EAF3DE;
  --amber:       #854F0B;
  --amber-light: #FAEEDA;
  --bg:          #f2f3ee;
  --panel:       #ffffff;
  --white:       #FFFFFF;
  --ink:         #141513;
  --ink2:        #2e2e28;
  --muted:       #454540;
  --border:      rgba(0,0,0,0.09);
  --border2:     rgba(0,0,0,0.14);
  --font-display: 'Tektur', system-ui, sans-serif;
  --font-body:   'Outfit', system-ui, sans-serif;
  --font-mono:   ui-monospace, 'Cascadia Code', monospace;
  --s-1: 12px;
  --s-2: 24px;
  --s-3: 36px;
  --s-4: 48px;
  --s-5: 56px;
  --s-6: 64px;
  --s-8: 88px;
  --s-10: 112px;
  --s-12: 128px;
  --shell-max: 1180px;
}

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

#main-content {
  min-width: 0;
}

/* WCAG 2.2 AA — visible focus */
:focus:not(:focus-visible) { outline: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  border-radius: 0 0 8px 8px;
}

.skip-link:focus-visible {
  left: 16px;
  outline: 3px solid var(--teal-mid);
}

/* ── SHELL ── */
.site-shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 28px) var(--s-12);
  width: 100%;
}

/* ── NAV (shared) ── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) 0 var(--s-2);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  gap: var(--s-2);
  flex-wrap: nowrap;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-cta {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 14px 24px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 2px solid var(--ink);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.nav-cta:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
}

/* ── FOOTER (shared, rich 4-col) ── */
.site-footer {
  border-top: 1px solid var(--border2);
  margin-top: var(--s-6);
  padding: var(--s-4) clamp(16px, 4vw, 28px) var(--s-3);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
}

.footer-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: var(--s-4) var(--s-3);
  align-items: start;
}

.footer-brand {
  min-width: 0;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
  margin-bottom: var(--s-2);
}

.footer-logo-link img {
  height: 36px;
  width: auto;
  display: block;
}

.footer-logo-link:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
  border-radius: 6px;
}

.footer-tagline {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 22rem;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink2);
  margin: 0 0 var(--s-2);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-list a {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 6px 4px 6px 0;
  border-radius: 6px;
}

.footer-list a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-list a:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
}

.footer-contact-desc {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}

.footer-list--contact li + li {
  margin-top: var(--s-2);
}

.footer-list--contact .footer-contact-desc {
  margin-top: 4px;
}

.footer-bottom {
  max-width: var(--shell-max);
  margin: var(--s-4) auto 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}

.footer-copy {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.footer-meta a {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
}

.footer-meta a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer: keep 4-column layout on typical laptops; 2×2 only when narrow */
@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .site-nav {
    padding: 16px 0 12px;
    gap: 12px;
  }

  .logo img {
    height: 32px;
  }

  .nav-cta {
    padding: 10px 14px;
    min-height: 40px;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
  }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Short viewports — tighten chrome so more vertical space stays for the H1 */
@media (max-height: 720px) {
  .site-nav { padding: 14px 0 12px; }
  .logo img { height: 34px; }
  .nav-cta { padding: 10px 16px; font-size: 1rem; }
}

/* ── PRINT ── */
@media print {
  .site-nav, .site-footer, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .site-shell { padding-bottom: 0; }
}
