/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: perspective(1200px) rotateX(-9deg) translateY(50px);
  transform-origin: top center;
  transition: opacity 0.92s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.92s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.reveal-on {
  opacity: 1;
  transform: perspective(1200px) rotateX(0deg) translateY(0);
}

/* Staggered grid children */
.reveal-stagger > * {
  opacity: 0;
  transform: perspective(800px) rotateX(-12deg) translateY(32px) scale(0.96);
  transform-origin: top center;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.reveal-on > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.reveal-on > *:nth-child(2) { transition-delay: 0.13s; }
.reveal-stagger.reveal-on > *:nth-child(3) { transition-delay: 0.22s; }
.reveal-stagger.reveal-on > *:nth-child(4) { transition-delay: 0.31s; }
.reveal-stagger.reveal-on > *:nth-child(5) { transition-delay: 0.40s; }
.reveal-stagger.reveal-on > *:nth-child(6) { transition-delay: 0.49s; }
.reveal-stagger.reveal-on > *:nth-child(n+7) { transition-delay: 0.55s; }
.reveal-stagger.reveal-on > * { opacity: 1; transform: perspective(800px) rotateX(0) translateY(0) scale(1); }

/* ===== CURSOR GLOW ===== */
#cursor-glow {
  position: fixed;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  transform: translate(-50%, -50%);
  opacity: 0;
  mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(194,42,34,0.07) 0%, transparent 70%);
  transition: opacity 0.6s ease;
  will-change: left, top;
}
#cursor-glow.glow-on { opacity: 1; }

/* ===== AURORA BACKGROUND ===== */
#aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.aurora-blob.a1 {
  width: 720px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(194,42,34,0.15) 0%, transparent 70%);
  top: -15%;
  left: 8%;
  filter: blur(88px);
  animation: auroraDrift1 22s ease-in-out infinite alternate;
}

.aurora-blob.a2 {
  width: 600px;
  height: 420px;
  background: radial-gradient(ellipse, rgba(0,116,139,0.12) 0%, transparent 70%);
  top: 15%;
  right: 2%;
  filter: blur(80px);
  animation: auroraDrift2 28s ease-in-out infinite alternate;
}

.aurora-blob.a3 {
  width: 520px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(139,63,255,0.10) 0%, transparent 70%);
  bottom: -8%;
  left: 38%;
  filter: blur(84px);
  animation: auroraDrift3 18s ease-in-out infinite alternate;
}

@keyframes auroraDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(110px, 65px) scale(1.28); }
}
@keyframes auroraDrift2 {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-90px, 55px) scale(0.88); }
}
@keyframes auroraDrift3 {
  0%   { transform: translate(0, 0) scale(0.92); }
  100% { transform: translate(55px, -75px) scale(1.22); }
}

/* ===== HOLOGRAPHIC CARD BORDER ===== */
@keyframes holoBorder {
  0%   { box-shadow: 0 0 0 2px rgba(194,42,34,0.92),  0 0 26px rgba(194,42,34,0.58),  0 8px 40px rgba(194,42,34,0.22);  }
  14%  { box-shadow: 0 0 0 2px rgba(237,108,0,0.92),  0 0 26px rgba(237,108,0,0.58),  0 8px 40px rgba(237,108,0,0.22);  }
  28%  { box-shadow: 0 0 0 2px rgba(255,217,63,0.92), 0 0 26px rgba(255,217,63,0.58), 0 8px 40px rgba(255,217,63,0.22); }
  42%  { box-shadow: 0 0 0 2px rgba(61,190,61,0.92),  0 0 26px rgba(61,190,61,0.58),  0 8px 40px rgba(61,190,61,0.22);  }
  57%  { box-shadow: 0 0 0 2px rgba(0,116,139,0.92),  0 0 26px rgba(0,116,139,0.58),  0 8px 40px rgba(0,116,139,0.22);  }
  71%  { box-shadow: 0 0 0 2px rgba(139,63,255,0.92), 0 0 26px rgba(139,63,255,0.58), 0 8px 40px rgba(139,63,255,0.22); }
  85%  { box-shadow: 0 0 0 2px rgba(26,127,212,0.92), 0 0 26px rgba(26,127,212,0.58), 0 8px 40px rgba(26,127,212,0.22); }
  100% { box-shadow: 0 0 0 2px rgba(194,42,34,0.92),  0 0 26px rgba(194,42,34,0.58),  0 8px 40px rgba(194,42,34,0.22);  }
}

