
/* ── Variables ───────────────────────────────────────────── */
:root {
  --blue:        #00285E;
  --blue-mid:    #1A4A8A;
  --blue-light:  #E8EEF7;
  --silver:      #F4F6F8;
  --silver-mid:  #CBD5E1;
  --white:       #FFFFFF;
  --navy-text:   #1A2744;
  --body-text:   #374151;
  --muted:       #6B7280;
  --accent:      #E8A020;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius:   6px;
  --radius-lg: 12px;
  --shadow:   0 2px 12px rgba(0,40,94,.10);
  --shadow-lg: 0 8px 32px rgba(0,40,94,.14);

  --header-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-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body-text);
  background: var(--silver);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-text);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Container ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(135deg, rgba(0,18,50,0.38) 0%, rgba(0,40,100,0.28) 50%, rgba(0,18,50,0.35) 100%);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  height: var(--header-h);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 32px rgba(0,0,0,.18);
}
.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  height: var(--header-h);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}
.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.02em;
  line-height: 1;
}
.site-logo-text span { color: var(--accent); }

/* Nav */
.site-nav { display: none; }
.site-nav > ul {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.site-nav a {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .45rem .75rem;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  border-radius: var(--radius);
  transition: background .18s, color .18s;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.12); color: var(--white); }
.site-nav a.active { background: rgba(255,255,255,.12); color: var(--white); }
.site-nav a img { filter: brightness(0) invert(1); opacity: .8; }
.site-nav a:hover img,
.site-nav a.active img { opacity: 1; }

/* Dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown > a { padding-right: .5rem; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  padding: .5rem 0;
  border: 1px solid var(--silver-mid);
}
.dropdown-menu a {
  display: block;
  padding: .55rem 1.1rem;
  font-size: .875rem;
  color: var(--navy-text);
  border-radius: 0;
  background: none;
}
.dropdown-menu a:hover { background: var(--blue-light); color: var(--blue); text-decoration: none; }
.dropdown-menu a.active { background: var(--accent); color: var(--white); font-weight: 600; }
.nav-dropdown.dropdown-open .dropdown-menu { display: block; }

/* Mega menu */
.mega-menu {
  min-width: 0;
  width: 580px;
  padding: 1.25rem 0;
  display: none;
  grid-template-columns: repeat(3, 1fr);
}
.nav-dropdown.dropdown-open .mega-menu { display: grid; }
.mega-col {
  padding: 0 1.1rem;
  border-right: 1px solid var(--silver-mid);
}
.mega-col:last-child { border-right: none; }
.mega-heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--silver);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.mega-heading img {
  filter: invert(45%) sepia(8%) saturate(400%) hue-rotate(180deg) brightness(90%);
}
.mega-col a {
  display: block;
  padding: .38rem 0;
  font-size: .845rem;
  color: var(--navy-text);
  background: none;
  border-radius: 0;
  transition: color .15s;
}
.mega-col a:hover { color: var(--blue); background: none; text-decoration: none; padding-left: .25rem; }


/* Header right */
/* ── Header search ───────────────────────────────────────────── */
.header-search {
  flex: 1;
  max-width: 360px;
  position: relative;
  display: none; /* hidden on mobile by default */
}
@media (min-width: 900px) { .header-search { display: block; } }

.hs-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  padding: .45rem .75rem;
  transition: background .18s, border-color .18s;
}
.hs-wrap:focus-within {
  background: rgba(255,255,255,.16);
  border-color: rgba(232,160,32,.7);
}
.hs-icon { flex-shrink: 0; filter: brightness(0) invert(1); opacity: .6; }
.hs-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: .85rem;
  font-family: inherit;
  min-width: 0;
}
.hs-input::placeholder { color: rgba(255,255,255,.4); }
.hs-input::-webkit-search-cancel-button { display: none; }
.hs-clear {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  opacity: .5;
  transition: opacity .15s;
}
.hs-clear:hover { opacity: 1; }
.hs-clear img { filter: brightness(0) invert(1); }

.hs-results {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--silver-mid);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 200;
  max-height: 420px;
  overflow-y: auto;
}
.hs-results[hidden] { display: none; }
.hs-result {
  display: block;
  padding: .7rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--silver-mid);
  transition: background .12s;
  cursor: pointer;
}
.hs-result:last-child { border-bottom: none; }
.hs-result:hover, .hs-result[aria-selected="true"] { background: var(--blue-light); }
.hs-result-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy-text);
  line-height: 1.3;
  margin-bottom: .15rem;
}
.hs-result-title mark {
  background: rgba(232,160,32,.3);
  color: inherit;
  padding: 0 .1em;
}
.hs-result-url {
  font-size: .72rem;
  color: var(--muted);
}
.hs-no-results {
  padding: 1rem;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}

