/* This atmosphere belongs only to the two welcome surfaces. Native content
   keeps its own stacking, layout, event handlers, and entry flow. */
[data-celestial-scene="web"].hero,
[data-celestial-scene="kiosk"].kiosk-screensaver {
  isolation: isolate;
  background-color: #f4cfaa;
}

.hero[data-celestial-scene="web"] {
  min-height: 100svh;
  padding: max(6rem, 11svh) 4vw max(4.5rem, 8svh);
}

.hero[data-celestial-scene="web"] .hero__logo {
  width: min(520px, 72vw, 56svh);
}

.hero[data-celestial-scene="web"] .hero__actions {
  margin-top: clamp(0.5rem, 2svh, 1.5rem);
}

.nudo-celestial-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: layout paint style;
  background: #f5caa3 url("assets/landing/sky-open.webp") center / cover no-repeat;
}

.nudo-celestial-scene::before,
.nudo-celestial-scene::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

/* A quiet patch of light remains behind the existing logo. */
.nudo-celestial-scene::before {
  z-index: 0;
  background:
    radial-gradient(ellipse at 49% 43%, rgb(255 241 208 / 24%), transparent 48%),
    linear-gradient(90deg, rgb(75 53 57 / 13%), transparent 27% 72%, rgb(103 55 48 / 9%));
}

.nudo-celestial-scene::after {
  z-index: 2;
  background: #101728;
  opacity: 0;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nudo-celestial-scene__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero[data-celestial-scene="web"] > .weather-field > .wind-clouds,
.kiosk-screensaver[data-celestial-scene="kiosk"] > .kiosk-screensaver__clouds {
  display: none;
}

.hero[data-celestial-scene="web"]::before {
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 48%, rgb(255 241 216 / 12%), transparent 40%),
    linear-gradient(180deg, transparent 70%, rgb(247 244 238 / 56%));
}

.kiosk-screensaver[data-celestial-scene="kiosk"]::after {
  background:
    radial-gradient(ellipse at 50% 27%, rgb(255 243 220 / 18%), transparent 38%),
    linear-gradient(180deg, transparent 80%, rgb(246 228 201 / 22%));
}

body.weather-active .hero[data-celestial-scene="web"] .nudo-celestial-scene::after {
  opacity: 0.63;
}

body.weather-active .hero[data-celestial-scene="web"]::before {
  background: linear-gradient(180deg, rgb(16 23 40 / 5%) 65%, rgb(7 8 10 / 60%));
}

.nudo-celestial-pause {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(99 57 38 / 24%);
  border-radius: 50%;
  background: rgb(255 245 226 / 86%);
  color: #6c3827;
  box-shadow: 0 2px 12px rgb(88 41 23 / 8%);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nudo-celestial-pause:hover {
  background: #fff6e7;
}

.hero[data-celestial-scene="web"] > .nudo-celestial-pause {
  right: auto;
  left: max(1rem, env(safe-area-inset-left));
}

.nudo-celestial-pause:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.nudo-celestial-pause svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nudo-celestial-pause [data-celestial-play],
.nudo-celestial-pause[aria-pressed="true"] [data-celestial-stop] {
  display: none;
}

.nudo-celestial-pause[aria-pressed="true"] [data-celestial-play] {
  display: block;
}

.nudo-celestial-pause:disabled {
  cursor: default;
  opacity: 0.55;
}

body.weather-active .hero[data-celestial-scene="web"] .nudo-celestial-pause {
  color: #ffedcf;
  background: rgb(24 28 40 / 84%);
  border-color: rgb(255 237 207 / 28%);
}

/* Pause the native decorative CSS motion, including existing tortas, without
   changing carousel timers, payment state, or interaction handlers. */
[data-celestial-scene][data-celestial-paused="true"] *,
[data-celestial-scene][data-celestial-paused="true"] *::before,
[data-celestial-scene][data-celestial-paused="true"] *::after {
  animation-play-state: paused !important;
}

@media (max-width: 760px) {
  .nudo-celestial-scene {
    background-position: 48% center;
  }

  .nudo-celestial-pause {
    right: max(0.7rem, env(safe-area-inset-right));
    bottom: max(0.7rem, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-celestial-scene] *,
  [data-celestial-scene] *::before,
  [data-celestial-scene] *::after {
    animation-play-state: paused !important;
  }

  .nudo-celestial-scene::after,
  .nudo-celestial-pause {
    transition: none;
  }
}

/* The kiosk welcome is now a centered brand over the animated atmosphere.
   Its native brand button still starts the same ordering flow. */
.kiosk-screensaver[data-kiosk-screensaver][data-celestial-scene="kiosk"] .kiosk-screensaver__logos.kiosk-screensaver__logos--single {
  position: absolute !important;
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
  place-self: auto !important;
  z-index: 6 !important;
}

.kiosk-screensaver[data-kiosk-screensaver][data-celestial-scene="kiosk"] .kiosk-screensaver__brand {
  width: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  place-items: center !important;
}

.kiosk-screensaver[data-kiosk-screensaver][data-celestial-scene="kiosk"] .kiosk-screensaver__logo--nudo {
  width: min(70vw, 39vh) !important;
  height: auto !important;
  max-width: min(70vw, 39vh) !important;
  max-height: 39vh !important;
  opacity: 1 !important;
  filter: drop-shadow(0 4px 18px rgb(255 238 209 / 72%)) !important;
}

.kiosk-screensaver[data-kiosk-screensaver][data-celestial-scene="kiosk"] .kiosk-screensaver__prompt {
  position: absolute !important;
  inset: auto !important;
  top: max(7vh, env(safe-area-inset-top, 0px) + 1.5rem) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  max-width: 88% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  color: #8d1115 !important;
  font: inherit;
  font-size: clamp(1.4rem, 3.4vw, 2.8rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-align: center;
  text-shadow: 0 2px 16px rgb(255 241 214 / 90%);
  background: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  animation: none !important;
  pointer-events: none;
  z-index: 6 !important;
}

.kiosk-screensaver[data-kiosk-screensaver][data-celestial-scene="kiosk"] :is(
  .kiosk-screensaver__coverflow,
  .kiosk-screensaver__promo,
  .kiosk-screensaver__qr,
  .kiosk-screensaver__cobro
) {
  display: none !important;
}
