/* =====================================================================
   ADA Websites — base.css
   Shared chrome: reset, design tokens, navigation, footer, buttons,
   forms and utilities. Loaded on every page BEFORE its page stylesheet.
   ===================================================================== */

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

:root {
  --black: #0A0A0A;
  --white: #FAFAF7;
  --off-white: #F2F1EC;
  --accent: #2A5FFF;
  --accent-light: #EEF2FF;
  --accent-dark: #1A3FCC;
  --green: #00B87C;
  --green-light: #E6F9F3;
  --red: #E53E3E;
  --red-light: #FFF5F5;
  --amber: #F59E0B;
  --amber-light: #FFFBEB;
  --gray-100: #F5F4EF;
  --gray-200: #E8E7E1;
  --gray-300: #D1CFC8;
  --gray-500: #9B9890;
  --gray-700: #4A4A47;
  --gray-900: #1A1A18;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --nav-h: 68px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); background: var(--white); color: var(--black);
  line-height: 1.6; font-size: 16px; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px; font-weight: 600; z-index: 1000; transition: top .2s; }
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 200; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(250,250,247,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200); transition: box-shadow .25s ease;
}
.site-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.nav-inner { max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-mark { width: 36px; height: 36px; background: var(--accent); border-radius: 10px; display: grid; place-items: center; color: #fff;font-weight: 800; font-size: 16px; }
.logo-text {font-weight: 700; font-size: 18px; color: var(--black); }
.logo-text span { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--gray-700); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 9px 12px; border-radius: var(--radius-sm); transition: color .2s, background .2s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent); background: var(--accent-light); }
.has-sub { position: relative; }
.sub-toggle::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-1px); transition: transform .2s; }
.has-sub:hover .sub-toggle::after, .has-sub.open .sub-toggle::after { transform: rotate(-135deg); }
.submenu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; list-style: none; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s, transform .18s, visibility .18s; }
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--gray-700); text-decoration: none; transition: background .15s, color .15s; }
.submenu a:hover { background: var(--accent-light); color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-alert { font-size: 14px; font-weight: 500; color: var(--red); text-decoration: none; white-space: nowrap; }
.nav-alert:hover { text-decoration: underline; }
.nav-btn { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: #fff; background: var(--accent); border-radius: var(--radius-sm); padding: 9px 20px; text-decoration: none; white-space: nowrap; transition: background .2s, transform .2s; box-shadow: 0 4px 16px rgba(42,95,255,.25); }
.nav-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--gray-200); background: #fff; border-radius: var(--radius-sm); cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--black); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 500; font-size: 15px; line-height: 1; text-decoration: none; border: 1.5px solid transparent; border-radius: var(--radius-md); padding: 14px 24px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn-primary { color: #fff; background: var(--accent); box-shadow: 0 4px 20px rgba(42,95,255,.3); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { color: var(--black); background: #fff; border-color: var(--gray-300); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
input, select, textarea { width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--black); background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); padding: 12px 16px; outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42,95,255,.1); }
textarea { resize: vertical; min-height: 100px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gray-900); color: rgba(255,255,255,.45); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 56px 60px 40px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 36px; }
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand .logo-text { color: #fff; font-size: 15px; }
.footer-brand p { font-size: 13px; line-height: 1.65; margin-bottom: 16px; max-width: 260px; }
.f-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,184,124,.1); border: 1px solid rgba(0,184,124,.25); border-radius: var(--radius-sm); padding: 5px 10px; font-size: 11px; color: var(--green); font-weight: 500; }
.footer-col h5 {font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,.4); text-decoration: none; transition: color .2s; }
.footer-col ul li a:hover { color: rgba(255,255,255,.85); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; }

/* ---------- Utilities ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.muted { color: var(--gray-500); }
.text-red { color: var(--red); }
.text-accent { color: var(--accent); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-inner { padding: 0 20px; }
  .nav-toggle { display: block; }
  .nav-menu { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-lg); padding: 12px 20px 24px; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; transform: translateY(-130%); transition: transform .3s ease; visibility: hidden; }
  .nav-menu.open { transform: translateY(0); visibility: visible; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav-link { padding: 13px 12px; font-size: 16px; width: 100%; justify-content: space-between; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; display: none; }
  .has-sub.open .submenu { display: block; }
  .nav-cta { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; margin-top: 10px; }
  .nav-alert { padding: 8px 0; }
  .nav-btn { text-align: center; padding: 13px 20px; }
  .footer-inner { padding: 48px 24px 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- Global overflow safety (tablet & mobile) ----------
   Grid/flex items default to min-width:auto and refuse to shrink below their
   content, so a wide table or long word forces the whole column off-screen.
   :where() keeps zero specificity so any intentional min-width still wins. */
@media (max-width: 992px) {
  :where(*) { min-width: 0; }
  img, svg, video, table, pre { max-width: 100%; }
  table { table-layout: fixed; width: 100%; }
  th, td { overflow-wrap: anywhere; word-break: break-word; }
  h1, h2, h3, h4, p, li, a, span, div { overflow-wrap: break-word; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
