/* ==========================================================================
   Fonts (self-hosted, Latin subset, SIL OFL: see assets/fonts/*-OFL.txt)
   The "Fallback" faces are Arial scaled to the web fonts' metrics, so text
   doesn't shift when the web fonts finish loading.
   ========================================================================== */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
/* Greek letters (e.g. the diameter sign in specs). Downloaded only on pages that use them. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/inter-greek-400-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/poppins-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Fallback"; src: local("Arial");
  size-adjust: 107.31%; ascent-override: 90.28%; descent-override: 22.48%; line-gap-override: 0%; }
@font-face { font-family: "Poppins Fallback"; src: local("Arial");
  size-adjust: 113.70%; ascent-override: 92.35%; descent-override: 30.78%; line-gap-override: 8.80%; }

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --brand-blue: #045CBC;       /* primary: buttons, links, focus */
  --brand-blue-dark: #034A97;  /* primary hover */
  --brand-blue-tint: #E8F0FA;
  --brand-red: #E41424;        /* accent only: badges, hover underline, highlights */
  --navy: #0F172A;
  --text: #0F172A;
  --muted: #475569;
  --bg: #FFFFFF;
  --surface: #F5F7FA;
  --border: #E2E8F0;

  --font-head: "Poppins", "Poppins Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 12px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .05);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  --ease: 180ms ease;
  --focus-ring: 0 0 0 3px rgba(4, 92, 188, .4);

  --container: 1200px;
  --gutter: 16px;
  --header-h: 64px;
  --tap: 44px;
}

@media (min-width: 960px) {
  :root { --gutter: 24px; --header-h: 76px; }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--navy);
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }

a { color: var(--brand-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-blue-dark); }

:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

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

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--brand-blue); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: 500 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.0625rem; }
.btn-primary { background: var(--brand-blue); color: #fff; }
.btn-primary:hover { background: var(--brand-blue-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--brand-blue); border-color: currentColor; }
.btn-outline:hover { background: var(--brand-blue-tint); }
.btn-light { background: #fff; color: var(--brand-blue); }
.btn-light:hover { background: var(--brand-blue-tint); color: var(--brand-blue-dark); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-light:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .7); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-header::before { /* thin two-tone brand line */
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--brand-red) 0 18%, var(--brand-blue) 18% 100%);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; min-height: var(--tap); }
.brand-mark { width: 40px; height: 40px; }
.brand-full { height: 44px; width: auto; }
.wordmark {
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  letter-spacing: .14em; line-height: 1; white-space: nowrap;
}
.wm-a { color: var(--brand-red); }
.wm-b { color: var(--brand-blue); }

