/* ═══════════════════════════════════════════════
   birthday.tools — Landing Page Styles (2026)
   ═══════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --gold-primary: #e9c400;
  --gold-light: #ffe16d;
  --gold-glow: rgba(233, 196, 0, 0.25);
  --rose-accent: #ff6b6b;
  --violet-accent: #a78bfa;
  --navy-deep: #111125;
  --navy-card: #1e1e32;
  --navy-card-hover: #28283d;
  --text-primary: #fff6df;
  --text-secondary: #d0c6ab;
  --border-subtle: rgba(255, 246, 223, 0.08);
  --border-glow: rgba(233, 196, 0, 0.15);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Gradient Mesh Background ── */
.hero-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-mesh::before,
.hero-mesh::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  will-change: transform;
}

.hero-mesh::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--gold-primary) 0%, transparent 70%);
  top: -10%;
  left: -5%;
  animation: mesh-drift-1 20s ease-in-out infinite;
}

.hero-mesh::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--violet-accent) 0%, transparent 70%);
  bottom: -15%;
  right: -5%;
  animation: mesh-drift-2 25s ease-in-out infinite;
}

.hero-mesh-rose {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rose-accent) 0%, transparent 70%);
  filter: blur(140px);
  opacity: 0.15;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: mesh-drift-3 18s ease-in-out infinite;
  will-change: transform;
}

@keyframes mesh-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, 50px) scale(1.1); }
  66% { transform: translate(-40px, 80px) scale(0.95); }
}

@keyframes mesh-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, -40px) scale(1.05); }
  66% { transform: translate(50px, -60px) scale(1.1); }
}

@keyframes mesh-drift-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-40%, -60%) scale(1.15); }
}

/* ── SVG Confetti Particles ── */
.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0;
  animation: confetti-fall linear infinite;
}

.confetti-piece:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; background: var(--gold-primary); }
.confetti-piece:nth-child(2) { left: 25%; animation-duration: 15s; animation-delay: 2s; background: var(--violet-accent); border-radius: 50%; }
.confetti-piece:nth-child(3) { left: 40%; animation-duration: 11s; animation-delay: 4s; background: var(--rose-accent); }
.confetti-piece:nth-child(4) { left: 55%; animation-duration: 14s; animation-delay: 1s; background: var(--gold-light); border-radius: 50%; }
.confetti-piece:nth-child(5) { left: 70%; animation-duration: 13s; animation-delay: 3s; background: var(--violet-accent); }
.confetti-piece:nth-child(6) { left: 85%; animation-duration: 16s; animation-delay: 5s; background: var(--gold-primary); border-radius: 50%; }
.confetti-piece:nth-child(7) { left: 15%; animation-duration: 10s; animation-delay: 7s; background: var(--rose-accent); border-radius: 50%; }
.confetti-piece:nth-child(8) { left: 60%; animation-duration: 14s; animation-delay: 6s; background: var(--gold-light); }

@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.3; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── Hero Image Float ── */
.hero-image {
  animation: hero-float 6s var(--ease-out-expo) infinite;
  will-change: transform;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.5));
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, black 50%, transparent 75%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, black 50%, transparent 75%);
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-16px) rotate(0deg); }
}

/* ── Gradient Text ── */
.gradient-text-gold {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, #d4a800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-accent {
  background: linear-gradient(135deg, var(--violet-accent) 0%, var(--rose-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Stagger delays for grid children */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.4s; }
.stagger-9 { transition-delay: 0.45s; }

/* ── 3D Tilt Card ── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
  will-change: transform;
}

.tilt-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--gold-glow);
}

/* ── Feature Card Styles ── */
.feature-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--border-glow), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  background: var(--navy-card-hover);
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

/* Colorful inner glow on hover */
.feature-card:nth-child(odd):hover {
  background: linear-gradient(135deg, var(--navy-card-hover) 60%, rgba(167, 139, 250, 0.08) 100%);
}
.feature-card:nth-child(even):hover {
  background: linear-gradient(135deg, var(--navy-card-hover) 60%, rgba(233, 196, 0, 0.06) 100%);
}

/* Emoji bounce on card hover */
.feature-card:hover .text-3xl,
.feature-card:hover .text-5xl {
  transform: scale(1.15) rotate(-5deg);
}

/* Feature card icon container */
.feature-card .icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(233, 196, 0, 0.08);
  margin-bottom: 1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.feature-card:hover .icon-wrap {
  background: rgba(233, 196, 0, 0.15);
  transform: scale(1.05);
}

/* ── Event Type Card ── */
.event-type-card {
  background: var(--navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.event-type-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), var(--violet-accent));
  transition: width 0.4s var(--ease-out-expo);
}

.event-type-card:hover::after {
  width: 60%;
}

.event-type-card:hover {
  transform: translateY(-6px);
  background: var(--navy-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ── "How it Works" Steps ── */
.step-connector {
  position: relative;
}

.step-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -2rem;
  width: 4rem;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), transparent);
  opacity: 0.3;
}

.step-connector:last-child::after {
  display: none;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--gold-primary), #d4a800);
  color: #221b00;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px var(--gold-glow);
}

/* ── CTA Glow Button ── */
.cta-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-expo);
}

.cta-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-light), var(--gold-primary));
  z-index: -1;
  animation: glow-rotate 3s linear infinite;
  background-size: 200% 200%;
}

.cta-glow:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px var(--gold-glow), 0 20px 60px rgba(233, 196, 0, 0.15);
}

.cta-glow:active {
  transform: scale(0.97);
}

@keyframes glow-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── CTA Pulse (final section) ── */
.cta-pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--gold-glow); }
  50% { box-shadow: 0 0 40px var(--gold-glow), 0 0 80px rgba(233, 196, 0, 0.1); }
}

/* ── Navbar Compact on Scroll ── */
.nav-compact {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.nav-landing {
  transition: padding 0.3s var(--ease-out-expo), background-color 0.3s ease;
}

/* ── Testimonial Card ── */
.testimonial-card {
  background: rgba(55, 55, 77, 0.25);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 0.3s var(--ease-out-expo);
}

.testimonial-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

/* Stars */
.stars {
  color: var(--gold-primary);
  font-size: 1rem;
  letter-spacing: 2px;
}

/* ── Stats Counter ── */
.stat-number {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 2ch;
}

/* ── Section Divider ── */
.section-glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), var(--violet-accent), var(--gold-glow), transparent);
  border: none;
  opacity: 0.5;
}

/* ── Footer Gradient Top ── */
.footer-landing {
  border-top: 1px solid transparent;
  background-image: linear-gradient(var(--navy-deep), var(--navy-deep)), 
                    linear-gradient(90deg, transparent, var(--gold-glow), var(--violet-accent), var(--gold-glow), transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh::before,
  .hero-mesh::after,
  .hero-mesh-rose,
  .hero-image,
  .confetti-piece,
  .cta-glow::before {
    animation: none !important;
  }

  .cta-pulse {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .feature-card,
  .event-type-card,
  .testimonial-card,
  .tilt-card {
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-mesh::before {
    width: 300px;
    height: 300px;
  }
  .hero-mesh::after {
    width: 250px;
    height: 250px;
  }

  .step-connector::after {
    display: none;
  }

  .confetti-piece {
    width: 6px;
    height: 6px;
  }
}

/* ── Smooth Scrollbar ── */
html {
  scroll-behavior: smooth;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--navy-deep);
}

body::-webkit-scrollbar-thumb {
  background: rgba(233, 196, 0, 0.2);
  border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
  background: rgba(233, 196, 0, 0.4);
}
