/* =========================================
   ROMANTIC LUXURY - Wedding Invitation
   Premium Typography System v3.0
   =========================================
   
   TYPOGRAPHY PHILOSOPHY:
   - Display Font: Pinyon Script (names, accent)
   - Heading Font: Cormorant Garamond (elegant serif)
   - Body Font: Lato (clean, readable sans-serif)
   
   TYPE SCALE: Major Third (1.25 ratio)
   Base: 16px
   
   Scale:
   - Display: 3.5rem (56px) - Hero names only
   - H1: 2.5rem (40px) - Section titles
   - H2: 2rem (32px) - Sub-sections
   - H3: 1.5rem (24px) - Card titles
   - H4: 1.25rem (20px) - Small headings
   - Body: 1rem (16px) - Paragraphs
   - Small: 0.875rem (14px) - Secondary text
   - XS: 0.75rem (12px) - Captions
   - Tiny: 0.625rem (10px) - Labels
   
   ========================================= */

/* ========== TYPOGRAPHY SYSTEM ========== */
:root {
  /* ===== FONT FAMILIES ===== */
  /* Display: For names and romantic accents */
  --font-display: 'Pinyon Script', 'Dancing Script', cursive;
  
  /* Heading: Elegant serif for titles */
  --font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  
  /* Body: Clean sans-serif for readability */
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  
  /* ===== TYPE SCALE (Major Third 1.25) ===== */
  --text-display: clamp(2.5rem, 10vw, 3.5rem);  /* 40-56px - Hero names */
  --text-h1: clamp(1.75rem, 6vw, 2.5rem);       /* 28-40px - Section titles */
  --text-h2: clamp(1.5rem, 5vw, 2rem);          /* 24-32px - Sub-sections */
  --text-h3: clamp(1.25rem, 4vw, 1.5rem);       /* 20-24px - Card titles */
  --text-h4: 1.25rem;                            /* 20px - Small headings */
  --text-body: 1rem;                             /* 16px - Paragraphs */
  --text-body-lg: 1.125rem;                      /* 18px - Lead text */
  --text-small: 0.875rem;                        /* 14px - Secondary */
  --text-xs: 0.75rem;                            /* 12px - Captions */
  --text-tiny: 0.625rem;                         /* 10px - Labels */
  
  /* ===== FONT WEIGHTS ===== */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  
  /* ===== LINE HEIGHTS ===== */
  --leading-none: 1;
  --leading-tight: 1.15;      /* Display text */
  --leading-snug: 1.3;        /* Headings */
  --leading-normal: 1.5;      /* Short paragraphs */
  --leading-relaxed: 1.7;     /* Long paragraphs */
  --leading-loose: 1.9;       /* Maximum readability */
  
  /* ===== LETTER SPACING ===== */
  --tracking-tighter: -0.02em;  /* Script fonts */
  --tracking-tight: -0.01em;    /* Large display */
  --tracking-normal: 0;         /* Body text */
  --tracking-wide: 0.025em;     /* Headings */
  --tracking-wider: 0.05em;     /* Subheadings */
  --tracking-widest: 0.15em;    /* All caps labels */
  
  /* ===== PARAGRAPH SPACING ===== */
  --paragraph-spacing: 1.5em;
  
  /* ========== COLORS ========== */
  /* Primary Colors - Warm Rose Gold Palette */
  --color-primary: #c9a77c;
  --color-primary-light: #e0c9a6;
  --color-primary-dark: #a67c52;
  --color-primary-rgb: 201, 167, 124;
  
  /* Accent Colors */
  --color-accent: #d4a574;
  --color-accent-rose: #e8c4b8;
  --color-gold: #d4af37;
  --color-gold-light: #f4e4bc;
  
  /* Neutral Colors */
  --color-dark: #1a1a1a;
  --color-text: #2d2d2d;
  --color-text-light: #5a5a5a;
  --color-text-muted: #8a8a8a;
  --color-light: #ffffff;
  --color-cream: #faf8f5;
  --color-ivory: #f5f0e8;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 50%, var(--color-primary-dark) 100%);
  --gradient-gold: linear-gradient(135deg, #f4e4bc 0%, #d4af37 50%, #c9a227 100%);
  --gradient-rose: linear-gradient(135deg, #fdf2f0 0%, #e8c4b8 50%, #d4a574 100%);
  --gradient-dark: linear-gradient(180deg, rgba(26,26,26,0.95) 0%, rgba(26,26,26,0.8) 100%);
  
  /* ========== SPACING SCALE ========== */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  
  /* ========== SIZING ========== */
  --container-width: 480px;
  --section-padding: clamp(3rem, 8vw, 5rem);
  
  /* ========== BORDERS & RADIUS ========== */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* ========== SHADOWS ========== */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.16);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.2);
  --shadow-glow: 0 0 40px rgba(var(--color-primary-rgb), 0.3);
  
  /* ========== TRANSITIONS ========== */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.2s var(--ease-in-out);
  --transition-base: 0.4s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);
  
  /* ========== Z-INDEX ========== */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  /* Prevent font-size inflation on mobile */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-normal);
  color: var(--color-text);
  background: var(--color-cream);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ========== TYPOGRAPHY ELEMENTS ========== */

