/* ============================================================
   Meggie's Cosmic Cupcakes — Custom CSS
   All Tailwind utilities are loaded via CDN (see functions.php).
   This file adds design tokens, animations, and component styles
   that Tailwind cannot express as utility classes.
============================================================ */

/* Design tokens */
:root {
  --color-bg-deep:     #050510;
  --color-bg-surface:  #0a0a1a;
  --color-bg-card:     #0f0f24;
  --color-magenta:     #ff00cc;
  --color-magenta-dim: #cc0099;
  --color-cyan:        #00e5ff;
  --color-cyan-dim:    #00b8cc;
  --color-yellow:      #ffd600;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--color-bg-deep);
  font-family: 'Inter', sans-serif;
  color: #ffffff;
  overflow-x: hidden;
}

/* Starfield canvas */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Glow utilities ─────────────────────────────────────────── */
.glow-text-magenta {
  text-shadow:
    0 0 10px rgba(255, 0, 204, 0.9),
    0 0 30px rgba(255, 0, 204, 0.6),
    0 0 60px rgba(255, 0, 204, 0.3);
}

.glow-text-cyan {
  text-shadow:
    0 0 10px rgba(0, 229, 255, 0.9),
    0 0 30px rgba(0, 229, 255, 0.5),
    0 0 60px rgba(0, 229, 255, 0.2);
}

/* ── Glassmorphism ──────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-22px) rotate(1deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.2; transform: scale(0.6); }
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50%       { transform: translateY(8px) translateX(-50%); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

@keyframes neon-flicker {
  0%, 95%, 100% { opacity: 1; }
  96%            { opacity: 0.7; }
  97%            { opacity: 1; }
  98%            { opacity: 0.5; }
  99%            { opacity: 1; }
}

.float-anim   { animation: float 5s ease-in-out infinite; }
.pulse-anim   { animation: pulse-glow 2.5s ease-in-out infinite; }
.neon-flicker { animation: neon-flicker 8s ease-in-out infinite; }

.sparkle { animation: twinkle 2.5s ease-in-out infinite; }
.sparkle:nth-child(2) { animation-delay: 0.8s; }
.sparkle:nth-child(3) { animation-delay: 1.6s; }

/* Scroll bounce arrow — absolute positioned centred at bottom of hero */
.bounce-arrow {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce-down 1.6s ease-in-out infinite;
}

/* ── Fade-in-up (IntersectionObserver) ──────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navbar ─────────────────────────────────────────────────── */
.nav-scrolled {
  background: rgba(5, 5, 16, 0.88) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-bottom: 1px solid rgba(255, 0, 204, 0.15) !important;
}

/* Desktop nav links */
.mcc-desktop-nav ul,
.mcc-desktop-nav .menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mcc-desktop-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mcc-desktop-nav a:hover,
.mcc-desktop-nav .current-menu-item > a {
  color: var(--color-magenta);
}

/* Mobile nav links */
.mcc-mobile-nav,
.mcc-mobile-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mcc-mobile-nav li a {
  display: block;
  padding: 12px 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.2s ease;
}

.mcc-mobile-nav li a:hover { color: var(--color-magenta); }

/* Hamburger transform */
#mobile-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-drawer.open { max-height: 480px; }

#hamburger .bar-top,
#hamburger .bar-mid,
#hamburger .bar-bot {
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
  display: block;
}

#hamburger.open .bar-top { transform: translateY(8px) rotate(45deg); }
#hamburger.open .bar-mid { opacity: 0; transform: scaleX(0); }
#hamburger.open .bar-bot { transform: translateY(-8px) rotate(-45deg); }

/* ── Logo glow ──────────────────────────────────────────────── */
.logo-glow {
  filter: drop-shadow(0 0 6px rgba(255, 0, 204, 0.8))
          drop-shadow(0 0 18px rgba(0, 229, 255, 0.4));
}

/* ── Flavor cards ───────────────────────────────────────────── */
.flavor-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flavor-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 35px rgba(255, 0, 204, 0.35), 0 24px 48px rgba(0, 0, 0, 0.5);
}

.flavor-card .flavor-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.flavor-card:hover .flavor-overlay { opacity: 1; }

/* ── Instagram grid ─────────────────────────────────────────── */
.ig-tile .ig-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ig-tile:hover .ig-overlay { opacity: 1; }

/* ── Ripple button ──────────────────────────────────────────── */
.ripple-btn { position: relative; overflow: hidden; }

.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}

/* ── Form inputs ────────────────────────────────────────────── */
.cosmic-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cosmic-input:focus {
  outline: none;
  border-color: var(--color-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3), 0 0 20px rgba(0, 229, 255, 0.1);
}

/* Date input calendar icon colour */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.4);
  cursor: pointer;
}

/* Select arrow */
select option { background-color: #0f0f24; color: #fff; }

/* ── Nebula blobs ───────────────────────────────────────────── */
.nebula-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* ── Section divider ────────────────────────────────────────── */
.nebula-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 204, 0.35),
    rgba(0, 229, 255, 0.35),
    transparent
  );
}

/* ── Price tag ──────────────────────────────────────────────── */
.price-tag {
  background: linear-gradient(135deg, rgba(255, 0, 204, 0.15), rgba(0, 229, 255, 0.08));
  border: 1px solid rgba(255, 0, 204, 0.3);
  border-radius: 8px;
  padding: 2px 8px;
}

/* ── Step ring glows ────────────────────────────────────────── */
.step-ring-magenta {
  box-shadow: 0 0 20px rgba(255, 0, 204, 0.4), 0 0 40px rgba(255, 0, 204, 0.15);
}

.step-ring-cyan {
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4), 0 0 40px rgba(0, 229, 255, 0.15);
}

/* ── Form success state ─────────────────────────────────────── */
#form-success { display: none; }

/* ── WordPress body classes — remove default margins ────────── */
.custom-logo { max-width: 100%; height: 100%; object-fit: contain; }
