*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-dark);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:root {
  --ivory: #F8F3EB;
  --cream: #F0E8D8;
  --parchment: #EDE4D3;
  --sage-dark: #2A3C2A;
  --sage: #3D5240;
  --sage-mid: #5A7A5E;
  --sage-light: #7B9B7D;
  --gold: #B08D4C;
  --gold-light: #C9A96E;
  --gold-pale: #DECE9C;
  --blush: #D4B9A0;
  --text-dark: #2A3528;
  --text-muted: #5C6B5E;
  --text-light: #F8F3EB;

  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Lora', 'Georgia', serif;

  --section-pad: clamp(4rem, 10vw, 8rem);
  --content-max: 720px;
}

.texture-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

section {
  position: relative;
  padding: var(--section-pad) 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-light { background-color: var(--ivory); }
.section-cream { background-color: var(--cream); }
.section-dark {
  background-color: var(--sage-dark);
  color: var(--text-light);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  gap: 0;
}
.ornament svg { flex-shrink: 0; }

.ornament-gold svg path,
.ornament-gold svg circle,
.ornament-gold svg line {
  stroke: var(--gold);
  fill: none;
}
.ornament-gold svg .fill-gold { fill: var(--gold); stroke: none; }

.ornament-light svg path,
.ornament-light svg circle,
.ornament-light svg line {
  stroke: var(--gold-pale);
  fill: none;
}
.ornament-light svg .fill-gold { fill: var(--gold-pale); stroke: none; }

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
  background: var(--sage-dark);
  color: var(--text-light);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(42, 60, 42, 0.55) 0%, transparent 70%),
    linear-gradient(to bottom, rgba(42, 60, 42, 0.6) 0%, rgba(42, 60, 42, 0.75) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-frame {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-frame::before,
.hero-frame::after,
.hero-frame .corner-bl,
.hero-frame .corner-br {
  content: '';
  position: absolute;
  width: clamp(40px, 8vw, 80px);
  height: clamp(40px, 8vw, 80px);
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.5;
}
.hero-frame::before {
  top: 0; left: 0;
  border-width: 1px 0 0 1px;
}
.hero-frame::after {
  top: 0; right: 0;
  border-width: 1px 1px 0 0;
}
.hero-frame .corner-bl {
  bottom: 0; left: 0;
  border-width: 0 0 1px 1px;
}
.hero-frame .corner-br {
  bottom: 0; right: 0;
  border-width: 0 1px 1px 0;
}

.hero-pretitle {
  font-family: var(--font-heading);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--gold-light);
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 1s ease-out 0.3s forwards;
}

.hero-names {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 1s ease-out 0.6s forwards;
}

.hero-names .amp {
  display: block;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 5vw, 3rem);
  color: var(--gold-light);
  margin: 0.2em 0;
}

.hero-ornament-middle {
  margin: 1.5rem 0;
  opacity: 0;
  animation: heroReveal 1s ease-out 0.9s forwards;
}

.hero-date {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-pale);
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 1s ease-out 1.1s forwards;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: heroReveal 1s ease-out 1.6s forwards;
}
.scroll-cue span {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
}
.scroll-cue .arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  position: relative;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.3); }
}

/* ═══════════════════════════════════════
   INVITATION
   ═══════════════════════════════════════ */
.invitation {
  text-align: center;
}
.invitation-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--sage);
  margin-bottom: 2rem;
}
.invitation-text {
  max-width: var(--content-max);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.9;
  color: var(--text-muted);
}
.invitation-text p + p {
  margin-top: 1.2em;
}
.invitation .ornament {
  margin: 2.5rem auto;
}

/* ═══════════════════════════════════════
   SCHEDULE / TIMELINE
   ═══════════════════════════════════════ */
.schedule {
  text-align: center;
}
.schedule-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 3.5rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 540px;
  width: 100%;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: start;
}

.timeline-time-col {
  display: flex;
  justify-content: flex-end;
  padding-right: clamp(1.2rem, 3vw, 2rem);
  padding-top: 0.3rem;
}
.timeline-time {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--gold);
  letter-spacing: 0.05em;
}

.timeline-line-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--cream);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin-top: 0.4rem;
}
.timeline-connector {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold-light), var(--gold-pale), transparent);
}