/* Display - Hero Names (Pinyon Script) */
.text-display,
.hero-names .name,
.card-info .person-name,
.footer-names .name {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-dark);
}

/* H1 - Section Titles (Cormorant Garamond) */
h1, .text-h1,
.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-wide);
  color: var(--color-dark);
}

/* H2 - Sub-sections (Cormorant Garamond) */
h2, .text-h2 {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-wide);
  color: var(--color-dark);
}

/* H3 - Card Titles (Cormorant Garamond) */
h3, .text-h3 {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-normal);
  color: var(--color-dark);
}

/* H4 - Small Headings (Cormorant Garamond) */
h4, .text-h4 {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-normal);
  color: var(--color-dark);
}

/* Body Text (Lato) */
p, .text-body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-normal);
  color: var(--color-text);
}

/* Lead/Intro Text */
.text-lead {
  font-size: var(--text-body-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
}

/* Small Text */
.text-small,
small {
  font-size: var(--text-small);
  line-height: var(--leading-normal);
}

/* Extra Small - Captions */
.text-xs,
.caption {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

/* Tiny - Labels */
.text-tiny,
.label {
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Section Label - Script accent (Pinyon Script) */
.section-label {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-primary);
}

/* Quote Text (Cormorant Garamond Italic) */
.text-quote,
blockquote,
.story-quote p,
.card-info .person-quote {
  font-family: var(--font-heading);
  font-size: var(--text-body-lg);
  font-weight: var(--weight-regular);
  font-style: italic;
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-normal);
  color: var(--color-text);
}

/* All Caps Text */
.text-caps {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

/* ========== TYPOGRAPHY UTILITIES ========== */
.font-display { font-family: var(--font-display); }
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

.weight-light { font-weight: var(--weight-light); }
.weight-regular { font-weight: var(--weight-regular); }
.weight-medium { font-weight: var(--weight-medium); }
.weight-semibold { font-weight: var(--weight-semibold); }
.weight-bold { font-weight: var(--weight-bold); }

.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-widest { letter-spacing: var(--tracking-widest); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-dark { color: var(--color-dark); }
.text-light { color: var(--color-text-light); }
.text-muted { color: var(--color-text-muted); }
.text-white { color: var(--color-light); }
.text-gold { color: var(--color-gold-light); }

/* ========== BASE ELEMENTS ========== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

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

strong, b {
  font-weight: var(--weight-semibold);
}

em, i {
  font-style: italic;
}

/* ========== WEDDING GATE LOADING SCREEN ========== */
.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background */
.gate-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    #faf8f5 0%, 
    #f5f0e8 30%,
    #ebe3d7 70%,
    #e0d5c5 100%
  );
  z-index: 0;
}

/* Subtle pattern overlay */
.gate-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(201, 167, 124, 0.03) 0%, transparent 50%);
  background-size: 60px 60px;
}

/* Floral Decorations */
.gate-floral {
  position: absolute;
  z-index: 1;
  opacity: 0.7;
  pointer-events: none;
}

.gate-floral img {
  max-width: 150px;
  height: auto;
}

.gate-floral-left {
  top: 10%;
  left: -30px;
  transform: rotate(15deg);
}

.gate-floral-right {
  bottom: 10%;
  right: -40px;
  transform: rotate(-20deg) scaleX(-1);
}

/* Gate Container */
.gate-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  padding: 0 var(--space-lg);
}

/* Gate Header - Couple Names */
.gate-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(-20px);
  animation: gateRevealSimple 0.8s var(--ease-out-expo) 0.2s forwards;
}

.couple-name-small {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  color: var(--color-dark);
  letter-spacing: var(--tracking-tighter);
}

