/* Theme (light/dark) + shared reveal + nav.
   The cinematic scroll-scrub hero rules that used to live here have MOVED to
   assets/cool-hero.css and now load only on /cool/. Nothing in this file may
   hide the navigation or lock scrolling. */

html[data-theme="light"] {
  --bg: #F7F5FC;
  --bg-elevated: #FFFFFF;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #FFFFFF;
  --border: rgba(15, 10, 40, 0.08);
  --border-accent: rgba(124, 58, 237, 0.35);
  --text: #0F0F18;
  --text-dim: #5B5670;
  --text-faint: #8B86A0;
  --accent: #7C3AED;
  --accent-light: #8B5CF6;
  --accent-dark: #6D28D9;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --accent-glow: rgba(124, 58, 237, 0.28);
  --accent-2: #0891B2;
  --accent-2-soft: rgba(8, 145, 178, 0.12);
}
html[data-theme="light"] .bg-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 58, 237, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(34, 211, 238, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(167, 139, 250, 0.08), transparent 60%),
    var(--bg);
}
html[data-theme="light"] .bg-noise { opacity: 0.02; }

/* Nav: sticky, always visible. Never hidden by any hero state.
   z-index sits above hero media layers but below /cool/ fixed controls. */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  transition:
    background 0.35s var(--ease),
    border-color 0.35s,
    backdrop-filter 0.35s;
}
/* /cool/ supplies its own fixed control bar, so the shared nav is not rendered
   there. No rule may set the nav to opacity:0 or visibility:hidden. */

.reveal {
  will-change: opacity, transform;
  transform: translate3d(0, 24px, 0);
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.reveal-d2 { transition-delay: 0.08s; }
.reveal-d3 { transition-delay: 0.16s; }

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  background: transparent;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover {
  color: var(--accent-light);
  border-color: var(--border-accent);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