.timeline-info-col {
  padding-left: clamp(1.2rem, 3vw, 2rem);
  text-align: left;
  padding-bottom: 2rem;
}
.timeline-event {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--sage-dark);
  margin-bottom: 0.4rem;
}
.timeline-location {
  font-size: clamp(0.88rem, 1.8vw, 0.95rem);
  color: var(--text-muted);
  line-height: 1.6;
}
.timeline-location a {
  color: var(--sage-mid);
  border-bottom: 1px solid var(--sage-light);
  transition: border-color 0.3s;
}
.timeline-location a:hover {
  border-color: var(--gold);
}

/* ═══════════════════════════════════════
   COUNTDOWN
   ═══════════════════════════════════════ */
.countdown {
  text-align: center;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(93, 120, 78, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(176, 141, 76, 0.08) 0%, transparent 50%),
    var(--sage-dark);
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem;
}

.countdown-heading {
  font-family: var(--font-heading);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--gold-pale);
  letter-spacing: 0.08em;
  margin-bottom: 2.5rem;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.5rem);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: clamp(56px, 12vw, 80px);
}

.countdown-number {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #fff;
  line-height: 1;
  letter-spacing: 0.03em;
  transition: transform 0.3s ease;
}
.countdown-number.tick {
  transform: scale(1.08);
}

.countdown-label {
  font-family: var(--font-heading);
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}

.countdown-separator {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--gold);
  opacity: 0.3;
  align-self: flex-start;
  margin-top: clamp(0.3rem, 1vw, 0.5rem);
}

/* ═══════════════════════════════════════
   WISHES
   ═══════════════════════════════════════ */
.wishes {
  text-align: center;
}
.wishes-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 2rem;
}
.wishes-text {
  max-width: var(--content-max);
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.9;
  color: var(--text-muted);
}
.wishes-text p + p {
  margin-top: 1.2em;
}
.wishes .ornament { margin: 2.5rem auto; }

/* ═══════════════════════════════════════
   RSVP
   ═══════════════════════════════════════ */
.rsvp {
  text-align: center;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}
.rsvp-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--sage);
  margin-bottom: 1.5rem;
}
.rsvp-text {
  max-width: var(--content-max);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.rsvp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 1.6vw, 0.9rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-dark);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.rsvp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: -1;
}
.rsvp-btn:hover {
  color: #fff;
}
.rsvp-btn:hover::before {
  transform: scaleX(1);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  background: var(--sage-dark);
  color: var(--text-light);
}
.footer-names {
  font-family: var(--font-heading);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--gold-pale);
  margin-bottom: 0.5rem;
}
.footer-heart {
  font-size: 1.2rem;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 1.5rem;
}
.footer-tagline {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--sage-light);
  opacity: 0.5;
}

/* ═══════════════════════════════════════
   PHOTO GALLERY
   ═══════════════════════════════════════ */
.gallery {
  padding: 0;
  background: var(--ivory);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.gallery-item {
  overflow: hidden;
  position: relative;
}

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

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

.gallery-item--tall {
  grid-row: 1 / 3;
}

/* ═══════════════════════════════════════
   PHOTO DIVIDER
   ═══════════════════════════════════════ */
.photo-divider {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  position: relative;
}

.photo-divider img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 40%;
}

/* ═══════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.35s; }
.reveal-delay-4 { transition-delay: 0.5s; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 480px) {
  .timeline-item {
    grid-template-columns: auto auto 1fr;
  }
  .timeline-time-col {
    justify-content: flex-start;
    padding-right: clamp(0.6rem, 2vw, 1rem);
  }
  .timeline-info-col {
    padding-left: clamp(0.6rem, 2vw, 1rem);
  }
  .countdown-timer {
    gap: 0.6rem;
  }
  .countdown-separator {
    display: none;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 3px;
    padding: 0 0.75rem;
  }
  .gallery-item--tall {
    grid-row: auto;
  }
  .gallery-item img {
    height: 240px;
  }
  .photo-divider img {
    height: 260px;
  }
}

/* ═══════════════════════════════════════
   PRINT
   ═══════════════════════════════════════ */
@media print {
  .scroll-cue, .countdown { display: none; }
  .section-dark { background: #fff !important; color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
