/* ═══ Shared visual effects — realism pass ═══ */

.contact-shadow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--shadow-w, 80%);
  height: var(--shadow-h, 16px);
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--contact-shadow) 0%, transparent 72%);
  filter: blur(var(--shadow-blur, 4px));
  z-index: 0;
  pointer-events: none;
}

.ambient-occlusion {
  position: absolute;
  bottom: var(--ao-bottom, 0);
  left: 50%;
  transform: translateX(-50%);
  width: var(--ao-w, 70%);
  height: var(--ao-h, 8px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.55) 0%, transparent 75%);
  filter: blur(2px);
  z-index: 1;
  pointer-events: none;
}

.warm-pool {
  position: absolute;
  bottom: var(--pool-bottom, -8px);
  left: 50%;
  transform: translateX(-50%);
  width: var(--pool-w, 90%);
  height: var(--pool-h, 24px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,180,80,0.14), rgba(255,140,40,0.03) 55%, transparent 72%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}

.cast-shadow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-cast-x) var(--shadow-cast-y) 12px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: -1;
}

.rim-light {
  position: absolute;
  top: 8%;
  left: 6%;
  width: 28%;
  height: 55%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,248,230,0.22), transparent);
  pointer-events: none;
}

.specular-strip {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--specular), transparent);
  pointer-events: none;
}

.metal-sheen {
  background:
    repeating-linear-gradient(90deg, transparent 0 2px, rgba(255,255,255,0.03) 2px 3px),
    linear-gradient(175deg, var(--counter-steel-lit) 0%, var(--counter-steel) 40%, #2a2e32 100%);
}

.steam-column {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  animation: steam-rise var(--dur, 3.5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}

.steam-core {
  background: radial-gradient(ellipse, rgba(255,252,248,0.65), rgba(255,255,255,0.12) 50%, transparent 72%);
  filter: blur(4px);
}

.steam-halo {
  background: radial-gradient(ellipse, rgba(255,252,245,0.25), transparent 65%);
  filter: blur(10px);
  opacity: 0.8;
}

.steam-field {
  position: absolute;
  pointer-events: none;
  z-index: var(--z-steam);
}

@keyframes steam-rise {
  0% { transform: translateY(0) scaleX(1) scaleY(0.5); opacity: 0; }
  12% { opacity: 0.65; }
  55% { transform: translateY(-32px) scaleX(1.12) scaleY(1.08); opacity: 0.38; }
  100% { transform: translateY(-70px) scaleX(0.88) scaleY(1.35); opacity: 0; }
}

.steam-wisp {
  position: absolute;
  bottom: 0;
  filter: blur(5px);
  animation: wisp-drift var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}

@keyframes wisp-drift {
  0% { transform: translateY(0) translateX(0) rotate(var(--rot, -15deg)); opacity: 0; }
  15% { opacity: 0.7; }
  50% { transform: translateY(-28px) translateX(6px) rotate(calc(var(--rot, -15deg) + 10deg)); opacity: 0.45; }
  100% { transform: translateY(-58px) translateX(-4px) rotate(calc(var(--rot, -15deg) - 5deg)); opacity: 0; }
}

@keyframes ghee-shimmer {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

@keyframes tawa-glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

@keyframes heat-shimmer {
  0%, 100% { transform: translateY(0) scaleY(1); opacity: 0.25; }
  50% { transform: translateY(-3px) scaleY(1.08); opacity: 0.55; }
}

@keyframes string-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
  75% { opacity: 0.94; }
}

@keyframes rain-slide {
  0% { transform: translateY(-20px) rotate(8deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(200px) rotate(8deg); opacity: 0; }
}

.film-grain {
  position: absolute;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: calc(var(--z-grain) - 1);
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 30%, rgba(0,0,0,0.5) 100%);
}

.rain-drop {
  position: absolute;
  top: -15%;
  left: var(--x);
  width: 1px;
  height: var(--len);
  background: linear-gradient(to bottom, transparent, rgba(180, 210, 255, var(--op, 0.35)));
  transform: rotate(8deg);
  animation: rain-slide var(--dur) linear infinite;
  animation-delay: var(--delay);
}

.string-bulb {
  position: absolute;
  width: 7px;
  height: 9px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 40% 30%, #fff8dc, var(--lamp) 55%, #e65100 100%);
  box-shadow:
    0 0 6px #fff8dc,
    0 0 12px var(--lamp-soft),
    0 0 28px var(--lamp-glow),
    0 0 48px rgba(255, 140, 60, 0.12);
  animation: string-flicker var(--flicker-dur, 4s) ease-in-out infinite;
  animation-delay: var(--flicker-delay, 0s);
  z-index: 2;
}

.string-bulb-pool {
  position: absolute;
  width: 28px;
  height: 14px;
  margin-left: -10px;
  margin-top: 6px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 180, 80, 0.18), transparent 72%);
  filter: blur(3px);
  pointer-events: none;
  z-index: 1;
  animation: string-flicker var(--flicker-dur, 4s) ease-in-out infinite;
  animation-delay: var(--flicker-delay, 0s);
}

