/* HAM Bakery — living backgrounds (transform / opacity only) */
.ambient { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
.amb-blob { position: absolute; border-radius: 50%; will-change: transform; }
.amb-blob.b-1 { width: 48vmax; height: 48vmax; left: -12vmax; top: -16vmax;
  background: radial-gradient(circle, rgba(255, 236, 170, .32), rgba(255, 236, 170, 0) 62%); animation: ambA 26s ease-in-out infinite alternate; }
.amb-blob.b-2 { width: 42vmax; height: 42vmax; right: -12vmax; bottom: -18vmax;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 60%); animation: ambB 32s ease-in-out infinite alternate; }
.amb-blob.b-3 { width: 45vmax; height: 45vmax; left: 35%; top: 20%;
  background: radial-gradient(circle, rgba(255, 214, 120, .22), rgba(255, 214, 120, 0) 60%); animation: ambC 22s ease-in-out infinite alternate; }
@keyframes ambA { to { transform: translate3d(18vw, 14vh, 0); } }
@keyframes ambB { to { transform: translate3d(-22vw, -18vh, 0); } }
@keyframes ambC { 0% { transform: translate3d(-10vw, 6vh, 0); } 100% { transform: translate3d(12vw, -10vh, 0); } }

/* slow light rays fanning out behind the cake */
.amb-rays { position: absolute; left: 50%; top: 52%; width: 90vmax; height: 90vmax; margin: -45vmax 0 0 -45vmax; opacity: .35;
  background: url(../assets/rays.webp) center / contain no-repeat; will-change: transform; animation: raySpin 90s linear infinite; }
@keyframes raySpin { to { transform: rotate(360deg); } }

/* a soft sheen sweeping across now and then */
.amb-sheen { position: absolute; inset: -20% -60%; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .12) 50%, transparent 60%);
  will-change: transform; animation: sheen 11s ease-in-out infinite; }
@keyframes sheen { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }

/* bokeh: glowing particles rising slowly */
.bokeh { position: absolute; left: var(--x); bottom: -40px; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .95), rgba(255, 230, 160, .55) 45%, rgba(255, 230, 160, 0) 70%);
  opacity: 0; will-change: transform, opacity; animation: rise var(--d) linear infinite; animation-delay: var(--delay); }
@keyframes rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: var(--o); }
  85% { opacity: var(--o); }
  100% { transform: translate3d(var(--drift), -110vh, 0); opacity: 0; }
}

/* cream sections: big soft drifting clouds of brand colour */
.clouds { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict; }
.clouds span { position: absolute; border-radius: 50%; will-change: transform; }
.clouds span:nth-child(1) { width: 55vmax; height: 55vmax; left: -18vmax; top: -10%;
  background: radial-gradient(circle, rgba(243, 193, 65, .45), rgba(243, 193, 65, 0) 65%); animation: ambA 30s ease-in-out infinite alternate; }
.clouds span:nth-child(2) { width: 50vmax; height: 50vmax; right: -16vmax; top: 30%;
  background: radial-gradient(circle, rgba(79, 91, 42, .2), rgba(79, 91, 42, 0) 65%); animation: ambB 36s ease-in-out infinite alternate; }
.clouds span:nth-child(3) { width: 40vmax; height: 40vmax; left: 30%; bottom: -15%;
  background: radial-gradient(circle, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 65%); animation: ambC 26s ease-in-out infinite alternate; }
.clouds.c-1 span:nth-child(1) { animation-delay: -8s; }
.clouds.c-2 span:nth-child(2) { animation-delay: -14s; }

.amb-paused .ambient *, .amb-paused .clouds * { animation-play-state: paused !important; }
@media (max-width: 980px) {
  .amb-rays { opacity: .16; animation-duration: 120s; }
  .amb-blob.b-3 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient *, .clouds * { animation: none !important; }
}

.amb-off .ambient * { animation-play-state: paused !important; }
