/**
 * ==============================================================================
 * SHERYL'S ROMANTIC BIRTHDAY WEB APP — DESIGN TOKENS & BASE STYLING
 * ==============================================================================
 * Aesthetic: Pearl White, Blush Pink, Champagne Gold & Rosewood Charcoal
 * ==============================================================================
 */

:root {
  /* Surface & Background Palette */
  --color-bg-primary: #FAF9F6;        /* Luminous Pearl White */
  --color-bg-secondary: #FFFDF9;      /* Warm Soft Ivory */
  --color-bg-tertiary: #FCE7F0;       /* Delicate Blush Pink */
  --color-bg-lavender: #F3EFFB;       /* Whispering Lavender Mist */
  --color-bg-surface: #FFFFFF;        /* Crisp Surface White */

  /* Glassmorphism Overlays */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-subtle: rgba(255, 255, 255, 0.60);
  --glass-bg-elevated: rgba(255, 255, 255, 0.90);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-gold: rgba(212, 175, 55, 0.35);
  --glass-border-rose: rgba(229, 130, 157, 0.40);
  --glass-blur: blur(16px);
  --glass-blur-heavy: blur(24px);

  /* Romantic Accent Palette */
  --color-gold-primary: #D4AF37;      /* Metallic Champagne Gold */
  --color-gold-light: #F4E8C1;        /* Soft Shimmer Gold */
  --color-gold-dark: #A88219;         /* Antique Rich Gold */
  --color-gold-gradient: linear-gradient(135deg, #F4E8C1 0%, #D4AF37 50%, #C59B27 100%);
  
  --color-rose-primary: #E5829D;      /* Soft Romantic Rose */
  --color-rose-deep: #C74B6E;         /* Vivid Velvet Rose */
  --color-rose-light: #F8D7E3;        /* Soft Petal Pink */
  --color-rose-gradient: linear-gradient(135deg, #F8D7E3 0%, #E5829D 50%, #C74B6E 100%);

  --color-lavender-accent: #C8B8E8;   /* Dreamy Pastel Lavender */

  /* Typography Colors (WCAG AAA High Contrast) */
  --color-text-primary: #2C1820;      /* Deep Rosewood Charcoal */
  --color-text-secondary: #6B4E59;    /* Muted Velvet Rose */
  --color-text-muted: #9E7D8A;        /* Soft Mauve Hint */
  --color-text-gold: #996515;         /* Rich Antique Gold Text */
  --color-text-inverse: #FFFFFF;      /* Clean White */

  /* Status Colors */
  --color-success: #3E885B;           /* Mint Sage */
  --color-success-bg: #EAF6EE;
  --color-error: #D64562;             /* Soft Berry Red */
  --color-error-bg: #FEECEF;

  /* Shadows & Ambient Lighting */
  --shadow-sm: 0 4px 12px rgba(44, 24, 32, 0.05);
  --shadow-md: 0 8px 24px rgba(44, 24, 32, 0.08);
  --shadow-lg: 0 16px 40px rgba(44, 24, 32, 0.12);
  --shadow-xl: 0 24px 56px rgba(44, 24, 32, 0.16);
  --shadow-gold-glow: 0 0 25px rgba(212, 175, 55, 0.35);
  --shadow-rose-glow: 0 0 25px rgba(229, 130, 157, 0.35);
  --shadow-polaroid: 0 12px 32px rgba(44, 24, 32, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);

  /* Geometry & Border Radius */
  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 36px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-spring: 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);

  /* Typography Font Families */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-cursive: 'Great Vibes', 'Dancing Script', 'Sacramento', cursive;

  /* Layout Container */
  --container-max-width: 1160px;
}

/* ==============================================================================
 * CSS RESET & BASE STYLES
 * ==============================================================================
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(252, 231, 240, 0.7) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(244, 232, 193, 0.45) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(243, 239, 251, 0.6) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  -webkit-tap-highlight-color: transparent;
}

/* Canvas Layer */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 1;
}

/* Confetti Overlay Canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 9999;
}

/* Main Container Wrapper */
.app-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

@media (max-width: 480px) {
  .app-container {
    padding: 0 0.85rem 3.5rem;
  }
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--color-text-secondary);
}

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-rose-light);
  border-radius: var(--radius-full);
}

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

/* Selection Highlight */
::selection {
  background: var(--color-rose-light);
  color: var(--color-text-primary);
}

/* Accessibility: Focus visible */
:focus-visible {
  outline: 2px solid var(--color-rose-primary);
  outline-offset: 3px;
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  #ambient-canvas, #confetti-canvas {
    display: none !important;
  }
}
