/* =========================
   GLOBAL BACKGROUND SYSTEM
   Ice Cream Layer Pastel Background + Animated Elements
========================= */

:root {
  --scoop-cream: #fff8f0;
  --scoop-cream-deep: #fcf8f0;

  --scoop-pink: #ff92c8;
  --scoop-pink-soft: #ffd9eb;

  --scoop-blue: #abd8ff;
  --scoop-blue-soft: #e2f2ff;

  --scoop-lavender: #b7b0ff;

  --scoop-coral: #ff6f6f;
  --scoop-coral-hover: #ff6262;

  --scoop-chocolate: #4a2c2a;
}

/* =========================
   PAGE BASE
   CSS-only ice cream layer approximation
========================= */

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;

  background:
    /* warm cream center veil */
    radial-gradient(
      ellipse at 48% 34%,
      rgba(255, 247, 236, 0.98) 0%,
      rgba(255, 244, 232, 0.92) 30%,
      rgba(255, 239, 229, 0.72) 54%,
      rgba(255, 239, 229, 0) 78%
    ),

    /* strong pink left / upper-left band */
    radial-gradient(
      ellipse at -10% 24%,
      rgba(255, 139, 190, 0.76) 0%,
      rgba(255, 169, 207, 0.58) 20%,
      rgba(255, 204, 224, 0.34) 42%,
      rgba(255, 243, 235, 0) 70%
    ),

    /* broader pink lower-left layer */
    radial-gradient(
      ellipse at 7% 62%,
      rgba(255, 185, 211, 0.48) 0%,
      rgba(255, 215, 226, 0.30) 36%,
      rgba(255, 244, 235, 0) 70%
    ),

    /* lavender/purple upper-right band */
    radial-gradient(
      ellipse at 92% 22%,
      rgba(184, 178, 255, 0.56) 0%,
      rgba(205, 207, 255, 0.46) 26%,
      rgba(230, 227, 255, 0.28) 50%,
      rgba(255, 244, 235, 0) 76%
    ),

    /* soft blue lower-right layer */
    radial-gradient(
      ellipse at 96% 66%,
      rgba(160, 195, 255, 0.46) 0%,
      rgba(198, 216, 255, 0.34) 34%,
      rgba(232, 237, 255, 0.20) 56%,
      rgba(255, 244, 235, 0) 78%
    ),

    /* subtle horizontal ice-cream-band wash */
    linear-gradient(
      100deg,
      rgba(255, 190, 214, 0.40) 0%,
      rgba(255, 226, 230, 0.24) 21%,
      rgba(255, 244, 232, 0.72) 42%,
      rgba(245, 232, 248, 0.38) 64%,
      rgba(205, 222, 255, 0.44) 100%
    ),

    /* base */
    linear-gradient(
      180deg,
      #fff4ec 0%,
      #fff0e8 45%,
      #fbf2e8 100%
    );
}

/* Fixed wash that creates the cream center and dessert-layer softness */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;

  background:
    /* cream center restoration */
    radial-gradient(
      ellipse at 48% 40%,
      rgba(255, 242, 224, 0.68) 0%,
      rgba(255, 245, 232, 0.52) 34%,
      rgba(255, 248, 240, 0.18) 62%,
      rgba(255, 248, 240, 0) 84%
    ),

    /* pink horizontal layer similar to reference */
    linear-gradient(
      105deg,
      rgba(255, 152, 197, 0.46) 0%,
      rgba(255, 188, 215, 0.32) 18%,
      rgba(255, 231, 231, 0.20) 36%,
      rgba(255, 248, 240, 0.08) 52%,
      rgba(255, 248, 240, 0) 68%
    ),

    /* blue/lavender horizontal layer similar to reference */
    linear-gradient(
      82deg,
      rgba(255, 248, 240, 0) 0%,
      rgba(255, 248, 240, 0.08) 34%,
      rgba(222, 218, 255, 0.26) 62%,
      rgba(173, 202, 255, 0.42) 100%
    ),

    /* very soft overall cream glaze */
    linear-gradient(
      180deg,
      rgba(255, 238, 230, 0.26) 0%,
      rgba(255, 244, 234, 0.46) 42%,
      rgba(252, 244, 232, 0.42) 100%
    );
}