.string-wire {
  position: absolute;
  height: 1px;
  background: rgba(255,255,255,0.08);
  transform-origin: left center;
}

.lamp-pool {
  position: absolute;
  width: 40px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,180,80,0.12), transparent 70%);
  filter: blur(4px);
  pointer-events: none;
  z-index: 1;
}

.dish-label {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.dish-script {
  display: block;
  font-size: 0.85rem;
  color: var(--lamp);
  margin-bottom: 0.05rem;
}

.motion-reduced .steam-column,
.motion-reduced .steam-wisp,
.motion-reduced .rain-drop,
.motion-reduced .string-bulb,
.motion-reduced .string-bulb-pool,
.motion-reduced .tawa-glow-pulse,
.motion-reduced .ghee-sheen,
.motion-reduced .heat-shimmer-layer,
.motion-reduced .counter-lamp,
.motion-reduced .counter-lamp-beam,
.motion-reduced .hanging-lamp__filament,
.motion-reduced .tapri-neon-sign,
.motion-reduced .bokeh-orb,
.motion-reduced .night-mist,
.motion-reduced .page-night-sky::after {
  animation: none !important;
}

.motion-reduced .page-night-sky::before,
.motion-reduced .ambient-orb,
.motion-reduced .page-bokeh-orb,
.motion-reduced .app-logo,
.motion-reduced .app-night-shell__lamp-wash,
.motion-reduced .app-night-shell__top-beam {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .steam-column, .steam-wisp, .rain-drop, .string-bulb, .string-bulb-pool,
  .tawa-glow-pulse, .ghee-sheen, .heat-shimmer-layer,
  .counter-lamp, .counter-lamp-beam, .hanging-lamp__filament,
  .tapri-neon-sign, .bokeh-orb, .night-mist,
  .page-night-sky::before, .page-night-sky::after,
  .ambient-orb, .page-bokeh-orb, .app-logo,
  .app-night-shell__lamp-wash, .app-night-shell__top-beam {
    animation: none !important;
  }
}

/* ═══ Tapri night atmosphere — stars, lamp, neon, bokeh ═══ */

@keyframes star-twinkle-slow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.55; }
}

@keyframes lamp-pulse {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  45% { opacity: 1; transform: scale(1.04); }
  70% { opacity: 0.92; transform: scale(0.98); }
}

@keyframes lamp-beam-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@keyframes neon-flicker {
  0%, 100% { opacity: 1; filter: brightness(1); }
  92% { opacity: 1; }
  93% { opacity: 0.75; filter: brightness(0.85); }
  94% { opacity: 1; filter: brightness(1.1); }
  96% { opacity: 0.9; }
}

@keyframes bokeh-drift {
  0%, 100% { transform: translateY(0) scale(1); opacity: var(--bokeh-op, 0.5); }
  50% { transform: translateY(-6px) scale(1.08); opacity: calc(var(--bokeh-op, 0.5) * 1.3); }
}

@keyframes mist-drift {
  0%, 100% { opacity: 0.35; transform: translateX(0); }
  50% { opacity: 0.55; transform: translateX(8px); }
}

.night-atmosphere {
  position: absolute;
  inset: 0;
  z-index: var(--z-night);
  pointer-events: none;
  overflow: hidden;
}

.night-stars {
  position: absolute;
  inset: 0;
  opacity: 0.7;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 28% 10%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 42% 22%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 55% 8%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 68% 16%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 82% 12%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 90% 24%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 35% 32%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 75% 28%, rgba(255, 255, 255, 0.35), transparent);
  animation: star-twinkle-slow 7s ease-in-out infinite;
}

.night-moon-halo {
  position: absolute;
  top: 4%;
  right: 10%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 230, 255, 0.2) 0%, rgba(180, 200, 255, 0.06) 45%, transparent 70%);
  box-shadow: 0 0 40px rgba(180, 200, 255, 0.12);
}

.night-bokeh {
  position: absolute;
  inset: 0;
}

.bokeh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  background: radial-gradient(circle, var(--street-bokeh), transparent 70%);
  animation: bokeh-drift var(--drift-dur, 6s) ease-in-out infinite;
  animation-delay: var(--drift-delay, 0s);
}

.bokeh-orb:nth-child(1) { width: 14px; height: 14px; left: 8%; top: 38%; --bokeh-op: 0.35; --drift-dur: 7s; }
.bokeh-orb:nth-child(2) { width: 10px; height: 10px; left: 22%; top: 52%; --bokeh-op: 0.25; --drift-delay: 1s; --drift-dur: 5.5s; }
.bokeh-orb:nth-child(3) { width: 18px; height: 18px; left: 48%; top: 42%; --bokeh-op: 0.2; --drift-delay: 2s; }
.bokeh-orb:nth-child(4) { width: 12px; height: 12px; left: 62%; top: 55%; --bokeh-op: 0.3; --drift-delay: 0.5s; --drift-dur: 6.5s; }
.bokeh-orb:nth-child(5) { width: 16px; height: 16px; left: 78%; top: 45%; --bokeh-op: 0.28; --drift-delay: 1.5s; }
.bokeh-orb:nth-child(6) { width: 9px; height: 9px; left: 88%; top: 58%; --bokeh-op: 0.22; --drift-delay: 3s; --drift-dur: 8s; }

