:root {
  --paper: #f3eadc;
  --paper-deep: #e4d7c5;
  --ink: #2f2921;
  --muted: #7a6b5a;
  --olive: #6f806f;
  --olive-dark: #3f5543;
  --sage: #a9b5a4;
  --gold: #b58a48;
  --blue: #6f8ecf;
  --petal: #efe6db;
  --shadow: rgba(45, 35, 24, 0.18);
}

@font-face {
  font-family: "Le Major";
  src: url("./assets/LeMajor-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(111, 128, 111, 0.25), transparent 20rem),
    radial-gradient(circle at 88% 18%, rgba(111, 142, 207, 0.14), transparent 18rem),
    linear-gradient(180deg, #f7efe3 0%, #eee1ce 100%);
  font-family: "Cairo", "Amiri", "Times New Roman", serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(163, 177, 163, 0.16), transparent 17rem),
    linear-gradient(180deg, #faf6ee 0%, #f0e7db 100%);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.gate-screen.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  filter: saturate(0.85) brightness(0.96);
  transition: opacity 1s ease, transform 2.4s ease;
}

.gate-screen.is-playing-video .gate-video {
  opacity: 1;
  transform: scale(1);
}

.gate-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.55), transparent 16rem),
    linear-gradient(180deg, rgba(248, 243, 233, 0.1), rgba(83, 83, 70, 0.22));
}

.gate-copy {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 2rem;
  text-align: center;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.gate-copy.is-hiding {
  opacity: 0;
  transform: translateY(-1.1rem);
}

.gate-eyebrow {
  margin: 0 0 0.35rem;
  color: #806f5e;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.gate-names {
  margin: 0 0 clamp(1.25rem, 4.5vw, 1.9rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  color: var(--ink);
  font-family: "Le Major", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.55rem, 10vw, 4.25rem);
  font-weight: 400;
  line-height: 0.9;
  direction: ltr;
  white-space: nowrap;
}

.gate-names em {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.42em;
  font-style: italic;
  margin-inline: 0.08rem;
}

.seal-button {
  position: relative;
  width: clamp(6.2rem, 29vw, 8.2rem);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #3c352c;
  background: linear-gradient(160deg, #fffdf8 0%, #f3e7d6 60%, #e7d6bf 100%);
  box-shadow:
    0 1.2rem 2.6rem rgba(45, 35, 24, 0.16),
    0 0.25rem 0.7rem rgba(45, 35, 24, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seal-button::before {
  content: "";
  position: absolute;
  inset: -0.85rem;
  border: 1px solid rgba(181, 138, 72, 0.42);
  border-radius: 50%;
  animation: sealPulse 3.4s ease-in-out infinite;
  transition: inset 0.4s ease, border-color 0.4s ease;
}

.seal-button::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid rgba(181, 138, 72, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.seal-letter {
  font-family: "Le Major", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.9rem, 16vw, 5.3rem);
  line-height: 1;
  transform: translateY(0.1em);
}

.seal-button:hover,
.seal-button:focus-visible {
  transform: translateY(-0.25rem) scale(1.03);
  box-shadow:
    0 1.6rem 3.2rem rgba(45, 35, 24, 0.2),
    0 0 2.4rem rgba(181, 138, 72, 0.28);
}

.seal-button:hover::before,
.seal-button:focus-visible::before {
  inset: -1.15rem;
  border-color: rgba(181, 138, 72, 0.6);
}

@keyframes sealPulse {
  0%, 100% {
    inset: -0.85rem;
    opacity: 0.7;
  }
  50% {
    inset: -1.25rem;
    opacity: 0.2;
  }
}

.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 2;
  background: linear-gradient(90deg, rgba(255, 253, 248, 0.92), rgba(244, 236, 224, 0.86));
  backdrop-filter: blur(10px);
  transition: transform 1.15s cubic-bezier(0.7, 0, 0.2, 1);
}

.door::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(181, 138, 72, 0.28), transparent);
}

.door-right::after {
  left: 0;
}

.door-left::after {
  right: 0;
}

.door-left {
  left: 0;
  transform-origin: left center;
}

.door-right {
  right: 0;
  transform-origin: right center;
}

.gate-screen.is-opening .door-left {
  transform: translateX(-102%);
}

.gate-screen.is-opening .door-right {
  transform: translateX(102%);
}

.invitation {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.4rem, 3svh, 2.4rem) 1rem;
}

