/* Light and dark mode for alphanur.com (homepage and privacy page).
   Dark is the design default. theme.js sets <html data-theme="light|dark"> before
   first paint: the visitor's saved choice if any, else the device setting.
   Light palette = the Alpha Nur wiki colours (white sheets, navy #073763,
   ice #c4deef tints, body #222529 family); contrast by lightness, never hue alone. */

:root{color-scheme:dark}

:root[data-theme="light"]{
  color-scheme:light;
  --bg:#ffffff;
  --bg-rgb:255,255,255;
  --bg-soft:#eaf2f8;
  --panel:#f6fafd;
  --line:rgba(7,55,99,.14);
  --tint:7,55,99;
  --cherenkov:#0f4c81;
  --cherenkov-deep:#073763;
  --glow:rgba(7,55,99,.22);
  --text:#0b1d2a;
  --muted:#4b5b69;
  --on-accent:#ffffff;
  --stat-num:#073763;
}

/* ---------- toggle button ---------- */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex:none;
  border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--muted);cursor:pointer;
  transition:color .2s,border-color .2s}
.theme-toggle:hover{color:var(--cherenkov);border-color:var(--cherenkov)}
.theme-toggle:focus-visible{outline:2px solid var(--cherenkov);outline-offset:2px}
.theme-toggle .i-sun{display:none}
:root[data-theme="light"] .theme-toggle .i-sun{display:block}
:root[data-theme="light"] .theme-toggle .i-moon{display:none}
/* nav layout: brand left, links + toggle + menu button on the right */
.nav-inner{justify-content:flex-start;gap:22px}
.nav-inner .brand{margin-right:auto}
@media(max-width:900px){.nav-inner .theme-toggle{order:2}.nav-inner .menu-toggle{order:3}}

/* ---------- light-mode adjustments the tokens cannot reach ---------- */
:root[data-theme="light"] .logo-word-nav{filter:none}
:root[data-theme="light"] .btn.play,
:root[data-theme="light"] .nav-links a.btn.play,
:root[data-theme="light"] .nav-links a.btn.play:hover{color:#c4deef}

/* news bar stays navy in both modes */
:root[data-theme="light"] .newsbar .nb-text{color:#ffffff}
:root[data-theme="light"] .newsbar .nb-link{color:#c4deef}
:root[data-theme="light"] .newsbar .nb-badge{background:#c4deef;color:#02191f}

/* hero: the cyan glow headline becomes a navy-to-blue gradient */
:root[data-theme="light"] .hero h1 .glow{
  background:linear-gradient(100deg,#073763 10%,#1d6fa8 55%,#0f4c81 90%);
  -webkit-background-clip:text;background-clip:text;filter:none}

/* stat band: ice instead of a solid navy block */
:root[data-theme="light"] .stats{background:#dcebf6}

/* bio modal */
:root[data-theme="light"] .bio-backdrop{background:rgba(7,25,40,.45)}
:root[data-theme="light"] .bio-card{box-shadow:0 10px 60px rgba(7,55,99,.25)}

/* fuel-cycle diagram (inline SVG presentation attributes) */
:root[data-theme="light"] .cycle-visual svg text[fill="#ffffff"],
:root[data-theme="light"] .cycle-visual svg g[fill="#ffffff"]{fill:#0b1d2a}
:root[data-theme="light"] .cycle-visual svg text[fill="#91a1ad"]{fill:#4b5b69}
:root[data-theme="light"] .cycle-visual svg circle[stroke^="rgba"]{stroke:rgba(7,55,99,.18)}
:root[data-theme="light"] .cycle-visual svg .flow{stroke:#1d6fa8}
:root[data-theme="light"] .cycle-visual svg polygon[fill="#c4deef"]{fill:#0f4c81}
/* icons drawn in ice: navy on light backgrounds (the cycle's hexagon icons stay ice on their navy badges) */
:root[data-theme="light"] svg[stroke="#c4deef"],
:root[data-theme="light"] svg [stroke="#c4deef"]{stroke:#0f4c81}
:root[data-theme="light"] .cycle-visual svg g[stroke="#c4deef"]{stroke:#c4deef}

/* logo tiles: white tiles with each organization's own colours */
:root[data-theme="light"] .logo-tile{background:#ffffff;backdrop-filter:none}
:root[data-theme="light"] .logo-tile img{filter:none;opacity:1}
.logo-tile .on-light{display:none}
:root[data-theme="light"] .logo-tile .on-light{display:block}
:root[data-theme="light"] .logo-tile .on-dark{display:none}
