* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #fff;
  background: #222;
}
body {
  overflow: hidden;
}
.background,
.shade {
  position: fixed;
  inset: 0;
}
.background {
  background: #555 url("assets/couple.png") center 37% / cover no-repeat;
  filter: grayscale(1);
}
.shade {
  background: rgba(0, 0, 0, 0.57);
}
button,
a {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
.start {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  font-size: 20px;
}
.start-button {
  border: 1px solid white;
  border-radius: 50%;
  background: transparent;
  width: 112px;
  height: 112px;
  font-size: 29px;
}
.start-button:hover,
.outline:hover {
  background: #fff;
  color: #222;
}
main {
  position: relative;
  height: 100svh;
  max-width: 700px;
  margin: auto;
}
header {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 4;
}
.icon,
.lang,
.nav-arrow {
  border: 0;
  background: transparent;
}
.icon {
  font-size: 27px;
}
.lang {
  font-size: 18px;
}
nav {
  position: absolute;
  z-index: 5;
  top: 65px;
  left: 20px;
  background: rgba(20, 20, 20, 0.95);
  padding: 15px;
  min-width: 190px;
}
nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px;
  background: none;
  border: 0;
  font-size: 17px;
}
.slides {
  height: 100%;
  position: relative;
}
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 36px 125px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(25px);
  transition:
    opacity 0.5s,
    transform 0.5s,
    visibility 0.5s;
}
.slide.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.slide p {
  max-width: 450px;
  font-size: 21px;
  line-height: 1.4;
  margin: 10px 0;
}
.slide .eyebrow {
  font-size: 13px;
  letter-spacing: 0.25em;
}
.script {
  font-family: "Great Vibes", cursive;
  font-size: clamp(54px, 11vw, 82px);
  font-weight: 400;
  line-height: 1.25;
  margin: 24px 0;
}
.hero h1 {
  font-size: clamp(74px, 15vw, 115px);
  line-height: 1.12;
}
.hero h1 span {
  display: block;
  font-size: 0.7em;
}
.slide .smallcaps {
  font-size: 15px;
  letter-spacing: 0.3em;
}
.slide .verse {
  font-style: italic;
  font-size: 21px;
}
.slide .reference {
  font-size: 16px;
}
.rule {
  width: 42px;
  border-top: 1px solid #fff;
  margin: 22px auto;
}
.date {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0 20px;
  letter-spacing: 0.15em;
  font-size: 14px;
}
.date strong {
  font-size: 70px;
  font-weight: 400;
  line-height: 1;
}
.venue {
  font-size: 29px !important;
}
.number {
  font-size: 30px !important;
  letter-spacing: 0.18em;
}
.outline {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 25px;
  border: 1px solid white;
  background: transparent;
  color: white;
  text-decoration: none;
  letter-spacing: 0.15em;
  font-size: 13px;
}
.signature {
  font-size: 55px !important;
}
footer {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.nav-arrow {
  font-size: 32px;
  line-height: 1;
}
#dots {
  display: flex;
  gap: 12px;
  align-items: center;
}
#dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  background: #ffffff66;
  padding: 0;
}
#dots button.current {
  background: #fff;
}
.swipe {
  position: absolute;
  bottom: 40px;
  font-size: 16px;
  white-space: nowrap;
}
#copyStatus {
  margin-top: 10px;
  font-size: 15px;
}
@media (min-width: 800px) {
  .background {
    background-position: center 35%;
  }
  .shade {
    background: rgba(0, 0, 0, 0.62);
  }
}
@media (max-height: 650px) {
  .slide {
    padding-top: 55px;
    padding-bottom: 95px;
  }
  .slide p {
    font-size: 18px;
  }
  .script {
    margin: 10px 0;
    font-size: 55px;
  }
  .hero h1 {
    font-size: 70px;
  }
  .swipe {
    bottom: 32px;
  }
}
[hidden] {
  display: none !important;
}