.invitation-card {
  position: relative;
  width: min(100%, 29rem);
  min-height: min(49rem, calc(100svh - 2.8rem));
  display: grid;
  grid-template-rows: 15% 41% 44%;
  align-items: center;
  overflow: hidden;
  padding: clamp(1.1rem, 2.2svh, 1.55rem) clamp(1.4rem, 4vw, 2rem);
  border: 0;
  border-radius: 0.35rem;
  background:
    linear-gradient(rgba(243, 234, 220, 0.28), rgba(243, 234, 220, 0.16)),
    url("./assets/floral-bg.jfif") center top / cover no-repeat,
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.8), transparent 7rem),
    radial-gradient(circle at 78% 72%, rgba(214, 183, 118, 0.18), transparent 8rem),
    var(--paper);
  box-shadow: 0 1.8rem 4rem rgba(45, 35, 24, 0.16);
  isolation: isolate;
}

.invitation-card::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border: 0;
  pointer-events: none;
}

.invitation-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(47, 41, 33, 0.12) 0.6px, transparent 0.8px),
    radial-gradient(rgba(181, 138, 72, 0.12) 0.6px, transparent 0.8px);
  background-position: 0 0, 8px 12px;
  background-size: 22px 22px, 28px 28px;
  opacity: 0.28;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.verse {
  display: inline-block;
  color: #4f4438;
  font-weight: 600;
  font-size: 0.88em;
  letter-spacing: 0;
  text-shadow:
    0 0.04rem 0 rgba(255, 255, 255, 0.82),
    0 0 0.55rem rgba(255, 255, 255, 0.46);
}

.verse-ref {
  color: rgba(79, 68, 56, 0.72);
  font-size: clamp(0.68rem, 1.7vw, 0.78rem);
  font-style: normal;
  margin-top: 0.12rem;
  line-height: 1;
}

q {
  quotes: "﴿" "﴾";
  color: #2f2921;
  font-weight: 500;
}

cite {
  color: #7a6b5a;
  font-size: 0.9rem;
  display: block;
  margin-top: 0.2rem;
} 
.corner {
  display: none;
  position: absolute;
  z-index: 1;
  width: 7.2rem;
  height: 7.2rem;
  opacity: 0.9;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  border-radius: 999px 999px 999px 0;
  background: linear-gradient(135deg, var(--sage), var(--olive-dark));
  transform: rotate(-35deg);
  box-shadow:
    1.05rem 0.2rem 0 -0.22rem rgba(169, 181, 164, 0.72),
    1.85rem 0.65rem 0 -0.28rem rgba(63, 85, 67, 0.58),
    2.55rem 1.05rem 0 -0.34rem rgba(169, 181, 164, 0.62);
}

.corner::before {
  width: 2rem;
  height: 0.72rem;
  left: 1rem;
  top: 1rem;
}

.corner::after {
  width: 2.2rem;
  height: 0.76rem;
  left: 0.65rem;
  top: 2.2rem;
  transform: rotate(-10deg);
}

.corner-top-left {
  top: -0.5rem;
  left: -0.65rem;
}

.corner-top-right {
  top: -0.5rem;
  right: -0.65rem;
  transform: scaleX(-1);
}

.corner-bottom-left {
  bottom: -0.75rem;
  left: -0.7rem;
  transform: scaleY(-1);
}

.corner-bottom-right {
  right: -0.7rem;
  bottom: -0.75rem;
  transform: scale(-1);
}

.blessing,
.photo-shell,
.invite-text {
  position: relative;
  z-index: 2;
}

.blessing {
  display: grid;
  align-self: end;
  gap: 0.1rem;
  margin: 0;
  padding-bottom: 0.15rem;
  text-align: center;
  color: #49392b;
  font-family: "Traditional Arabic", "Arabic Typesetting", "Amiri", serif;
}

.blessing p {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.16;
}

.verse-line {
  display: flex;
  justify-content: center;
  width: 100%;
}

.photo-shell {
  align-self: center;
  justify-self: center;
  width: min(82%, 20rem);
  margin: 0;
}

.frame-stage {
  position: relative;
  aspect-ratio: 0.78;
  overflow: visible;
  background: transparent;
}

