/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* CSS variables (Design System) */
:root {
  /* Color Palette */
  --primary-sage: #556B2F;         /* Dark Olive/Sage Green */
  --primary-sage-light: #8FBC8F;   /* Light Sage Green */
  --primary-cream: #FAF9F6;        /* Warm Cream/Linen */
  --accent-gold: #C5A880;          /* Muted Gold */
  --text-dark: #1E2C1E;            /* Dark Forest Green Black */
  --text-muted: #5A6E5A;           /* Soft Muted Green Gray */
  --white: #FFFFFF;
  --overlay-dark: rgba(30, 44, 30, 0.4);

  /* Fonts */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Montserrat', sans-serif;

  /* Layout Constants */
  --container-width: 1100px;
  --container-narrow: 800px;
  --border-radius-arch: 150px 150px 0 0;
  --transition-smooth: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-subtle: 0 10px 30px rgba(85, 107, 47, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--primary-cream);
  color: var(--text-dark);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  color: var(--primary-sage);
  margin-bottom: 3.5rem;
  position: relative;
}

/* Floral Divider under H2 */
h2::after {
  content: "✿ ❦ ✿";
  display: block;
  font-size: 1.2rem;
  color: var(--accent-gold);
  margin-top: 0.5rem;
  font-weight: normal;
  letter-spacing: 0.2em;
}

p {
  color: var(--text-muted);
  font-size: 1rem;
}

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

/* Layout Utilities */
.section {
  padding: 8rem 2rem;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  position: relative;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--primary-sage);
  color: var(--primary-cream);
  border: 1px solid var(--primary-sage);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-sage);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(85, 107, 47, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-sage);
  border: 1px solid var(--primary-sage);
}

.btn-secondary:hover {
  background-color: var(--primary-sage);
  color: var(--primary-cream);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(85, 107, 47, 0.1);
}

.btn-gold {
  background-color: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-gold:hover {
  background-color: var(--accent-gold);
  color: var(--primary-cream);
  transform: translateY(-3px);
}

/* Image Arches */
.img-arch {
  border-radius: var(--border-radius-arch);
  border: 10px solid var(--white);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  display: block;
}

.img-arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition-smooth);
}

.img-arch:hover img {
  transform: scale(1.05);
}

/* 1. Hero Cover Section */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: #F3F1EC;
  padding: 4rem 2rem;
  border-bottom: 1px solid rgba(85, 107, 47, 0.1);
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--primary-sage-light) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  opacity: 0.15;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  text-align: left;
}

.hero-tag {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.hero-title {
  font-size: 4.5rem;
  line-height: 1.1;
  color: var(--primary-sage);
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-title span {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--accent-gold);
}

.hero-date {
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}

.hero-venue {
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper .img-arch {
  height: 550px;
  width: 100%;
}

.hero-date-stamp {
  position: absolute;
  top: 40px;
  right: -25px;
  background: var(--white);
  padding: 1.5rem 1rem;
  border-radius: 50%;
  width: 90px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  border: 1px solid rgba(85, 107, 47, 0.1);
  transform: rotate(12deg);
  z-index: 2;
}

.hero-date-stamp span {
  display: block;
}

.hero-date-stamp .day {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--primary-sage);
  line-height: 1;
}

.hero-date-stamp .month {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
}

.hero-date-stamp .year {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* 2. The Couple Section */
#couple {
  background-color: var(--primary-cream);
}

.couple-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 4rem;
  align-items: center;
}

.couple-card {
  text-align: center;
  padding: 2rem;
}

.couple-card .img-arch {
  width: 260px;
  height: 380px;
  margin: 0 auto 2.5rem;
}

.couple-role {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
}

.couple-name {
  font-size: 2.2rem;
  color: var(--primary-sage);
  margin-bottom: 1.5rem;
}

.couple-bio {
  font-size: 0.95rem;
  max-width: 320px;
  margin: 0 auto;
}

.couple-and {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-style: italic;
  color: var(--accent-gold);
  line-height: 1;
}

/* 3. Countdown & Details Section */
#details {
  background-color: #F5F3EE;
  background-image: radial-gradient(rgba(85, 107, 47, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  border-top: 1px solid rgba(85, 107, 47, 0.08);
  border-bottom: 1px solid rgba(85, 107, 47, 0.08);
}

/* Countdown */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.countdown-box {
  background: var(--white);
  min-width: 90px;
  padding: 1.5rem 1rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(85, 107, 47, 0.05);
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary-sage);
  line-height: 1.1;
  display: block;
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-top: 0.5rem;
  display: block;
}

/* Event Cards */
.events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.event-card {
  background: var(--white);
  padding: 3.5rem 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-subtle);
  text-align: center;
  border: 1.5px solid #EFECE6;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-sage);
}

.event-icon {
  font-size: 2rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.event-title {
  font-size: 1.8rem;
  color: var(--primary-sage);
  margin-bottom: 1.5rem;
}

.event-time, .event-venue-name, .event-address {
  margin-bottom: 0.8rem;
}

.event-time {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.event-venue-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--primary-sage);
}

.event-address {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.event-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 250px;
  margin: 0 auto;
}

/* 4. Photo Gallery Section */
#gallery {
  background-color: var(--primary-cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-subtle);
  aspect-ratio: 3/4;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

/* Quote Break section */
.quote-section {
  background-color: var(--primary-sage);
  color: var(--primary-cream);
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
}

.quote-content {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-style: italic;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
  color: var(--primary-cream);
}

.quote-author {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
}

/* 5. Love Story Section */
#story {
  background-color: var(--primary-cream);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 4rem auto 0;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background-color: var(--accent-gold);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 2rem 3rem;
  clear: both;
}