/* =========================
   BACKGROUND CONTAINER
========================= */

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Extra fixed atmosphere layer */
.background::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    /* left pink glow layer */
    radial-gradient(
      ellipse at 2% 30%,
      rgba(255, 128, 188, 0.32) 0%,
      rgba(255, 179, 210, 0.24) 30%,
      rgba(255, 248, 240, 0) 66%
    ),

    /* right lavender-blue glow layer */
    radial-gradient(
      ellipse at 95% 32%,
      rgba(177, 185, 255, 0.34) 0%,
      rgba(207, 216, 255, 0.26) 34%,
      rgba(255, 248, 240, 0) 70%
    ),

    /* low blue softness */
    radial-gradient(
      ellipse at 96% 74%,
      rgba(157, 196, 255, 0.22) 0%,
      rgba(214, 228, 255, 0.18) 38%,
      rgba(255, 248, 240, 0) 72%
    );
}

/* =========================
   SOFT GLOW BLOBS
   Tuned to support ice-cream layer background
========================= */

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(92px);
  opacity: 0.38;
  will-change: transform;
  animation: bgGlowFloat 13s ease-in-out infinite alternate;
}

.bg-glow--pink-top {
  width: 760px;
  height: 760px;
  top: -250px;
  left: -360px;
  background: rgba(255, 118, 184, 0.40);
}

.bg-glow--blue-top {
  width: 800px;
  height: 800px;
  top: -250px;
  right: -360px;
  background: rgba(166, 183, 255, 0.40);
  animation-delay: 1s;
}

.bg-glow--pink-mid {
  width: 720px;
  height: 720px;
  top: 28%;
  left: -360px;
  background: rgba(255, 170, 204, 0.30);
  animation-delay: 2s;
}

.bg-glow--blue-bottom {
  width: 760px;
  height: 760px;
  bottom: -300px;
  right: -300px;
  background: rgba(166, 204, 255, 0.28);
  animation-delay: 0.6s;
}

/* =========================
   MOVING SUNBURST RAYS
   Softened to avoid patching
========================= */

.sunburst-rays {
  position: absolute;
  width: 920px;
  height: 920px;
  border-radius: 50%;
  opacity: 0.10;
  will-change: transform;
  pointer-events: none;

  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0) 0deg 12deg,
      rgba(255, 146, 200, 0.022) 12deg 15deg,
      rgba(255, 255, 255, 0) 15deg 24deg,
      rgba(171, 216, 255, 0.022) 24deg 27deg,
      rgba(255, 255, 255, 0) 27deg 38deg
    );

  mask-image: radial-gradient(
    circle at 28% 48%,
    rgba(0, 0, 0, 0.42),
    rgba(0, 0, 0, 0.16) 42%,
    transparent 72%
  );

  -webkit-mask-image: radial-gradient(
    circle at 28% 48%,
    rgba(0, 0, 0, 0.42),
    rgba(0, 0, 0, 0.16) 42%,
    transparent 72%
  );

  animation: sunburstSweep 15s ease-in-out infinite alternate;
}

.sunburst-rays--hero {
  top: -260px;
  right: -290px;
  transform-origin: 22% 52%;
}

.sunburst-rays--footer {
  width: 620px;
  height: 620px;
  bottom: -220px;
  left: -220px;
  opacity: 0.08;
  transform-origin: 76% 42%;
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}

/* =========================
   CONFETTI
========================= */

.confetti-piece {
  position: absolute;
  display: block;
  opacity: 0.22;
  border-radius: 999px;
  will-change: transform;
  animation: confettiDrift linear infinite;
}

