/* ===========================================================
   Chrome — shared header + footer across ALL pages
   Uses hardcoded brand colors so it works independently of
   any page's token system (monolithic or thin-shell).
   =========================================================== */

/* --- Palette (scoped) --- */
.site-hdr,
.site-ftr,
.mobile-overlay {
  --c-navy: #122941;
  --c-navy-deep: #0a1929;
  --c-navy-bg: #0a0f1a;
  --c-teal: #228293;
  --c-teal-light: #31b7bc;
  --c-teal-mute: #99bec8;
  --c-steel: #5484A3;
  --c-fg: #ffffff;
  --c-orange: #f39655;
  --c-hairline: rgba(84,132,163,0.15);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18,41,65,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-hdr::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--c-hairline);
}
.site-hdr .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: relative;
}

/* Brand */
.site-hdr .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-fg);
  text-decoration: none;
}
.site-hdr .brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
}
.site-hdr .brand-mark svg { width: 100%; height: 100%; }
.site-hdr .brand-word { font-weight: 700; font-size: 18px; letter-spacing: 0.01em; }
.site-hdr .brand-word .lt { font-weight: 300; color: var(--c-teal-mute); margin-left: 6px; }

/* Nav */
.site-hdr .nav {
  display: flex;
  gap: 26px;
  position: relative;
  height: 68px;
  align-items: center;
}
.site-hdr .nav a {
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-teal-mute);
  transition: color .18s;
  display: inline-flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
  position: relative;
}
.site-hdr .nav a:hover { color: var(--c-fg); }
.site-hdr .nav a.is-active { color: var(--c-fg); }
.site-hdr .nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--c-teal);
}
.site-hdr .nav-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--c-teal);
  transition: left .3s cubic-bezier(.4,.6,.2,1), width .3s cubic-bezier(.4,.6,.2,1);
  pointer-events: none;
  z-index: 1;
}

/* Tools (right side) */
.site-hdr .hdr-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-hdr .loc {
  font-weight: 300;
  font-size: 12px;
  color: var(--c-steel);
  letter-spacing: 0.02em;
}

/* Theme toggle (pill switch) */
.site-hdr .theme-tog {
  width: 48px; height: 26px; border-radius: 999px;
  background: rgba(84,132,163,0.18);
  position: relative; cursor: pointer;
  border: 1px solid rgba(84,132,163,0.25);
  display: inline-flex; align-items: center;
  padding: 0 5px;
  justify-content: space-between;
}
.site-hdr .theme-tog svg {
  width: 13px; height: 13px;
  stroke-width: 1.8; fill: none; stroke: currentColor;
  flex-shrink: 0; position: relative; z-index: 2;
}
.site-hdr .theme-tog .ic-sun { color: rgba(243,150,85,0.45); }
.site-hdr .theme-tog .ic-moon { color: var(--c-teal-light); }
.site-hdr .theme-tog::before {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-navy);
  border: 1px solid rgba(49,183,188,0.5);
  transition: transform .3s cubic-bezier(.4,.6,.2,1), background .3s, border-color .3s;
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Burger */
.site-hdr .burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid rgba(84,132,163,0.35);
  border-radius: 6px;
  align-items: center; justify-content: center;
  background: transparent; cursor: pointer;
}
.site-hdr .burger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--c-teal-mute); position: relative;
}
.site-hdr .burger span::before,
.site-hdr .burger span::after {
  content: ""; position: absolute; left: 0;
  width: 18px; height: 1.5px; background: var(--c-teal-mute);
}
.site-hdr .burger span::before { top: -6px; }
.site-hdr .burger span::after { top: 6px; }

@media (max-width: 880px) {
  .site-hdr .nav { display: none; }
  .site-hdr .loc { display: none; }
  .site-hdr .burger { display: inline-flex; }
  .site-hdr .nav-indicator { display: none; }
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed; inset: 0;
  background: var(--c-navy);
  z-index: 60;
  display: none;
  flex-direction: column;
  padding: 80px 32px;
}
.mobile-overlay.open { display: flex; }
.mobile-overlay a {
  font-weight: 700; font-size: 28px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(84,132,163,0.2);
  color: var(--c-fg);
  text-decoration: none;
}
.mobile-overlay .close {
  position: absolute; top: 24px; right: 24px;
  font-size: 24px; color: var(--c-teal-mute);
  background: transparent; border: 0; cursor: pointer;
}