.rings-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 63%;
  display: block;
  object-fit: cover;
  object-position: 50% 22%;
  filter: saturate(0.9) contrast(0.98) brightness(1.04);
  transform: translate(-50%, -50%);
  border-radius: 999px 999px 0 0;
  box-shadow: 0 0.65rem 1.25rem rgba(47, 41, 33, 0.14);
  z-index: 1;
}

.frame-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  background: transparent;
  z-index: 2;
  pointer-events: none;
}

.invite-text {
  display: grid;
  grid-template-rows: 10% 28% 15% 27% 10% 10%;
  align-self: stretch;
  align-items: center;
  justify-items: center;
  text-align: center;
  min-height: 0;
}

.small-caps {
  margin: 0;
  color: #4b4137;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.invite-text h1 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  width: 100%;
  font-family: "Le Major", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.75rem, 5.2vw, 3.55rem);
  font-weight: 400;
  line-height: 0.88;
  direction: ltr;
  white-space: nowrap;
}

.invite-text em {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.45em;
  font-style: italic;
  margin: 0 0.2rem;
  vertical-align: middle;
}

.soul-line {
  margin: 0;
  color: #4f4438;
  font-family: "Sakkal Majalla", "Arabic Typesetting", "Traditional Arabic", "Amiri", serif;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.15;
}

.date-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(19rem, 88%);
  color: #302921;
  direction: ltr;
  font-family: "Cormorant Garamond", Georgia, serif;
  text-transform: uppercase;
}

.date-row::before,
.date-row::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1px;
  height: 3.2rem;
  background: linear-gradient(transparent, rgba(47, 41, 33, 0.75), transparent);
}

.date-row::before {
  left: 35%;
  transform: translateY(-50%);
}

.date-row::after {
  right: 35%;
  transform: translateY(-50%);
}

.date-row span:first-child {
  grid-column: 1;
}

.date-center {
  grid-column: 2;
  display: grid;
  justify-items: center;
  line-height: 1;
}

.date-center span {
  margin-bottom: 0.12rem;
  font-size: 0.82rem;
}

.date-row strong {
  grid-column: 2;
}

.date-row span:last-child {
  grid-column: 3;
}

.date-row span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.date-row strong {
  position: relative;
  overflow: hidden;
  min-width: 3.6rem;
  color: #302921;
  font-size: clamp(2.25rem, 10vw, 3.1rem);
  line-height: 0.9;
}

.date-row strong::after {
  content: "";
  position: absolute;
  top: -15%;
  bottom: -15%;
  left: -80%;
  width: 45%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  animation: shine 3.2s ease-in-out infinite;
}

@keyframes shine {
  0%, 48% {
    left: -80%;
  }
  78%, 100% {
    left: 135%;
  }
}

.place-line,
.area-line {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.place-line {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 700;
}

.area-line {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.details-band,
.gallery-section,
.rsvp-section {
  position: relative;
  isolation: isolate;
  width: min(100%, 58rem);
  margin: 0 auto;
  padding: 3rem 1.2rem;
}

.details-band::before,
.gallery-section::before,
.rsvp-section::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -2;
  width: 100vw;
  transform: translateX(-50%);
  background:
    linear-gradient(rgba(247, 241, 230, 0.74), rgba(247, 241, 230, 0.84)),
    url("./assets/secondary-floral-bg.jfif") center / 30rem auto repeat;
}

.details-band::after {
  content: "";
  position: absolute;
  top: -3rem;
  left: 50%;
  z-index: -1;
  width: 100vw;
  height: 6rem;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(243, 234, 220, 0), rgba(247, 241, 230, 0.92));
  pointer-events: none;
}