.couple-ampersand {
  font-size: var(--text-h4);
  color: var(--color-primary);
  animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Gate Arch */
.gate-arch {
  width: 100%;
  max-width: 320px;
  height: 30px;
  position: relative;
  margin-bottom: -2px;
  z-index: 5;
  opacity: 0;
  animation: gateRevealSimple 0.6s var(--ease-out-expo) 0.4s forwards;
}

.arch-decoration {
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-primary-light);
  border-bottom: none;
  border-radius: 100px 100px 0 0;
  background: linear-gradient(180deg, #f8f3ed 0%, #f0e8dc 100%);
  position: relative;
}

.arch-decoration::before {
  content: '❧';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-body);
  color: var(--color-primary);
}

/* Gate Frame - Wrapper for doors + content */
.gate-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 380px;
  opacity: 0;
  animation: gateRevealSimple 0.8s var(--ease-out-expo) 0.5s forwards;
}

/* Gate Doors Container */
.gate-doors {
  position: absolute;
  inset: 0;
  display: flex;
  perspective: 1000px;
}

/* Individual Door */
.gate-door {
  width: 50%;
  height: 100%;
  position: relative;
  z-index: 5;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gate-door-left {
  transform-origin: left center;
}

.gate-door-right {
  transform-origin: right center;
}

/* Door Panel */
.door-panel {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    #f8f3ed 0%, 
    #f0e8dc 50%, 
    #e8dece 100%
  );
  border: 2px solid var(--color-primary-light);
  position: relative;
  box-shadow: 
    inset 0 0 30px rgba(0,0,0,0.03),
    0 4px 20px rgba(0,0,0,0.08);
}

.gate-door-left .door-panel {
  border-right: 1px solid var(--color-primary-light);
  border-radius: 4px 0 0 4px;
}

.gate-door-right .door-panel {
  border-left: 1px solid var(--color-primary-light);
  border-radius: 0 4px 4px 0;
}

/* Door Frame Lines */
.door-frame {
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
  border-radius: 2px;
}

.door-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
}

/* Door Ornament */
.door-ornament {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--color-primary-light);
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gate-door-left .door-ornament {
  right: 15px;
}

.gate-door-right .door-ornament {
  left: 15px;
}

.door-ornament::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Light Effect Behind Doors - Subtle glow */
.gate-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, 
    rgba(250, 248, 245, 0.6) 0%,
    rgba(245, 240, 232, 0.3) 50%,
    transparent 80%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gate Content Overlay */
.gate-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  width: 85%;
  padding: var(--space-lg);
  pointer-events: none;
  /* Subtle glass effect for readability */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.gate-welcome-text {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  opacity: 0;
  transform: translateY(15px);
  animation: gateRevealSimple 0.6s var(--ease-out-expo) 0.8s forwards;
}

.gate-guest-name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  color: var(--color-dark);
  margin-bottom: var(--space-sm);
  opacity: 0;
  transform: translateY(15px);
  animation: gateRevealSimple 0.6s var(--ease-out-expo) 1s forwards;
}

.gate-message {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-style: italic;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
  opacity: 0;
  transform: translateY(15px);
  animation: gateRevealSimple 0.6s var(--ease-out-expo) 1.2s forwards;
}

/* Progress Bar */
.gate-progress {
  width: 120px;
  height: 2px;
  background: rgba(var(--color-primary-rgb), 0.2);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-md);
  overflow: hidden;
  opacity: 0;
  animation: gateRevealSimple 0.4s var(--ease-out-expo) 1.4s forwards;
}

.gate-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.1s linear;
}


/* Gate Footer */
.gate-footer {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  opacity: 0;
  animation: gateRevealFooter 0.6s var(--ease-out-expo) 1.8s forwards;
}

.wedding-date-small {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  color: var(--color-text-muted);
}

/* Gate Reveal Animations */
@keyframes gateRevealSimple {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gateRevealFooter {
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* ========== GATE OPENING STATE ========== */

/* Smoother door transition */
.gate-door {
  transition: transform 1.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Phase 1: Content fades gently */
.gate-screen.opening .gate-content {
  animation: contentFadeOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes contentFadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
}

/* Doors open smoothly */
.gate-screen.opening .gate-door-left {
  transform: rotateY(-95deg);
}

.gate-screen.opening .gate-door-right {
  transform: rotateY(95deg);
}

/* Light appears gently - just opacity, no scale */
.gate-screen.opening .gate-light {
  opacity: 1;
}


/* Header floats up gently */
.gate-screen.opening .gate-header {
  animation: headerFloat 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

@keyframes headerFloat {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px);
  }
}

/* Arch fades */
.gate-screen.opening .gate-arch {
  animation: archFade 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes archFade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-15px);
  }
}

