/* ===== Design Tokens ===== */
:root {
  --cream: #FDF8F0;
  --cream-dark: #F5EDE0;
  --gold: #C9A96E;
  --gold-light: #E2CFA5;
  --gold-dark: #A07D45;
  --text-primary: #3A2E2E;
  --text-secondary: #6B5B5B;
  --text-muted: #8C7A7A;
  --white: #FFFFFF;
  --accent-rose: #C4898A;
  --accent-sage: #8BA888;
  --divider: rgba(201, 169, 110, 0.3);
  --shadow-soft: 0 4px 30px rgba(58, 46, 46, 0.08);
  --shadow-elevated: 0 12px 40px rgba(58, 46, 46, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  background-color: var(--cream);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

/* ===== Typography ===== */
h1, h2, h3, h4 { font-family: 'Playfair Display', 'Georgia', serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: 0.01em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

.script-font {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--gold);
}

/* ===== Utility ===== */
.section-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 40px auto;
  max-width: 300px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}
.section-divider span {
  color: var(--gold);
  font-size: 1.2rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}
.navbar.scrolled {
  background: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(58, 46, 46, 0.06);
  padding: 10px 32px;
}
.navbar a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}
.navbar a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width var(--transition);
}
.navbar a:hover { color: var(--gold-dark); }
.navbar a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1001;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(201, 169, 110, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-image-wrapper {
  width: clamp(220px, 40vw, 340px);
  height: clamp(220px, 40vw, 340px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold-light);
  box-shadow: 0 0 0 8px rgba(201, 169, 110, 0.12), var(--shadow-elevated);
  margin-bottom: 40px;
  animation: gentle-float 6s ease-in-out infinite;
}
.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--gold-dark);
  margin-bottom: 8px;
  line-height: 1.1;
}
.hero-names .amp {
  display: inline-block;
  margin: 0 8px;
  font-size: 0.7em;
  color: var(--gold);
}

.hero h1 {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-verse {
  font-style: italic;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  max-width: 500px;
  line-height: 1.8;
}

.hero-date {
  margin-top: 32px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
}

/* ===== Countdown ===== */
.countdown-section {
  background: var(--white);
  padding: 50px 24px;
  text-align: center;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
  flex-wrap: wrap;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.countdown-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--gold-dark);
  line-height: 1;
  font-weight: 700;
}
.countdown-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== Story / Letter Section ===== */
.story-section {
  background: var(--cream);
  position: relative;
}
.story-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--gold-light));
}

.story-header {
  text-align: center;
  margin-bottom: 48px;
}
.story-header h2 { color: var(--text-primary); margin-bottom: 16px; }
.story-intro {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.9;
}

.letter-frame {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: clamp(16px, 4vw, 40px);
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
}
.letter-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-light));
}
.letter-frame img {
  width: 100%;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: transform var(--transition);
}
.letter-frame img:hover { transform: scale(1.01); }

.letter-caption {
  text-align: center;
  margin-top: 24px;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== Ceremony & Reception ===== */
.events-section {
  background: var(--white);
}
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}
.event-card {
  text-align: center;
  padding: 48px 32px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  background: var(--cream);
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.event-icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
  display: block;
}
.event-card h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.event-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}
.event-detail .icon {
  color: var(--gold);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.event-note {
  margin-top: 20px;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Family Section ===== */
.family-section {
  background: var(--cream);
  position: relative;
}
.family-section h2 {
  text-align: center;
  margin-bottom: 48px;
}

.family-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.family-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition);
}
.family-card:hover { transform: translateY(-3px); }

.family-role {
  font-family: 'Great Vibes', cursive;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.family-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.family-parents,
.family-house {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 6px;
  line-height: 1.6;
}
.family-house {
  font-style: italic;
  color: var(--text-muted);
}

.sharing-note {
  text-align: center;
  margin-top: 48px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(201,169,110,0.08), rgba(196,137,138,0.08));
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  color: var(--text-secondary);
}
.sharing-note strong { color: var(--gold-dark); font-weight: 600; }

/* ===== Couple Photo Section ===== */
.couple-photo-section {
  background: var(--white);
}
.couple-photo-frame {
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--gold-light);
  box-shadow: var(--shadow-elevated);
}
.couple-photo-frame img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}
.couple-photo-frame:hover img {
  transform: scale(1.02);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 48px 24px;
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}
.footer .couple-names-footer {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.footer p { margin-top: 8px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    flex-direction: column;
    justify-content: center;
    background: rgba(253, 248, 240, 0.97);
    backdrop-filter: blur(16px);
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.5s ease;
  }
  .navbar.open { transform: translateX(0); }
  .navbar a { font-size: 1.1rem; letter-spacing: 0.2em; }
  .menu-toggle { display: flex; }
  .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .family-grid { grid-template-columns: 1fr; gap: 24px; }
  .events-grid { grid-template-columns: 1fr; }
  .section-container { padding: 72px 20px; }
}

/* ===== Lightbox ===== */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===== Particles (decorative) ===== */
.particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-light);
  border-radius: 50%;
  opacity: 0;
  animation: particle-drift 8s linear infinite;
}
@keyframes particle-drift {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}