.confetti-piece:nth-of-type(3n) {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.confetti-piece:nth-of-type(3n + 1) {
  width: 9px;
  height: 20px;
}

.confetti-piece:nth-of-type(3n + 2) {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.confetti-piece--1 {
  left: 4%;
  background: #ff92c8;
  animation-duration: 10s;
  animation-delay: 0s;
}

.confetti-piece--2 {
  left: 10%;
  background: #abd8ff;
  animation-duration: 12s;
  animation-delay: 1s;
}

.confetti-piece--3 {
  left: 16%;
  background: #b7b0ff;
  animation-duration: 11s;
  animation-delay: 2.5s;
}

.confetti-piece--4 {
  left: 22%;
  background: #ffd9eb;
  animation-duration: 14s;
  animation-delay: 0.8s;
}

.confetti-piece--5 {
  left: 28%;
  background: #8ecbff;
  animation-duration: 10s;
  animation-delay: 3s;
}

.confetti-piece--6 {
  left: 34%;
  background: #ff6f6f;
  animation-duration: 13s;
  animation-delay: 1.2s;
}

.confetti-piece--7 {
  left: 40%;
  background: #abd8ff;
  animation-duration: 12s;
  animation-delay: 4s;
}

.confetti-piece--8 {
  left: 46%;
  background: #ff92c8;
  animation-duration: 11s;
  animation-delay: 0.4s;
}

.confetti-piece--9 {
  left: 52%;
  background: #e2f2ff;
  animation-duration: 15s;
  animation-delay: 2s;
}

.confetti-piece--10 {
  left: 58%;
  background: #b7b0ff;
  animation-duration: 10s;
  animation-delay: 1.4s;
}

.confetti-piece--11 {
  left: 64%;
  background: #ff92c8;
  animation-duration: 13s;
  animation-delay: 3.6s;
}

.confetti-piece--12 {
  left: 70%;
  background: #abd8ff;
  animation-duration: 12s;
  animation-delay: 2.3s;
}

.confetti-piece--13 {
  left: 76%;
  background: #ffd9eb;
  animation-duration: 14s;
  animation-delay: 0.7s;
}

.confetti-piece--14 {
  left: 82%;
  background: #8ecbff;
  animation-duration: 10s;
  animation-delay: 4.2s;
}

.confetti-piece--15 {
  left: 88%;
  background: #ff6f6f;
  animation-duration: 15s;
  animation-delay: 1s;
}

.confetti-piece--16 {
  left: 94%;
  background: #abd8ff;
  animation-duration: 12s;
  animation-delay: 2.7s;
}

/* =========================
   ROAMING ICE CREAM ICONS
========================= */

.dessert-icon {
  position: absolute;
  font-size: clamp(1.25rem, 2vw, 2rem);
  opacity: 0.22;
  filter:
    brightness(1.12)
    saturate(1.1)
    drop-shadow(0 8px 14px rgba(74, 44, 42, 0.08));
  user-select: none;
  will-change: transform;
  animation: dessertRoam var(--duration, 16s) ease-in-out infinite alternate;
}

.dessert-icon--1 {
  top: 4%;
  left: 16%;
  --duration: 16s;
  --x1: 25px;
  --y1: -20px;
  --x2: -12px;
  --y2: 18px;
  --x3: 18px;
  --y3: -8px;
  --x4: -20px;
  --y4: 16px;
}

.dessert-icon--2 {
  top: 8%;
  left: 72%;
  --duration: 14s;
  --x1: -20px;
  --y1: 10px;
  --x2: 18px;
  --y2: -18px;
  --x3: -26px;
  --y3: 12px;
  --x4: 20px;
  --y4: -14px;
}

.dessert-icon--3 {
  top: 16%;
  left: 4%;
  --duration: 17s;
}

.dessert-icon--4 {
  top: 20%;
  left: 84%;
  --duration: 13s;
}

.dessert-icon--5 {
  top: 30%;
  left: 12%;
  --duration: 15s;
}

.dessert-icon--6 {
  top: 38%;
  left: 91%;
  --duration: 18s;
}

.dessert-icon--7 {
  top: 46%;
  left: 5%;
  --duration: 14s;
}

.dessert-icon--8 {
  top: 52%;
  left: 78%;
  --duration: 16s;
}

.dessert-icon--9 {
  top: 60%;
  left: 11%;
  --duration: 17s;
}

.dessert-icon--10 {
  top: 65%;
  left: 88%;
  --duration: 13s;
}

.dessert-icon--11 {
  top: 74%;
  left: 22%;
  --duration: 15s;
}

.dessert-icon--12 {
  top: 80%;
  left: 68%;
  --duration: 16s;
}

/* =========================
   SPARKLES
========================= */

.bg-sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.90);
  clip-path: polygon(
    50% 0%,
    62% 38%,
    100% 50%,
    62% 62%,
    50% 100%,
    38% 62%,
    0% 50%,
    38% 38%
  );
  opacity: 0.64;
  will-change: transform, opacity;
  animation: sparkleTwinkle 2s ease-in-out infinite alternate;
}

