:root {
  --bg: #f6f2ea;
  --bg-soft: #efe6d6;
  --bg-deep: #c9ab7d;
  --card: #fbf8f2;
  --line: rgba(111, 88, 60, 0.16);
  --text: #5f4835;
  --text-soft: #8f7358;
  --white-soft: #fffdf9;
  --shadow: 0 18px 50px rgba(73, 51, 31, 0.08);
  --shadow-soft: 0 10px 30px rgba(73, 51, 31, 0.06);
  --radius: 24px;
  --radius-sm: 18px;
  --container: 1120px;
  --container-narrow: 760px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none;
}

/* =========================
   INTRO ENVELOPE (CSS VERSION - CLEAN)
========================= */

.intro-envelope {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f1ea;
  overflow: hidden;
}

.intro-envelope__content {
  position: relative;
  width: 320px;
  height: 220px;
  perspective: 1000px;
}

/* Envelope base */
.env {
  position: absolute;
  inset: 0;
  background: #fdfbf7;
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Bottom fold */
.env::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f7f3eb;
  clip-path: polygon(0 100%, 50% 45%, 100% 100%);
}

/* Top flap */
.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 50% 60%);
  transform-origin: top center;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
}

/* Side shading */
.env-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent 60%);
  pointer-events: none;
}

/* Seal */
.env-seal {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd66b, #c79a2b);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  z-index: 4;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.5s ease;
}

.env-seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

/* Opening animation */
.intro-envelope.is-opening .env-flap {
  transform: rotateX(180deg);
}

.intro-envelope.is-opening .env-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
}

/* Envelope fade out */
.intro-envelope.is-opened {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* Hint */
.intro-envelope__hint {
  position: absolute;
  bottom: 40px;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #8a6f52;
}


/* Open animation */
.intro-envelope.is-opening .intro-envelope__flap--left {
  transform: translateX(-105%) rotate(-7deg);
}

.intro-envelope.is-opening .intro-envelope__flap--right {
  transform: translateX(105%) rotate(7deg);
}

.intro-envelope.is-opening .intro-envelope__flap--top {
  transform: translateY(-105%) rotate(-4deg);
}

.intro-envelope.is-opening .intro-envelope__flap--bottom {
  transform: translateY(105%) rotate(4deg);
}

.intro-envelope.is-opening .seal-button {
  opacity: 0;
  transform: translateY(-24px) scale(0.82);
}

.intro-envelope.is-opening .intro-envelope__hint {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

.intro-envelope.is-opened {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

/* =========================
   MAIN SHELL
========================= */

.site-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.28)),
    var(--bg);
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 32px), var(--container-narrow));
  margin-inline: auto;
}

.center {
  text-align: center;
}

.section {
  padding: 78px 0;
  position: relative;
}

.section--compact {
  padding: 42px 0;
}

.section--cream {
  background: var(--bg);
}

.section--soft {
  background: var(--bg-soft);
}

.section--gold {
  background: linear-gradient(180deg, #ceb187, #bf9d6b);
  color: var(--white-soft);
}

.eyebrow,
.overline {
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 12px;
}

.overline--light {
  color: rgba(255, 249, 243, 0.86);
}

.section-title {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.section-title--left {
  text-align: left;
}

.section-title--light {
  color: var(--white-soft);
}

.body-copy {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 1rem;
}

.body-copy--left {
  margin-inline: 0;
  text-align: left;
}

.ornament {
  font-size: 1.35rem;
  margin-bottom: 14px;
  color: rgba(142, 109, 74, 0.8);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: rgba(255, 248, 240, 0.92);
  color: #7e6244;
  box-shadow: var(--shadow-soft);
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(122, 96, 68, 0.2);
}

.btn--secondary:hover {
  background: rgba(255, 253, 249, 0.65);
}

.btn--calendar {
  background: rgba(255, 248, 240, 0.9);
  color: #7e6244;
  border: 1px solid rgba(140, 110, 70, 0.12);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
}

.btn--calendar:hover {
  background: rgba(255, 248, 240, 1);
  transform: translateY(-2px);
}

.btn--ivory {
  background: rgba(255, 251, 244, 0.95);
  color: #7a5b3e;
  border: none;
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
}

.btn__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  opacity: 0.85;
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn__icon svg {
  transform: translateY(-1px);
}

/* Hero */
.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(107, 85, 60, 0.18), rgba(107, 85, 60, 0.18)),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=1600&q=80")
      center/cover no-repeat;
  color: var(--white-soft);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 250, 240, 0.1), transparent 45%),
    linear-gradient(180deg, rgba(38, 25, 14, 0.18), rgba(38, 25, 14, 0.3));
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 0 72px;
}

.hero .eyebrow {
  color: rgba(255, 251, 245, 0.86);
}