.music-toggle {
  margin-left: auto;
  margin-right: 20px;
  background: transparent;
  border: 0;
  font-size: 23px;
}
.music-panel {
  position: absolute;
  z-index: 6;
  top: 65px;
  right: 20px;
  background: rgba(20, 20, 20, 0.96);
  padding: 12px;
  text-align: center;
  font-size: 15px;
}
.music-panel p {
  margin: 0 0 8px;
}
.music-panel iframe {
  border: 0;
  display: block;
}
.music-panel a {
  display: block;
  color: white;
  margin-top: 8px;
}
.music-panel[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  left: -10000px;
  top: 0;
  right: auto;
}

.contact-link {
  color: inherit;
  text-decoration: none;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.contact-name {
  font-size: 24px !important;
}
.contact-link:hover {
  text-decoration: underline;
}

.backgrounds {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.background {
  opacity: 0;
  animation: crossfade 32s infinite;
}
.bg1 {
  background-image: url("assets/photo1.jpg");
  animation-delay: 0s;
}
.bg2 {
  background-image: url("assets/photo2.jpg");
  animation-delay: 8s;
}
.bg3 {
  background-image: url("assets/photo3.jpg");
  animation-delay: 16s;
}
.bg4 {
  background-image: url("assets/photo4.jpg");
  animation-delay: 24s;
}
@keyframes crossfade {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  6%,
  25% {
    opacity: 1;
  }
  16% {
    transform: scale(1.06);
  }
  31%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
}
.bg1 {
  opacity: 1;
}
.families {
  font-weight: 600;
}
.event-icon {
  font-size: 45px;
  margin: 8px 0;
}
.pin {
  font-size: 35px;
  margin-top: 22px;
}
.venue-slide .script,
.gift-slide .script {
  margin: 0 0 25px;
  font-size: clamp(48px, 9vw, 72px);
}
.venue-slide p {
  margin: 3px;
}
.venue-slide .outline {
  margin-top: 16px;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 7px;
}
.gift-slide p {
  margin: 12px 0;
}
.gift-slide .venue {
  margin-top: 55px;
}
.rsvp-slide {
  overflow: auto;
}
.rsvp-slide .script {
  font-size: 54px;
  margin: 0 0 18px;
}
#rsvp {
  width: min(100%, 480px);
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.attendance,
.send-buttons {
  display: flex;
  gap: 10px;
}
.attendance label,
.send-buttons button {
  flex: 1;
}
.attendance input {
  position: absolute;
  opacity: 0;
}
.attendance span,
.send-buttons button {
  display: block;
  width: 100%;
  padding: 11px 8px;
  border: 1px solid #fff;
  border-radius: 5px;
  background: transparent;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
.attendance input:checked + span {
  background: #25b65b;
  border-color: #25b65b;
}
.attendance input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  text-align: left;
  margin: 15px 0;
  font-size: 18px;
}
.field input {
  width: 55%;
  min-width: 0;
  padding: 10px;
  border: 1px solid white;
  border-radius: 5px;
  background: #0008;
  color: white;
  font: inherit;
}
.rsvp-note {
  font-size: 15px !important;
  margin: 12px 0 !important;
}
.send-buttons button {
  font-size: 16px;
}
.send-buttons button:hover {
  background: white;
  color: #111;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-height: 700px) {
  .rsvp-slide .script {
    font-size: 42px;
    margin: 0;
  }
  .field {
    margin: 8px 0;
  }
  .venue-slide .event-icon {
    margin: 2px;
    font-size: 30px;
  }
  .venue-slide .script {
    margin: 0 0 8px;
  }
}

nav {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #414141;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vh, 30px);
  padding: 70px 20px;
}
nav button:not(.close-menu) {
  text-align: center;
  width: auto;
  font-size: clamp(25px, 4vh, 36px);
  padding: 4px 20px;
}
nav .close-menu {
  position: absolute;
  top: 15px;
  left: 20px;
  width: auto;
  background: transparent;
  border: 0;
  font-family: Arial, sans-serif;
  font-size: 50px;
  line-height: 1;
}
nav button:hover {
  text-decoration: underline;
}
.bg1 {
  animation-delay: -2s;
}
.bg2 {
  animation-delay: 6s;
}
.bg3 {
  animation-delay: 14s;
}
.bg4 {
  animation-delay: 22s;
}
@media (prefers-reduced-motion: reduce) {
  .background {
    animation: none;
  }
  .bg1 {
    opacity: 1;
  }
}

.event-icon svg {
  display: block;
  width: 42px;
  height: 42px;
}
.pin svg {
  width: 40px;
  height: 40px;
}

.final-slide {
  padding: 65px 35px 110px;
}
.polaroid {
  width: min(62vw, 340px);
  max-height: 70svh;
  transform: rotate(-10deg);
  background: #fff;
  color: #111;
  border-radius: 7px;
  padding: 12px 12px 18px;
  margin: 0;
  box-shadow: 0 12px 35px #0006;
}
.polaroid img {
  display: block;
  width: 100%;
  height: min(52svh, 480px);
  object-fit: cover;
  border-radius: 4px;
  filter: grayscale(1);
}
.polaroid figcaption {
  text-align: center;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.5;
  padding-top: 8px;
}
@media (max-width: 500px) {
  .polaroid {
    width: min(70vw, 340px);
  }
}

.rsvp-slide .deadline {
  font-size: 17px;
  margin: 0 0 14px;
}
.music-panel {
  max-width: calc(100vw - 40px);
}

/* Use lining numerals for a clear, balanced wedding date. */
.date strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 7vw, 68px);
  font-weight: 400;
  font-variant-numeric: lining-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.date,
.date-text {
  font-family: Georgia, "Times New Roman", serif;
  font-variant-numeric: lining-nums;
}

.slide .invitation-copy {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2.5vw, 21px);
  line-height: 1.5;
}
.slide .families {
  font-weight: 700;
}

