/* WECAIRS shared site layer.
   Loaded last on every page, after styles.css and the page-specific sheets.
   It holds the shared header, dropdown navigation, breadcrumbs, the gold A and I
   in the wordmark, and accessibility fixes (contrast, focus, target size, reflow).
   Brand values stay the same: forest #092d28, heritage gold #d9ae63, ivory #f5f3ec.
   --gold-deep is the same gold, darkened only where it sits on a light
   background, so the text meets WCAG 2.2 AA contrast (4.5:1). */

:root {
  --gold-deep:#8a6420;   /* 5.2:1 on paper, 4.8:1 on ivory */
  --gold-on-dark:#d9ae63;/* 7.2:1 on forest */
  --muted-strong:#55635d;
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position:absolute!important;
  width:1px;height:1px;
  margin:-1px;padding:0;border:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);
  white-space:nowrap;
}

/* ---------- Focus: a two-tone ring that shows on light and dark grounds ---------- */
a:focus-visible,button:focus-visible,summary:focus-visible,
input:focus-visible,select:focus-visible,textarea:focus-visible,
[tabindex]:focus-visible {
  outline:3px solid var(--forest);
  outline-offset:2px;
  box-shadow:0 0 0 5px #fff,0 0 0 8px var(--gold-on-dark);
}
.skip:focus {
  outline:3px solid var(--forest);
  color:var(--forest);
  font-weight:700;
}
/* Keep focused items clear of the sticky header (WCAG 2.4.11) */
html { scroll-padding-top:120px; }

/* ---------- Wordmark: the A and I in gold ---------- */
.wordmark { letter-spacing:1.3px; white-space:nowrap; }
.wordmark .ai { color:var(--gold-deep); }          /* header sits on paper */
footer .wordmark .ai,
.footer-brand .ai { color:var(--gold-on-dark); }   /* footer sits on dark green */

/* ---------- Top line: allow text spacing and zoom without clipping ---------- */
.topline { height:auto; min-height:34px; padding-top:6px; padding-bottom:6px; gap:16px; flex-wrap:wrap; }

/* ---------- Header and primary navigation ---------- */
.site-header { height:auto; min-height:92px; gap:20px; }
.nav-list,.nav-list ul { list-style:none; margin:0; padding:0; }
.nav-list { display:flex; align-items:center; gap:6px 20px; flex-wrap:wrap; justify-content:flex-end; }
.nav-list > li { position:relative; display:flex; align-items:center; }
.nav-list a { display:inline-flex; align-items:center; min-height:32px; padding:4px 2px; }
.nav-list a[aria-current="page"]:not(.nav-cta),
.nav-list .is-current > a { color:var(--forest); box-shadow:inset 0 -2px 0 var(--gold-deep); }
nav a:not(.nav-cta):hover { color:var(--gold-deep); }
.nav-list .nav-cta { padding:12px 18px; min-height:44px; }

.sub-toggle {
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:32px; margin-left:-2px;
  background:none; border:0; color:inherit; cursor:pointer; padding:0;
}
.sub-toggle::after {
  content:""; width:7px; height:7px;
  border-right:2px solid currentColor; border-bottom:2px solid currentColor;
  transform:translateY(-2px) rotate(45deg); transition:transform .15s;
}
.sub-toggle[aria-expanded="true"]::after { transform:translateY(2px) rotate(-135deg); }

.sub {
  display:none;
  position:absolute; top:100%; left:-14px; z-index:30;
  min-width:250px; padding:10px 0;
  background:var(--paper); border:1px solid #d9d8cd; border-top:3px solid var(--gold-on-dark);
  box-shadow:0 14px 30px #0000001f;
  font:500 13px/1.4 'DM Sans',Arial,sans-serif;
}
.sub a { display:flex; min-height:40px; padding:8px 18px; width:100%; }
.sub a:hover,.sub a:focus-visible { background:var(--ivory); }
.has-sub.is-open > .sub { display:block; }
@media (hover:hover) and (min-width:1101px) {
  .has-sub:not(.no-hover):hover > .sub { display:block; }
}