/* Phase 2: Simple elegant fade out */
.gate-screen.entering {
  animation: simpleFadeOut 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes simpleFadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Florals drift away gently */
.gate-screen.opening .gate-floral-left {
  animation: floralDriftLeft 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gate-screen.opening .gate-floral-right {
  animation: floralDriftRight 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes floralDriftLeft {
  0% {
    opacity: 0.7;
    transform: rotate(15deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-80px) rotate(25deg);
  }
}

@keyframes floralDriftRight {
  0% {
    opacity: 0.7;
    transform: rotate(-20deg) scaleX(-1);
  }
  100% {
    opacity: 0;
    transform: translateX(80px) rotate(-30deg) scaleX(-1);
  }
}

/* Footer fades smoothly */
.gate-screen.opening .gate-footer {
  animation: footerFade 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes footerFade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Final state */
.gate-screen.opened {
  display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 520px) {
  .gate-floral img {
    max-width: 100px;
  }
  
  .gate-frame {
    height: 320px;
    max-width: 280px;
  }
  
  .gate-arch {
    max-width: 280px;
  }
  
  .gate-floral-left {
    top: 5%;
    left: -20px;
  }
  
  .gate-floral-right {
    bottom: 5%;
    right: -25px;
  }
  
  .couple-name-small {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  .gate-screen.opening .gate-door-left,
  .gate-screen.opening .gate-door-right {
    transform: none;
    opacity: 0;
  }
  
  .gate-screen.opening {
    opacity: 0;
  }
}

/* ========== PARTICLES ========== */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--color-gold-light);
  border-radius: 50%;
  opacity: 0.4;
  animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {
  0%, 100% { 
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { 
    transform: translateY(-100px) rotate(720deg);
    opacity: 0;
  }
}

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-gold);
  width: 0%;
  z-index: var(--z-fixed);
  transition: width 0.1s linear;
}

/* ========== NAVIGATION DOTS ========== */
.nav-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.3);
  border: 2px solid transparent;
  transition: var(--transition-fast);
  position: relative;
}

.nav-dot:hover,
.nav-dot.active {
  background: var(--color-primary);
  border-color: var(--color-light);
  transform: scale(1.2);
}

.nav-tooltip {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-dark);
  color: var(--color-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.nav-dot:hover .nav-tooltip {
  opacity: 1;
  visibility: visible;
  right: 28px;
}

@media (max-width: 768px) {
  .nav-dots {
    display: none;
  }
}

/* ========== MUSIC PLAYER ========== */
.music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-fixed);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.music-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-light);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.music-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-gold);
  opacity: 0;
  transition: var(--transition-fast);
}

.music-btn:hover {
  transform: scale(1.1);
}

.music-btn:hover::before,
.music-btn.playing::before {
  opacity: 1;
}

.music-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.music-waves span {
  width: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.music-btn.playing .music-waves span {
  background: var(--color-light);
  animation: wave 1s ease-in-out infinite;
}

.music-waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.music-waves span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.music-waves span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.music-waves span:nth-child(4) { height: 16px; animation-delay: 0.3s; }

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

/* Music Icon - Play button (shown when paused) */
.music-icon-play {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  position: relative;
  z-index: 1;
  transition: var(--transition-fast);
}

/* When NOT playing: show play icon, hide waves */
.music-btn:not(.playing) .music-waves {
  display: none;
}

.music-btn:not(.playing) .music-icon-play {
  display: block;
}

/* When playing: show waves, hide play icon */
.music-btn.playing .music-icon-play {
  display: none;
}

.music-btn.playing .music-waves {
  display: flex;
}

/* Hover states */
.music-btn:hover .music-icon-play {
  color: var(--color-light);
}

.music-label {
  background: var(--color-light);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.music-player:hover .music-label {
  opacity: 1;
  transform: translateX(0);
}

/* Pulse animation to attract attention */
.music-btn:not(.playing) {
  animation: pulse-attention 2s ease-in-out infinite;
}

.music-btn.playing {
  animation: none;
}

@keyframes pulse-attention {
  0%, 100% { 
    box-shadow: var(--shadow-lg);
  }
  50% { 
    box-shadow: var(--shadow-lg), 0 0 0 8px rgba(var(--color-primary-rgb), 0.2);
  }
}

/* ========== MAIN APP CONTAINER ========== */
.wedding-app {
  max-width: var(--container-width);
  margin: 0 auto;
  background: var(--color-light);
  position: relative;
  box-shadow: var(--shadow-xl);
  min-height: 100vh;
}

/* ========== SECTIONS ========== */
.section {
  position: relative;
  padding: var(--section-padding) var(--space-xl);
  overflow: hidden;
}

.section-container {
  position: relative;
  z-index: 2;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header .section-label {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.section-header .section-title {
  margin-bottom: var(--space-md);
}

.section-header.light .section-title,
.section-header.light .section-label {
  color: var(--color-light);
}

.title-underline {
  width: 60px;
  height: 2px;
  background: var(--gradient-gold);
  margin: 0 auto;
  position: relative;
}

.title-underline::before {
  content: '♥';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-light);
  padding: 0 8px;
  color: var(--color-primary);
  font-size: var(--text-small);
}

.section-desc {
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
  margin-top: var(--space-lg);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== GLASSMORPHISM CARD ========== */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ========== HERO SECTION ========== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--color-ivory) 0%, var(--color-light) 100%);
  padding-top: 0;
  padding-bottom: 0;
}

/* Hero Decorations */
.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.deco-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(var(--color-primary-rgb), 0.2), transparent);
  height: 1px;
}