.card:hover,
.benefit-item:hover {
  animation: holoBorder 2.8s linear infinite;
}

/* ===== TOUCH TAP-TO-REVEAL (now handled via flip class) ===== */

/* ===== CARD SHIMMER HIGHLIGHT ===== */
.card,
.benefit-item,
.flavor-card,
.cooler-card,
.catering-card {
  position: relative;
}
.card::before,
.benefit-item::before,
.flavor-card::before,
.cooler-card::before,
.catering-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    180px circle at var(--mx, 50%) var(--my, 50%),
    rgba(26, 127, 212, 0.08) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}
.card:hover::before,
.benefit-item:hover::before,
.flavor-card:hover::before,
.cooler-card:hover::before,
.catering-card:hover::before {
  opacity: 1;
}

/* ===== 3D FLIP CARDS (catering event type cards) ===== */
.event-type-card {
  perspective: 900px;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  overflow: visible !important;
  animation: none !important;
  height: 150px;
}
.event-type-card:hover,
.event-type-card.tapped {
  transform: none !important;
  animation: none !important;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
  will-change: transform;
}

.event-type-card:hover .flip-inner,
.event-type-card.tapped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  text-align: center;
}

.flip-front {
  background: #ffffff;
  border: 1px solid #dde3f0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.event-type-card:hover .flip-front {
  border-color: rgba(232, 25, 44, 0.5);
  box-shadow: 0 0 0 2px rgba(194, 42, 34, 0.3), 0 0 28px rgba(194, 42, 34, 0.18);
}

.flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, rgba(20, 14, 30, 0.97) 0%, rgba(13, 18, 33, 0.97) 100%);
  border: 1px solid rgba(194, 42, 34, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: flex-start;
  text-align: left;
  padding: 16px 14px;
  gap: 6px;
  overflow: hidden;
}

.event-type-card:hover .flip-back,
.event-type-card.tapped .flip-back {
  animation: holoBorder 2.8s linear infinite;
}

@media (max-width: 768px) {
  .event-type-card { height: 155px; }
  .event-tooltip-body {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ===== CURSOR TRAIL / BURST DOTS ===== */
.burst-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  transform: translate(-50%, -50%);
}

/* ===== CARD TILT GPU HINT ===== */
.card,
.benefit-item,
.flavor-card,
.cooler-card,
.catering-card {
  will-change: transform;
}

/* ===== STAT COUNTER FLASH ===== */
.counter-active {
  display: inline-block;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  #cursor-glow { display: none; }

  #aurora { display: none; }

  .reveal {
    transform: translateY(26px);
    transition-duration: 0.65s;
  }

  .reveal-stagger > * {
    transform: translateY(20px);
    transition-duration: 0.55s;
  }

  /* Card tilt removed on mobile — handled in JS */
}

/* ===== SECTION TITLE ANIMATED UNDERLINE ===== */
h2.section-title {
  position: relative;
}
h2.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  height: 3px;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #c22a22, #ed6c00, #FFD93F, #3DBE3D, #00748b, #8B3FFF);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on h2.section-title::after {
  width: 80px;
}

