/* =========================================================
   base.css — shared reset + the cross-site "world switcher"
   Each section page loads this, then its own theme file,
   which overrides the --nav-* variables below.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; line-height: 1.6; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
button { font: inherit; }

:root {
  --nav-bg: rgba(10, 12, 18, .72);
  --nav-fg: #e8ecf4;
  --nav-muted: #8a93a6;
  --nav-accent: #7aa2ff;
  --nav-border: rgba(255,255,255,.08);
  --nav-font: "Space Grotesk", system-ui, sans-serif;
  --nav-radius: 999px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #000; color: #fff; padding: .5rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- World switcher (top nav) ---------- */
.world-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: var(--nav-bg);
  color: var(--nav-fg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  font-family: var(--nav-font);
  font-size: .92rem;
}
.world-nav__brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.world-nav__mark {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--nav-accent); color: var(--nav-bg);
  font-size: .8rem; font-weight: 800;
}
.world-nav__links { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.world-nav__links a {
  display: block; padding: .45rem .85rem; border-radius: var(--nav-radius);
  text-decoration: none; color: var(--nav-muted);
  transition: color .2s, background .2s;
}
.world-nav__links a:hover { color: var(--nav-fg); background: var(--nav-border); }
.world-nav__links a[aria-current="page"] { color: var(--nav-bg); background: var(--nav-accent); }

.world-nav__toggle {
  display: none; background: none; border: 1px solid var(--nav-border);
  color: var(--nav-fg); border-radius: 8px; padding: .4rem .7rem; cursor: pointer;
}

@media (max-width: 900px) {
  .world-nav__toggle { display: block; }
  .world-nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; padding: .75rem;
    background: var(--nav-bg); border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    display: none;
  }
  .world-nav[data-open="true"] .world-nav__links { display: flex; }
  .world-nav__links a { padding: .7rem 1rem; }
}

/* ---------- Reveal-on-scroll helper (js/site.js) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Shared footer skeleton ---------- */
.site-footer {
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem);
  font-size: .85rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