.bg-sparkle--1 {
  top: 8%;
  left: 28%;
  animation-delay: 0.2s;
}

.bg-sparkle--2 {
  top: 12%;
  left: 56%;
  animation-delay: 1s;
}

.bg-sparkle--3 {
  top: 18%;
  left: 82%;
  animation-delay: 0.7s;
}

.bg-sparkle--4 {
  top: 24%;
  left: 18%;
  animation-delay: 1.4s;
}

.bg-sparkle--5 {
  top: 32%;
  left: 66%;
  animation-delay: 0.3s;
}

.bg-sparkle--6 {
  top: 42%;
  left: 34%;
  animation-delay: 1.7s;
}

.bg-sparkle--7 {
  top: 50%;
  left: 88%;
  animation-delay: 0.9s;
}

.bg-sparkle--8 {
  top: 58%;
  left: 10%;
  animation-delay: 1.1s;
}

.bg-sparkle--9 {
  top: 66%;
  left: 58%;
  animation-delay: 0.5s;
}

.bg-sparkle--10 {
  top: 74%;
  left: 30%;
  animation-delay: 1.6s;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes bgGlowFloat {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(18px, -14px, 0) scale(1.05);
  }
}

@keyframes sunburstSweep {
  0% {
    transform: rotate(-5deg) translate3d(0, 0, 0);
  }

  50% {
    transform: rotate(7deg) translate3d(-16px, 0, 0);
  }

  100% {
    transform: rotate(5deg) translate3d(-12px, 8px, 0);
  }
}

@keyframes confettiDrift {
  0% {
    transform: translate3d(0, -6vh, 0) rotate(0deg);
  }

  40% {
    transform: translate3d(35px, 38vh, 0) rotate(160deg);
  }

  100% {
    transform: translate3d(-30px, 106vh, 0) rotate(360deg);
  }
}

@keyframes dessertRoam {
  0% {
    transform: translate3d(0, 0, 0) rotate(-18deg);
  }

  25% {
    transform: translate3d(var(--x1, 18px), var(--y1, -20px), 0) rotate(70deg);
  }

  50% {
    transform: translate3d(var(--x2, -16px), var(--y2, 18px), 0) rotate(180deg);
  }

  75% {
    transform: translate3d(var(--x3, 24px), var(--y3, -12px), 0) rotate(270deg);
  }

  100% {
    transform: translate3d(var(--x4, -22px), var(--y4, 20px), 0) rotate(360deg);
  }
}

@keyframes sparkleTwinkle {
  from {
    transform: scale(0.7) rotate(0deg);
    opacity: 0.28;
  }

  to {
    transform: scale(1.25) rotate(45deg);
    opacity: 0.86;
  }
}

/* =========================
   BUTTON COLOR RESTORE
========================= */