#countControl {
  width: 55%;
  display: block;
}
#countControl input,
#countControl select {
  width: 100%;
  padding: 10px;
  border: 1px solid white;
  border-radius: 5px;
  background: #171717;
  color: white;
  font: inherit;
}
.invitation-greeting {
  font-weight: 600;
  font-size: 22px !important;
}
.rsvp-slide {
  justify-content: flex-start;
  padding-top: 65px;
  padding-bottom: 115px;
}
.rsvp-slide .rsvp-note {
  margin: 8px 0 !important;
}
.guest-name-field {
  margin: 8px 0;
}
.rsvp-slide #rsvp {
  padding-bottom: 15px;
}

/* Keep media inside its container without changing its desktop dimensions. */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
}
img,
video {
  height: auto;
}

/* Phone layouts retain the desktop composition with room to scroll each page. */
@media (max-width: 767px), (max-height: 500px) {
  body {
    font-size: 16px;
  }
  main {
    height: 100svh;
    height: 100dvh;
    min-width: 0;
  }
  header {
    top: max(12px, env(safe-area-inset-top));
    left: 16px;
    right: 16px;
  }
  button,
  a,
  input,
  select {
    min-width: 44px;
    min-height: 44px;
  }
  .music-toggle {
    margin-right: 8px;
  }
  .slide {
    padding: 76px 20px calc(116px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: safe center;
    overscroll-behavior-y: contain;
    overflow-wrap: anywhere;
    transform: none;
  }
  .slide > * {
    flex-shrink: 0;
    max-width: 100%;
    min-width: 0;
  }
  .slide .eyebrow,
  .slide .smallcaps,
  .date,
  .outline,
  .rsvp-note,
  .slide .rsvp-note {
    font-size: 16px !important;
  }
  .slide .eyebrow,
  .slide .smallcaps {
    letter-spacing: 0.15em;
  }
  .hero h1 {
    font-size: clamp(60px, 15vw, 100px);
  }
  .venue-slide .script,
  .gift-slide .script {
    font-size: clamp(40px, 9vw, 68px);
  }
  .date {
    gap: 10px;
    letter-spacing: 0.06em;
  }
  footer {
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 4px;
    padding: 0 8px;
    pointer-events: none;
  }
  footer .nav-arrow {
    flex: 0 0 44px;
  }
  footer button,
  #dots {
    pointer-events: auto;
  }
  #dots {
    display: flex;
    flex: 1 1 0;
    max-width: 352px;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 0;
  }
  #dots button {
    flex: 1 1 0;
    min-width: 0;
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: radial-gradient(circle, #ffffff66 3.5px, transparent 4px);
  }
  #dots button.current {
    background: radial-gradient(circle, #fff 3.5px, transparent 4px);
  }
  .swipe {
    bottom: 44px;
    margin: 8px 0;
    font-size: 16px;
  }
  nav {
    min-width: 0;
    max-width: 100%;
    padding: 70px 20px calc(20px + env(safe-area-inset-bottom));
    gap: 4px;
    overflow-y: auto;
    justify-content: safe center;
  }
  nav button:not(.close-menu) {
    font-size: 25px;
    max-width: 100%;
    flex-shrink: 0;
    overflow-wrap: anywhere;
  }
  nav .close-menu {
    top: max(12px, env(safe-area-inset-top));
  }
  .rsvp-slide {
    padding-top: 76px;
    padding-bottom: calc(116px + env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .field {
    flex-wrap: wrap;
    gap: 8px;
  }
  .field > span:first-child {
    flex: 1 1 120px;
  }
  .field input,
  #countControl {
    flex: 1 1 140px;
    width: 55%;
    max-width: 100%;
    font-size: 18px;
  }
  #countControl input,
  #countControl select {
    width: 100%;
    font-size: 18px;
  }
  .attendance label,
  .send-buttons button {
    min-width: 0;
  }
  .attendance span {
    min-height: 44px;
  }
  .attendance input {
    min-width: 0;
    min-height: 0;
    width: 1px;
    height: 1px;
  }
  .send-buttons {
    flex-wrap: wrap;
  }
  .send-buttons button {
    flex: 1 1 130px;
  }
  .polaroid {
    width: min(65vw, 340px);
    max-height: none;
  }
  .polaroid img {
    height: min(45svh, 480px);
  }
}