/* ===== STEP BADGE POP ENTRANCE ===== */
@keyframes badgePop {
  0%   { transform: scale(0) rotateY(-180deg) rotateZ(-15deg); opacity: 0; }
  60%  { transform: scale(1.28) rotateY(0deg) rotateZ(4deg);  opacity: 1; }
  80%  { transform: scale(0.88) rotateY(0deg) rotateZ(-2deg); }
  100% { transform: scale(1)    rotateY(0deg) rotateZ(0deg);  }
}
.step-badge.badge-popped {
  animation: badgePop 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.step-badge.badge-red.badge-popped    { box-shadow: 0 0 0 4px rgba(194,42,34,0.15),  0 0 20px rgba(194,42,34,0.35); }
.step-badge.badge-blue.badge-popped   { box-shadow: 0 0 0 4px rgba(26,127,212,0.15), 0 0 20px rgba(26,127,212,0.35); }
.step-badge.badge-green.badge-popped  { box-shadow: 0 0 0 4px rgba(61,190,61,0.15),  0 0 20px rgba(61,190,61,0.35); }
.step-badge.badge-yellow.badge-popped { box-shadow: 0 0 0 4px rgba(255,217,63,0.15), 0 0 20px rgba(255,217,63,0.35); }

/* ===== DIVIDER ANIMATED COLOR SWEEP ===== */
@keyframes dividerSweep {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}
.divider {
  position: relative;
}
.divider::before {
  content: '';
  display: block;
  height: 2px;
  width: 60%;
  margin: 0 auto;
  border-radius: 2px;
  background: linear-gradient(90deg,
    transparent, #c22a22, #ed6c00, #FFD93F, #3DBE3D, #00748b, #8B3FFF, #1A7FD4, transparent);
  background-size: 300% 100%;
  animation: dividerSweep 5s linear infinite;
  opacity: 0.6;
}

/* ===== BRAND STAT CARD GLOW + TILT ===== */
.brand-stat-card {
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.16,1,0.3,1), box-shadow 0.38s;
}
.brand-stat-card:hover {
  transform: perspective(600px) rotateX(-4deg) translateY(-8px) scale(1.04);
  box-shadow: 0 18px 55px rgba(0,0,0,0.5), 0 0 0 1px rgba(194,42,34,0.45);
}
.brand-stat-num {
  transition: text-shadow 0.35s ease, filter 0.35s ease;
}
.brand-stat-card:hover .brand-stat-num {
  text-shadow:
    0 0 14px rgba(194,42,34,0.75),
    0 0 32px rgba(237,108,0,0.52),
    0 0 60px rgba(255,217,63,0.28);
  filter: brightness(1.22);
}

/* ===== STAT COUNTER DONE FLASH ===== */
@keyframes counterFlash {
  0%   { text-shadow: none; }
  30%  { text-shadow: 0 0 26px rgba(255,217,63,1), 0 0 60px rgba(237,108,0,0.65); }
  100% { text-shadow: none; }
}
.counter-done {
  animation: counterFlash 1.25s ease-out forwards;
}

/* ===== TESTIMONIAL STARS TWINKLE ===== */
@keyframes starTwinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}
.testimonial-stars span {
  display: inline-block;
  animation: starTwinkle 2.8s ease-in-out infinite;
}
.testimonial-stars span:nth-child(1) { animation-delay: 0.00s; }
.testimonial-stars span:nth-child(2) { animation-delay: 0.45s; }
.testimonial-stars span:nth-child(3) { animation-delay: 0.90s; }
.testimonial-stars span:nth-child(4) { animation-delay: 1.35s; }
.testimonial-stars span:nth-child(5) { animation-delay: 1.80s; }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  #cursor-glow { display: none; }
  #aurora { display: none; }
  .card:hover,
  .benefit-item:hover {
    animation: none !important;
  }
  .flip-inner { transition: none !important; }
  .flip-back {
    transform: rotateY(0deg) !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    opacity: 0;
  }
  .flip-front {
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
  }
  .event-type-card:hover .flip-back,
  .event-type-card.tapped .flip-back { opacity: 1; animation: none !important; }
  .event-type-card:hover .flip-front,
  .event-type-card.tapped .flip-front { opacity: 0; }
  h2.section-title::after { width: 80px; transition: none; }
  .step-badge.badge-popped { animation: none !important; opacity: 1 !important; }
  .divider::before { animation: none !important; }
  .counter-done { animation: none !important; }
  .testimonial-stars span { animation: none !important; }
  .brand-stat-card:hover { transform: none; }
}