.menu-toggle {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); padding: 0;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--navy); cursor: pointer;
}
.menu-toggle svg { stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.menu-toggle .bar { transition: transform var(--ease), opacity var(--ease); transform-origin: 12px 12px; }
.menu-toggle[aria-expanded="true"] .bar-1 { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar-2 { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar-3 { transform: translateY(-5px) rotate(-45deg); }
.no-js .menu-toggle { display: none; }

/* Mobile nav panel (below 960px) */
.nav-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: 12px var(--gutter) 20px;
  max-height: calc(100vh - var(--header-h) - 3px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.js .nav-panel:not(.is-open) { display: none; }
.no-js .nav-panel { position: static; box-shadow: none; border: 0; padding: 0 0 12px; }
.no-js .header-inner { flex-wrap: wrap; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  min-height: var(--tap); padding: 10px 4px;
  color: var(--navy); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
@media (hover: hover) { .nav-link:hover { color: var(--brand-blue); } }
.nav-link[aria-current="page"], .nav-link[data-current="true"] { color: var(--brand-blue); }
.chevron { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--ease); }
.has-dropdown.is-open .chevron { transform: rotate(180deg); }

.dropdown { padding: 4px 0 8px 12px; }
.js .has-dropdown:not(.is-open) .dropdown { display: none; }
.no-js .dropdown { display: none; }
.dropdown-grid { list-style: none; margin: 0; padding: 0; }
.dropdown-grid a {
  display: flex; align-items: center; min-height: var(--tap); padding: 8px 12px;
  color: var(--text); text-decoration: none; border-radius: 8px;
}
@media (hover: hover) { .dropdown-grid a:hover { background: var(--surface); color: var(--brand-blue); } }
.dropdown-all a { font-weight: 500; color: var(--brand-blue); }

/* Search box */
.search-form { position: relative; display: flex; align-items: center; order: -1; } /* first in the mobile menu */
.search-input {
  width: 100%; min-height: var(--tap); padding: 10px 48px 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit;
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; border-color: var(--brand-blue); background: #fff; box-shadow: var(--focus-ring); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-submit {
  position: absolute; right: 0; top: 0; width: var(--tap); height: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search-submit:hover { color: var(--brand-blue); }
.search-submit svg { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

/* Desktop header */
@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .header-inner { gap: 32px; }
  .brand-mark { width: 44px; height: 44px; }
  .wordmark { font-size: 1.375rem; }

  .nav-panel, .js .nav-panel:not(.is-open), .no-js .nav-panel {
    position: static; display: flex; flex-direction: row; align-items: center; flex: 1;
    gap: 24px; padding: 0; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible;
  }
  .search-form { margin-left: auto; width: 280px; order: 0; }

  .nav-list { display: flex; align-items: center; gap: 4px; }
  .nav-list > li { position: relative; }
  .nav-link { border: 0; padding: 10px 14px; position: relative; justify-content: flex-start; }
  .nav-link::after { /* red accent underline on hover */
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--brand-red); border-radius: 2px; transform: scaleX(0); transition: transform var(--ease);
  }
  .nav-link:hover::after { transform: scaleX(1); }
  .nav-link[aria-current="page"]::after, .nav-link[data-current="true"]::after { background: var(--brand-blue); transform: scaleX(1); }

  .dropdown {
    position: absolute; top: calc(100% + 8px); left: -12px; z-index: 60;
    width: 520px; padding: 12px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  }
  .dropdown::before { /* hover bridge across the gap so the panel doesn't close */
    content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
  }
  .dropdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
  .dropdown-all { grid-column: 1 / -1; border-bottom: 1px solid var(--border); margin-bottom: 6px; padding-bottom: 6px; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 48px 0; }
.section-surface { background: var(--surface); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-title { margin: 0; }
@media (min-width: 960px) { .section { padding: 72px 0; } }

.hero {
  color: #fff;
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(255, 255, 255, .12), transparent 60%),
    linear-gradient(135deg, var(--brand-blue) 0%, #0A3C80 55%, var(--navy) 100%);
}
.hero-inner { padding-top: 64px; padding-bottom: 72px; max-width: var(--container); }
.hero-title { color: #fff; max-width: 18ch; margin-bottom: 16px; }
.hero-sub { font-size: 1.125rem; color: rgba(255, 255, 255, .9); max-width: 52ch; margin-bottom: 28px; }
@media (min-width: 960px) { .hero-inner { padding-top: 104px; padding-bottom: 112px; } .hero-sub { font-size: 1.25rem; } }

.about { display: grid; gap: 32px; align-items: start; }
.about-text { max-width: 68ch; }
.about-text .section-title { margin-bottom: 16px; }
.about-text p { color: var(--muted); font-size: 1.0625rem; }
.about-text .about-lead { color: var(--text); font-size: 1.1875rem; line-height: 1.55; }
.about-facts { margin: 0; display: grid; gap: 12px; }
.fact {
  padding: 16px 20px; background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--brand-blue); border-radius: var(--radius-sm);
}
.fact:first-child { border-left-color: var(--brand-red); }
.fact dt { font-size: .8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fact dd { margin: 2px 0 0; font-family: var(--font-head); font-weight: 600; font-size: 1.125rem; color: var(--navy); }
@media (min-width: 720px) and (max-width: 959px) { .about-facts { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .about { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; } .about-facts { margin-top: 56px; } }

.cta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  padding: 32px; border-radius: var(--radius);
  background: var(--brand-blue-tint); border-left: 4px solid var(--brand-red);
}
.cta-title { margin: 0 0 4px; font-size: 1.375rem; }
.cta-text { margin: 0; color: var(--muted); }
@media (min-width: 720px) { .cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 40px 48px; } }

/* Temporary list until category cards land (Stage 2). */
.placeholder-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.placeholder-list a { display: flex; align-items: center; min-height: 56px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 0; font-size: .9375rem; }
.footer-grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.footer-about { color: var(--muted); margin-top: 12px; max-width: 36ch; }
.footer-title { font-size: 1rem; margin-bottom: 12px; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-links a, .footer-contact a { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.footer-links a:hover, .footer-contact a:hover { color: var(--brand-blue); text-decoration: underline; }
.footer-contact li { color: var(--muted); padding: 2px 0; }
.footer-contact li:not(:has(a)) { padding: 10px 0; line-height: 1.4; }
.footer-links-2col { columns: 2; column-gap: 16px; }
.footer-links-2col li { break-inside: avoid; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; padding-bottom: 24px; color: var(--muted); font-size: .875rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.1fr 1.4fr 1fr; gap: 48px; } }

/* ==========================================================================
   Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
  .btn:hover { transform: none; }
}
