/* ============================================
   💗 BIRTHDAY WEBSITE — CORE DESIGN SYSTEM
   Premium Cinematic Experience
   ============================================ */

/* --- CSS Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* Lenis smooth scroll override */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--soft-pink);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* --- Design Tokens --- */
:root {
  /* Primary Colors */
  --soft-pink: #ffd6e7;
  --rose-pink: #ff8ab7;
  --deep-rose: #e84393;
  --hot-pink: #ff6b9d;
  --blush: #fff0f5;
  --lavender: #f0e6ff;
  --peach: #ffecd2;
  --white: #ffffff;
  --cream: #fffaf5;

  /* Premium additions */
  --warm-cream: #FFF8F0;
  --rose-gold: #B76E79;
  --soft-gold: #D4AF37;
  --champagne: #F7E7CE;
  --dusty-rose: #DCAE96;
  --pearl: #FDEEF4;

  /* Dark / Black Heart */
  --black-heart: #1a1a2e;
  --dark-bg: #0d0d1a;
  --dark-card: #16213e;
  --dark-text: #e0d6ff;
  --midnight: #0a0a14;

  /* Accents */
  --gold: #f8d56b;
  --gold-shimmer: #ffd700;
  --sparkle: #fff4cc;

  /* Text */
  --text-dark: #2d1f3d;
  --text-medium: #6b5b7b;
  --text-light: #9b8aab;
  --text-white: #ffffff;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(232, 67, 147, 0.15);
  --glass-blur: blur(20px);

  /* Premium Glass */
  --glass-premium-bg: rgba(255, 255, 255, 0.12);
  --glass-premium-border: rgba(255, 255, 255, 0.2);
  --glass-premium-blur: blur(30px);

  /* Dark Glassmorphism */
  --glass-dark-bg: rgba(26, 26, 46, 0.7);
  --glass-dark-border: rgba(255, 255, 255, 0.08);

  /* Gradients */
  --gradient-romantic: linear-gradient(135deg, #ffd6e7 0%, #ff8ab7 50%, #e84393 100%);
  --gradient-soft: linear-gradient(135deg, #fff0f5 0%, #ffd6e7 100%);
  --gradient-sunset: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ff8ab7 100%);
  --gradient-dreamy: linear-gradient(135deg, #f0e6ff 0%, #ffd6e7 50%, #ffecd2 100%);
  --gradient-dark: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #16213e 100%);
  --gradient-starry: linear-gradient(180deg, #0d0d1a 0%, #1a1a3e 40%, #2d1f5e 70%, #e84393 100%);
  --gradient-gold: linear-gradient(135deg, #f8d56b 0%, #ffd700 100%);
  --gradient-night: linear-gradient(180deg, #0a0a14 0%, #0d0d2a 30%, #1a1a3e 60%, #2d1f5e 100%);
  --gradient-cream: linear-gradient(135deg, #FFF8F0 0%, #FDEEF4 50%, #ffd6e7 100%);

  /* Shadows */
  --shadow-soft: 0 4px 15px rgba(232, 67, 147, 0.1);
  --shadow-medium: 0 8px 30px rgba(232, 67, 147, 0.15);
  --shadow-strong: 0 15px 50px rgba(232, 67, 147, 0.25);
  --shadow-glow: 0 0 30px rgba(255, 138, 183, 0.4);
  --shadow-glow-strong: 0 0 60px rgba(255, 138, 183, 0.6);
  --shadow-dark: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-premium: 0 20px 60px rgba(232, 67, 147, 0.12), 0 4px 20px rgba(0, 0, 0, 0.06);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 50%;
  --radius-pill: 9999px;

  /* Typography Scale */
  --text-xs: clamp(0.7rem, 1.5vw, 0.75rem);
  --text-sm: clamp(0.8rem, 2vw, 0.875rem);
  --text-base: clamp(0.9rem, 2.5vw, 1rem);
  --text-lg: clamp(1rem, 3vw, 1.125rem);
  --text-xl: clamp(1.1rem, 3.5vw, 1.25rem);
  --text-2xl: clamp(1.3rem, 4vw, 1.5rem);
  --text-3xl: clamp(1.6rem, 5vw, 1.875rem);
  --text-4xl: clamp(2rem, 6vw, 2.5rem);
  --text-5xl: clamp(2.5rem, 8vw, 3.5rem);
  --text-6xl: clamp(3rem, 10vw, 4.5rem);
  --text-7xl: clamp(3.5rem, 12vw, 6rem);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-slower: 0.8s ease;
  --transition-cinematic: 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Z-index layers */
  --z-particles: 1;
  --z-content: 10;
  --z-overlay: 100;
  --z-modal: 200;
  --z-pin-screen: 300;
  --z-music: 250;
  --z-notification: 400;
  --z-cinematic: 500;
}

/* --- Typography --- */
.font-script {
  font-family: 'Great Vibes', cursive;
}

.font-display {
  font-family: 'Playfair Display', serif;
}

.font-body {
  font-family: 'Inter', sans-serif;
}

.font-handwrite {
  font-family: 'Dancing Script', cursive;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

/* --- Section Base --- */
.section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
}

.section-title {
  font-family: 'Great Vibes', cursive;
  font-size: var(--text-5xl);
  color: var(--deep-rose);
  text-align: center;
  margin-bottom: var(--space-xl);
  text-shadow: 0 2px 10px rgba(232, 67, 147, 0.2);
}

.section-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-2xl);
  color: var(--text-medium);
  text-align: center;
  margin-bottom: var(--space-lg);
  font-style: italic;
}

/* --- Section Divider --- */
.section-divider {
  width: 60px;
  height: 2px;
  background: var(--gradient-romantic);
  margin: var(--space-2xl) auto;
  border-radius: 1px;
  opacity: 0.6;
}

/* --- Glassmorphism Cards --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: var(--space-xl);
}

.glass-card-premium {
  background: var(--glass-premium-bg);
  backdrop-filter: var(--glass-premium-blur);
  -webkit-backdrop-filter: var(--glass-premium-blur);
  border: 1px solid var(--glass-premium-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-premium);
  padding: var(--space-xl);
}

.glass-card-dark {
  background: var(--glass-dark-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-dark-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dark);
  padding: var(--space-xl);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: 600;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-romantic);
  color: var(--white);
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--deep-rose);
  box-shadow: var(--shadow-soft);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* --- Particle Canvas --- */
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-particles);
  pointer-events: none;
}

/* --- Music Toggle --- */
.music-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--gradient-romantic);
  color: var(--white);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-music);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-base);
  opacity: 0;
  pointer-events: none;
}