/* =========================================================
   LIGHT THEME — header overrides
   ========================================================= */
[data-theme="light"] .site-hdr {
  background: #ffffff;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: 0 1px 0 rgba(18,41,65,0.08);
}
[data-theme="light"] .site-hdr::after { display: none; }
[data-theme="light"] .site-hdr .brand { color: #122941; }
[data-theme="light"] .site-hdr .brand-word .lt { color: #5484A3; }
[data-theme="light"] .site-hdr .nav a { color: #5484A3; }
[data-theme="light"] .site-hdr .nav a:hover,
[data-theme="light"] .site-hdr .nav a.is-active { color: #122941; }
[data-theme="light"] .site-hdr .theme-tog { background: rgba(18,41,65,0.08); border-color: rgba(18,41,65,0.12); }
[data-theme="light"] .site-hdr .theme-tog::before {
  transform: translateX(20px);
  background: #ffffff;
  border-color: rgba(243,150,85,0.6);
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}
[data-theme="light"] .site-hdr .theme-tog .ic-sun { color: #f39655; }
[data-theme="light"] .site-hdr .theme-tog .ic-moon { color: rgba(84,132,163,0.40); }
[data-theme="light"] .site-hdr .burger { border-color: rgba(18,41,65,0.20); }
[data-theme="light"] .site-hdr .burger span,
[data-theme="light"] .site-hdr .burger span::before,
[data-theme="light"] .site-hdr .burger span::after { background: #5484A3; }
[data-theme="light"] .mobile-overlay { background: #ffffff; }
[data-theme="light"] .mobile-overlay a { color: #122941; border-bottom-color: rgba(18,41,65,0.12); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-ftr {
  position: relative;
  background: #0a0f1a;
  padding: 80px 0 32px;
  border-top: 1px solid rgba(34,130,147,0.15);
}
.site-ftr .shell {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.ftr-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
@media (max-width: 960px) { .ftr-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; } }
@media (max-width: 560px) { .ftr-grid { grid-template-columns: 1fr; gap: 36px; } }

/* Brand column */
.ftr-brand-col { display: flex; flex-direction: column; gap: 20px; }
.ftr-brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
}
.ftr-brand-mark { width: 28px; height: 28px; display: grid; place-items: center; }
.ftr-brand-mark svg { width: 100%; height: 100%; }
.ftr-brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.ftr-brand-name .light { font-weight: 300; color: #cbd3dd; margin-left: 2px; }
.ftr-tag {
  font-style: italic; font-weight: 300; font-size: 14px;
  color: #99bec8; max-width: 30ch; line-height: 1.5; margin: 0;
}
.ftr-social { display: flex; gap: 16px; margin-top: auto; padding-top: 8px; }
.ftr-social a {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  color: #5484A3; transition: color .3s ease;
  text-decoration: none;
}
.ftr-social a:hover { color: #228293; }
.ftr-social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* Link columns */
.ftr-col h4 {
  font-family: "Museo", serif;
  font-weight: 500; font-size: 13px;
  letter-spacing: 0.06em;
  color: #228293;
  margin: 0 0 18px;
  text-transform: none;
}
.ftr-col ul { display: flex; flex-direction: column; list-style: none; padding: 0; margin: 0; }
.ftr-col a {
  display: block; font-weight: 300; font-size: 15px;
  color: #99bec8; line-height: 2.2;
  transition: color .3s ease; text-decoration: none;
}
.ftr-col a:hover { color: #ffffff; }

/* Bottom bar */
.ftr-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(34,130,147,0.10);
  font-weight: 300; font-size: 13px; color: #5484A3;
}

/* Light theme footer */
[data-theme="light"] .site-ftr { background: #1a2030; border-top-color: rgba(34,130,147,0.25); }

/* =========================================================
   Smooth transition for theme switch
   ========================================================= */
.site-hdr,
.site-hdr .brand,
.site-hdr .nav a,
.site-hdr .theme-tog,
.site-hdr .theme-tog::before {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
