:root {
  --paper: #f3efbd;
  --ink: #552b2d;
  --panel: #fff8f8;
  --panel-border: rgba(85, 43, 45, 0.14);
  --shadow: rgba(85, 43, 45, 0.12);
  --accent: #7e6c9b;
  --green: #798641;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='18' viewBox='0 0 100 18'%3E%3Cpath fill='%237e6c9b' fill-opacity='0.01' d='M61.82 18c3.47-1.45 6.86-3.78 11.3-7.34C78 6.76 80.34 5.1 83.87 3.42 88.56 1.16 93.75 0 100 0v6.16C98.76 6.05 97.43 6 96 6c-9.59 0-14.23 2.23-23.13 9.34-1.28 1.03-2.39 1.9-3.4 2.66h-7.65zm-23.64 0H22.52c-1-.76-2.1-1.63-3.4-2.66C11.57 9.3 7.08 6.78 0 6.16V0c6.25 0 11.44 1.16 16.14 3.42 3.53 1.7 5.87 3.35 10.73 7.24 4.45 3.56 7.84 5.9 11.31 7.34zM61.82 0h7.66a39.57 39.57 0 0 1-7.34 4.58C57.44 6.84 52.25 8 46 8S34.56 6.84 29.86 4.58A39.57 39.57 0 0 1 22.52 0h15.66C41.65 1.44 45.21 2 50 2c4.8 0 8.35-.56 11.82-2z'%3E%3C/path%3E%3C/svg%3E");
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  padding-bottom: 56px;
}

.wedding_title_section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px 20px 10px;
  text-align: center;
}

.wedding_title_section h1 {
  margin: 0;
}

.wedding_calligraphy {
  display: block;
  width: min(420px, 86vw);
  height: auto;
}

.wedding_subtitle {
  max-width: 92vw;
  margin: 0;
  font-size: clamp(17px, 4vw, 28px);
  font-weight: 250;
  line-height: 1.3;
}

.navigation_sentinel {
  height: 1px;
}

.wedding_navigation {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 8px auto 0;
  padding: 8px 12px;
  background: transparent;
  font-size: 18px;
  font-style: italic;
  font-weight: 200;
  transition:
    background-color 180ms ease,
    backdrop-filter 180ms ease;
}

.wedding_navigation.is-stuck {
  background: rgba(243, 239, 189, 0.88);
  backdrop-filter: blur(8px);
}

.wedding_navigation_item {
  min-height: 44px;
  padding: 11px 12px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-weight: 300;
}

.wedding_navigation_item:hover,
.wedding_navigation_item:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.wedding_photo_section,
.wedding_itinerary_section,
.wedding_registry_section,
.wedding_rsvp_section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 22px 20px 0;
}

.clothing_gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 660px;
}

.color_gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 660px;
}

.clothing_gallery + .color_gallery {
  margin-top: 10px;
}

.wedding_photo {
  display: block;
  width: min(400px, 88vw);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 44px var(--shadow);
}

.wedding_photo_gallery_item {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  justify-self: center;
  border-radius: 8px;
  box-shadow: 0 18px 44px var(--shadow);
}

.wedding_titles {
  margin: 18px 0 14px;
  font-size: 22px;
  font-weight: 300;
}

.section_container {
  width: min(800px, 100%);
  padding: 24px;
  background-color: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 4px 14px var(--shadow);
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.section_text {
  margin-top: 4px;
  text-align: center;
}

.detail_list {
  margin: 0;
  padding-left: 1.25rem;
}

.detail_list li {
  margin: 8px 0;
}

.detail_list ul {
  margin-top: 8px;
  padding-left: 1.15rem;
}

.list_heading {
  margin-bottom: 4px;
  font-weight: 600;
}

.section_text + .list_heading,
address + .list_heading {
  margin-top: 28px;
}

.color_gallery + .list_heading {
  margin-top: 36px;
}

address {
  width: fit-content;
  margin: 8px 0;
  padding: 12px 14px;
  background: rgba(126, 108, 155, 0.08);
  border-left: 3px solid var(--accent);
  font-style: normal;
  line-height: 1.5;
}

.registry_grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: start;
}

.registry_grid p {
  margin-top: 0;
}

.venmo_card {
  margin: 0;
  text-align: center;
}

.venmo_card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

.venmo_card figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink);
}

.rsvp_container {
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
}

.rsvp_container iframe {
  width: 100%;
  min-height: 640px;
  border: 0;
}

.rsvp_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid rgba(85, 43, 45, 0.18);
  border-radius: 4px;
  background: var(--ink);
  color: var(--panel);
  box-shadow: 0 4px 12px rgba(85, 43, 45, 0.12);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.rsvp_button:hover,
.rsvp_button:focus-visible {
  background: var(--green);
  border-color: rgba(85, 43, 45, 0.26);
  box-shadow: 0 6px 14px rgba(85, 43, 45, 0.16);
  color: var(--panel);
}

.rsvp_button:focus-visible {
  outline: 3px solid rgba(126, 108, 155, 0.32);
  outline-offset: 3px;
}

.rsvp_button:active {
  box-shadow: 0 2px 8px rgba(85, 43, 45, 0.12);
  transform: translateY(1px);
}

@media (max-width: 700px) {
  .wedding_title_section {
    padding-top: 22px;
  }

  .wedding_navigation {
    font-size: 16px;
  }

  .section_container {
    padding: 18px;
  }

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

  .venmo_card {
    width: min(220px, 100%);
    justify-self: center;
  }

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

@media (max-width: 360px) {
  .clothing_gallery,
  .color_gallery {
    grid-template-columns: 1fr;
  }
}

.restaurant_address {
  display: block;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.wedding_photo_section {
  position: relative;
}

.carousel {
  display: grid;
  position: relative;
  width: min(400px, 88vw);
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.carousel .wedding_photo {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateX(18px);
  transition:
    opacity 450ms ease,
    transform 450ms ease;
}

.carousel .wedding_photo.active {
  opacity: 1;
  transform: translateX(0);
}

.carousel.direction-prev .wedding_photo {
  transform: translateX(-18px);
}

.carousel.direction-prev .wedding_photo.active {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .carousel .wedding_photo {
    transition: none;
  }
}

.carousel_button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(85, 43, 45, 0.55);
  color: var(--panel);
  cursor: pointer;
}

.carousel_button::before {
  content: "";
  width: 12px;
  height: 12px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.carousel_button--prev::before {
  transform: translateX(2px) rotate(-135deg);
}

.carousel_button--next::before {
  transform: translateX(-2px) rotate(45deg);
}

.carousel_button:hover,
.carousel_button:focus-visible {
  background: rgba(85, 43, 45, 0.75);
}

.carousel_button--prev {
  left: max(8px, calc(50% - min(200px, 44vw) - 60px));
}

.carousel_button--next {
  right: max(8px, calc(50% - min(200px, 44vw) - 60px));
}