.music-status {
  position: absolute;
  z-index: 6;
  top: 65px;
  right: 20px;
  max-width: calc(100% - 40px);
  margin: 0;
  padding: 10px 14px;
  background: rgba(20, 20, 20, 0.96);
  font-size: 16px;
  line-height: 1.4;
}

/* Slide only the invitation content; the photo backdrop stays independent. */
.slides {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar,
.slides > .slide::-webkit-scrollbar {
  display: none;
}
.slides > .slide {
  position: relative;
  inset: auto;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scrollbar-width: none;
}

/* Grab the text pages while leaving the independent photo slideshow in place. */
.slides {
  cursor: grab;
}
.slides.is-dragging,
.slides.is-settling {
  scroll-snap-type: none;
}
.slides.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.slides a,
.slides button,
.slides input,
.slides select,
.slides label {
  cursor: auto;
}
.slides button,
.slides a,
.slides label {
  cursor: pointer;
}

/* Keep the story track physical while localizing each page for Arabic reading. */
.slides,
header,
footer {
  direction: ltr;
}
.hero h1 .couple-name {
  display: inline;
  font-size: inherit;
}
html[lang="ar"] body {
  font-family: "Noto Naskh Arabic", serif;
}
html[lang="ar"] .slide,
html[lang="ar"] nav,
html[lang="ar"] .music-status {
  direction: rtl;
}
html[lang="ar"] .script,
html[lang="ar"] .date,
html[lang="ar"] .date-text,
html[lang="ar"] .date strong,
html[lang="ar"] .slide .invitation-copy {
  font-family: "Noto Naskh Arabic", serif;
}
html[lang="ar"] .script {
  line-height: 1.5;
}
html[lang="ar"] .eyebrow,
html[lang="ar"] .smallcaps,
html[lang="ar"] .date,
html[lang="ar"] .outline {
  letter-spacing: normal;
}
html[lang="ar"] .field {
  text-align: right;
}
html[lang="ar"] .hero h1 {
  font-size: clamp(60px, 13vw, 95px);
}
html[lang="ar"] .rsvp-slide .script {
  font-size: clamp(30px, 7vw, 48px);
}

/* Highlight the current story without losing the other navigation dots. */
#dots button {
  background-color: rgba(255, 255, 255, 0.48);
}
#dots button.current {
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}
@media (max-width: 767px), (max-height: 500px) {
  #dots button {
    background-color: transparent;
    background-image: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.48) 3.5px,
      transparent 4px
    );
  }
  #dots button.current {
    background-color: transparent;
    background-image: radial-gradient(circle, #fff 5px, transparent 5.5px);
    box-shadow: none;
  }
}

