:root {
  color-scheme: light;
  font-family: Georgia, 'Times New Roman', serif;
  color: #454d3e;
  background: #f8f5ee;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
button:focus-visible { outline: 2px solid white; outline-offset: 4px; }
[hidden] { display: none !important; }

.wedding {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}

.gallery { position: relative; overflow: hidden; background: #deddd4; }
.couple-gallery {
  width: min(560px, calc(100% - 64px));
  margin: 32px 0;
  padding-bottom: 40px;
  justify-self: center;
  align-self: center;
  background: transparent;
}
.photos { position: absolute; inset: 0; }
.photos img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.photos img.is-active { opacity: 1; }
.couple-gallery .photos { position: relative; inset: auto; aspect-ratio: 3 / 4; }
.couple-gallery img { object-fit: cover; }

.invitation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 32px 44px;
}
.announcement {
  margin: 0 0 32px;
  font-family: Arial, sans-serif;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.5;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(48px, 5.2vw, 82px); font-weight: 400; line-height: 1.06; }
h1 span { display: block; overflow-wrap: anywhere; }
h1 em { display: block; margin: 12px 0; font-size: 0.36em; font-weight: 400; }
.date { margin: 27px 0 0; font-size: 19px; }
.ceremony { margin: 28px 0 30px; }
.ceremony p { margin: 0; font-size: 16px; }
.ceremony .label {
  margin-bottom: 10px;
  font-family: Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.rsvp {
  display: inline-block;
  margin-bottom: 30px;
  padding: 14px 34px;
  border: 1px solid #454d3e;
  color: #454d3e;
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition: background-color 200ms, color 200ms;
}
.rsvp:hover { background: #454d3e; color: #f8f5ee; }
.rsvp:focus-visible { outline: 2px solid #454d3e; outline-offset: 4px; }
.cat-gallery { width: 176px; flex-shrink: 0; aspect-ratio: 4 / 5; border-radius: 88px 88px 3px 3px; }
.cat-gallery img { object-position: center 60%; }

.gallery-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 25px 14px 15px;
  background: linear-gradient(transparent, rgb(0 0 0 / 30%));
}
.photo-dots { display: flex; align-items: center; }
.photo-dots button, .playback {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}
.photo-dots button::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  transition: opacity 200ms, transform 200ms;
}
.photo-dots button[aria-current="true"]::after { opacity: 1; transform: scale(1.4); }
.playback svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.playback .play-icon { display: none; }
.playback[aria-pressed="true"] .pause-icon { display: none; }
.playback[aria-pressed="true"] .play-icon { display: block; }
.cat-gallery .gallery-controls { gap: 4px; padding: 18px 8px 3px; }
.couple-gallery .gallery-controls { padding: 0; background: none; }
.couple-gallery .gallery-controls button { color: #454d3e; }
.couple-gallery button:focus-visible { outline-color: #454d3e; }

@media (max-width: 640px) {
  .wedding { grid-template-columns: 1fr; }
  .couple-gallery { width: min(480px, calc(100% - 40px)); margin: 20px 0 0; }
  .invitation { padding: 48px 24px; }
  .announcement { margin-bottom: 28px; font-size: 18px; }
  h1 { font-size: clamp(48px, 13vw, 72px); }
  .cat-gallery { width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