/* ── Header right ────────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--navy-text);
  font-size: .7rem;
  font-weight: 700;
  border-radius: var(--radius);
  padding: .2rem .45rem;
  line-height: 1;
}
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  transition: background .18s;
}
.nav-toggle:hover { background: rgba(255,255,255,.12); }
.nav-toggle img { filter: brightness(0) invert(1); }
.nav-toggle .icon-close { display: none; }

/* Mobile nav open state — nav is portalled to <body> by JS */
body.nav-open > .site-nav {
  display: block !important;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--blue);
  overflow-y: auto;
  padding: 1rem 1rem 2rem;
  z-index: 99;
}
body.nav-open > .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
body.nav-open > .site-nav > ul > li > a { font-size: 1rem; padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }

/* Mobile dropdown — hidden until .mobile-open is added by JS */
body.nav-open > .site-nav .dropdown-menu {
  display: none;
  position: static;
  box-shadow: none;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
  background: rgba(0,0,0,.2);
}
body.nav-open > .site-nav .nav-dropdown.mobile-open > .dropdown-menu {
  display: block;
}
body.nav-open > .site-nav .nav-dropdown.mobile-open > .mega-menu {
  display: flex !important;
  flex-direction: column;
}
body.nav-open > .site-nav .dropdown-menu a { color: rgba(255,255,255,.8); font-size: .9rem; padding: .55rem 1rem .55rem 1.75rem; }
body.nav-open > .site-nav .dropdown-menu a:hover { background: rgba(255,255,255,.1); color: var(--white); }

/* Caret rotates when accordion is open */
body.nav-open > .site-nav .nav-dropdown > a img { transition: transform .2s; }
body.nav-open > .site-nav .nav-dropdown.mobile-open > a img { transform: rotate(180deg); }

/* Mobile mega menu */
body.nav-open > .site-nav .mega-col {
  border-right: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .5rem .75rem .5rem 1.75rem;
}
body.nav-open > .site-nav .mega-col:last-child { border-bottom: none; }
body.nav-open > .site-nav .mega-heading { color: rgba(255,255,255,.4); font-size: .7rem; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: .4rem; margin-bottom: .4rem; }
body.nav-open > .site-nav .mega-col a { color: rgba(255,255,255,.8); padding: .3rem 0; font-size: .88rem; }

body.nav-open .nav-toggle .icon-open { display: none; }
body.nav-open .nav-toggle .icon-close { display: block; }

@media (min-width: 900px) {
  .site-nav { display: flex !important; }
  .nav-toggle { display: none; }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(180deg, #0e1c35 0%, #060e1c 100%);
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  margin-top: auto;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, #e8a020 30%, #f5c842 55%, #e8a020 70%, transparent 100%) 1;
}

/* ── Brand row ───────────────────────────────────────────────── */
.footer-brand {
  padding: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-brand-logo {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none;
}
.footer-brand-logo img { width: 28px; height: 28px; }
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.footer-brand-name span { color: var(--accent); }
.footer-tagline {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  max-width: 340px;
}

/* ── Divider ─────────────────────────────────────────────────── */
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(232,160,32,.35) 0%, rgba(255,255,255,.08) 60%, transparent 100%);
  margin: 1.75rem 0 0;
}

/* ── Columns ─────────────────────────────────────────────────── */
.footer-main {
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) { .footer-main { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-main { grid-template-columns: repeat(3, 1fr); } }

.footer-col-heading {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding-left: .7rem;
  border-left: 2px solid var(--accent);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul a {
  color: rgba(255,255,255,.65);
  transition: color .18s, padding-left .18s;
  text-decoration: none;
  display: inline-block;
}
.footer-col ul a:hover { color: var(--accent); padding-left: .3rem; }

/* ── RG band — full-width, outside .container ────────────────── */
.footer-rg {
  background: rgba(0,0,0,.3);
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-rg-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.footer-rg-logos {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.footer-rg img {
  height: 34px;
  width: auto;
  opacity: .6;
  filter: grayscale(1) brightness(1.8);
  transition: opacity .2s, filter .2s;
}
.footer-rg img:hover { opacity: 1; filter: none; }
.footer-rg-helpline {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
}
.footer-rg-helpline a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 599px) {
  .footer-rg-inner { flex-direction: column; align-items: flex-start; }
  .footer-rg-helpline { white-space: normal; }
}

/* ── Bottom bar ──────────────────────────────────────────────── */
.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}
.footer-disclaimer {
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  max-width: 680px;
  line-height: 1.6;
}
.footer-disclaimer a { color: rgba(255,255,255,.7); text-decoration: underline; text-underline-offset: 2px; }
.footer-copyright {
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
}

/* ── Back to top ─────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateY(8px);
}
.back-to-top img { filter: brightness(0) invert(1); }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--blue-mid); }

/* ── Utility classes ─────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