.deco-line-1 { top: 15%; left: 5%; right: 5%; }
.deco-line-2 { bottom: 15%; left: 5%; right: 5%; }

.deco-corner {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

.deco-corner-tl { top: 20px; left: 20px; border-right: 0; border-bottom: 0; }
.deco-corner-tr { top: 20px; right: 20px; border-left: 0; border-bottom: 0; }
.deco-corner-bl { bottom: 20px; left: 20px; border-right: 0; border-top: 0; }
.deco-corner-br { bottom: 20px; right: 20px; border-left: 0; border-top: 0; }

/* Floating Elements */
.floating-element {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.flower-1 {
  top: 80px;
  left: -40px;
  width: 120px;
  transform: rotate(15deg);
  opacity: 0.9;
}

.flower-2 {
  bottom: 120px;
  right: -50px;
  width: 140px;
  transform: rotate(-20deg);
  opacity: 0.9;
}

/* Hero Content */
.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  padding: var(--space-3xl) 0;
}

.hero-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.hero-names {
  margin-bottom: var(--space-xl);
}

.hero-names .name {
  display: block;
  /* Uses .text-display styles from typography system */
}

.hero-names .ampersand {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin: var(--space-sm) 0;
}

/* Date Badge */
.hero-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-lg) var(--space-2xl);
  background: var(--color-light);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2xl);
}

.date-ornament {
  width: 40px;
  height: 1px;
  background: var(--gradient-gold);
}

.save-the-date {
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wedding-date {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  color: var(--color-dark);
  letter-spacing: var(--tracking-wider);
}

/* ========== ENVELOPE - Premium Animation ========== */
.envelope-section {
  margin-bottom: var(--space-2xl);
  perspective: 1000px;
}

.envelope {
  width: 220px;
  height: 160px;
  margin: 0 auto var(--space-lg);
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: envelopeFloat 3s ease-in-out infinite;
}

@keyframes envelopeFloat {
  0%, 100% { transform: translateY(0) rotateZ(0deg); }
  25% { transform: translateY(-5px) rotateZ(0.5deg); }
  75% { transform: translateY(-3px) rotateZ(-0.5deg); }
}

.envelope:hover {
  animation-play-state: paused;
  transform: scale(1.05) translateY(-5px);
}

.envelope.open {
  animation: none;
}

/* Envelope Body - Main container */
.envelope-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 115px;
  background: linear-gradient(180deg, #f8f3ed 0%, #ebe3d7 50%, #ddd4c6 100%);
  border-radius: 4px 4px 8px 8px;
  box-shadow: 
    0 4px 15px rgba(0,0,0,0.1),
    0 1px 3px rgba(0,0,0,0.08),
    inset 0 -2px 5px rgba(0,0,0,0.03);
  /* Make sure body covers the hidden letter */
  z-index: 2;
  overflow: hidden;
}

/* Inner pocket shadow */
.envelope-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, transparent 100%);
  border-radius: 0 0 50% 50%;
}

/* Paper texture overlay */
.envelope-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  border-radius: inherit;
  pointer-events: none;
}

/* Envelope Flap - The opening part */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 75px;
  background: linear-gradient(180deg, #fdfaf6 0%, #f5ede3 40%, #ebe3d7 100%);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Flap inner shadow when closed */
.envelope-flap::before {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 30%;
  width: 40%;
  height: 30px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.04) 100%);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

/* Flap opening animation */
.envelope.open .envelope-flap {
  transform: rotateX(180deg) translateZ(1px);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0; /* Move behind when open */
}

