/* SHROUD clean dark accents. Layout and exchange logic remain in the original files. */
.night-theme {
  --night: #101919;
  --paper: #f3efdf;
  --mist: #a9b8b2;
  --mint: #a9dccb;
  --night-line: #b6d5ca26;
  background: var(--night);
  color: var(--paper);
  overflow-x: clip;
}
.night-theme ::selection { background: #a9dccb; color: #101919; }
.night-theme a:focus-visible, .night-theme button:focus-visible,
.night-theme summary:focus-visible { outline: 2px solid #88bfae; outline-offset: 6px; }
.night-theme .header { position: relative; z-index: 5; border-color: var(--night-line); }
.night-theme .header .brand, .night-theme .header .twitter-soon { color: var(--paper); }
.night-theme .header .brand img { filter: drop-shadow(0 0 2px #a9dccb) drop-shadow(0 0 8px #a9dccb35); }
.night-theme .token-contract { color: #b1bcb6; border-color: var(--night-line); background: #0d151533; }
.night-theme .token-contract b { color: var(--paper); }
.night-theme .header nav.header-actions .quiet {
  color: var(--night); background: var(--paper); border-color: var(--paper);
}
.night-theme .header nav.header-actions .docs-pill {
  color: var(--paper); background: #15232360; border-color: #f3efdf45;
}
.night-theme .header nav.header-actions .quiet:hover { background: var(--mint); color: var(--night); }
.night-theme footer { color: #afbab4; border-color: var(--night-line); position: relative; }
.night-theme footer .brand { color: var(--paper); }
.night-theme footer .brand span { color: var(--paper); }
.night-theme footer a:hover, .night-theme footer button:hover { color: var(--mint); }
.night-theme .skip-link {
  position: fixed; z-index: 30; left: 20px; top: 12px; padding: 12px 18px;
  color: #101919; background: #f3efdf; border-radius: 8px; transform: translateY(-160%);
}
.night-theme .skip-link:focus { transform: none; }
.reading-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 20; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: #a9dccb; transform: scaleX(0); transform-origin: left; }

/* A plain charcoal backdrop keeps the hero focused on the product. */
.landing-page.night-theme .landing-hero { padding-top: 78px; padding-bottom: 96px; }
.night-theme .hero-grid { display: none; }
.night-scene {
  position: absolute; z-index: -1; top: -83px; bottom: 0;
  left: 50%; width: 100vw; transform: translateX(-50%); overflow: hidden;
  pointer-events: none; background: #101919;
}
.night-theme .hero-copy { z-index: 5; }
.night-theme .hero-badge { color: #d6e5db; background: #142121b8; border-color: #c5e2d236; }
.night-theme .hero-badge i { background: var(--mint); box-shadow: 0 0 10px #a9dccb70; }
.landing-page.night-theme h1 { color: var(--paper); text-shadow: 0 2px 28px #0b141433; }
.landing-page.night-theme h1 span { color: #a9ccc0; }

.landing-page.night-theme .landing-hero p { color: #c3cdc4; }
.landing-page.night-theme :is(.landing-hero, .final-cta) .solid { color: #14201e; background: var(--paper); border: 1px solid var(--paper); }
.landing-page.night-theme :is(.landing-hero, .final-cta) .solid:hover { background: var(--mint); border-color: var(--mint); }
.landing-page.night-theme .outline { color: var(--paper); background: #10191966; border-color: #d0dfd448; backdrop-filter: blur(8px); }
.landing-page.night-theme .outline:hover { background: #283c37; }
.night-theme .route-stage {
  z-index: 5; color: var(--paper); background: linear-gradient(140deg, #1a2a29e8, #111d1bf2);
  border-color: #c3e0ce3b; box-shadow: 0 24px 80px #0005, inset 0 1px #e6f6e00d;
  backdrop-filter: blur(16px);
}
.night-theme .stage-top, .night-theme .stage-bottom { color: #a5b5ac; }
.night-theme .stage-bottom a { color: var(--paper); }
.night-theme .route-end small { color: #a9b8ae; }
.night-theme .route-end .network-mark { border-color: #1c2a27; background: #1c2a27; }
.night-theme .route-wire { background: #a9dccb45; }
.night-theme .route-wire::after { background: var(--mint); box-shadow: 0 0 9px #a9dccb80; }
.night-theme .core-orbit { border-color: #a9dccb55; }
.night-theme .ghost-core > img { filter: drop-shadow(0 0 2px #8cbfb0) drop-shadow(0 0 18px #8cbfb055); }
.night-theme .ghost-core::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(#a9dccb20, transparent 70%); }
.scene-tools { position: absolute; bottom: 31px; right: 0; z-index: 6; }
.motion-toggle {
  display: inline-flex; align-items: center; gap: 8px; color: #bdc9c0;
  border: 1px solid #b6d5ca2c; border-radius: 30px; background: #13201cb3;
  padding: 9px 13px; font: 10px Poppins, sans-serif; cursor: pointer;
}
.motion-toggle:hover { color: var(--paper); border-color: #a9dccb66; }
.motion-toggle[hidden] { display: none; }
.motion-icon { width: 9px; height: 10px; border-inline: 2px solid currentColor; }
.motion-toggle[aria-pressed='true'] .motion-icon { width: 0; height: 0; border: 5px solid transparent; border-right: 0; border-left: 7px solid currentColor; }
.scroll-cue { position: absolute; z-index: 6; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; color: #bac7bd; font-size: 8px; letter-spacing: 1.7px; text-transform: uppercase; }
.scroll-cue span { font-size: 15px; animation: night-nudge 3s ease-in-out infinite; }
/* Keep the original paper backgrounds, cards and text below the hero. */
.landing-page.night-theme { background: #f6f4ef; color: #111; }
.night-theme .network-section { position: relative; }
.landing-page.night-theme footer { background: #f6f4ef; color: #77766d; border-color: #dedbd1; }
.landing-page.night-theme footer .brand,
.landing-page.night-theme footer .brand span { color: #111; }
.landing-page.night-theme footer a:hover { color: #111; }
.night-theme .final-cta { color: var(--paper); position: relative; isolation: isolate; border-color: var(--night-line); padding-block: 85px 95px; }
.night-theme .final-cta::before {
  content: ''; position: absolute; z-index: -1; inset: 0 calc((1120px - 100vw) / 2);
  background: #101919;
  pointer-events: none;
}
.night-theme .final-cta > img { filter: drop-shadow(0 0 2px #a9dccb) drop-shadow(0 0 20px #a9dccb50); }
.night-theme .will-reveal { transition-duration: .7s; }

/* App and docs keep their original readable paper work surfaces. */
.app-page.night-theme, .docs-page.night-theme { background: #101919; position: relative; isolation: isolate; }
.app-page.night-theme::before, .docs-page.night-theme::before {
  content: ''; position: absolute; z-index: -1; inset: 0 0 auto; height: 1100px; pointer-events: none;
  background: #101919;
}
.app-page.night-theme .app-title h1 { color: var(--paper); }
.app-page.night-theme .app-title p, .app-page.night-theme .app-title .eyebrow { color: #bfccbf; }
.app-page.night-theme .app-mascot { filter: drop-shadow(0 0 2px #a9dccb) drop-shadow(0 0 15px #a9dccb55); }
.app-page.night-theme .card, .app-page.night-theme .order-panel { color: #111; box-shadow: 0 25px 75px #0004; }
.app-page.night-theme .below-card, .app-page.night-theme .resume-order { color: #bdcbbc; }
.app-page.night-theme footer .text-button { color: #afbab4; }
.docs-page.night-theme .docs-layout { color: #111; background: #f6f4ef; border-radius: 24px; margin-bottom: 45px; }
.docs-page.night-theme .docs-layout a:focus-visible, .app-page.night-theme .card :focus-visible { outline-color: #356551; }

@keyframes night-nudge { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.night-theme.motion-paused *, .night-theme.motion-paused *::before, .night-theme.motion-paused *::after { animation-play-state: paused!important; }
.scene-out-of-view .night-scene *, .scene-out-of-view .night-scene *::before { animation-play-state: paused!important; }
@media (max-width: 1199px) { .night-theme .final-cta::before { inset-inline: -40px; } }
@media (max-width: 900px) {
  .docs-page.night-theme .docs-layout { margin-inline: 18px; }
}
@media (max-width: 600px) {
  .landing-page.night-theme .landing-hero { padding-top: 58px; padding-bottom: 88px; }
  .night-scene { top: -73px; bottom: 0; }
  .night-theme .landing-hero h1 { font-size: clamp(44px, 12vw, 60px); }
  .scene-tools { right: 0; bottom: 23px; }
  .motion-toggle { padding: 9px 10px; font-size: 9px; }
  .scroll-cue { left: 0; transform: none; bottom: 31px; font-size: 7px; letter-spacing: 1.2px; }
  .night-theme .route-stage { backdrop-filter: blur(8px); }
  .night-theme .final-cta { padding-block: 60px; }
  .night-theme .final-cta::before { inset-inline: -20px; }
  .night-theme .header .header-social .token-contract { display: none; }
  .docs-page.night-theme .docs-layout { border-radius: 20px; margin-inline: 10px; padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .night-theme *, .night-theme *::before, .night-theme *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
  .night-theme [data-depth] { transform: none!important; }
  .night-theme .will-reveal { opacity: 1; transform: none; }
  .scene-tools, .scroll-cue span, .reading-progress { display: none; }
}
