[data-ambient] { position: relative; isolation: isolate; }
.ambient-field { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; mask-image: linear-gradient(90deg, transparent 15%, #000 58%); }
.ambient-ember { position: absolute; left: var(--ember-x); top: var(--ember-y); width: 1.5px; height: 3px; border-radius: 50%; background: #d24634; box-shadow: 0 0 4px #b2262366; opacity: 0; animation: ember-drift var(--ember-duration) linear var(--ember-delay) infinite paused; }
.ambient-ember:nth-child(3n) { width: 1px; height: 2px; background: #be6545; }
[data-motion="running"].ambient-visible .ambient-ember { animation-play-state: running; }
.ambient-toggle { position: absolute; z-index: 4; right: var(--gutter); bottom: 24px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #e3d0b837; border-radius: 3px; background: #08090c99; color: #b7afa7; cursor: pointer; transition: border-color .2s, color .2s; }
.ambient-toggle:hover { color: #f3eadf; border-color: #d4aa55aa; }
.ambient-toggle:disabled { cursor: default; opacity: .5; }
.ambient-toggle-icon { display: block; width: 10px; height: 11px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.ambient-toggle[aria-pressed="false"] .ambient-toggle-icon { width: 0; height: 0; border-left: 9px solid currentColor; border-right: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.refresh-site [data-ambient] .hero-scroll { right: calc(var(--gutter) + 58px); bottom: 32px; }
@keyframes ember-drift {
  0% { transform: translate3d(0, 25px, 0) rotate(-22deg); opacity: 0; }
  20% { opacity: .5; }
  65% { opacity: .28; }
  100% { transform: translate3d(var(--ember-drift), -150px, 0) rotate(-22deg); opacity: 0; }
}
@media (max-width: 560px) {
  .ambient-ember:nth-child(2n) { display: none; }
  .ambient-toggle { right: 20px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-field { display: none; }
  .ambient-ember { animation: none !important; }
  .ambient-toggle { transition: none; }
}
