:root {
  --white: #fafaf5;
  --ivory: #f4efe2;
  --olive: #556b2f;
  --olive-deep: #263518;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.34);
  --ink: #2d3325;
  --glass: rgba(250, 250, 245, 0.58);
  --glass-strong: rgba(250, 250, 245, 0.78);
  --shadow: 0 28px 80px rgba(38, 53, 24, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(212, 175, 55, 0.13), transparent 28rem),
    linear-gradient(180deg, var(--white), var(--ivory) 46%, var(--white));
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(85, 107, 47, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 107, 47, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

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

button,
a {
  font: inherit;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(2rem, 4vw, 4rem);
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -8%;
  z-index: -4;
  /* The photo layer uses the requested couple image path with an elegant gradient fallback. */
  background:
    linear-gradient(rgba(250, 250, 245, 0.46), rgba(250, 250, 245, 0.67)),
    url("images/photo1.jpg") center / cover,
    linear-gradient(135deg, #eef0e5, #f8f1dd 46%, #dfe8d5);
  transform: translate3d(0, var(--parallax, 0px), 0) scale(1.07);
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 46%, rgba(250, 250, 245, 0.08), rgba(250, 250, 245, 0.74) 62%),
    linear-gradient(90deg, rgba(38, 53, 24, 0.28), transparent 24%, transparent 76%, rgba(38, 53, 24, 0.22));
}

.hero-veils {
  position: absolute;
  inset: 1.2rem;
  z-index: -1;
  border: 1px solid rgba(212, 175, 55, 0.42);
  pointer-events: none;
}

.hero-veils::before,
.hero-veils::after,
.floral-divider::before,
.floral-divider::after {
  position: absolute;
  width: 9rem;
  height: 2.6rem;
  content: "";
  background:
    radial-gradient(ellipse at 12% 52%, rgba(85, 107, 47, 0.82) 0 20%, transparent 22%),
    radial-gradient(ellipse at 34% 36%, rgba(85, 107, 47, 0.7) 0 18%, transparent 20%),
    radial-gradient(ellipse at 56% 58%, rgba(85, 107, 47, 0.78) 0 20%, transparent 22%),
    radial-gradient(ellipse at 78% 38%, rgba(85, 107, 47, 0.62) 0 17%, transparent 19%),
    linear-gradient(100deg, transparent 8%, rgba(212, 175, 55, 0.64) 9% 91%, transparent 92%);
  opacity: 0.78;
}

.hero-veils::before {
  top: 1.2rem;
  left: 1.2rem;
  transform: rotate(-26deg);
}

.hero-veils::after {
  right: 1.2rem;
  bottom: 1.2rem;
  transform: rotate(154deg);
}

.hero-content {
  width: min(100%, 780px);
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.2rem, 5vw, 4rem);
  text-align: center;
  background: linear-gradient(145deg, rgba(250, 250, 245, 0.56), rgba(250, 250, 245, 0.2));
  border: 1px solid rgba(250, 250, 245, 0.62);
  border-radius: 36px 36px 8px 8px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  animation: fadeUp 1.3s ease both;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--olive);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 700;
  text-transform: uppercase;
}

.couple-names {
  display: grid;
  gap: 0.1em;
  margin: 0;
  color: var(--olive-deep);
  font-family: "Great Vibes", cursive;
  font-size: clamp(4.2rem, 12vw, 9rem);
  font-weight: 400;
  line-height: 0.86;
}

.couple-names small {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.32em;
  font-weight: 600;
  line-height: 1;
}

.couple-names em {
  font-style: normal;
  white-space: nowrap;
}

.invitation-line,
.closing-section p {
  margin: 1.3rem auto;
  max-width: 34rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.25;
}

.date-stack {
  display: grid;
  gap: 0.2rem;
  margin: 2rem auto;
  color: var(--olive-deep);
  font-size: clamp(1.25rem, 2.7vw, 2rem);
}

.date-stack strong {
  color: var(--olive);
  font-size: 1.35em;
}

.luxury-button,
.map-button {
  position: relative;
  display: inline-flex;
  min-height: 3.4rem;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.5rem;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--olive), var(--olive-deep));
  border: 1px solid rgba(212, 175, 55, 0.72);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(85, 107, 47, 0.28), 0 0 0 8px rgba(212, 175, 55, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.luxury-button::after,
.map-button::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 10%, rgba(255, 255, 255, 0.42), transparent 34%);
  transform: translateX(-120%);
  transition: transform 600ms ease;
}

.luxury-button:hover,
.map-button:hover {
  box-shadow: 0 24px 56px rgba(85, 107, 47, 0.34), 0 0 0 10px rgba(212, 175, 55, 0.12);
  transform: translateY(-3px);
}

.luxury-button:hover::after,
.map-button:hover::after {
  transform: translateX(120%);
}

.scroll-cue {
  position: absolute;
  bottom: 1.8rem;
  width: 1px;
  height: 4.8rem;
  background: linear-gradient(var(--gold), transparent);
  animation: cuePulse 1.8s ease-in-out infinite;
}

.section {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.2rem, 5vw, 5rem);
}

.section-heading {
  margin: 0 auto 2.6rem;
  max-width: 46rem;
  text-align: center;
}

.section-heading h2,
.details-card h2 {
  margin: 0;
  color: var(--olive-deep);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
}