/* Mobile and tablet menu */
@media (max-width:1100px) {
  .menu { display:block; background:none; border:1px solid #ced5ca; padding:9px 14px; min-height:44px; font-size:13px; cursor:pointer; color:var(--ink); }
  .site-header { min-height:75px; padding:0 20px; position:sticky; }
  #nav { display:none; position:absolute; top:100%; left:0; right:0; max-height:calc(100vh - 110px); overflow-y:auto;
         background:var(--paper); padding:12px 20px 20px; box-shadow:0 10px 25px #0002; }
  #nav.open { display:block; }
  .nav-list { display:block; }
  .nav-list > li { display:flex; flex-wrap:wrap; border-bottom:1px solid #e4e2d8; }
  .nav-list > li > a { flex:1; min-height:48px; font-size:14px; }
  .sub-toggle { width:48px; height:48px; }
  .sub { position:static; flex-basis:100%; min-width:0; box-shadow:none; border:0; border-left:3px solid var(--gold-on-dark);
         margin:0 0 10px 4px; padding:0; background:transparent; }
  .sub a { min-height:44px; font-size:14px; }
  .nav-list > li:last-child { border-bottom:0; padding-top:14px; }
  .nav-list .nav-cta { justify-content:center; width:100%; }
}

/* styles.css styles every <nav> as the header menu. Undo that for the
   breadcrumb and footer navs, at every width. */
nav.breadcrumb,footer nav { position:static; inset:auto; background:none; padding:0; box-shadow:none; gap:0; }

/* ---------- Breadcrumbs ---------- */
nav.breadcrumb { display:block; }
.breadcrumb { margin:0 0 18px; font:600 12px/1.5 'Manrope',sans-serif; letter-spacing:.4px; }
.breadcrumb ol { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:4px 0; }
.breadcrumb li { color:#e2e8e1; }
.breadcrumb li + li::before { content:"/"; margin:0 9px; color:#9fb7ab; }
.breadcrumb a { color:#fff; text-decoration:underline; text-decoration-color:var(--gold-on-dark); text-underline-offset:3px; }
.breadcrumb [aria-current="page"] { color:var(--gold-on-dark); }

/* ---------- Page record line (authorship and dates) ---------- */
.page-record { margin:0 auto; padding:18px 0 40px; font-size:.85rem; color:var(--muted-strong); border-top:1px solid #e1e0d6; }
.page-record strong { color:var(--ink); }

/* ---------- Footer ---------- */
footer nav { display:contents; font:inherit; }
.footer-grid a { display:block; min-height:24px; padding:3px 0; }
.footer-grid a:hover { text-decoration:underline; text-decoration-color:var(--gold-on-dark); }
.footer-grid a.footer-brand { display:inline-block; font:500 34px Georgia,serif; color:#fff; margin:0 0 6px; padding:0; }
.footer-grid a.footer-brand:hover { text-decoration:none; }
.footer-status { margin-top:16px; max-width:265px; }

/* ---------- Contrast fixes (WCAG 1.4.3) ---------- */
/* Gold labels on light grounds */
.section-kicker,.pnum,.mini,.research-cards span { color:var(--gold-deep); }
.statement .section-kicker { color:#7a571a; }            /* #eae9df band: 5.4:1 */
.ivory .btn.outline { color:var(--forest); border-color:#5e7a6e; }  /* outline buttons were white on ivory */
.evidence-scroll:focus-visible { outline:3px solid var(--forest); outline-offset:2px; }
.section-head h2 em,.about h2 em,.faq h2 em { color:var(--gold-deep); }
h1 em,h2 em { color:var(--gold-deep); }
/* ...and keep the bright gold on dark grounds */
.hero .section-kicker,.pilots .section-kicker,.participate .section-kicker,.contact .section-kicker,
.phase-hero .section-kicker,.founder-preview .section-kicker,footer .section-kicker,.section-kicker.light { color:#e2bb79; }
.hero h1 em,.pilots h2 em,.participate h2 em,.contact h2 em,.phase-hero h1 em,.founder-preview h2 em { color:var(--gold-on-dark); }
.pilot-feature .mini { color:#e5bf7a; }
/* Grey text that fell under 4.5:1 */
.research-cards small,.pilot-disclaimer,.statement p:last-child,.tab-content p,.tab-content li { color:var(--muted-strong); }
.brand small { color:#56685f; }

/* ---------- Links inside running text are underlined (WCAG 1.4.1) ---------- */
.phase-card p a,.research-alert a,.founder-main a,.faq a,.contact-grid small a,.page-record a { text-decoration:underline; text-underline-offset:3px; }

/* ---------- Reflow and zoom (WCAG 1.4.10) ---------- */
img,canvas,svg,video { max-width:100%; }
.phase-hero h1,.founder-heading,h1,h2 { overflow-wrap:break-word; }
@media (max-width:420px) {
  .wrap { width:calc(100% - 32px); }
  .topline { font-size:10px; }
  .brand strong { font-size:22px; }
  .brand img { width:40px; height:40px; }
}

/* ---------- Assessment workspace: make the file picker reachable by keyboard ---------- */
.import-button { position:relative; }
.import-button input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.import-button:focus-within { outline:3px solid var(--forest); outline-offset:2px; box-shadow:0 0 0 5px #fff,0 0 0 8px var(--gold-on-dark); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion:reduce) {
  .btn:hover { transform:none; }
  .sub-toggle::after { transition:none; }
}

/* ---------- Print ---------- */
@media print {
  .topline,.site-header,.breadcrumb,footer,.skip { display:none!important; }
}