/* A quiet signature beneath the closing portrait. */
.final-slide {
  display: grid;
  grid-template-rows: minmax(100px, 1fr) auto;
  justify-items: center;
  align-items: start;
  gap: clamp(34px, 10vw, 54px);
  padding: 76px 12px calc(10px + env(safe-area-inset-bottom));
}
.final-slide .polaroid {
  margin: 0;
  width: min(78vw, 48svh, 480px);
  height: 100%;
  min-height: 0;
  max-height: 740px;
  transform: rotate(-13deg);
  padding: 10px 10px 14px;
  border-radius: 6px;
}
.portrait-window {
  height: calc(100% - 38px);
  min-height: 0;
  overflow: hidden;
  border-radius: 4px;
}
.final-slide .polaroid img {
  height: 100%;
  min-height: 0;
  animation: portrait-zoom 8s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.final-slide.active .polaroid img {
  animation-play-state: running;
}
@keyframes portrait-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}
@media (prefers-reduced-motion: reduce) {
  .final-slide .polaroid img {
    animation: none;
  }
}
.final-slide .polaroid figcaption {
  font-size: 21px;
  padding-top: 6px;
}
.invitu-credit {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  text-align: center;
  color: #ffffffb8;
  font-size: 10px;
  line-height: 1.3;
}
.invitu-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.invitu-credit a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 24px;
  color: inherit;
  text-decoration: none;
}
.invitu-brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.invitu-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.invitu-links a {
  width: 44px;
  min-height: 44px;
}
.invitu-links svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.invitu-links a:hover {
  color: #fff;
}
.invitu-credit a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.invitu-credit a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}
.final-back {
  position: absolute;
  left: 16px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffffc9;
}
.final-back svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.final-back:hover {
  color: #fff;
  background: #ffffff14;
}
.final-back:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 2px;
}

/* Keep the navigation hit areas below the closing page's social links. */
footer {
  height: 44px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    visibility 0s;
}
footer button {
  pointer-events: auto;
}
footer.is-leaving {
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    visibility 0s 0.35s;
}
footer.is-leaving button,
footer.is-leaving #dots {
  pointer-events: none;
}

/* Names and invitation text */
html[lang="en"] .script {
  font-family: "Allura", "Great Vibes", cursive;
  font-weight: 400;
}
.slide .families {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.25;
}
html[lang="ar"] .slide .families {
  font-family: "Noto Naskh Arabic", serif;
  font-style: normal;
}

