/* ══ Shared site chrome for the inner pages ══
   Header, footer and palette copied from the homepage (index.html) so every route looks the same.
   Loaded after each page's own <style>, and every rule is scoped (header.site / footer.site) so it
   wins over the pages' older nav/footer styles without touching their content sections. */

:root {
  --ink: #0B1530;
  --surface: #FFFFFF;
  --accent: #0A47E6;
  --divider: color-mix(in srgb, #0B1530 11%, transparent);
  --on-ink-divider: color-mix(in srgb, #FFFFFF 18%, transparent);
  --accent-100: #EEF3FF; --accent-200: #DCE6FF; --accent-300: #B8CBFF; --accent-400: #7EA1FA;
  --accent-500: #3B6CF0; --accent-600: #083CC4; --accent-700: #06309E;
  --n-100: #F5F7FB; --n-200: #E7EBF3; --n-300: #D2D8E5; --n-400: #AEB7CA; --n-500: #8790A6;
  --n-600: #656E86; --n-700: #4B5369; --n-800: #323A4F; --n-900: #1A2135;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-md: 12px; --r-lg: 20px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
}

/* Page palette — the homepage's ink-on-cool-white values, mapped onto the inner pages' variable names */
html[data-theme="light"] {
  --or: #0A47E6; --or-h: #083CC4;
  --bg: #F4F7FD; --bg2: #F5F7FB; --bg3: #E7EBF3; --bg4: #D2D8E5;
  --card: #FFFFFF;
  --card-b: color-mix(in srgb, #0B1530 11%, transparent);
  --card-bh: color-mix(in srgb, #0B1530 20%, transparent);
  --nav-bg: color-mix(in srgb, #FFFFFF 86%, transparent);
  --tx: #0B1530; --tx2: #4B5369; --tx3: #656E86; --tx4: #8790A6;
  --sep: color-mix(in srgb, #0B1530 11%, transparent);
}
body { font-family: var(--font); }
h1, h2, h3, h4 { letter-spacing: -.03em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

/* Neutralise the old generic `nav {}` rule for navs inside the new chrome */
header.site nav, footer.site nav { position: static; background: none; border: 0; box-shadow: none; z-index: auto; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ── Buttons (header/footer only) ── */
header.site .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-md); padding: 11px 16px; font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; white-space: nowrap; box-shadow: none; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
header.site .btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
header.site .btn-primary:hover { background: var(--accent-600); }
header.site .btn-outline { background: var(--surface); color: var(--accent); border-color: var(--accent-300); }
header.site .btn-outline:hover { background: var(--accent-100); }
header.site .btn-ghost { background: transparent; color: var(--ink); border-color: var(--divider); }
header.site .btn-ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
header.site .btn-icon { width: 44px; height: 44px; padding: 0; }

/* ── Header ── */
header.site { position: sticky; top: 0; z-index: 200; font-family: var(--font); color: var(--ink); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--divider); }
header.site .nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); padding: 12px var(--gutter); max-width: var(--maxw); margin: 0 auto; }
header.site .brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
header.site .brand img { width: 40px; height: 40px; border-radius: 50%; }
.site .brand span { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.site .brand span em { font-style: normal; color: var(--accent); }
header.site .nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 600; }
header.site .nav-links a { position: relative; padding: 6px 0; white-space: nowrap; color: var(--ink); }
header.site .nav-links a:hover, header.site .nav-links a[aria-current="page"] { color: var(--accent); }
header.site .nav-actions { display: flex; align-items: center; gap: 8px; }
header.site .nav-actions .btn { display: inline-flex; }
header.site .nav-actions .hamburger { display: none; }
header.site #scroll-progress { position: absolute; left: 0; top: auto; bottom: -1px; height: 2px; width: 0; background: var(--accent); box-shadow: none; z-index: 1; pointer-events: none; }

header.site #mobile-menu { display: none; border-top: 1px solid var(--divider); padding: 8px var(--gutter) 20px; background: var(--surface); }
header.site #mobile-menu.open { display: block; }
header.site #mobile-menu a.mm { display: flex; justify-content: space-between; padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--divider); font-weight: 700; font-size: 16px; color: var(--ink); background: none; }
header.site #mobile-menu a.mm[aria-current="page"] { color: var(--accent); }
header.site #mobile-menu .mm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

@media (max-width: 1100px) {
  header.site .nav-links { display: none; }
  header.site .nav-actions .hamburger { display: inline-flex; }
}
@media (max-width: 640px) {
  header.site .nav-actions .btn-outline, header.site .nav-actions .btn-primary { display: none; }
  .site .brand span { font-size: 18px; }
}

/* ── Footer ── */
footer.site { background: var(--ink); color: #fff; padding: 0; border-top: 0; font-family: var(--font); }
footer.site .wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
footer.site .foot { padding-top: clamp(48px, 5vw, 72px); padding-bottom: 28px; display: flex; flex-direction: column; gap: 44px; }
footer.site .foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
footer.site .foot-brand { display: flex; flex-direction: column; gap: 16px; }
footer.site .brand { display: flex; align-items: center; gap: 10px; }
footer.site .brand img { width: 40px; height: 40px; border-radius: 50%; }
footer.site .foot-brand .brand span { font-size: 26px; }
footer.site .foot-brand p { font-size: 14px; opacity: .72; max-width: 36ch; margin: 0; }
footer.site .foot-col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
footer.site .foot-col h4 { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .16em; opacity: .6; border-bottom: 1px solid var(--on-ink-divider); padding-bottom: 10px; text-transform: uppercase; }
footer.site .foot-col a { opacity: .9; color: #fff; }
footer.site .foot-col a:hover { color: var(--accent-300); opacity: 1; }
footer.site .foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--on-ink-divider); padding-top: 20px; font-size: 12px; opacity: .65; }
footer.site .foot-bottom nav { display: flex; gap: 18px; }
@media (max-width: 900px) { footer.site .foot-top { grid-template-columns: 1fr 1fr; } footer.site .foot-brand { grid-column: span 2; } }
