:root {
  --paper: #f8f4ee;
  --white: #ffffff;
  --sage: #6f755f;
  --sage-dark: #343b2c;
  --gold: #b99b5d;
  --ink: #2e302a;
  --muted: #6d6d65;
  --line: #ded4c5;
  --radius: 8px;
  --shadow: 0 26px 80px rgba(46, 48, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1;
}

h1 {
  margin-bottom: 16px;
  color: var(--white);
  font-size: clamp(4rem, 12vw, 9rem);
}

h2 {
  margin-bottom: 12px;
  color: var(--sage-dark);
  font-size: clamp(1.65rem, 4vw, 3rem);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.wedding-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  text-align: center;
}

.wedding-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(27, 31, 24, 0.26), rgba(27, 31, 24, 0.68));
}

.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 32px));
  padding: clamp(24px, 5vw, 52px);
}

.hero-copy p:not(.eyebrow) {
  margin-bottom: 28px;
  color: var(--white);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--sage);
  border-radius: 999px;
  background: var(--sage);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--sage-dark);
}

.button-light {
  border-color: var(--white);
  background: var(--white);
  color: var(--sage-dark);
}

.button-soft {
  background: var(--white);
  color: var(--sage);
}

.countdown,
.quote,
.map,
.calendar-section,
.gallery,
.music,
.hashtag,
.form-section {
  padding: clamp(56px, 8vw, 96px) 20px;
}

.countdown,
.quote,
.music,
.hashtag,
footer {
  text-align: center;
}

.countdown-grid,
.details,
.gift-rsvp,
.rsvp-form,
.section-heading {
  width: min(1080px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.countdown-grid div,
.details article,
.gift-rsvp article,
.rsvp-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 42px rgba(46, 48, 42, 0.08);
}

.countdown-grid div {
  padding: 24px 10px;
}

.countdown-grid strong {
  display: block;
  color: var(--sage);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.9;
}

.countdown-grid span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quote {
  background: var(--sage-dark);
}

.quote p {
  width: min(760px, 100%);
  margin: 0 auto 18px;
  color: var(--white);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.28rem, 2.8vw, 2rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
}

.quote span {
  color: var(--gold);
  font-weight: 700;
}

.details,
.gift-rsvp {
  display: grid;
  gap: 18px;
  padding: clamp(56px, 8vw, 96px) 16px;
}

.details {
  grid-template-columns: repeat(3, 1fr);
}

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

.details article,
.gift-rsvp article {
  padding: 28px;
  text-align: center;
}

.details img,
.music img,
.hashtag img {
  width: 72px;
  margin: 0 auto 18px;
}

.details p,
.gift-rsvp p,
.music p,
.hashtag p {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.calendar-section {
  background: var(--white);
  text-align: center;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.gallery {
  background: #eee5d9;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
}

.gallery-item {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 250ms ease;
}

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

.map {
  background: var(--white);
}

.map iframe {
  display: block;
  width: min(1080px, calc(100% - 32px));
  height: 440px;
  margin: 0 auto;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

details {
  margin-top: 16px;
}

summary {
  cursor: pointer;
  color: var(--sage);
  font-weight: 800;
}

.music {
  background: var(--white);
}

.music-player {
  width: min(680px, calc(100% - 32px));
  margin: 22px auto;
}

.music-player iframe {
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
}

.hashtag {
  background:
    linear-gradient(rgba(52, 59, 44, 0.74), rgba(52, 59, 44, 0.78)),
    url("../images/background-instagram.jpg") center / cover;
  color: var(--white);
}

.hashtag h2,
.hashtag p {
  color: var(--white);
}

.rsvp-form {
  display: grid;
  gap: 18px;
  max-width: 680px;
  padding: clamp(22px, 5vw, 38px);
}

.rsvp-form label,
.rsvp-form legend {
  color: var(--sage-dark);
  font-weight: 800;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
}

.rsvp-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rsvp-form fieldset label {
  font-weight: 500;
}

.rsvp-form button {
  width: 100%;
  cursor: pointer;
}

footer {
  padding: 22px;
  background: var(--sage-dark);
  color: var(--white);
}

footer p {
  margin: 0;
}

.back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.thanks-page {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  text-align: center;
}

.thanks-page section {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.thanks-page h1 {
  color: var(--sage-dark);
  font-size: clamp(3rem, 9vw, 6rem);
}

.modal-open {
  overflow: hidden;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(24, 28, 20, 0.88);
}

.gallery-modal.is-open {
  display: flex;
}

.gallery-modal img {
  max-width: min(980px, 82vw);
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gallery-close,
.gallery-nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.gallery-close {
  top: 18px;
  right: 18px;
}

.gallery-prev {
  left: 18px;
}

.gallery-next {
  right: 18px;
}

@media (max-width: 760px) {
  .hero-media {
    grid-template-columns: 1fr;
  }

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

  .details,
  .gift-rsvp,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .map iframe {
    height: 340px;
  }

  .calendar-actions .button {
    width: 100%;
  }

  .gallery-modal {
    padding: 14px;
  }

  .gallery-modal img {
    max-width: 100%;
  }

  .gallery-nav {
    bottom: 18px;
    top: auto;
  }
}