/* Add breathing room around the ceremony and reception details. */
.venue-slide .script {
  margin-bottom: clamp(32px, 6vh, 55px);
}
.venue-slide .event-icon.pin {
  margin-top: clamp(36px, 6vh, 54px);
}
.venue-slide .event-icon {
  color: #fff;
}
@media (max-height: 700px) {
  .venue-slide .script {
    margin-bottom: 18px;
  }
  .venue-slide .event-icon.pin {
    margin-top: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  footer,
  footer.is-leaving {
    transition: none;
    transform: none;
  }
}

/* Ceremony and celebration: the same airy hierarchy on both pages. */
.venue-slide {
  justify-content: center;
}
html[lang="en"] .venue-slide .script {
  font-family: "Allura", "Great Vibes", cursive;
  font-size: clamp(42px, 8vw, 68px);
  line-height: 1.12;
  white-space: nowrap;
  margin: 0 0 clamp(38px, 6vh, 58px);
}
.venue-slide .event-icon:not(.pin) {
  margin: 0 0 12px;
}
.venue-slide .event-icon.pin {
  margin: clamp(38px, 6vh, 60px) 0 14px;
}
.venue-slide .event-icon img {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.venue-slide .event-icon.pin img {
  width: 48px;
  height: 68px;
}
.venue-slide p {
  margin: 3px 0;
}
html[lang="en"] .venue-slide p,
html[lang="en"] .venue-slide .outline {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.venue-slide .date-text {
  font-size: clamp(19px, 4.7vw, 24px);
  line-height: 1.45;
}
.venue-slide .venue {
  font-size: clamp(23px, 5.4vw, 29px) !important;
}
.venue-slide .outline {
  border: 1px solid white;
  margin-top: 22px;
}
@media (max-width: 400px) {
  html[lang="en"] .venue-slide .script {
    font-size: clamp(34px, 9.2vw, 42px);
  }
}
@media (max-height: 700px) {
  html[lang="en"] .venue-slide .script {
    margin-bottom: 25px;
  }
  .venue-slide .event-icon.pin {
    margin-top: 25px;
  }
}

/* Breathing room on both ceremony and celebration slides. */
html[lang] .venue-slide .script { margin-bottom: clamp(38px, 6vh, 58px); }
.venue-slide .event-icon.pin { margin-top: clamp(40px, 6vh, 60px); }
@media (max-height: 700px) {
  html[lang] .venue-slide .script { margin-bottom: 25px; }
  .venue-slide .event-icon.pin { margin-top: 25px; }
}

/* Align the event details near the top like the reference invitation. */
.slides > .venue-slide {
  justify-content: flex-start;
  padding-top: clamp(44px, 5.5vh, 58px);
  padding-bottom: 120px;
}
html[lang="en"] .venue-slide .script {
  font-size: clamp(44px, 12vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 clamp(42px, 7vh, 64px);
}
.venue-slide .event-icon:not(.pin) { margin: 0 0 12px; }
.venue-slide .event-icon.pin { margin: clamp(40px, 6.5vh, 58px) 0 12px; }
.venue-slide .date-text { font-size: clamp(18px, 5.2vw, 22px); }
.venue-slide .venue { font-size: clamp(20px, 5.8vw, 24px) !important; }
@media (max-height: 650px) {
  .slides > .venue-slide { padding-top: 40px; }
  html[lang="en"] .venue-slide .script { margin-bottom: 25px; }
  .venue-slide .event-icon.pin { margin-top: 25px; }
}

/* Home, invitation, and registry: match the reference's mobile hierarchy. */
.hero h1.names-script { margin: 0; line-height: 1.02; }
.hero h1.names-script span,
.hero h1.names-script .couple-name { display: block; font-size: inherit; }
html[lang="en"] .hero h1.names-script { font-size: clamp(78px, 25vw, 112px); font-weight: 400; }
.hero h1.names-script span:nth-child(2) { font-size: .7em; margin: .05em 0; }
.slides > .invitation-slide,
.slides > .gift-slide { justify-content: flex-start; padding-top: clamp(38px, 5vh, 55px); padding-bottom: 115px; }
.invitation-slide .verse { margin: 0; font-size: clamp(17px, 4.5vw, 20px); line-height: 1.55; }
.invitation-slide .reference { margin: 12px 0 0; font-size: 16px; }
.invitation-slide .rule { margin: 20px auto 22px; }
.invitation-slide .invitation-copy { margin: 3px 0; font-size: clamp(17px, 4.5vw, 20px); line-height: 1.45; }
.invitation-slide .families { font-size: clamp(21px, 5.2vw, 26px); }
.invitation-slide .script { margin: 18px 0 12px; font-size: clamp(48px, 12vw, 64px); line-height: 1.2; }
.invitation-slide .date-text { margin: 8px 0; font-size: clamp(17px, 4.5vw, 20px); }
html[lang="en"] .gift-slide .script { margin: 0 0 clamp(40px, 7vh, 56px); font-size: clamp(48px, 13vw, 60px); line-height: 1.12; font-weight: 700; }
.gift-slide p { max-width: 320px; margin: 6px 0; font-size: clamp(17px, 4.5vw, 20px); line-height: 1.55; }
.gift-slide .venue { margin-top: clamp(38px, 7vh, 56px); font-size: clamp(20px, 5.4vw, 24px) !important; }
@media (max-height: 650px) {
  .slides > .invitation-slide, .slides > .gift-slide { padding-top: 35px; }
  .invitation-slide .rule { margin: 10px auto; }
  html[lang="en"] .gift-slide .script { margin-bottom: 24px; }
  .gift-slide .venue { margin-top: 24px; }
}

/* Invitation page only: clear the menu and separate the paragraphs. */
.slides > .invitation-slide { padding-top: 82px; }
.invitation-slide .invitation-copy { margin: 8px 0; }
.invitation-slide .reference { margin-top: 16px; }

/* Arabic calligraphy for the couple's names and page headings. */
html[lang="ar"] .script {
  font-family: "Aref Ruqaa", "Noto Naskh Arabic", serif;
  font-weight: 400;
  line-height: 1.45;
}

/* Make the family names prominent in both languages. */
.invitation-slide p.families {
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 700;
  line-height: 1.3;
}

@font-face {
  font-family: "High Spirited";
  src: url("assets/high-spirited.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
html[lang="en"] .script,
html[lang="en"] .venue-slide .script {
  font-family: "High Spirited", "Allura", cursive;
}

/* Reservation: match the other page titles and give the form room to breathe. */
html[lang="en"] .rsvp-slide .script {
  font-size: clamp(44px, 12vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 22px;
}
.rsvp-slide .deadline {
  line-height: 1.5;
  margin-bottom: 20px;
}
.rsvp-slide .field {
  margin: 20px 0;
  line-height: 1.5;
}
.rsvp-slide .guest-name-field {
  margin: 16px 0;
}
.rsvp-slide .rsvp-note {
  line-height: 1.6;
  margin: 16px 0 !important;
}

/* Add space before the invitation date and between RSVP rows. */
.invitation-slide .date-text {
  margin-top: clamp(50px, 10vh, 100px);
}
@media (max-width: 600px) {
  .invitation-slide .date-text {
    margin-top: clamp(28px, 5vh, 45px);
  }
}
.rsvp-slide .deadline {
  margin-bottom: 26px;
}
.rsvp-slide .field,
.rsvp-slide .guest-name-field {
  margin: 26px 0;
  line-height: 1.6;
}
.rsvp-slide .rsvp-note {
  margin: 22px 0 !important;
}

/* Move the couple's names down while keeping the date in place. */
.invitation-slide {
  --names-offset: clamp(12px, 4vh, 40px);
}
.invitation-slide .script {
  margin-top: calc(18px + var(--names-offset));
}
.invitation-slide .date-text {
  margin-top: calc(clamp(50px, 10vh, 100px) - var(--names-offset));
}
@media (max-width: 600px) {
  .invitation-slide {
    --names-offset: 15px;
  }
  .invitation-slide .date-text {
    margin-top: calc(clamp(28px, 5vh, 45px) - var(--names-offset));
  }
}

/* Use more of the available height on taller phone screens. */
@media (max-width: 600px) and (min-height: 720px) {
  .invitation-slide {
    --names-offset: clamp(32px, 5vh, 46px);
  }
  .invitation-slide .date-text {
    margin-top: clamp(55px, 8vh, 75px);
  }
}

/* Subtle, closer story indicators. */
#dots {
  gap: 8px;
}
#dots button {
  background: rgba(255, 255, 255, 0.05);
}
#dots button.current {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: none;
}
@media (max-width: 767px), (max-height: 500px) {
  #dots {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    gap: 0;
    justify-content: center;
  }
  #dots button {
    flex: 0 0 28px;
    width: 28px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 3.5px, transparent 4px);
  }
  #dots button.current {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 4px, transparent 4.5px);
    box-shadow: none;
  }
}


.countdown-slide .script,
.dress-code-slide .script {
  margin: 0 0 16px;
  font-size: clamp(46px, 11vw, 70px);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 2vw, 12px);
  width: min(100%, 390px);
  margin: 22px 0 0;
}

.countdown > div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 5px;
  padding: 12px 2px;
  border: 1px solid rgba(255, 255, 255, .65);
  background: rgba(20, 20, 20, .45);
}

.countdown dt {
  font-size: clamp(11px, 3vw, 16px);
}

.countdown dd {
  margin: 0;
  font-size: clamp(23px, 7vw, 39px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.dress-code-slide .rule {
  margin: 0 auto 16px;
}

html[lang] .dress-code-slide .script,
.dress-code-slide .venue {
  font-weight: 700;
}

.dress-palette {
  display: flex;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.dress-palette li {
  width: 15px;
  height: 15px;
  border: 1px solid #fff;
  border-radius: 50%;
  background-color: var(--swatch);
}

.send-buttons button:disabled {
  opacity: .55;
  cursor: default;
}