.night-window {
  position: absolute;
  top: 22%;
  right: 14%;
  width: 72px;
  height: 52px;
  border-radius: 4px;
  border: 2px solid rgba(255, 184, 77, 0.15);
  background:
    linear-gradient(135deg, rgba(255, 200, 120, 0.12) 0%, rgba(255, 140, 60, 0.06) 100%);
  box-shadow:
    inset 0 0 20px rgba(255, 180, 80, 0.15),
    0 0 30px rgba(255, 140, 60, 0.08);
}

.night-window::before,
.night-window::after {
  content: '';
  position: absolute;
  background: rgba(255, 184, 77, 0.12);
}

.night-window::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}

.night-window::after {
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}

.night-mist {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(0deg, var(--mist) 0%, transparent 100%);
  animation: mist-drift 12s ease-in-out infinite;
}

.hanging-lamp {
  position: absolute;
  top: 0;
  left: 22%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

.hanging-lamp__cord {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(80, 60, 40, 0.5));
}

.hanging-lamp__shade {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 36px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50% 50% 45% 45% / 40% 40% 60% 60%;
  background:
    radial-gradient(ellipse 80% 60% at 50% 25%, #4a3828, #2a2018 70%, #1a140e 100%);
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.hanging-lamp__shade::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 24px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 220, 150, 0.9), rgba(255, 160, 60, 0.4) 60%, transparent 80%);
  animation: lamp-pulse 5s ease-in-out infinite;
}

.hanging-lamp__filament {
  position: absolute;
  top: 26px;
  left: 50%;
  width: 60px;
  height: 40px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 200, 120, 0.25), transparent 70%);
  filter: blur(8px);
  animation: lamp-pulse 5s ease-in-out infinite;
}

.tapri-neon-sign {
  position: absolute;
  top: 18%;
  right: 11%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 107, 53, 0.35);
  background: rgba(20, 10, 6, 0.65);
  box-shadow:
    0 0 12px var(--neon-open-glow),
    inset 0 0 8px rgba(255, 107, 53, 0.15);
  animation: neon-flicker 8s ease-in-out infinite;
}

.tapri-neon-sign__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-open);
  box-shadow: 0 0 8px var(--neon-open-glow);
}

.tapri-neon-sign__text {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--neon-open);
  text-shadow:
    0 0 6px var(--neon-open-glow),
    0 0 16px rgba(255, 107, 53, 0.35);
}

/* ═══ Page-wide night SaaS atmosphere ═══ */

.page-ambient-lights {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: ambient-orb-pulse var(--pulse-dur, 8s) ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}

.ambient-orb--lamp-tl {
  top: -8%;
  left: -5%;
  width: 45vw;
  height: 45vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, rgba(255, 160, 80, 0.14), transparent 70%);
  --pulse-dur: 7s;
}

.ambient-orb--moon-tr {
  top: -5%;
  right: -8%;
  width: 35vw;
  height: 35vw;
  max-width: 400px;
  max-height: 400px;
  background: radial-gradient(circle, rgba(160, 190, 255, 0.08), transparent 70%);
  --pulse-dur: 10s;
  --pulse-delay: 2s;
}

.ambient-orb--street-br {
  bottom: -10%;
  right: -5%;
  width: 50vw;
  height: 40vw;
  max-width: 560px;
  max-height: 440px;
  background: radial-gradient(circle, rgba(255, 120, 50, 0.07), transparent 68%);
  --pulse-dur: 9s;
  --pulse-delay: 1s;
}

.ambient-orb--center {
  top: 40%;
  left: 50%;
  width: 60vw;
  height: 40vw;
  max-width: 700px;
  max-height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 184, 77, 0.04), transparent 65%);
  --pulse-dur: 12s;
  --pulse-delay: 3s;
}

@keyframes ambient-orb-pulse {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.ambient-orb--lamp-tl,
.ambient-orb--moon-tr,
.ambient-orb--street-br {
  transform: none;
}

.ambient-orb--lamp-tl {
  animation-name: ambient-orb-pulse-simple;
}

.ambient-orb--moon-tr,
.ambient-orb--street-br {
  animation-name: ambient-orb-pulse-simple;
}

@keyframes ambient-orb-pulse-simple {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.page-bokeh-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.page-bokeh-orb {
  position: absolute;
  width: var(--bokeh-size, 12px);
  height: var(--bokeh-size, 12px);
  border-radius: 50%;
  filter: blur(6px);
  background: radial-gradient(circle, var(--street-bokeh), transparent 72%);
  opacity: var(--bokeh-op, 0.3);
  animation: bokeh-drift var(--drift-dur, 7s) ease-in-out infinite;
  animation-delay: var(--drift-delay, 0s);
}

.page-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse 88% 78% at 50% 48%, transparent 38%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 12%, transparent 88%, rgba(0, 0, 0, 0.4) 100%);
}

.page-film-grain {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