.section-kicker {
  margin: 0;
  color: var(--olive-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.details-band {
  display: grid;
  gap: 1rem;
}

.countdown-panel,
.venue-panel,
.rsvp-section {
  border: 1px solid rgba(111, 128, 111, 0.22);
  border-radius: 0.55rem;
  padding: 1.3rem;
  background: rgba(250, 245, 236, 0.72);
  box-shadow: 0 1rem 2.4rem rgba(45, 35, 24, 0.08);
  backdrop-filter: blur(3px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}

.countdown-panel:hover,
.venue-panel:hover,
.rsvp-section:hover {
  transform: translateY(-0.18rem);
  border-color: rgba(181, 138, 72, 0.3);
  background-color: rgba(250, 245, 236, 0.82);
  box-shadow: 0 1.35rem 2.7rem rgba(45, 35, 24, 0.11);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-top: 1rem;
  direction: ltr;
}

.countdown div {
  display: grid;
  place-items: center;
  min-height: 5.3rem;
  border: 1px solid rgba(181, 138, 72, 0.18);
  border-radius: 0.45rem;
  background: linear-gradient(180deg, rgba(251, 245, 234, 0.9), rgba(232, 220, 203, 0.86));
  color: var(--ink);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.countdown div:hover {
  transform: translateY(-0.12rem);
  border-color: rgba(181, 138, 72, 0.34);
}

.countdown strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.55rem, 8vw, 2.7rem);
  line-height: 1;
}

.countdown span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.venue-panel h2,
.gallery-section h2,
.rsvp-section h2 {
  margin: 0.35rem 0 0.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 8vw, 3.3rem);
  font-weight: 600;
  line-height: 1;
}

.venue-panel p,
.rsvp-section p {
  margin: 0 0 1.1rem;
  color: #675b4d;
  font-size: 1.05rem;
  line-height: 1.8;
}

.action-button,
.rsvp-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 999px;
  color: #fff8ea;
  text-decoration: none;
  font-family: "Amiri", serif;
  font-weight: 700;
  background: linear-gradient(135deg, var(--olive-dark), #81906f 52%, var(--gold));
  box-shadow: 0 0.8rem 1.5rem rgba(63, 85, 67, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
}

.action-button:hover,
.action-button:focus-visible,
.rsvp-option:hover,
.rsvp-option:focus-visible {
  transform: translateY(-0.16rem);
  filter: saturate(1.05) brightness(1.03);
  box-shadow: 0 1.05rem 1.8rem rgba(63, 85, 67, 0.23);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.05rem);
  margin-top: 1.25rem;
  direction: ltr;
}

.photo-slot {
  position: relative;
  min-height: 0;
  margin: 0;
  direction: rtl;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 0.42rem solid rgba(255, 252, 245, 0.9);
  border-radius: 0.55rem;
  background: rgba(255, 252, 245, 0.78);
  box-shadow:
    0 0.45rem 0.85rem rgba(45, 35, 24, 0.1),
    0 1.15rem 2.2rem rgba(45, 35, 24, 0.1);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.96) contrast(0.98) brightness(1.02);
  transform: scale(1.01);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.photo-slot::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(37, 29, 22, 0.18) 36%, rgba(37, 29, 22, 0.72));
  pointer-events: none;
}

.photo-slot figcaption {
  position: absolute;
  right: 0.75rem;
  bottom: 0.7rem;
  left: 0.75rem;
  z-index: 2;
  display: grid;
  min-height: 2.4rem;
  place-items: center;
  padding: 0.45rem 0.65rem 0.5rem;
  border: 1px solid rgba(255, 248, 235, 0.38);
  border-radius: 999px;
  color: #fffaf0;
  background: rgba(50, 40, 31, 0.28);
  backdrop-filter: blur(5px);
  font-family: "Sakkal Majalla", "Arabic Typesetting", "Amiri", serif;
  font-size: clamp(1.02rem, 3.5vw, 1.22rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 0.1rem 0.45rem rgba(0, 0, 0, 0.45);
}

.photo-slot:hover {
  transform: translateY(-0.22rem);
  border-color: rgba(255, 252, 245, 1);
  box-shadow:
    0 0.6rem 1rem rgba(45, 35, 24, 0.12),
    0 1.45rem 2.7rem rgba(45, 35, 24, 0.16);
}

.photo-slot:hover img {
  filter: saturate(1.03) contrast(1) brightness(1.04);
  transform: scale(1.045);
}

.photo-slot:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 5 / 4;
}

.rsvp-grid {
  display: grid;
  gap: 0.75rem;
}

.rsvp-option {
  width: 100%;
}

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  width: 3.2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: #fff7e9;
  background: rgba(63, 85, 67, 0.9);
  box-shadow: 0 0.8rem 1.8rem rgba(40, 25, 10, 0.22);
  cursor: pointer;
}

.music-toggle.is-playing {
  background: var(--gold);
}

