/* Fonts */
@font-face {
  font-family: "Great Vibes";
  src: url("../fonts/great-vibes-latin.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Great Vibes";
  src: url("../fonts/great-vibes-cyrillic.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Alice;
  src: url("../fonts/alice-latin.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: Alice;
  src: url("../fonts/alice-cyrillic.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Theme and base styles */
:root {
  --press-transition: scale 245ms cubic-bezier(.2, .65, .3, 1);
  color-scheme: light;
  --paper: #faf6f1;
  --white: #fffaf5;
  --ink: #533a46;
  --muted: #604a51;
  --wine: #644353;
  --wine-deep: #4e3240;
  --line: #d9c8c9;
  --gold: #aa846e;
  --serif: Alice, Georgia, serif;
  --script: "Great Vibes", Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:not(.intro-locked) { scrollbar-gutter: stable; }
html.intro-locked {
  overflow: hidden;
  overscroll-behavior: none;
}
.intro-locked .letter { display: none; }
body {
  margin: 0;
  background: #172125;
  color: var(--ink);
  font: 1.06rem/1.65 var(--serif);
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 1px 1px, rgb(255 234 217 / .065) .45px, transparent .75px) 0 0 / 5px 5px,
    radial-gradient(ellipse at 93% 25%, rgb(167 124 113 / .29), transparent 55%),
    radial-gradient(ellipse at 9% 82%, rgb(84 124 111 / .34), transparent 54%),
    radial-gradient(ellipse at 48% 42%, transparent 23%, rgb(20 17 25 / .37) 100%),
    linear-gradient(148deg, rgb(21 37 38 / .35), rgb(27 25 33 / .6)),
    url("../images/page-background.jpeg") center center / cover no-repeat;
}
[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img {
  display: block;
  width: 100%;
  height: auto;
}
p { margin: 0; }
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.16;
  text-wrap: balance;
}
h1, h2 { font-family: var(--script); }
h2 { font-size: clamp(2.65rem, 7vw, 3.55rem); }
section[id] { scroll-margin-top: 1.25rem; }
:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 5px;
}
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 5;
  top: .5rem;
  left: .5rem;
  background: var(--white);
  padding: .5rem 1rem;
}

/* Invitation layout */
.letter {
  width: min(42rem, calc(100% - 1.75rem));
  margin: 0 auto clamp(1rem, 3vw, 2rem);
  overflow: clip;
  border-radius: 1.65rem;
  background: radial-gradient(ellipse at 12% 4%, #fffaf2 0%, transparent 37%), var(--paper);
  box-shadow: 0 1rem 4rem rgb(8 19 23 / .3);
  text-align: center;
}
.letter .shell {
  width: calc(100% - clamp(2rem, 8vw, 3.5rem));
  margin-inline: auto;
}
.section { padding-block: clamp(2rem, 6.3vw, 3.25rem); }
.lead {
  max-width: 35rem;
  margin-inline: auto;
  color: var(--muted);
}
.section-heading { margin-bottom: clamp(1.35rem, 4vw, 2rem); }
.section-heading .lead { margin-top: 1rem; }
.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--wine);
  line-height: 1;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
.divider i { font: 1.35em/1 var(--script); }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(.6rem, 2vw, 1.4rem);
  min-height: 5.1rem;
  padding: .9rem clamp(1rem, 4.6vw, 2.35rem);
  border-top: 1px solid #d9c7c5;
  background: linear-gradient(112deg, #f9f1e9, #efe3df);
  color: var(--wine-deep);
}
.footer-signature {
  font: clamp(1.9rem, 5.5vw, 2.65rem)/1.15 var(--script);
  text-wrap: balance;
}
.footer-top {
  display: inline-grid;
  border-radius: 999px;
  text-decoration: none;
}
.footer-top > .press-face {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .2rem .25rem .2rem .6rem;
  border-radius: inherit;
  font-size: .9rem;
  transition: background-color 300ms, box-shadow 300ms, var(--press-transition);
}
.footer-arrow {
  display: grid;
  place-items: center;
  width: 2.15rem;
  aspect-ratio: 1;
  border: 1px solid #cbb2b2;
  border-radius: 50%;
  background: #fff9f2;
  transition: transform 360ms var(--ease), border-color 300ms;
}
.footer-top:is(:hover, :focus-visible) > .press-face { background: rgb(255 251 246 / .64); }
.footer-top:is(:hover, :focus-visible) .footer-arrow {
  transform: translateY(-3px);
  border-color: var(--wine);
}
.footer-top:active > .press-face {
  background: #ead8d9;
  box-shadow: inset 0 1px 5px rgb(78 50 64 / .13);
}

/* Cover */
.hero :focus-visible { outline-color: var(--white); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(2rem, 13svh, 8.75rem) 1rem clamp(2rem, 6svh, 4rem);
  text-align: center;
  color: var(--white);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: clamp(.75rem, 2.3vw, 2.5rem);
  border: 1px solid rgb(250 226 205 / .23);
  border-radius: clamp(.6rem, 1.8vw, 1.65rem);
  box-shadow: inset 0 0 0 4px rgb(13 23 27 / .17);
  pointer-events: none;
  animation: frame-in 1.6s ease-out both;
}
@keyframes frame-in {
  from {
    opacity: 0;
    transform: scale(.984);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.hero-names {
  display: grid;
  grid-template-columns: 1fr auto;
  width: min(4.55em, 100%);
  font-size: clamp(3.05rem, 8svh, 4.85rem);
  line-height: .88;
  text-shadow: 0 .15em .35em rgb(0 0 0 / .35);
}
.hero-names span, .hero-intro, .cover-wrap { animation: entrance 1.3s var(--ease) both; }
.hero-kirill {
  grid-column: 1 / -1;
  justify-self: start;
  margin-left: .2em;
}
.hero-amp {
  grid-column: 2;
  justify-self: start;
  margin: .5em 0 .2em -.1em;
  font-size: .5em;
  --delay: 150ms;
}
.hero-yana {
  grid-column: 2;
  padding-right: .12em;
  --delay: 270ms;
}
.hero-intro {
  max-width: 34rem;
  margin: clamp(.9rem, 1.6svh, 1.25rem) 0 clamp(.95rem, 2.6svh, 1.6rem);
  font-size: clamp(1rem, 2.2svh, 1.33rem);
  line-height: 1.48;
  text-wrap: pretty;
  text-shadow: 0 1px 12px #11191b;
  --delay: 390ms;
}
.cover-wrap {
  width: clamp(9.85rem, 26svh, 16rem);
  max-width: 76vw;
  --delay: 490ms;
}
.intro-locked .cover-wrap {
  animation-name: entrance, cover-nudge;
  animation-duration: 1.3s, 4.25s;
  animation-delay: var(--delay), 1.95s;
  animation-timing-function: var(--ease), ease-in-out;
  animation-iteration-count: 1, 3;
  animation-fill-mode: both, none;
}
@keyframes cover-nudge {
  0%, 18%, 100% {
    rotate: 0deg;
    translate: 0 0;
  }
  5% {
    rotate: -1.8deg;
    translate: 0 -3px;
  }
  10% {
    rotate: 1.2deg;
    translate: 0 -1px;
  }
}

/* Shared buttons */
.button {
  display: inline-grid;
  padding: 0;
  border: 0;
  border-radius: .8rem;
  background: transparent;
  text-decoration: none;
}
.button > .press-face {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  min-height: 2.9rem;
  border: 1px solid var(--wine);
  border-radius: inherit;
  padding: .65rem 1.15rem;
  background: var(--wine);
  color: var(--white);
  font-size: .94rem;
  font-weight: 650;
  text-align: center;
  transition: background-color 260ms, border-color 260ms, color 260ms, box-shadow 260ms, var(--press-transition);
}
.button-outline > .press-face {
  color: var(--wine-deep);
  background: transparent;
}
.button:is(:hover, :focus-visible) > .press-face {
  background: var(--wine-deep);
  border-color: var(--wine-deep);
  color: var(--white);
}
.button:active > .press-face {
  background: #452d39;
  border-color: #452d39;
  color: var(--white);
  box-shadow: inset 0 2px 7px rgb(25 15 20 / .36);
}

/* Cover photo */
.cover {
  display: block;
  text-decoration: none;
}
.cover > .press-face {
  position: relative;
  display: block;
  overflow: hidden;
  padding: .55rem .55rem .68rem;
  background: var(--white);
  color: #32272b;
  box-shadow: 0 1rem 2.25rem rgb(11 9 10 / .24);
  transition: background-color 300ms, box-shadow 360ms var(--ease), var(--press-transition);
}
.cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: filter 320ms;
}
.cover-caption {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .45em;
  margin-top: .55rem;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(.58rem, 1.05svh, .68rem);
  letter-spacing: .12em;
}
.cover-caption span {
  color: var(--wine);
  font-size: 1.1em;
}
.intro-locked .cover-caption span { animation: invite-arrow 940ms 1.65s ease-in-out 2; }
@keyframes invite-arrow {
  45% { transform: translateY(2.5px); }
}
.cover > .press-face::after {
  content: "";
  position: absolute;
  inset: .55rem .55rem 1.75rem;
  background: linear-gradient(112deg, transparent 32%, rgb(255 255 255 / .25) 48%, transparent 64%);
  background-size: 240% 100%;
  background-position: 100% 0;
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) {
  .cover:hover > .press-face {
    background: #fff4ea;
    box-shadow: 0 1.2rem 2.6rem rgb(10 9 10 / .4);
  }
  .cover:hover > .press-face::after { animation: cover-glint 820ms var(--ease); }
}
.cover:active > .press-face {
  background: #ecdbd1;
  box-shadow: 0 .7rem 1.45rem rgb(10 9 10 / .34);
}
.cover:active img { filter: brightness(.94); }
@keyframes cover-glint {
  0% {
    background-position: 100% 0;
    opacity: 0;
  }
  24% { opacity: 1; }
  100% {
    background-position: 0 0;
    opacity: 0;
  }
}

/* Greeting and calendar */
.greeting { scroll-margin-top: clamp(1.25rem, 5vw, 4.75rem); }
.greeting .lead { margin-top: 1rem; }
.signature {
  margin-top: .85rem;
  color: var(--wine-deep);
  font: clamp(1.9rem, 5vw, 2.55rem)/1.25 var(--script);
}
.calendar {
  position: relative;
  width: min(100%, 17.5rem);
  margin: 1.6rem auto 0;
  padding: 1.1rem 1.05rem .95rem;
  border: 1px solid var(--line);
  border-radius: 1.55rem;
  background: radial-gradient(ellipse at 50% 0%, #f4e7da, transparent 55%), linear-gradient(155deg, var(--white), #fbf2e9);
  box-shadow: 0 .9rem 1.6rem -.95rem rgb(89 57 73 / .27);
}
.calendar::before {
  content: "";
  position: absolute;
  inset: .35rem;
  border: 1px solid rgb(100 67 83 / .18);
  border-radius: 1.25rem;
  pointer-events: none;
}
.calendar table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
}
.calendar caption {
  font: 2rem/1.3 var(--script);
  margin-bottom: .55rem;
}
.calendar th {
  color: var(--muted);
  font-size: .71rem;
  text-transform: uppercase;
}
.calendar td {
  height: 1.95rem;
  font-size: .86rem;
  padding: 0;
}
.calendar td:nth-child(n+6) { color: var(--wine); }
.wedding-day {
  display: inline-grid;
  place-items: center;
  width: 1.95rem;
  height: 1.85rem;
  isolation: isolate;
  position: relative;
  color: var(--white);
  font-weight: bold;
}
.wedding-day::before {
  content: "♥";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -51%);
  color: var(--wine);
  font: 2.55rem/1 system-ui, sans-serif;
}
.wedding-day::after {
  content: "";
  position: absolute;
  inset: -.16rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.calendar.is-revealed caption,
.calendar.is-revealed thead,
.calendar.is-revealed tbody tr {
  animation: calendar-week 740ms var(--week-delay, 190ms) var(--ease) both;
}
.calendar.is-revealed thead { --week-delay: 260ms; }
.calendar.is-revealed tbody tr:nth-child(1) { --week-delay: 330ms; }
.calendar.is-revealed tbody tr:nth-child(2) { --week-delay: 400ms; }
.calendar.is-revealed tbody tr:nth-child(3) { --week-delay: 470ms; }
.calendar.is-revealed tbody tr:nth-child(4) { --week-delay: 540ms; }
.calendar.is-revealed tbody tr:nth-child(5) { --week-delay: 610ms; }
.wedding-day.date-in-view { animation: heart-pop 790ms 250ms var(--ease) both; }
.wedding-day.date-in-view::before { animation: calendar-heartbeat 1.85s 1.05s ease-in-out infinite; }
.wedding-day.date-in-view::after { animation: date-ripple 840ms 455ms ease-out; }
@keyframes calendar-week {
  from {
    opacity: 0;
    transform: translateY(.55rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes heart-pop {
  0% { transform: scale(.55) rotate(-12deg); }
  58% { transform: scale(1.18) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes calendar-heartbeat {
  0%, 19%, 37%, 100% { transform: translate(-50%, -51%) scale(1); }
  9% { transform: translate(-50%, -51%) scale(1.15); }
  27% { transform: translate(-50%, -51%) scale(1.09); }
}
@keyframes date-ripple {
  from {
    opacity: .75;
    transform: scale(.65);
  }
  to {
    opacity: 0;
    transform: scale(1.62);
  }
}

/* Wedding schedule */
.agenda { position: relative; }
.agenda-ornament {
  position: absolute;
  inset-block: 0;
  left: 50%;
  display: grid;
  width: clamp(2.4rem, 11vw, 4.45rem);
  transform: translateX(-50%);
}
.agenda-ornament span {
  width: 50%;
  height: 100%;
}
.agenda-ornament span:nth-child(odd) {
  justify-self: end;
  border: 2px solid var(--wine);
  border-left: 0;
  border-radius: 0 100% 100% 0 / 0 50% 50% 0;
}
.agenda-ornament span:nth-child(even) {
  border: 2px solid var(--wine);
  border-right: 0;
  border-radius: 100% 0 0 100% / 50% 0 0 50%;
}
.agenda-ornament::before, .agenda-ornament::after {
  content: "♥";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--wine);
  font: 1.7rem/1 system-ui, sans-serif;
}
.agenda-ornament::before { top: -.52em; }
.agenda-ornament::after { bottom: -.42em; }
.agenda-motion {
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: clamp(2.45rem, 12vw, 5.5rem);
  transform: translateX(-50%);
  visibility: hidden;
  pointer-events: none;
}
.agenda-path {
  display: block;
  width: 100%;
  height: 100%;
}
.agenda-heart {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--wine);
  font: clamp(1.6rem, 4vw, 2.25rem)/1 system-ui, sans-serif;
  text-shadow: 0 1px 2px rgb(78 50 64 / .25), 0 0 .6rem var(--paper);
}
.has-agenda-motion .agenda-motion { visibility: visible; }
.has-agenda-motion .agenda-ornament { visibility: hidden; }
.has-agenda-motion .timeline li {
  opacity: 0;
  transform: translateX(var(--shift-x));
  transition: opacity 390ms ease, transform 480ms var(--ease);
}
.has-agenda-motion .timeline li.timeline-event-visible {
  opacity: 1;
  transform: translateX(0);
  transition-duration: 770ms, 950ms;
}
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  display: grid;
  place-content: center end;
  gap: .5rem;
  min-height: clamp(5.3rem, 17vw, 7rem);
  padding-right: calc(50% + clamp(1.55rem, 8vw, 4.65rem));
  text-align: right;
  --shift-x: -12px;
}
.timeline li:nth-child(even) {
  place-content: center start;
  padding: 0 0 0 calc(50% + clamp(1.55rem, 8vw, 4.65rem));
  text-align: left;
  --shift-x: 12px;
}
.timeline time {
  color: var(--wine-deep);
  font: clamp(1.7rem, 5vw, 2.55rem)/1.1 var(--serif);
  font-variant-numeric: lining-nums;
}
.timeline li span {
  color: var(--muted);
  font-size: clamp(.78rem, 2.5vw, 1.02rem);
  line-height: 1.35;
  text-transform: uppercase;
  font-weight: 650;
  letter-spacing: .09em;
}

/* Venue and map */
.venue-photo {
  position: relative;
  width: min(16.6rem, 74%);
  margin: 1.45rem auto 1.3rem;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 .8rem 1.5rem -.9rem rgb(89 57 73 / .4);
}
.venue-photo::after {
  content: "";
  position: absolute;
  inset: -.42rem;
  border: 1px solid rgb(170 132 110 / .28);
  border-radius: 50%;
  pointer-events: none;
}
.venue-photo.is-revealed::after { animation: photo-ring 1050ms 130ms var(--ease) both; }
@keyframes photo-ring {
  from {
    opacity: 0;
    transform: scale(.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.venue-photo img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: inherit;
}
.venue h3 {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 1.28rem;
}
.venue address {
  font-style: normal;
  color: var(--muted);
  margin-top: .85rem;
}
.map-link {
  display: inline-grid;
  max-width: 100%;
  margin-top: 1.25rem;
  border-radius: 999px;
  text-decoration: none;
}
.map-link > .press-face {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  max-width: 100%;
  gap: clamp(.52rem, 2vw, .85rem);
  padding: .45rem .45rem .45rem .85rem;
  border: 1px solid #bca2a6;
  border-radius: inherit;
  background: var(--white);
  color: var(--wine-deep);
  font: 500 clamp(.84rem, 2.8vw, .94rem)/1.3 system-ui, sans-serif;
  text-align: left;
  box-shadow: 0 .5rem 1.2rem -.9rem #6d4654;
  transition: background-color 320ms, border-color 320ms, box-shadow 320ms, var(--press-transition);
}
.map-link:is(:hover, :focus-visible) > .press-face {
  background: #f6ebe6;
  border-color: var(--wine);
  box-shadow: 0 .6rem 1.5rem -.8rem #6d465478;
}
.map-link:active > .press-face {
  background: #ecdcd8;
  box-shadow: inset 0 1px 6px rgb(78 50 64 / .19);
}
.map-pin {
  position: relative;
  width: .83rem;
  height: .83rem;
  border: 1.5px solid currentColor;
  border-radius: 50% 50% 50% 12%;
  transform: rotate(-45deg);
}
.map-pin::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: currentColor;
}
.map-arrow {
  display: grid;
  place-items: center;
  width: 2.2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--wine);
  color: var(--white);
  font-size: 1.03rem;
  transition: transform 480ms var(--ease), background-color 420ms;
}
.map-link:is(:hover, :focus-visible) .map-arrow {
  transform: translate(1px, -1px) rotate(9deg);
  background: var(--wine-deep);
}
.venue-note {
  max-width: 27rem;
  margin: 1.5rem auto 0;
}
.venue-note h4 { font: 2rem/1.2 var(--script); }
.venue-note p { margin-top: .5rem; }

/* Guest information */
.details-section p {
  max-width: 30rem;
  margin: 1rem auto 0;
  color: var(--muted);
}
.dress-swatch {
  display: block;
  width: 2.4rem;
  aspect-ratio: 1;
  margin: 1.35rem auto 0;
  border: 3px solid var(--white);
  border-radius: 50%;
  outline: 1px solid var(--line);
  background: #e70d0d;
  box-shadow: 0 .4rem .8rem -.5rem #b52727;
}

/* Photo carousel */
.story .lead { max-width: 27rem; }
.gallery {
  position: relative;
  display: flex;
  gap: clamp(.5rem, 2vw, .85rem);
  gap: round(nearest, clamp(.5rem, 2vw, .85rem), 1px);
  margin-top: 1.45rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:is(.is-gliding, .is-viewer-paused) { scroll-snap-type: none; }
.gallery a {
  position: relative;
  flex: 0 0 72%;
  /* Keep the loop offset on a whole pixel when switching between copies. */
  flex-basis: round(nearest, 72%, 1px);
  min-width: 0;
  overflow: hidden;
  border-radius: clamp(.65rem, 2vw, 1rem);
  background: #d6c8bc;
  color: var(--white);
  text-decoration: none;
  scroll-snap-align: center;
}
.gallery a:focus-visible {
  outline-offset: -5px;
  outline-color: white;
}
.gallery-repeat { cursor: pointer; }
.album-photo {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  transition: var(--press-transition);
}
.gallery img {
  height: 100%;
  object-fit: cover;
  transition: transform 730ms var(--ease), filter 290ms;
}
.album-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 1.8em .5em .35em;
  background: linear-gradient(transparent, rgb(28 18 24 / .77));
  font: clamp(1.75rem, 5.6vw, 2.55rem)/1 var(--script);
  transition: padding-bottom 420ms var(--ease);
}
.story-signoff {
  margin: 1.25rem auto 0;
  max-width: 19em;
  font: clamp(1.65rem, 5vw, 2.3rem)/1.18 var(--script);
  color: var(--wine-deep);
}
@media (hover: hover) {
  .gallery a.is-hovered img { transform: scale(1.04); }
  .gallery a.is-hovered .album-caption { padding-bottom: .52em; }
}
.gallery a[href]:active img { filter: brightness(.92); }

/* Photo viewer */
.lightbox {
  width: min(50rem, calc(100% - 1.5rem));
  max-height: calc(100% - 1rem);
  padding: .55rem;
  border: 0;
  background: transparent;
  color: var(--white);
}
.lightbox[open] { animation: viewer-in 550ms var(--ease) both; }
.lightbox[open].is-closing { animation: viewer-out 320ms ease-in both; }
.lightbox::backdrop {
  background: radial-gradient(ellipse at 50% 60%, rgb(64 43 53 / .65), rgb(28 26 33 / .87));
  backdrop-filter: blur(9px) saturate(.72);
}
.lightbox[open]::backdrop { animation: backdrop-in 470ms ease both; }
.lightbox[open].is-closing::backdrop { animation: backdrop-out 320ms ease-in both; }
@keyframes viewer-in {
  from { transform: translateY(.55rem); }
  to { transform: none; }
}
@keyframes viewer-out {
  to {
    opacity: 0;
    transform: translateY(.35rem) scale(.98);
  }
}
@keyframes backdrop-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes backdrop-out {
  to { opacity: 0; }
}
body:has(.lightbox[open]) { overflow: hidden; }
.lightbox-panel {
  position: relative;
  text-align: center;
}
.lightbox figure { margin: 0; }
.lightbox-photo {
  --photo-height: min(69svh, calc(100svh - 10rem), 45rem);
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  height: var(--photo-height);
  touch-action: pan-y pinch-zoom;
}
.lightbox-frame {
  position: relative;
  width: min(100%, calc(var(--photo-height) * var(--photo-ratio, 1)));
  aspect-ratio: var(--photo-ratio, 1);
  overflow: clip;
  border-radius: clamp(.9rem, 2.3vw, 1.5rem);
  box-shadow: 0 18px 44px -20px rgb(17 13 16 / .8);
}
.lightbox-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lightbox-frame .lightbox-outgoing {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.lightbox-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgb(255 249 242 / .56);
  border-radius: inherit;
  pointer-events: none;
}
.lightbox-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem .85rem;
  margin: .75rem auto .6rem;
}
#gallery-caption { font: clamp(1.75rem, 5vw, 2.65rem)/1.08 var(--script); }
#gallery-counter {
  border-left: 1px solid rgb(244 224 213 / .42);
  padding-left: .85rem;
  color: #f0ded6;
  font-size: .78rem;
  white-space: nowrap;
}
.lightbox button { line-height: 1; }
.lightbox button > .press-face { transition: background-color 300ms, border-color 300ms, box-shadow 300ms, opacity 300ms, var(--press-transition); }
.lightbox button:focus-visible, .closing a:focus-visible { outline-color: var(--white); }
.lightbox-close {
  position: absolute;
  z-index: 3;
  top: .55rem;
  right: .55rem;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
}
.lightbox-close > .press-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid rgb(252 228 217 / .55);
  border-radius: 50%;
  background: rgb(46 34 42 / .86);
}
.lightbox-close > .press-face::before, .lightbox-close > .press-face::after {
  content: "";
  grid-area: 1 / 1;
  width: 1rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.lightbox-close > .press-face::after { transform: rotate(-45deg); }
.lightbox-close:focus-visible { outline-offset: 2px; }
.lightbox-close:is(:hover, :focus-visible) > .press-face { background: #6b4f5e; }
.lightbox-close:active > .press-face {
  background: #382633;
  box-shadow: inset 0 2px 6px rgb(16 10 14 / .52);
}
.lightbox-thumbs {
  display: inline-flex;
  gap: .42rem;
  max-width: 100%;
  padding: .38rem;
  border: 1px solid rgb(248 222 209 / .25);
  border-radius: 1rem;
  background: rgb(43 33 42 / .5);
}
.lightbox-thumbs button {
  position: relative;
  width: clamp(2.4rem, 10vw, 3.1rem);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: .62rem;
  background: transparent;
}
.lightbox-thumbs button > .press-face {
  display: block;
  width: 100%;
  height: 100%;
  padding: .13rem;
  border: 1px solid transparent;
  border-radius: inherit;
  background: transparent;
  opacity: .72;
}
.lightbox-thumbs button img {
  height: 100%;
  border-radius: .42rem;
  object-fit: cover;
}
.lightbox-thumbs button[aria-current="true"] > .press-face {
  border-color: #f3d7c6;
  opacity: 1;
  background: rgb(243 214 197 / .17);
}
.lightbox-thumbs button:is(:hover, :focus-visible) > .press-face {
  opacity: 1;
  border-color: #f3d7c6;
}
.lightbox-thumbs button:active > .press-face {
  background: rgb(243 214 197 / .29);
  box-shadow: inset 0 0 0 2px rgb(243 214 197 / .2);
}

/* Guest form */
.rsvp .lead { margin-top: .65rem; }
.contact {
  margin-top: .8rem;
  color: var(--muted);
}
.contact a {
  display: inline-block;
  margin-top: .35rem;
  color: var(--wine-deep);
  font-weight: 650;
  text-underline-offset: .25em;
  text-decoration-color: #a37d86;
  transition: text-decoration-color 320ms, color 320ms;
}
.contact .press-face {
  display: inline-block;
  text-decoration: inherit;
  transition: var(--press-transition);
}
.contact a:is(:hover, :focus-visible) { text-decoration-color: currentColor; }
.contact a:active { color: #995965; }
.rsvp-form {
  display: grid;
  margin: 1.55rem auto 0;
  padding: clamp(.85rem, 4.5vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background: linear-gradient(150deg, #f7efe8, #f1e9e4);
  box-shadow: 0 .85rem 2rem -.9rem rgb(86 56 73 / .19);
  text-align: left;
}
.rsvp-form > :not(:first-child, .form-disclosure) { margin-top: 1.08rem; }
.rsvp-form > .form-disclosure > .disclosure-window { padding-inline: 1px; }
#companions > .disclosure-window > .rsvp-panel { margin-top: 1.08rem; }
.rsvp-form > .button { justify-self: start; }
.rsvp-form fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.rsvp-form legend, .field {
  font-size: .95rem;
  font-weight: 650;
}
.field {
  display: block;
  transition: color 330ms;
}
.field:focus-within { color: var(--wine-deep); }
.field small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 400;
}
.field input, textarea {
  display: block;
  width: 100%;
  min-height: 2.95rem;
  margin-top: .4rem;
  padding: .6rem .8rem;
  border: 1px solid #cfbcb7;
  border-radius: .8rem;
  background: #fffcf9;
  color: var(--ink);
  caret-color: var(--wine);
  font-size: 1rem;
  font-weight: 400;
  transition: border-color 330ms, box-shadow 380ms var(--ease), background-color 330ms;
}
.field input::placeholder, textarea::placeholder {
  color: #765e66;
  opacity: 1;
  transition: opacity 330ms;
}
.field :is(input, textarea):focus::placeholder { opacity: .64; }
.field input:focus, textarea:focus {
  outline: none;
  border-color: var(--wine);
  background: #fffdfa;
  box-shadow: 0 0 0 3px rgb(100 67 83 / .13);
}
.field.is-editing :is(input, textarea):focus {
  background: #fffcf9;
  box-shadow: inset 0 -2px 0 #cdaab8, 0 0 0 3px rgb(100 67 83 / .19);
}
textarea { resize: vertical; }
.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  margin-top: .4rem;
}
.choices label {
  position: relative;
  cursor: pointer;
}
.choices input {
  position: absolute;
  opacity: 0;
}
.choices span {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 3.15rem;
  padding: .5rem .25rem;
  border: 1px solid #cfbcb7;
  border-radius: .8rem;
  background: #fffcf9;
  color: var(--wine-deep);
  font-size: clamp(.77rem, 2.6vw, .98rem);
  text-align: center;
  line-height: 1.15;
  transition: background-color 300ms, border-color 300ms, box-shadow 300ms, var(--press-transition);
}
.choices label:hover span { border-color: var(--wine); }
.choices input:checked + span {
  border-color: var(--wine);
  box-shadow: 0 .35rem .7rem -.45rem #7c5260;
  background: #eadbe0;
}
.choices label:active span {
  background: #e5d1d9;
  box-shadow: inset 0 1px 5px rgb(78 50 64 / .17);
}
.choices span::after {
  content: "✓";
  position: absolute;
  display: grid;
  place-items: center;
  top: -.38rem;
  right: -.2rem;
  width: 1.13rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--wine);
  color: var(--white);
  font: .68rem/1 system-ui, sans-serif;
  opacity: 0;
  transform: translateY(3px) scale(.55);
  transition: opacity 260ms, transform 440ms var(--ease);
}
.choices input:checked + span::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.choices input:focus-visible + span {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}
.rsvp-panel {
  padding: clamp(.62rem, 3vw, 1rem);
  border: 1px solid #ddcec9;
  border-radius: 1rem;
  background: rgb(255 251 246 / .52);
}
.form-disclosure {
  display: grid;
  grid-template-rows: 0fr;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 460ms var(--ease), opacity 330ms var(--ease), visibility 0s linear 460ms;
}
.form-disclosure.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 45ms, 0s;
}
.disclosure-window {
  display: flow-root;
  min-width: 0;
  min-height: 0;
  overflow: clip;
}
.switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .7rem;
  cursor: pointer;
  line-height: 1.35;
}
.switch-row strong {
  display: block;
  font-size: .98rem;
}
.switch-row small {
  display: block;
  margin-top: .26rem;
  color: var(--muted);
  font-size: .8rem;
}
.switch-row input {
  position: absolute;
  opacity: 0;
}
.switch-track {
  position: relative;
  width: 2.75rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #a0878b;
  transition: background-color 350ms, box-shadow 320ms, var(--press-transition);
}
.switch-row:is(:hover, :focus-within) .switch-track { box-shadow: 0 0 0 3px rgb(100 67 83 / .13); }
.switch-row:active .switch-track { box-shadow: inset 0 2px 5px rgb(45 25 35 / .32), 0 0 0 3px rgb(100 67 83 / .13); }
.switch-track::after {
  content: "";
  position: absolute;
  top: .2rem;
  left: .2rem;
  width: 1.15rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fffaf5;
  box-shadow: 0 2px 3px #4e32403d;
  transition: transform 420ms var(--ease);
}
.switch-row input:checked + .switch-track { background: var(--wine); }
.switch-row input:checked + .switch-track::after { transform: translateX(1.2rem); }
.switch-row input:focus-visible + .switch-track {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}
.rsvp-form #companion-fields {
  margin: .85rem 0 0;
  padding: 0 4px 4px;
}
#companion-list { display: grid; }
.companion-card {
  margin-bottom: .6rem;
  padding: .75rem;
  border: 1px solid #dfd2cd;
  border-radius: .75rem;
  background: rgb(255 253 250 / .62);
  transition: border-color 330ms, background-color 330ms;
}
.companion-card:has([data-child]:checked) {
  border-color: #c9aab8;
  background: #fcf5f5;
}
.companion-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .35rem;
  margin-bottom: .25rem;
}
.child-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .43rem;
  padding-block: .25rem;
  font-size: .86rem;
  cursor: pointer;
}
.child-choice input {
  position: absolute;
  opacity: 0;
}
.child-mark {
  display: grid;
  place-items: center;
  width: 1.15rem;
  aspect-ratio: 1;
  border: 1px solid #ac8d98;
  border-radius: .32rem;
  background: var(--white);
  color: var(--white);
  transition: background-color 300ms, border-color 300ms, box-shadow 300ms, var(--press-transition);
}
.child-mark::after {
  content: "";
  width: .31rem;
  height: .56rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg) scale(.55);
  transition: opacity 230ms, transform 360ms var(--ease);
}
.child-choice:hover .child-mark { border-color: var(--wine); }
.child-choice:active .child-mark { box-shadow: inset 0 1px 4px rgb(45 25 35 / .36); }
.child-choice input:checked + .child-mark {
  border-color: var(--wine);
  background: var(--wine);
}
.child-choice input:checked + .child-mark::after {
  opacity: 1;
  transform: translateY(-1px) rotate(45deg) scale(1);
}
.child-choice input:focus-visible + .child-mark {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}
.add-companion, .remove-companion {
  padding: 0;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--wine-deep);
}
:is(.add-companion, .remove-companion) > .press-face {
  display: block;
  padding: .28rem .42rem;
  border-radius: inherit;
  transition: background-color 280ms, box-shadow 280ms, var(--press-transition);
}
:is(.add-companion, .remove-companion):is(:hover, :focus-visible) > .press-face { background: #eedfe0; }
:is(.add-companion, .remove-companion):active > .press-face {
  background: #e6d2d8;
  box-shadow: inset 0 1px 4px rgb(78 50 64 / .15);
}
.add-companion {
  font-size: .93rem;
  font-weight: bold;
}
.companion-plus {
  display: inline-block;
  margin-right: .15rem;
  transition: transform 365ms var(--ease);
}
.add-companion:is(:hover, :focus-visible) .companion-plus { transform: rotate(90deg); }
.remove-companion {
  font-size: .81rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.notes-heading {
  margin-bottom: .4rem;
  color: var(--wine-deep);
  font: 1.85rem/1.05 var(--script);
}
.rsvp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.rsvp-actions .rsvp-submit { flex: 1 1 13rem; }
.rsvp-actions .button:disabled { opacity: .64; cursor: default; }
.rsvp-form .rsvp-wait:empty { margin: 0; }
.rsvp-wait {
  color: var(--wine-deep);
  font-size: .9rem;
}
.rsvp-submit > .press-face {
  justify-content: space-between;
  min-height: 3.1rem;
}
.submit-arrow { transition: transform 420ms var(--ease); }
.rsvp-submit:is(:hover, :focus-visible) .submit-arrow { transform: translateX(3px); }
#rsvp-status:empty { margin: 0; }
#rsvp-status:not(:empty) {
  margin-top: .65rem;
  padding: .55rem .72rem;
  border-radius: .65rem;
  background: #f0e4e7;
  color: var(--wine-deep);
  font-size: .9rem;
}
#rsvp-status.is-success {
  background: #e7ece3;
  color: #344738;
}

