:root {
  --cream: #fffaf2;
  --paper: #fffdf8;
  --sky: #cfe5eb;
  --sky-dark: #4e7b88;
  --beige: #e9d9c5;
  --beige-dark: #9b7f67;
  --sage: #dfe4c8;
  --sage-dark: #6f7a59;
  --ink: #3d3f3a;
  --muted: #6f716c;
  --line: rgba(125, 102, 85, 0.2);
  --radius: 8px;
  --shadow: 0 24px 70px rgba(77, 57, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.modal-open {
  overflow: hidden;
}

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(--ink);
  font-size: clamp(3.1rem, 8vw, 6.8rem);
}

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

.eyebrow {
  margin-bottom: 12px;
  color: var(--beige-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(28px, 6vw, 80px);
  background:
    linear-gradient(120deg, rgba(255, 250, 242, 0.95), rgba(207, 229, 235, 0.76)),
    var(--cream);
}

.hero-photo {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.hero-copy p:not(.eyebrow) {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid rgba(61, 63, 58, 0.18);
  border-radius: 999px;
  background: var(--beige-dark);
  color: var(--paper);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button-soft {
  background: var(--paper);
  color: var(--sky-dark);
}

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

.countdown,
.phrase,
.calendar-section,
.music,
.hashtag,
footer {
  text-align: center;
}

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

.countdown {
  background: var(--paper);
}

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

.countdown-grid div,
.details article,
.party-actions article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 40px rgba(77, 57, 42, 0.08);
}

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

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

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

.phrase {
  background: var(--sky);
}

.phrase p {
  width: min(780px, 100%);
  margin: 0 auto;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  font-style: italic;
  font-weight: 400;
}

.details,
.party-actions {
  display: grid;
  gap: 18px;
  padding: clamp(56px, 8vw, 96px) max(16px, calc((100vw - 1080px) / 2));
}

.details {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  background: var(--beige);
}

.party-actions {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  background: var(--cream);
}

.details article,
.party-actions article {
  min-height: 260px;
  padding: 28px;
  text-align: center;
}

.party-actions article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

.details p,
.party-actions p,
.section-heading p:not(.eyebrow),
.hashtag p {
  color: var(--muted);
}

.calendar-section {
  background: var(--paper);
}

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

.gallery {
  background: #eadcc9;
}

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

.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: 1;
  object-fit: cover;
  transition: transform 250ms ease;
}

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

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

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

details {
  margin-top: 16px;
}

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

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

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

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

.hashtag {
  background: var(--sage);
}

footer {
  padding: 24px;
  background: var(--beige-dark);
  color: var(--paper);
}

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

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(41, 31, 24, 0.86);
}

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

.gallery-modal img {
  width: min(900px, 86vw);
  max-height: 86vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.gallery-close,
.gallery-nav {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

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

.gallery-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}

.gallery-prev {
  left: 18px;
}

.gallery-next {
  right: 18px;
}

@media (max-width: 820px) {
  .hero,
  .details,
  .party-actions,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .details,
  .party-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
}

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