.petals {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -3rem;
  width: 0.65rem;
  height: 1.05rem;
  border-radius: 80% 20% 70% 30%;
  background: linear-gradient(145deg, #fff1df, #d8c8b7);
  opacity: 0.9;
  animation: petalFall var(--dur) linear forwards;
}

@keyframes petalFall {
  to {
    transform: translate3d(var(--drift), 110vh, 0) rotate(520deg);
    opacity: 0;
  }
}

@media (min-width: 720px) {
  .gate-screen {
    background:
      linear-gradient(rgba(245, 240, 232, 0.2), rgba(28, 31, 23, 0.38)),
      url("./assets/floral-bg.jfif") center / auto 100% no-repeat,
      #ede8df;
  }

  .invitation-card {
    width: clamp(26rem, 33vw, 29rem);
    grid-template-rows: 16% 38% 46%;
  }

  .photo-shell {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
  }

  .frame-stage {
    height: min(100%, 18.25rem);
    width: auto;
  }

  .details-band {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }

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

  .gallery-grid {
    grid-template-columns: 1.12fr 0.94fr 0.94fr;
    grid-auto-rows: 13.9rem;
    align-items: stretch;
  }

  .photo-slot {
    aspect-ratio: auto;
    height: 100%;
  }

  .photo-slot:first-child {
    grid-column: 1 / 2;
    grid-row: 1 / span 2;
    aspect-ratio: auto;
  }

  .photo-slot:not(:first-child) img {
    object-fit: contain;
    background: rgba(36, 29, 24, 0.05);
  }

  .photo-slot:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .photo-slot:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .photo-slot:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .photo-slot:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
  }
}

@media (max-width: 719px) {
  .invitation {
    padding: 0;
    align-items: stretch;
  }

  .invitation-card {
    display: grid;
    grid-template-rows: 13svh 38svh 49svh;
    align-items: center;
    width: 100%;
    min-height: 100svh;
    padding: 0 1.2rem;
    border-radius: 0;
    box-shadow: none;
    background:
      linear-gradient(rgba(243, 234, 220, 0.28), rgba(243, 234, 220, 0.16)),
      url("./assets/floral-bg.jfif") center / cover no-repeat,
      radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.8), transparent 7rem),
      radial-gradient(circle at 78% 72%, rgba(214, 183, 118, 0.18), transparent 8rem),
      var(--paper);
  }

  .blessing {
    grid-row: 1;
    align-self: end;
    margin: 0;
    padding-bottom: 0.35rem;
  }

  .blessing p {
    font-size: clamp(1.42rem, 6.2vw, 1.76rem);
    line-height: 1.12;
  }

  .photo-shell {
    grid-row: 2;
    align-self: center;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .frame-stage {
    height: min(100%, 38svh);
    width: auto;
    max-width: 98vw;
  }

  .rings-photo {
    width: 62%;
    height: 66%;
  }

  .invite-text {
    grid-row: 3;
    align-self: stretch;
    display: grid;
    grid-template-rows: 10% 27% 15% 27% 10% 11%;
    align-items: center;
    min-height: 0;
  }

  .small-caps,
  .invite-text h1,
  .soul-line,
  .date-row,
  .place-line,
  .area-line {
    margin-top: 0;
    margin-bottom: 0;
  }

  .small-caps {
    align-self: end;
    font-size: 0.72rem;
  }

  .invite-text h1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.16em;
    width: 100%;
    font-size: clamp(2.2rem, 11.2vw, 2.85rem);
    line-height: 0.9;
    white-space: nowrap;
  }

  .invite-text em {
    font-size: 0.38em;
    line-height: 1;
    margin: 0 0.02rem;
  }

  .soul-line {
    font-size: clamp(1.55rem, 6.8vw, 1.95rem);
    line-height: 1.12;
  }

  .date-row {
    width: min(17.5rem, 78%);
    grid-template-columns: 1fr 3.4rem 1fr;
    align-self: center;
  }

  .date-row span {
    font-size: 0.68rem;
  }

  .date-row strong {
    min-width: 3.4rem;
    font-size: clamp(2.05rem, 9vw, 2.65rem);
  }

  .date-row::before {
    left: 34%;
  }

  .date-row::after {
    right: 34%;
  }

  .place-line {
    align-self: end;
  }

  .area-line {
    align-self: start;
  }
}

@media (max-width: 370px) {
  .invitation-card {
    padding-inline: 1rem;
  }

  .photo-shell {
    width: 76%;
  }

  .date-row {
    gap: 0.75rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .photo-slot:first-child {
    grid-column: auto;
    aspect-ratio: 4 / 5;
  }
}

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