.order-btn,
.mobile-order-btn,
.hero-section-two__btn--primary,
.large-order__btn--primary,
button[type="submit"] {
  background: var(--scoop-coral);
  color: #ffffff;
  border-color: var(--scoop-coral);
  box-shadow: 0 16px 32px rgba(255, 111, 111, 0.24);
}

.order-btn:hover,
.mobile-order-btn:hover,
.hero-section-two__btn--primary:hover,
.large-order__btn--primary:hover,
button[type="submit"]:hover {
  background: var(--scoop-coral-hover);
  border-color: var(--scoop-coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(255, 111, 111, 0.30);
}

/* =========================
   CONTENT LAYER FIX
========================= */

header,
main,
footer,
.announcement-bar {
  position: relative;
  z-index: 2;
}

/* =========================
   GLASS SYSTEM
========================= */

.glass {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.46);

  box-shadow:
    0 20px 50px rgba(120, 60, 80, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* =========================
   RESPONSIVE SAFETY
========================= */

@media (max-width: 768px) {
  body {
    background:
      radial-gradient(
        ellipse at 50% 26%,
        rgba(255, 247, 236, 0.98) 0%,
        rgba(255, 244, 232, 0.84) 42%,
        rgba(255, 239, 229, 0.54) 68%,
        rgba(255, 239, 229, 0) 86%
      ),
      radial-gradient(
        ellipse at -16% 18%,
        rgba(255, 139, 190, 0.62) 0%,
        rgba(255, 186, 214, 0.42) 32%,
        rgba(255, 248, 240, 0) 72%
      ),
      radial-gradient(
        ellipse at 112% 20%,
        rgba(184, 178, 255, 0.52) 0%,
        rgba(208, 213, 255, 0.38) 36%,
        rgba(255, 248, 240, 0) 74%
      ),
      radial-gradient(
        ellipse at 106% 70%,
        rgba(160, 195, 255, 0.34) 0%,
        rgba(209, 225, 255, 0.24) 42%,
        rgba(255, 248, 240, 0) 74%
      ),
      linear-gradient(
        105deg,
        rgba(255, 190, 214, 0.34) 0%,
        rgba(255, 244, 232, 0.68) 44%,
        rgba(205, 222, 255, 0.34) 100%
      ),
      linear-gradient(180deg, #fff4ec 0%, #fff0e8 48%, #fbf2e8 100%);
  }

  body::before {
    background:
      radial-gradient(
        ellipse at 50% 38%,
        rgba(255, 242, 224, 0.54) 0%,
        rgba(255, 245, 232, 0.40) 44%,
        rgba(255, 248, 240, 0) 82%
      ),
      linear-gradient(
        90deg,
        rgba(255, 166, 204, 0.28) 0%,
        rgba(255, 244, 232, 0.30) 46%,
        rgba(191, 211, 255, 0.30) 100%
      );
  }

  .dessert-icon {
    opacity: 0.20;
    font-size: 1.35rem;
  }

  .confetti-piece {
    opacity: 0.20;
  }

  .sunburst-rays--hero {
    width: 520px;
    height: 520px;
    top: -130px;
    right: -180px;
  }

  .sunburst-rays--footer {
    display: none;
  }

  .bg-glow {
    opacity: 0.28;
    filter: blur(76px);
  }

  .bg-glow--pink-top {
    width: 520px;
    height: 520px;
    top: -170px;
    left: -250px;
  }

  .bg-glow--blue-top {
    width: 520px;
    height: 520px;
    top: -150px;
    right: -250px;
  }

  .bg-glow--pink-mid {
    width: 440px;
    height: 440px;
    left: -230px;
  }

  .bg-glow--blue-bottom {
    width: 460px;
    height: 460px;
    right: -220px;
  }
}

/* =========================
   PERFORMANCE SAFETY
========================= */

@media (prefers-reduced-motion: reduce) {
  .bg-glow,
  .sunburst-rays,
  .confetti-piece,
  .dessert-icon,
  .bg-sparkle {
    animation: none;
  }
}