/* The Letter inside - Hidden when closed */
.envelope-letter {
  position: absolute;
  top: 60px;
  left: 12%;
  width: 76%;
  height: 85px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcfa 100%);
  border-radius: 6px;
  box-shadow: 
    0 2px 15px rgba(0,0,0,0.1),
    0 0 0 1px rgba(0,0,0,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Behind the envelope body when closed */
  z-index: 1;
  /* Hidden inside envelope when closed */
  transform: translateY(20px);
  opacity: 0;
  transition: 
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s,
    opacity 0.5s ease 0.3s;
}

/* Letter reveal animation - Rises up when opened */
.envelope.open .envelope-letter {
  transform: translateY(-90px);
  opacity: 1;
}

/* Letter content */
.letter-content {
  text-align: center;
  padding: var(--space-sm);
}

.letter-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
  animation: letterIconPulse 2s ease-in-out infinite;
}

@keyframes letterIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.envelope.open .letter-icon {
  animation: none;
}

.letter-content p {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-style: italic;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* Wax Seal */
.envelope-seal {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  background: radial-gradient(circle at 30% 30%, #d64545 0%, #b22b2b 50%, #8b1e1e 100%);
  border-radius: 50%;
  z-index: 5;
  box-shadow: 
    0 3px 12px rgba(139, 30, 30, 0.5),
    0 1px 3px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.25),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  transition: 
    opacity 0.3s ease,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Heart emboss on seal */
.envelope-seal::before {
  content: '♥';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: rgba(255,255,255,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Seal break animation */
.envelope.open .envelope-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.3) rotate(180deg);
  transition: 
    opacity 0.2s ease,
    transform 0.4s cubic-bezier(0.6, -0.28, 0.74, 0.05);
}

/* Hint text */
.envelope-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: var(--text-small);
  color: var(--color-text-muted);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.envelope:hover + .envelope-hint,
.envelope-hint:hover {
  opacity: 1;
}

.envelope.open ~ .envelope-hint {
  opacity: 0;
  pointer-events: none;
}

.hint-icon {
  display: inline-block;
  animation: hintBounce 1.5s ease-in-out infinite;
}

@keyframes hintBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.1); }
}

/* Sparkle effect on open */
.envelope.open::before {
  content: '✨';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  opacity: 0;
  animation: sparkle 0.6s ease-out 0.2s forwards;
}

@keyframes sparkle {
  0% { opacity: 0; transform: translateX(-50%) scale(0) translateY(20px); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2) translateY(-10px); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.8) translateY(-30px); }
}

/* Scroll Indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ========== STORY SECTION ========== */
.story-section {
  background: var(--color-light);
}

.story-timeline {
  position: relative;
  padding: var(--space-xl) 0;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--color-primary), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: var(--space-2xl);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 8px;
  top: 0;
  width: 26px;
  height: 26px;
  background: var(--color-light);
  border: 3px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot.special {
  background: var(--gradient-gold);
  border-color: var(--color-gold);
}

.dot-year {
  font-size: var(--text-tiny);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
}

.timeline-dot.special .dot-year {
  color: var(--color-light);
}

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

.timeline-card .card-label {
  display: inline-block;
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.timeline-card h3 {
  margin-bottom: var(--space-sm);
}

.timeline-card p {
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
}

.timeline-card.special {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(201, 167, 124, 0.1) 100%);
  border-color: rgba(212, 175, 55, 0.3);
}

/* Story Quote */
.story-quote {
  text-align: center;
  padding: var(--space-2xl);
  margin-top: var(--space-2xl);
  position: relative;
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-primary-light);
  line-height: 1;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.story-quote p {
  margin-bottom: var(--space-md);
}

.story-quote cite {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-style: normal;
  color: var(--color-text-muted);
}

/* ========== COUPLE SECTION ========== */
.couple-section {
  background: var(--color-ivory);
}

.couple-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.couple-card {
  text-align: center;
  max-width: 280px;
}

.card-image-wrapper {
  position: relative;
  margin-bottom: var(--space-lg);
}

.image-frame {
  position: relative;
  width: 180px;
  height: 240px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.couple-card:hover .image-frame img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.3) 100%);
}

.card-decoration {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  border: 1px solid var(--color-primary-light);
  border-radius: calc(var(--radius-lg) + 5px);
  pointer-events: none;
}

.card-info .role-label {
  display: inline-block;
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.card-info .person-name {
  font-size: var(--text-h2);
  margin-bottom: var(--space-sm);
}

.card-info .person-quote {
  font-size: var(--text-small);
  margin-bottom: var(--space-md);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-link svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-primary);
  fill: none;
}