.music-toggle.visible {
  opacity: 1;
  pointer-events: all;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow-strong);
}

.music-toggle.playing {
  animation: musicPulse 1.5s ease-in-out infinite;
}

/* --- Scroll Progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-romantic);
  z-index: var(--z-overlay);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(232, 67, 147, 0.5);
}

/* --- Loading Screen --- */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-heart {
  font-size: 3rem;
  animation: heartBeat 1s ease-in-out infinite;
}

.loading-text {
  font-family: 'Great Vibes', cursive;
  font-size: var(--text-2xl);
  color: var(--deep-rose);
  margin-top: var(--space-md);
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-rose { color: var(--deep-rose); }
.text-white { color: var(--white); }
.text-gold { color: var(--gold); }
.text-script { font-family: 'Great Vibes', cursive; }
.text-display { font-family: 'Playfair Display', serif; }

.hidden { display: none !important; }
.invisible { opacity: 0; visibility: hidden; }
.visible { opacity: 1; visibility: visible; }

.no-scroll { overflow: hidden; height: 100vh; }

/* --- In-app Browser Prompt --- */
.browser-prompt {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 10, 24, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.browser-prompt.visible {
  display: flex;
}

.browser-prompt-card {
  width: min(100%, 360px);
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(45, 31, 61, 0.32);
  text-align: center;
}

.browser-prompt-title {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--deep-rose);
  margin-bottom: 10px;
}

.browser-prompt-text,
.browser-prompt-help {
  font-size: var(--text-sm);
  color: var(--text-medium);
  line-height: 1.5;
}

.browser-prompt-help {
  margin-top: 14px;
}

.browser-prompt-primary,
.browser-prompt-secondary {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.browser-prompt-primary {
  background: var(--gradient-romantic);
  color: var(--white);
  box-shadow: var(--shadow-glow);
}

.browser-prompt-secondary {
  background: rgba(232, 67, 147, 0.1);
  color: var(--deep-rose);
}

/* --- Responsive Utilities --- */
@media (max-width: 480px) {
  .section {
    padding: var(--space-lg) var(--space-sm);
  }

  .glass-card {
    padding: var(--space-lg);
  }
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-3xl) var(--space-xl);
  }
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-4xl) var(--space-2xl);
  }
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--blush);
}

::-webkit-scrollbar-thumb {
  background: var(--rose-pink);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--deep-rose);
}

/* --- Selection Color --- */
::selection {
  background: var(--rose-pink);
  color: var(--white);
}