.hero__names {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.92;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero__names span {
  font-family: "Great Vibes", cursive;
  display: inline-block;
  margin: 0 0.2rem;
  font-size: 0.95em;
  font-weight: 400;
}

.hero__subtext {
  width: min(100%, 680px);
  margin: 18px auto 30px;
  color: rgba(255, 248, 241, 0.88);
  font-size: 1rem;
}

.hero__date-block {
  display: inline-grid;
  gap: 6px;
  padding: 16px 24px;
  margin-bottom: 26px;
  border-radius: 24px;
  background: rgba(255, 252, 246, 0.12);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 239, 0.2);
}

.hero__date-block span {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: rgba(255, 248, 241, 0.84);
}

.hero__date-block strong {
  font-size: 3rem;
  line-height: 1;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.calendar-menu {
  width: fit-content;
  min-width: 240px;
  margin: 16px auto 0;
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid rgba(122, 96, 68, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 8px;
}

.calendar-menu.hidden {
  display: none;
}

.calendar-menu__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.calendar-menu__item:hover {
  background: rgba(201, 171, 125, 0.12);
}

/* Layout sections */
.split-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.story-card,
.venue-card,
.venue-map-card,
.quote-card,
.rsvp-card,
.detail-card {
  background: rgba(255, 252, 247, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.story-card--image {
  overflow: hidden;
  min-height: 420px;
}

.story-card--image img {
  height: 100%;
  object-fit: cover;
}

.story-card--text,
.venue-card {
  padding: 34px 24px;
}

.signature-block {
  margin-top: 22px;
}

.signature {
  font-family: "Great Vibes", cursive;
  font-size: 2.2rem;
  color: #a6845e;
}

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.countdown__item {
  border-radius: 22px;
  padding: 18px 16px;
  background: rgba(255, 250, 244, 0.14);
  border: 1px solid rgba(255, 249, 242, 0.18);
  backdrop-filter: blur(6px);
}

.countdown__item strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1;
  margin-bottom: 8px;
  color: var(--white-soft);
}

.countdown__item span {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 250, 244, 0.86);
}

/* Detail cards */
.details-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.detail-card {
  padding: 22px 18px;
}

.detail-card__label {
  display: inline-block;
  margin-bottom: 8px;
  color: #aa8863;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
}

.detail-card h3 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  line-height: 1.1;
}

.detail-card p {
  margin: 0;
  color: var(--text-soft);
}

/* Swatches */
.swatches {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.swatches span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255, 251, 246, 0.72);
  box-shadow: var(--shadow-soft);
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 34px;
  display: grid;
  gap: 18px;
}

.timeline__item {
  display: grid;
  gap: 10px;
  padding: 0 0 0 20px;
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: -18px;
  width: 1px;
  background: rgba(143, 115, 88, 0.28);
}

.timeline__item:last-child::before {
  display: none;
}

.timeline__item::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #c9ab7d;
  box-shadow: 0 0 0 6px rgba(201, 171, 125, 0.14);
}

.timeline__time {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ab8660;
}

.timeline__content {
  background: rgba(255, 252, 247, 0.74);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 18px;
}

.timeline__content h3 {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.65rem;
  line-height: 1;
}

.timeline__content p {
  margin: 0;
  color: var(--text-soft);
}

/* Monogram strip */
.monogram-break {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 7vw, 4rem);
  color: rgba(255, 251, 244, 0.95);
}

.monogram-break span {
  font-family: "Great Vibes", cursive;
  margin: 0 0.1rem;
  font-size: 0.9em;
}

/* Venue */
.split-grid--venue {
  align-items: stretch;
}

.venue-map-card {
  display: grid;
  place-items: center;
  min-height: 360px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.8), rgba(248, 241, 231, 0.76));
}

.venue-map-card__inner {
  width: min(100%, 340px);
  padding: 24px;
  text-align: center;
}

.venue-map-card__inner h3 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--text);
}

.venue-map-card__inner p {
  margin: 0 0 20px;
  color: var(--text-soft);
}

.mini-map {
  position: relative;
  height: 220px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(191, 157, 107, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(191, 157, 107, 0.08) 1px, transparent 1px),
    #fffaf3;
  background-size: 38px 38px;
  overflow: hidden;
}

.mini-map::before,
.mini-map::after {
  content: "";
  position: absolute;
  background: rgba(191, 157, 107, 0.24);
  border-radius: 999px;
}

.mini-map::before {
  width: 140%;
  height: 16px;
  left: -20%;
  top: 55%;
  transform: rotate(-16deg);
}

.mini-map::after {
  width: 120%;
  height: 12px;
  left: -8%;
  top: 30%;
  transform: rotate(14deg);
}

.mini-map__pin {
  position: absolute;
  left: 62%;
  top: 44%;
  width: 20px;
  height: 20px;
  background: #bf9d6b;
  border-radius: 999px 999px 999px 0;
  transform: rotate(-45deg);
  box-shadow: 0 10px 30px rgba(191, 157, 107, 0.35);
}

