/* =========================================================================
   dark.css — site-wide dark theme. Activated by <html data-theme="dark">.
   Brand blue/teal/orange carry over; surfaces, ink, lines and shadows flip.
   ========================================================================= */

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Dark blue surfaces keep the blue-only system intact. */
  --bg:        #101a33;
  --bg-pure:   #17264a;
  --glass:     rgba(16, 26, 51, 0.6);
  --paper-surface: rgba(23, 38, 74, 0.82);
  --paper-fiber:  rgba(222, 233, 255, 0.022);
  --paper-fiber-soft: rgba(7, 12, 28, 0.3);
  --paper-wash: rgba(4, 13, 28, 0.12);
  --paper-texture: url("../assets/img/navy-paper-texture-hq.png");

  /* Ink */
  --ink:    #f2f4f8;
  --ink-2:  #b9bec9;
  --ink-3:  #8b919d;   /* AA on --bg */
  --ink-inv: #101a33;

  /* Lines */
  --hair:   rgba(255, 255, 255, 0.09);

  /* Shadows — deeper, plus we lean on hairline borders for separation */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue:  0 18px 56px rgba(56, 112, 255, 0.42);
}

/* Smoothly tween color-ish props when NOT using the View Transition sweep
   (e.g. reduced-motion users get a gentle fade rather than a hard flip). */
:root[data-theme] body,
:root[data-theme] .nav__inner {
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

/* Footer background removed 2026-06-24 — footer is transparent in both themes so
   the fixed .hero-aura ambient gradient shows through behind the pricing/footer. */

/* Hero scrim becomes a dark gradient for legibility over the artwork */
:root[data-theme="dark"] .hero::before {
  background: linear-gradient(180deg, rgba(16, 26, 51, 0.92) 0%, rgba(16, 26, 51, 0.6) 46%, rgba(16, 26, 51, 0) 100%);
}

/* Nav stuck glass on dark */
:root[data-theme="dark"] .nav.is-stuck .nav__inner {
  background: var(--glass);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hair);
}

/* ::selection */
:root[data-theme="dark"] ::selection { background: rgba(91, 173, 247, 0.42); color: #fff; }

/* =========================================================================
   View Transitions — Apple-style circular appearance sweep from the toggle.
   The JS animates ::view-transition-new(root) clip-path; we disable the
   default cross-fade so the reveal is a clean wipe.
   ========================================================================= */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
/* New theme paints on top and is revealed by the expanding circle */
::view-transition-new(root) { z-index: 1; }
::view-transition-old(root) { z-index: 0; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}