.timeline-item:nth-child(odd) {
  float: left;
  text-align: right;
}

.timeline-item:nth-child(even) {
  float: right;
  text-align: left;
}

.timeline-badge {
  content: "";
  position: absolute;
  top: 2.8rem;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-cream);
  border: 2px solid var(--primary-sage);
  transform: translate(-50%, -50%);
  z-index: 10;
}

.timeline-date {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-title {
  font-size: 1.5rem;
  color: var(--primary-sage);
  margin-bottom: 1rem;
}

.timeline-img {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(85, 107, 47, 0.08);
}

.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-desc {
  font-size: 0.95rem;
}

/* Clearfix for float layout */
.timeline::after {
  content: "";
  display: table;
  clear: both;
}

/* 6. RSVP Section */
#rsvp {
  background-color: #F5F3EE;
  border-top: 1px solid rgba(85, 107, 47, 0.08);
  border-bottom: 1px solid rgba(85, 107, 47, 0.08);
}

.rsvp-wrapper {
  background: var(--white);
  padding: 4rem 3.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-subtle);
  border: 1.5px solid #EFECE6;
}

.rsvp-intro {
  text-align: center;
  max-width: 500px;
  margin: 0 auto 3rem;
}

.rsvp-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-full {
  grid-column: span 2;
}

label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

input[type="text"], select, textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  border: 1.5px solid #EFECE6;
  background-color: var(--primary-cream);
  color: var(--text-dark);
  transition: var(--transition-smooth);
  width: 100%;
}

input[type="text"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-sage);
  background-color: var(--white);
  box-shadow: 0 0 10px rgba(85, 107, 47, 0.05);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.rsvp-submit-container {
  text-align: center;
  margin-top: 1rem;
}

/* Success Card */
.rsvp-success {
  text-align: center;
  padding: 3rem 1.5rem;
}

.success-icon {
  font-size: 3.5rem;
  color: var(--primary-sage);
  margin-bottom: 1.5rem;
}

.success-title {
  font-size: 2.2rem;
  color: var(--primary-sage);
  margin-bottom: 1rem;
}

.success-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 450px;
  margin: 0 auto;
}

/* 7. Gift Registry Section */
#registry {
  background-color: var(--primary-cream);
  text-align: center;
}

.registry-intro {
  max-width: 500px;
  margin: 0 auto 3.5rem;
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.registry-card {
  background: var(--white);
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow-subtle);
  border: 1.5px solid #EFECE6;
  transition: var(--transition-smooth);
}

.registry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(85, 107, 47, 0.1);
}

.registry-logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
  display: block;
}

.registry-logo.paypal { color: #003087; }
.registry-logo.stripe { color: #635bff; }
.registry-logo.bank { color: var(--primary-sage); }

.registry-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.registry-details {
  background-color: var(--primary-cream);
  padding: 0.8rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(85, 107, 47, 0.05);
}

.shipping-address {
  margin-top: 4rem;
  background: #F5F3EE;
  padding: 2.5rem;
  border-radius: 16px;
  display: inline-block;
  max-width: 600px;
  border: 1px solid rgba(85, 107, 47, 0.08);
}

.shipping-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--primary-sage);
  margin-bottom: 0.8rem;
}

.shipping-text {
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* 8. Footer Section */
footer {
  background-color: #1E2C1E;
  color: var(--primary-cream);
  padding: 6rem 2rem 4rem;
  text-align: center;
  position: relative;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-style: italic;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.footer-names {
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.footer-divider {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background-color: var(--accent-gold);
  margin: 1.5rem auto;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--primary-sage-light);
  margin-bottom: 3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #5A6E5A;
  margin-top: 4rem;
}

/* Audio Controller */
.audio-controller {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--white);
  border: 1px solid rgba(85, 107, 47, 0.1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  transition: var(--transition-smooth);
}

.audio-controller:hover {
  transform: scale(1.1);
}

.audio-icon {
  font-size: 1.25rem;
  color: var(--primary-sage);
}

.audio-wave {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 15px;
}

.audio-wave span {
  width: 2.5px;
  background-color: var(--primary-sage);
  border-radius: 2px;
  animation: bounce 0.8s ease-in-out infinite alternate;
  display: block;
}

.audio-wave span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.audio-wave span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.audio-wave span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.audio-wave span:nth-child(4) { height: 4px; animation-delay: 0.4s; }

.audio-paused .audio-wave span {
  animation: none !important;
  height: 3px !important;
}

@keyframes bounce {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

/* Scroll Animation classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries (Responsive) */

@media (max-width: 968px) {
  h2 {
    font-size: 2.2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-image-wrapper .img-arch {
    height: 480px;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-date-stamp {
    right: 10px;
  }

  .couple-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .couple-and {
    transform: rotate(90deg);
    margin: 1.5rem 0;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline::before {
    left: 40px;
  }

  .timeline-item {
    width: 100%;
    float: right !important;
    text-align: left !important;
    padding-left: 80px;
    padding-right: 0;
  }

  .timeline-badge {
    left: 40px;
  }

  .rsvp-form-grid {
    grid-template-columns: 1fr;
  }

  .form-group-full {
    grid-column: span 1;
  }

  .registry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .section {
    padding: 6rem 1.5rem;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .countdown-container {
    gap: 0.8rem;
  }

  .countdown-box {
    min-width: 70px;
    padding: 1rem 0.5rem;
  }

  .countdown-num {
    font-size: 1.8rem;
  }

  .rsvp-wrapper {
    padding: 2.5rem 1.5rem;
  }
}