.mini-map__pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: #fffaf3;
}

/* Gallery */
.gallery-grid {
  margin-top: 34px;
  display: grid;
  gap: 14px;
}

.gallery-item {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  transition: transform 0.35s var(--ease);
}

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

/* Quote */
.quote-card {
  padding: 34px 26px;
}

.quote-card__text {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
}

.quote-card__source {
  color: var(--text-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* RSVP */
.rsvp-card {
  padding: 28px 18px;
  background: rgba(167, 128, 74, 0.14);
  border: 1px solid rgba(255, 249, 241, 0.18);
  box-shadow: none;
}

.rsvp-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label {
  color: rgba(255, 249, 241, 0.9);
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid rgba(255, 247, 237, 0.2);
  background: rgba(255, 250, 244, 0.12);
  color: var(--white-soft);
  border-radius: 18px;
  outline: none;
  padding: 15px 16px;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: rgba(255, 246, 235, 0.58);
}

.form-row select option {
  color: #5f4835;
}

.form-row textarea {
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: rgba(255, 249, 241, 0.4);
  box-shadow: 0 0 0 4px rgba(255, 247, 237, 0.08);
}

.form-message {
  margin: 4px 0 0;
  min-height: 24px;
  color: rgba(255, 248, 241, 0.9);
}

/* Footer */
.footer {
  padding: 58px 0 80px;
  background: #efe5d6;
}

.footer-monogram {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.7rem;
  line-height: 1;
  color: #9b7852;
}

.footer-monogram span {
  font-family: "Great Vibes", cursive;
}

.footer-text,
.footer-date {
  margin: 10px 0 0;
  color: var(--text-soft);
}

.footer-date {
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-credit {
  margin: 18px 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #8f7358;
  line-height: 1.6;
}

.footer-credit a {
  color: inherit;
  text-decoration: none;
}

.footer-credit a:hover {
  text-decoration: underline;
}

/* Floating top button */
.floating-pill {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  border: 1px solid rgba(121, 93, 67, 0.14);
  background: rgba(255, 251, 245, 0.9);
  color: var(--text);
  border-radius: 999px;
  min-width: 58px;
  height: 44px;
  padding: 0 16px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.floating-pill.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Music button */
.music-toggle {
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(121, 93, 67, 0.14);
  background: rgba(255, 251, 245, 0.95);
  color: #7e6244;
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    color 0.25s var(--ease);
}

.music-toggle:hover {
  transform: translateY(-2px);
  background: rgba(255, 251, 245, 1);
  color: #5f4835;
}

/* Reveal animations */
.section-observe {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

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

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox.hidden {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(23, 16, 10, 0.82);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.lightbox__dialog {
  position: relative;
  z-index: 2;
  width: min(100vw, 1100px);
  height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.lightbox__viewport {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-y;
}

.lightbox__viewport img {
  width: auto;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 0;
  background: rgba(255, 251, 245, 0.12);
  color: #fffaf4;
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 251, 245, 0.2);
}

.lightbox__close {
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox__close:hover {
  transform: scale(1.04);
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox__nav:hover {
  transform: translateY(-50%) scale(1.04);
}

.lightbox__nav--prev {
  left: 16px;
}

.lightbox__nav--next {
  right: 16px;
}

/* Responsive */
@media (min-width: 760px) {
  .section {
    padding: 96px 0;
  }

  .split-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 34px;
  }

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

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

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

  .rsvp-card {
    padding: 38px 34px;
  }
}

@media (min-width: 1024px) {
  .story-card--text,
  .venue-card {
    padding: 46px 42px;
  }

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

  .timeline__item {
    grid-template-columns: 150px 1fr;
    align-items: start;
    gap: 18px;
  }

  .timeline__time {
    padding-top: 14px;
  }
}

@media (max-width: 640px) {
  .lightbox__dialog {
    padding: 16px 10px;
  }

  .lightbox__viewport img {
    max-height: 76vh;
    border-radius: 16px;
  }

  .lightbox__close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }

  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
  }

  .lightbox__nav--prev {
    left: 10px;
  }

  .lightbox__nav--next {
    right: 10px;
  }
}

@media (max-width: 520px) {
  .seal-button {
    width: 148px;
    height: 148px;
    transform: translateY(-18px);
  }

  .seal-button:hover {
    transform: translateY(-18px) scale(1.03);
  }

  .seal-button:active {
    transform: translateY(-18px) scale(0.98);
  }

  .seal-button__inner {
    inset: 13px;
  }

  .seal-monogram {
    font-size: 2.6rem;
  }

  .seal-monogram span {
    font-size: 1.2rem;
  }

  .hero__date-block strong {
    font-size: 2.45rem;
  }

  .section {
    padding: 68px 0;
  }
}