/* Closing section and countdown */
.closing {
  text-align: center;
  color: var(--white);
  margin-top: 1rem;
  background: linear-gradient(90deg, rgb(48 23 29 / .81), rgb(48 23 29 / .69)), #432832 url("../images/closing-background.webp") center 46% / cover no-repeat;
}
.closing p { margin-top: .85rem; }
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 32rem;
  margin: 1.7rem auto 0;
}
.countdown div {
  display: grid;
  gap: .35rem;
  padding: .45rem .22rem;
  border-inline-start: 1px solid rgb(255 251 246 / .35);
}
.countdown div:first-child { border: 0; }
.countdown dd {
  grid-row: 1;
  margin: 0;
  font: clamp(1.45rem, 4.8vw, 3rem)/1.15 var(--serif);
  font-variant-numeric: tabular-nums lining-nums;
}
.countdown dt { font-size: .72rem; }

/* Section reveal animations */
@keyframes entrance {
  from {
    opacity: 0;
    transform: translate(var(--shift-x, 0), 22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-names span, .hero-intro, .cover-wrap { animation-delay: var(--delay, 0ms); }
[data-reveal].is-revealed { animation: entrance 1.18s var(--delay, 0ms) var(--ease) both; }
.is-revealed:is(.album, .venue-actions, .rsvp > *) { animation-name: reveal-opacity; }
@keyframes reveal-opacity {
  from { opacity: 0; }
  to { opacity: 1; }
}
[data-reveal].awaiting-reveal:not(:focus-within) { opacity: 0; }

/* Press feedback */
:where(.press-face, .album-photo, .choices label > span, .switch-track, .child-mark) { scale: 1; }
@media (prefers-reduced-motion: no-preference) {
  /* A tap can trigger native :active after pointerup. Use the touch state instead. */
  :where(html:not(.touch-input) :active, .is-touch-pressed)
    > :is(.press-face, .album-photo, .choices label > span, .switch-track, .child-mark) { scale: .955; }
}

/* Small screens */
@media (max-width: 540px) {
  .hero::before {
    inset: .45rem;
    border-color: rgb(250 226 205 / .17);
    box-shadow: none;
  }
  .hero {
    justify-content: center;
    padding-block: 1.75rem 2.5rem;
  }
  .hero-intro { max-width: 24rem; }
  .letter { border-radius: 1.2rem; }
  .timeline li { padding-right: calc(50% + 1.8rem); }
  .timeline li:nth-child(even) { padding-left: calc(50% + 1.8rem); }
}

@media (max-height: 540px) {
  .hero {
    justify-content: center;
    padding-block: 1.5rem;
  }
  .hero-names { font-size: clamp(2.65rem, 10svh, 3.15rem); }
  .hero-intro { margin-block: .65rem; }
  .cover-wrap { width: clamp(7rem, 21svh, 9.5rem); }
}

@media (max-height: 440px) and (min-width: 520px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(12rem, 19rem) auto;
    grid-template-rows: auto auto;
    place-content: center;
    gap: .5rem 1.5rem;
  }
  .hero-names {
    justify-self: center;
    align-self: end;
  }
  .hero-intro {
    margin: 0;
    align-self: start;
    grid-row: 2;
  }
  .cover-wrap {
    grid-area: 1 / 2 / 3 / 3;
    align-self: center;
    width: clamp(7rem, 40svh, 10rem);
  }
}

@media (max-height: 440px) and (max-width: 519px) {
  .hero { padding-block: .75rem; }
  .hero-names { font-size: clamp(1.85rem, 9svh, 2.65rem); }
  .hero-intro { font-size: .85rem; }
  .cover-wrap { width: clamp(5.5rem, 29svh, 8rem); }
  .cover-caption { letter-spacing: .04em; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal].awaiting-reveal:not(:focus-within), .has-agenda-motion .timeline li {
    opacity: 1;
    transform: none;
  }
  .gallery a.is-hovered img,
  .map-link:is(:hover, :focus-visible) .map-arrow,
  .footer-top:is(:hover, :focus-visible) .footer-arrow,
  .rsvp-submit:is(:hover, :focus-visible) .submit-arrow,
  .add-companion:is(:hover, :focus-visible) .companion-plus { transform: none; }
}

/* Print */
@media print {
  html.intro-locked { overflow: visible; }
  .intro-locked .letter { display: block; }
  [data-reveal].awaiting-reveal:not(:focus-within), .has-agenda-motion .timeline li {
    opacity: 1;
    transform: none;
  }
  .has-agenda-motion .agenda-motion { visibility: hidden; }
  .has-agenda-motion .agenda-ornament { visibility: visible; }
}