.social-link:hover {
  background: var(--color-primary);
}

.social-link:hover svg {
  stroke: var(--color-light);
}

/* Couple Connector */
.couple-connector {
  padding: var(--space-md) 0;
}

.connector-heart {
  width: 50px;
  height: 50px;
  background: var(--gradient-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-heart 2s ease-in-out infinite;
  box-shadow: var(--shadow-glow);
}

.connector-heart svg {
  width: 24px;
  height: 24px;
  color: var(--color-light);
}

@keyframes pulse-heart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ========== GALLERY SECTION ========== */
.gallery-section {
  background: var(--color-light);
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item.large {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item.tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-icon {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: var(--transition-fast);
}

.gallery-item:hover .gallery-icon {
  transform: scale(1);
}

.gallery-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-dark);
}

/* ========== EVENT SECTION ========== */
.event-section {
  background: linear-gradient(180deg, var(--color-dark) 0%, #2a2a2a 100%);
  color: var(--color-light);
}

/* Countdown */
.countdown-wrapper {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.countdown-label {
  font-size: var(--text-small);
  line-height: var(--leading-normal);
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-lg);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
}

.countdown-item {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  min-width: 70px;
}

.countdown-value {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  color: var(--color-gold-light);
  line-height: var(--leading-none);
}

.countdown-unit {
  font-size: var(--text-tiny);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-xs);
}

.countdown-separator {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  color: var(--color-gold-light);
  font-weight: var(--weight-light);
}

/* Event Cards */
.event-cards {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.event-card {
  text-align: center;
  padding: var(--space-xl);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.event-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-md);
  background: rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-gold-light);
}

.event-card h3 {
  color: var(--color-light);
  margin-bottom: var(--space-md);
}

.event-details {
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,0.8);
}

.event-time strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  color: var(--color-gold-light);
  margin-bottom: var(--space-xs);
}

.event-lunar {
  font-size: var(--text-small);
  color: rgba(255,255,255,0.5);
  margin-top: var(--space-xs);
}

.event-venue {
  font-family: var(--font-heading);
  font-size: var(--text-body-lg);
  font-weight: var(--weight-medium);
  color: var(--color-gold-light);
  margin-bottom: var(--space-xs);
}

.event-address {
  line-height: var(--leading-relaxed);
}

/* Map Section */
.map-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.btn-map,
.btn-calendar {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  transition: var(--transition-fast);
}

.btn-map {
  background: var(--gradient-gold);
  color: var(--color-dark);
}

.btn-calendar {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-light);
}

.btn-map:hover,
.btn-calendar:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-map svg,
.btn-calendar svg {
  width: 18px;
  height: 18px;
}

/* Calendar Visual */
.calendar-visual {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 320px;
  margin: 0 auto;
}

.calendar-header {
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--color-gold-light);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-weekday {
  font-size: var(--text-tiny);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding: var(--space-xs);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-small);
  color: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day.selected {
  background: var(--gradient-gold);
  color: var(--color-dark);
  font-weight: var(--weight-semibold);
  position: relative;
  flex-direction: column;
}

.calendar-day.selected .heart-badge {
  font-size: var(--text-tiny);
  margin-top: -2px;
}

/* ========== RSVP SECTION ========== */
.rsvp-section {
  background: linear-gradient(180deg, var(--color-ivory) 0%, var(--color-light) 100%);
}

.rsvp-card {
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-row {
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.form-group label svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  background: var(--color-light);
  transition: var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio Cards */
.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.radio-card {
  cursor: pointer;
}

.radio-card input {
  display: none;
}

.radio-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  border: 2px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  text-align: center;
}

.radio-card input:checked + .radio-content {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
}

.radio-icon {
  font-size: var(--text-h3);
}

.radio-text {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

/* Guest Counter */
.guest-counter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.counter-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  font-size: var(--text-h4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.counter-btn:hover {
  background: var(--color-primary);
  color: var(--color-light);
}

.guest-counter input {
  width: 60px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
  border: none;
  background: none;
  color: var(--color-dark);
}

/* Submit Button */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--color-dark);
  transition: var(--transition-fast);
  margin-top: var(--space-sm);
}

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

.btn-submit svg {
  width: 18px;
  height: 18px;
}

/* Form Success */
.form-success {
  display: none;
  text-align: center;
  padding: var(--space-2xl);
}

.form-success.show {
  display: block;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-h3);
  color: var(--color-dark);
  margin: 0 auto var(--space-md);
  animation: success-pop 0.5s var(--ease-out-back);
}