.section-heading p:last-child {
  margin: 0.5rem 0 0;
  color: var(--olive);
  font-size: 1.5rem;
}

.countdown-grid {
  display: grid;
  width: min(100%, 920px);
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 2vw, 1.4rem);
  margin: 0 auto;
}

.count-card,
.glass-card {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
}

.count-card {
  display: grid;
  min-height: 11rem;
  place-items: center;
  padding: 1.4rem 0.8rem;
  border-radius: 8px;
  transition: transform 260ms ease, background 260ms ease;
}

.count-card:hover {
  background: var(--glass-strong);
  transform: translateY(-6px) scale(1.015);
}

.count-card strong {
  color: var(--olive-deep);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 0.9;
}

.count-card span {
  color: var(--olive);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  text-transform: uppercase;
}

.details-section {
  display: grid;
  place-items: center;
}

.details-card {
  width: min(100%, 860px);
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: var(--radius);
  text-align: center;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}

.detail-list div {
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
}

.detail-list span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--olive);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list strong {
  color: var(--olive-deep);
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  line-height: 1.1;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  width: min(100%, 1120px);
  grid-auto-flow: dense;
  grid-auto-rows: 13rem;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(85, 107, 47, 0.22), rgba(212, 175, 55, 0.2)),
    var(--ivory);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(38, 53, 24, 0.14);
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-item::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(38, 53, 24, 0.56);
  content: attr(data-label);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

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

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease, filter 600ms ease;
}

.gallery-item img:not([src]),
.gallery-item img[src=""] {
  display: none;
}

.gallery-item::after {
  position: absolute;
  inset: 1rem;
  z-index: 2;
  content: "";
  border: 1px solid rgba(250, 250, 245, 0.72);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 300ms ease;
}

.gallery-item:hover img {
  filter: saturate(0.94) contrast(1.04);
  transform: scale(1.08);
}

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

.verse-section {
  display: grid;
  place-items: center;
}

.verse-card {
  width: min(100%, 780px);
  padding: clamp(2.2rem, 6vw, 5rem);
  border-radius: 8px 36px;
  text-align: center;
}

blockquote {
  margin: 0;
  color: var(--olive-deep);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.06;
}

cite {
  display: block;
  margin-top: 1.4rem;
  color: var(--gold);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-style: normal;
  font-weight: 700;
}

.closing-section {
  min-height: 78svh;
  text-align: center;
}

.closing-names {
  margin: 1rem auto;
  font-size: clamp(3.8rem, 10vw, 8rem);
}

.floral-divider {
  position: relative;
  width: min(84vw, 28rem);
  height: 4rem;
  margin: 0 auto 1.5rem;
}

.floral-divider::before {
  top: 0.8rem;
  left: 0;
  transform: rotate(0deg);
}

.floral-divider::after {
  top: 0.8rem;
  right: 0;
  transform: scaleX(-1);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  padding: clamp(1rem, 4vw, 3rem);
  place-items: center;
  background: rgba(18, 25, 12, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  backdrop-filter: blur(14px);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(100%, 980px);
  max-height: 82svh;
  border: 1px solid rgba(212, 175, 55, 0.58);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  transform: scale(0.94);
  transition: transform 260ms ease;
}

.lightbox.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 3rem;
  height: 3rem;
  color: var(--white);
  background: rgba(250, 250, 245, 0.13);
  border: 1px solid rgba(250, 250, 245, 0.5);
  border-radius: 50%;
  cursor: pointer;
  font-size: 2rem;
}

.ambient-leaves {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}

.leaf {
  position: absolute;
  width: 1.1rem;
  height: 2.7rem;
  background: linear-gradient(160deg, rgba(85, 107, 47, 0.84), rgba(143, 153, 84, 0.64));
  border-radius: 100% 0 100% 0;
  filter: drop-shadow(0 8px 16px rgba(38, 53, 24, 0.18));
  opacity: 0.58;
  transform-origin: 50% 120%;
  animation: floatLeaf 14s linear infinite;
}

.leaf-one { left: 8%; animation-delay: -8s; animation-duration: 18s; }
.leaf-two { left: 24%; animation-delay: -2s; animation-duration: 15s; }
.leaf-three { left: 48%; animation-delay: -11s; animation-duration: 19s; }
.leaf-four { left: 68%; animation-delay: -5s; animation-duration: 16s; }
.leaf-five { left: 84%; animation-delay: -13s; animation-duration: 21s; }
.leaf-six { left: 92%; animation-delay: -1s; animation-duration: 17s; }

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 900ms ease, transform 900ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cuePulse {
  50% {
    opacity: 0.28;
    transform: translateY(0.7rem);
  }
}

@keyframes floatLeaf {
  from {
    transform: translate3d(-1rem, -8vh, 0) rotate(0deg);
  }
  to {
    transform: translate3d(3rem, 110vh, 0) rotate(360deg);
  }
}

@media (max-width: 900px) {
  .countdown-grid,
  .detail-list {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 620px) {
  .hero {
    padding: 1rem;
  }

  .hero-veils {
    inset: 0.7rem;
  }

  .hero-content {
    border-radius: 26px 26px 8px 8px;
  }

  .countdown-grid,
  .detail-list,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .count-card {
    min-height: 8.5rem;
  }

  .gallery-grid {
    grid-auto-rows: 17rem;
  }

  .gallery-item.large,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