@keyframes success-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.form-success h3 {
  margin-bottom: var(--space-sm);
}

.form-success p {
  font-size: var(--text-small);
  color: var(--color-text-light);
}

/* Gift Section */
.gift-section {
  text-align: center;
}

.gift-card {
  padding: var(--space-xl);
  max-width: 320px;
  margin: 0 auto;
}

.gift-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-md);
}

.gift-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--color-primary);
}

.gift-card h3 {
  margin-bottom: var(--space-sm);
}

.gift-card p {
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.btn-gift {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  transition: var(--transition-fast);
}

.btn-gift:hover {
  background: var(--color-primary);
  color: var(--color-light);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--color-dark);
  color: var(--color-light);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  position: relative;
}

.footer-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.footer-names .name {
  font-size: var(--text-h2);
}

.footer-names .heart {
  color: var(--color-primary);
  animation: pulse-heart 2s ease-in-out infinite;
}

.footer-date {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-lg);
}

.footer-thanks p {
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-lg);
}

.footer-credits {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

/* Back to Top */
.btn-top {
  position: absolute;
  right: var(--space-lg);
  bottom: var(--space-lg);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.btn-top.visible {
  opacity: 1;
  visibility: visible;
}

.btn-top:hover {
  background: var(--color-primary);
}

.btn-top svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-light);
}

/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-light);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.lightbox-nav svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-light);
}

/* ========== MODAL ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  max-width: 360px;
  width: 100%;
  padding: var(--space-xl);
  background: var(--color-light);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 32px;
  height: 32px;
  font-size: var(--text-h3);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header {
  margin-bottom: var(--space-lg);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

.modal-body {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
}

.modal-body .contact-info {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-ivory);
  border-radius: var(--radius-md);
  text-align: left;
}

.modal-body .contact-info p {
  font-size: var(--text-small);
  margin-bottom: var(--space-xs);
}

/* ========== ANIMATIONS ========== */
[data-animate] {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate="fade-down"] {
  transform: translateY(-40px);
}

[data-animate="fade-left"] {
  transform: translateX(40px);
}

[data-animate="fade-right"] {
  transform: translateX(-40px);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger Delays */
[data-delay="0.1"] { transition-delay: 0.1s; }
[data-delay="0.2"] { transition-delay: 0.2s; }
[data-delay="0.3"] { transition-delay: 0.3s; }
[data-delay="0.4"] { transition-delay: 0.4s; }
[data-delay="0.5"] { transition-delay: 0.5s; }
[data-delay="0.6"] { transition-delay: 0.6s; }
[data-delay="0.8"] { transition-delay: 0.8s; }
[data-delay="1"] { transition-delay: 1s; }

/* ========== RESPONSIVE TYPOGRAPHY ========== */
@media (max-width: 520px) {
  :root {
    /* Scale down type on mobile */
    --text-display: clamp(2rem, 10vw, 2.5rem);
    --text-h1: clamp(1.5rem, 6vw, 1.75rem);
    --text-h2: clamp(1.25rem, 5vw, 1.5rem);
    --text-h3: clamp(1.125rem, 4vw, 1.25rem);
  }
  
  .wedding-app {
    max-width: 100%;
  }
  
  .section {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
  
  .countdown-timer {
    gap: var(--space-xs);
  }
  
  .countdown-item {
    min-width: 60px;
    padding: var(--space-sm) var(--space-md);
  }
  
  .countdown-value {
    font-size: var(--text-h3);
  }
  
  .radio-cards {
    grid-template-columns: 1fr;
  }
  
  .music-player {
    bottom: 16px;
    right: 16px;
  }
  
  .music-btn {
    width: 48px;
    height: 48px;
  }
  
  .music-label {
    display: none;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  [data-animate] {
    opacity: 1;
    transform: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ========== HERO PERSONALIZATION ========== */
.hero-invitation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.invitation-label {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
}

.invitation-guest-name {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  color: var(--color-primary);
}

/* Guest Welcome Responsive */
@media (max-width: 520px) {
  .guest-photo-frame {
    width: 120px;
    height: 120px;
  }
  
  .guest-name {
    font-size: var(--text-h2);
  }
}

/* ========== PRINT ========== */
@media print {
  .music-player,
  .nav-dots,
  .scroll-progress,
  .gate-screen,
  .particles-container,
  .btn-top,
  .lightbox,
  .modal {
    display: none !important;
  }
  
  .wedding-app {
    max-width: 100%;
    box-shadow: none;
  }
  
  .section {
    break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}
