@font-face {
  font-family: "Pushkin";
  src: url("./assets/pushkin.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ekaterina Velikaya Two";
  src: url("./assets/ekaterina-velikaya-two.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #f7f0e4;
  --ivory-soft: #fffaf0;
  --burgundy: #651f2b;
  --burgundy-dark: #321016;
  --green: #173f31;
  --green-soft: #2f5a46;
  --gold: #c6a76a;
  --ink: #281c19;
  --muted: #77685f;
  --line: rgba(40, 28, 25, 0.16);
  --shadow: 0 24px 70px rgba(31, 16, 12, 0.2);
  --lace-width: min(118vw, 2172px);
  --lace-height: min(9.67vw, 178px);
}

* {
  box-sizing: border-box;
}

html {
  background-color: rgb(50, 16, 22);
  background-image: linear-gradient(180deg, rgb(50, 16, 22) 0%, var(--ivory) 100%);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: transparent;
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.8), rgba(247, 240, 228, 0.9)),
    url("./assets/botanical-second-bg.png") center / cover no-repeat;
  opacity: 0.72;
}

body.intro-active {
  overflow: hidden;
}

a {
  color: inherit;
}

.envelope-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--green);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 250, 240, 0.98), rgba(247, 240, 228, 0.9) 24rem, transparent 54rem),
    radial-gradient(circle at 12% 22%, rgba(198, 167, 106, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 76%, rgba(23, 63, 49, 0.12), transparent 30rem),
    linear-gradient(135deg, #fffaf0, #f0e4d1 48%, #fff8ec);
  transition:
    opacity 720ms ease,
    visibility 720ms ease;
}

.envelope-intro.is-open {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0ms;
}

.envelope-intro__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 250, 240, 0.72), rgba(255, 250, 240, 0.72)),
    url("./assets/envelope-botanical-pattern.png"),
    linear-gradient(rgba(101, 31, 43, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 63, 49, 0.03) 1px, transparent 1px);
  background-position:
    center,
    center,
    center,
    center;
  background-size:
    auto,
    min(88vw, 1180px) auto,
    38px 38px,
    38px 38px;
  opacity: 0.82;
  mask-image: radial-gradient(circle at 50% 42%, #000 0 38rem, transparent 62rem);
}

.envelope-intro__content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(18px, 2.2vh, 30px);
  width: min(96vw, 1420px);
}

.envelope-intro__eyebrow {
  margin: 0;
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.envelope {
  position: relative;
  --envelope-open-scale: 1.34;
  width: min(92vw, 1360px);
  height: min(66vh, 720px);
  min-height: 430px;
  perspective: 1200px;
  transform-style: preserve-3d;
  opacity: 1;
  overflow: visible;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition:
    opacity 620ms ease,
    transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope__body,
.envelope__side,
.envelope__bottom,
.envelope__flap,
.envelope__letter {
  position: absolute;
  inset: 0;
}

.envelope__letter {
  z-index: 3;
  inset: 10% 18% 28%;
  border: 1px solid rgba(198, 167, 106, 0.26);
  border-radius: 5px;
  background: var(--burgundy-dark);
  box-shadow:
    0 18px 42px rgba(50, 16, 22, 0.18),
    0 2px 0 rgba(255, 250, 240, 0.32);
  overflow: hidden;
  pointer-events: none;
}

.envelope__letter img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.94) contrast(1.03) brightness(0.9);
}

.envelope__body {
  z-index: 2;
  border: 1px solid rgba(198, 167, 106, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 250, 240, 0.48), rgba(255, 250, 240, 0.48)),
    url("./assets/envelope-botanical-pattern.png") center / cover no-repeat,
    linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(239, 226, 207, 0.98)),
    linear-gradient(141deg, transparent 49.8%, rgba(198, 167, 106, 0.24) 50%, transparent 50.45%),
    linear-gradient(39deg, transparent 49.8%, rgba(101, 31, 43, 0.1) 50%, transparent 50.45%),
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.58), transparent 34rem);
  box-shadow:
    0 24px 54px rgba(50, 16, 22, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -26px 54px rgba(101, 31, 43, 0.06);
  overflow: hidden;
}

.envelope__side {
  z-index: 4;
  pointer-events: none;
}

.envelope__bottom {
  z-index: 4;
  pointer-events: none;
  clip-path: polygon(0 100%, 50% 50%, 100% 100%);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.62), rgba(232, 218, 196, 0.78)),
    url("./assets/envelope-botanical-pattern.png") 50% 77% / 122% auto no-repeat;
  background-blend-mode: normal, multiply;
  box-shadow: inset 0 -1px 0 rgba(198, 167, 106, 0.18);
}

.envelope__side--left {
  clip-path: polygon(0 0, 52% 50%, 0 100%);
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.6), rgba(225, 210, 185, 0.72)),
    url("./assets/envelope-botanical-pattern.png") 20% 55% / 136% auto no-repeat;
  background-blend-mode: normal, multiply;
}

.envelope__side--right {
  clip-path: polygon(100% 0, 48% 50%, 100% 100%);
  background:
    linear-gradient(270deg, rgba(255, 250, 240, 0.62), rgba(47, 90, 70, 0.1)),
    url("./assets/envelope-botanical-pattern.png") 82% 52% / 136% auto no-repeat;
  background-blend-mode: normal, multiply;
}

.envelope__flap {
  z-index: 5;
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(rgba(255, 250, 240, 0.3), rgba(232, 218, 196, 0.56)),
    url("./assets/envelope-botanical-pattern.png") center 36% / 118% auto no-repeat,
    linear-gradient(180deg, rgba(255, 250, 240, 0.99), rgba(232, 218, 196, 0.96)),
    linear-gradient(135deg, transparent 49.6%, rgba(198, 167, 106, 0.34) 50%, transparent 50.5%);
  background-blend-mode: normal, multiply, normal, normal;
  clip-path: polygon(0 0, 100% 0, 50% 63%);
  transform-origin: 50% 0;
  backface-visibility: visible;
  will-change: transform;
  transform: translateZ(2px) rotateX(0deg);
  transition: transform 620ms cubic-bezier(0.2, 0.84, 0.18, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.envelope__seal {
  position: absolute;
  top: 52%;
  left: 50%;
  z-index: 20;
  display: grid;
  width: clamp(116px, 11.8vw, 172px);
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: url("./assets/wax-seal-burgundy.png") center / contain no-repeat;
  box-shadow: none;
  transform: translate3d(-50%, -50%, 80px);
  cursor: pointer;
  padding: 0;
  isolation: isolate;
  transition:
    filter 180ms ease,
    opacity 90ms ease,
    transform 90ms ease;
}

.envelope__seal:hover {
  filter: brightness(1.06);
}

.envelope__seal img {
  position: relative;
  z-index: 1;
  width: 58%;
  opacity: 0.94;
  filter:
    brightness(1.28)
    sepia(0.34)
    saturate(1.1)
    drop-shadow(0 1px 1px rgba(37, 8, 15, 0.62));
}

.envelope-intro__button {
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid rgba(198, 167, 106, 0.46);
  border-radius: 999px;
  color: var(--burgundy);
  background: var(--gold);
  box-shadow:
    0 14px 34px rgba(50, 16, 22, 0.16),
    inset 0 1px 0 rgba(255, 250, 240, 0.14);
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.envelope-intro__button:hover {
  box-shadow: 0 18px 42px rgba(50, 16, 22, 0.22);
  transform: translateY(-2px);
}

.envelope-intro.is-opening .envelope__flap {
  z-index: 7;
  transform: translateZ(2px) rotateX(180deg);
}

.envelope-intro.is-opening .envelope__seal {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 80px) scale(0.96);
}

.envelope-intro.is-open .envelope {
  opacity: 0;
  transform: scale(var(--envelope-open-scale));
}

.topbar {
  --topbar-peek: 30px;
  position: fixed;
  top: -1px;
  right: clamp(24px, 3.4vw, 52px);
  z-index: 60;
  display: flex;
  width: 258px;
  min-height: 120px;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 12px 20px 18px;
  color: var(--ivory-soft);
  background:
    linear-gradient(90deg, rgba(18, 8, 5, 0.9), rgba(18, 8, 5, 0.18) 52%, rgba(18, 8, 5, 0.88)),
    url("./assets/nav-bookshelf.png") 78% 56% / 520px 120px no-repeat,
    #2d140d;
  border: 1px solid rgba(198, 167, 106, 0.36);
  border-radius: 0 0 8px 8px;
  box-shadow:
    0 18px 60px rgba(12, 19, 15, 0.3),
    inset 0 1px 0 rgba(255, 250, 240, 0.16),
    inset 0 -8px 0 rgba(39, 18, 12, 0.62);
  backdrop-filter: blur(18px);
  transform: translateY(0);
  transition:
    transform 520ms cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 240ms ease;
  will-change: transform;
}

.topbar.is-collapsed {
  transform: translateY(calc(-100% + var(--topbar-peek)));
}

.topbar:not(.is-collapsed) {
  box-shadow:
    0 22px 72px rgba(12, 19, 15, 0.42),
    inset 0 1px 0 rgba(255, 250, 240, 0.16),
    inset 0 -8px 0 rgba(39, 18, 12, 0.62);
}

.topbar::after {
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  z-index: 1;
  height: 12px;
  content: "";
  pointer-events: none;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.16), rgba(0, 0, 0, 0.22)),
    url("./assets/nav-bookshelf.png") 84% 92% / 520px 120px no-repeat,
    #2b130d;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 250, 240, 0.16);
}

.topbar__toggle {
  position: absolute;
  right: 50%;
  bottom: 4px;
  z-index: 4;
  display: grid;
  width: 28px;
  height: 18px;
  place-items: center;
  border: 0;
  color: rgba(224, 189, 111, 0.96);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition:
    color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
  transform: translateX(50%);
}

.topbar__toggle:hover {
  opacity: 0.86;
  color: rgba(255, 226, 164, 0.98);
  transform: translateX(50%) scaleY(1.04);
}

.topbar__toggle span {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  transform: translateY(-2px) rotate(90deg);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.topbar.is-collapsed .topbar__toggle span {
  transform: translateY(1px) rotate(-90deg);
}

.brand {
  display: none;
  width: 104px;
  height: 98px;
  position: relative;
  z-index: 3;
  place-items: center;
  align-self: end;
  text-decoration: none;
  transform: translateY(10px);
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.42));
}

nav {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: end;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 86px;
  perspective: 900px;
}

nav a {
  position: relative;
  display: inline-flex;
  width: 30px;
  min-height: 86px;
  align-items: center;
  justify-content: center;
  padding: 8px 5px 12px;
  border: 0;
  border-radius: 6px 6px 2px 2px;
  color: #fff2d3;
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.12), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.32)),
    url("./assets/nav-book-spines.png") var(--book-x, 0%) center / 400% 100% no-repeat,
    var(--book-color, var(--burgundy));
  box-shadow:
    0 8px 14px rgba(0, 0, 0, 0.24);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transform-origin: bottom center;
  transition:
    transform 220ms ease,
    filter 180ms ease,
    color 180ms ease;
}

nav a:nth-child(1) {
  --book-color: #642334;
  --book-x: 0%;
}

nav a:nth-child(2) {
  --book-color: #1d4b38;
  --book-x: 33.33%;
}

nav a:nth-child(3) {
  --book-color: #76302e;
  --book-x: 66.66%;
}

nav a:nth-child(4) {
  --book-color: #243f31;
  --book-x: 100%;
}

nav a:nth-child(5) {
  --book-color: #642334;
  --book-x: 0%;
}

nav a:nth-child(6) {
  --book-color: #1d4b38;
  --book-x: 33.33%;
}

nav a:hover {
  color: #fff9ea;
  filter: brightness(1.08);
  transform: translateY(-7px) rotateY(-14deg) rotate(-2deg);
}

.book-title {
  display: block;
  pointer-events: none;
}

.book-title--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 0.08em;
  text-shadow:
    0 1px 0 rgba(49, 24, 13, 0.9),
    0 0 10px rgba(198, 167, 106, 0.24);
}

.book-title--horizontal {
  display: none;
}

nav a.is-tilted {
  transform: translateY(-9px) rotateY(-20deg) rotate(-7deg);
  filter: brightness(1.12);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100svh;
  min-height: 640px;
  overflow: visible;
  grid-template-columns: minmax(420px, 0.5fr) minmax(480px, 0.5fr);
  gap: clamp(18px, 3.2vw, 54px);
  align-items: center;
  padding: 112px max(28px, calc((100vw - 1180px) / 2)) 132px;
  color: var(--ivory-soft);
  background:
    linear-gradient(90deg, rgba(50, 16, 22, 0.94), rgba(50, 16, 22, 0.68) 46%, rgba(23, 63, 49, 0.26)),
    linear-gradient(135deg, var(--burgundy-dark), var(--green));
}

.hero__art {
  position: absolute;
  inset: 0;
  opacity: 0.96;
}

.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.05);
}

.hero__art::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(50, 16, 22, 0.9), rgba(50, 16, 22, 0.52) 42%, rgba(23, 63, 49, 0.38)),
    radial-gradient(circle at 74% 46%, transparent 0 16rem, rgba(0, 0, 0, 0.18) 34rem);
}

.hero__monogram {
  position: absolute;
  top: clamp(20px, 3.4vw, 42px);
  left: 50%;
  z-index: 12;
  width: min(25vw, 190px);
  height: auto;
  pointer-events: none;
  opacity: 0.9;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 12px rgba(198, 167, 106, 0.12));
}

.hero__content {
  position: relative;
  z-index: 5;
  max-width: 760px;
  align-self: center;
  justify-self: start;
  margin-top: clamp(-28px, -2.6vh, -12px);
  transform: translateX(clamp(-72px, -4.2vw, -28px));
}

.hero__portrait {
  position: relative;
  z-index: 4;
  display: grid;
  width: min(44vw, 650px);
  min-width: 450px;
  min-height: min(72vh, 650px);
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: clamp(12px, 2vw, 18px);
  justify-self: center;
  margin: 0;
  cursor: pointer;
  animation: portrait-rise 900ms ease-out both;
  transform: translateX(clamp(86px, 8.2vw, 142px)) translateY(-20px) scale(1.04);
}

.hero__portrait:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 8px;
}

.hero__portrait::before {
  position: absolute;
  inset: 9% 4% 5%;
  z-index: -1;
  content: "";
  border: 1px solid rgba(198, 167, 106, 0.34);
  border-radius: 999px 999px 8px 8px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.2), rgba(255, 250, 240, 0.02)),
    linear-gradient(90deg, rgba(101, 31, 43, 0.34), rgba(47, 90, 70, 0.38));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.36);
}

.hero__portrait::after {
  display: none;
  content: none;
}

.portrait-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(198, 167, 106, 0.62);
  border-radius: 999px 999px 8px 8px;
  background:
    linear-gradient(135deg, rgba(101, 31, 43, 0.2), transparent 34%),
    linear-gradient(315deg, rgba(23, 63, 49, 0.18), transparent 36%),
    linear-gradient(180deg, #fff7e8, #e8d9bd);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.34),
    inset 0 0 0 5px rgba(255, 250, 240, 0.28),
    inset 0 0 0 6px rgba(198, 167, 106, 0.46),
    inset 0 0 0 1px rgba(255, 250, 240, 0.5);
  transition:
    transform 900ms cubic-bezier(0.2, 0.9, 0.2, 1),
    filter 760ms ease,
    box-shadow 760ms ease;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.portrait-card::after {
  position: absolute;
  inset: 8px;
  z-index: 3;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 58%, rgba(50, 16, 22, 0.22)),
    radial-gradient(circle at 50% 12%, rgba(255, 250, 240, 0.16), transparent 18rem);
  mix-blend-mode: multiply;
}

.portrait-card img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px 999px 6px 6px;
  filter: sepia(0.1) saturate(0.84) contrast(1.04) brightness(0.96);
  transition:
    transform 900ms cubic-bezier(0.2, 0.9, 0.2, 1);
  backface-visibility: hidden;
}

.portrait-card--groom {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 88%;
  align-self: center;
  justify-self: start;
  transform: translateY(-14px) rotate(-3deg);
}

.portrait-card--groom img {
  object-position: 50% 50%;
  transform: scale(1.24);
}

.portrait-card--bride {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 88%;
  align-self: center;
  justify-self: end;
  transform: translateY(18px) rotate(3deg);
}

.portrait-card--bride img {
  object-position: 52% 42%;
}

.hero__portrait.is-framed .portrait-card {
  filter: saturate(1.02);
  box-shadow:
    0 30px 72px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(198, 167, 106, 0.2),
    inset 0 0 0 5px rgba(255, 250, 240, 0.32),
    inset 0 0 0 6px rgba(198, 167, 106, 0.56),
    inset 0 0 0 1px rgba(255, 250, 240, 0.62);
}

.hero__portrait.is-framed .portrait-card--groom {
  transform: translateY(0) rotate(-1.2deg);
}

.hero__portrait.is-framed .portrait-card--bride {
  transform: translateY(0) rotate(1.2deg);
}

@keyframes portrait-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.origami-field {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.origami {
  position: absolute;
  display: block;
  width: var(--size, 96px);
  height: var(--size, 96px);
  opacity: var(--alpha, 0.64);
  filter: drop-shadow(0 16px 18px rgba(23, 12, 10, 0.22));
  transform: rotate(var(--turn, -8deg));
  animation:
    paper-float var(--float, 9s) ease-in-out infinite,
    paper-glint 4.8s ease-in-out infinite;
}

.origami::before,
.origami::after {
  position: absolute;
  content: "";
}

.origami--burgundy {
  --paper-a: #7a2334;
  --paper-b: #45111e;
  --crease: rgba(255, 250, 240, 0.16);
}

.origami--green {
  --paper-a: #2f654e;
  --paper-b: #143428;
  --crease: rgba(255, 250, 240, 0.18);
}

.origami--ivory {
  --paper-a: #fff4df;
  --paper-b: #d8c28b;
  --crease: rgba(50, 16, 22, 0.16);
}

.origami--bird {
  clip-path: polygon(6% 50%, 49% 18%, 43% 46%, 94% 36%, 58% 60%, 68% 86%, 44% 67%, 24% 80%, 34% 58%);
  background:
    linear-gradient(142deg, transparent 48%, var(--crease) 49% 51%, transparent 52%),
    linear-gradient(32deg, var(--paper-a), var(--paper-b));
}

.origami--bird::before {
  inset: 35% 22% 34% 36%;
  background: rgba(255, 250, 240, 0.16);
  clip-path: polygon(0 100%, 44% 0, 100% 74%);
}

.origami--crane {
  clip-path: polygon(2% 56%, 36% 22%, 50% 44%, 68% 12%, 98% 47%, 65% 48%, 76% 88%, 50% 64%, 22% 90%, 33% 61%);
  background:
    linear-gradient(118deg, transparent 46%, var(--crease) 47% 49%, transparent 50%),
    linear-gradient(52deg, var(--paper-b), var(--paper-a) 52%, var(--paper-b));
}

.origami--crane::after {
  inset: 42% 40% 22% 13%;
  background: rgba(0, 0, 0, 0.12);
  clip-path: polygon(0 18%, 100% 0, 72% 100%);
}

.origami--reference-crane {
  overflow: visible;
  background: none;
  clip-path: none;
}

.origami--reference-crane::before,
.origami--reference-crane::after {
  display: none;
}

.reference-crane-svg {
  position: absolute;
  top: -118%;
  left: -78%;
  width: 225%;
  height: auto;
  overflow: visible;
  transform: rotate(-5deg);
  filter: drop-shadow(0 14px 18px rgba(23, 12, 10, 0.18));
}

.crane-pair {
  transform-box: fill-box;
  transform-origin: center;
}

.crane-pair--left {
  transform: translate(250px, 40px) scale(-0.3, 0.3);
}

.crane-pair--right {
  transform: translate(508px, 54px) scale(0.3);
}

.crane-pair--left .crane-shape--bright {
  fill: rgba(255, 244, 223, 0.84);
}

.crane-pair--left .crane-shape--light {
  fill: rgba(224, 202, 157, 0.78);
}

.crane-pair--left .crane-shape--paper {
  fill: rgba(188, 151, 86, 0.7);
}

.crane-pair--left .crane-shape--mid {
  fill: rgba(151, 111, 58, 0.68);
}

.crane-pair--left .crane-shape--deep {
  fill: rgba(102, 72, 38, 0.62);
}

.crane-pair--right .crane-shape--bright {
  fill: rgba(255, 250, 240, 0.88);
}

.crane-pair--right .crane-shape--light {
  fill: rgba(235, 224, 198, 0.82);
}

.crane-pair--right .crane-shape--paper {
  fill: rgba(210, 184, 128, 0.7);
}

.crane-pair--right .crane-shape--mid {
  fill: rgba(174, 137, 76, 0.68);
}

.crane-pair--right .crane-shape--deep {
  fill: rgba(118, 84, 45, 0.62);
}

.crane-shape {
  stroke: rgba(255, 250, 240, 0.55);
  stroke-linejoin: round;
  stroke-width: 2;
}

.crane-shape--bright {
  fill: rgba(255, 244, 223, 0.88);
}

.crane-shape--light {
  fill: rgba(232, 214, 178, 0.82);
}

.crane-shape--paper {
  fill: rgba(198, 167, 106, 0.72);
}

.crane-shape--mid {
  fill: rgba(171, 135, 75, 0.72);
}

.crane-shape--deep {
  fill: rgba(126, 93, 48, 0.68);
}

.origami--leaf {
  clip-path: polygon(50% 0, 94% 34%, 74% 88%, 50% 100%, 26% 88%, 6% 34%);
  background:
    linear-gradient(90deg, transparent 48%, var(--crease) 49% 51%, transparent 52%),
    linear-gradient(150deg, var(--paper-a), var(--paper-b));
}

.origami--leaf::before {
  inset: 18% 16%;
  border-left: 1px solid var(--crease);
  border-bottom: 1px solid var(--crease);
  transform: skewY(-24deg);
}

.origami-field--hero .origami:nth-child(1) {
  --size: clamp(74px, 12vw, 154px);
  --alpha: 0.55;
  --turn: -15deg;
  --float: 10s;
  top: 24%;
  right: 13%;
}

.origami-field--hero .origami:nth-child(2) {
  --size: clamp(88px, 15vw, 196px);
  --alpha: 0.44;
  --turn: 18deg;
  --float: 12s;
  right: 5%;
  bottom: 20%;
  animation-delay: -2.2s;
}

.origami-field--hero .origami:nth-child(3) {
  --size: clamp(78px, 9.4vw, 146px);
  --alpha: 0.44;
  --turn: -7deg;
  --float: 9.5s;
  top: 52.5%;
  left: -5.5%;
  animation-delay: -4s;
}

.details,
.rsvp {
  position: relative;
}

.origami-field--details,
.origami-field--rsvp {
  inset: -34px 0;
  z-index: -1;
}

.origami-field--details .origami:nth-child(1) {
  --size: 82px;
  --alpha: 0.22;
  --turn: -24deg;
  top: 32px;
  right: 6%;
}

.origami-field--details .origami:nth-child(2) {
  --size: 64px;
  --alpha: 0.2;
  --turn: 17deg;
  bottom: 20px;
  left: 2%;
  animation-delay: -3s;
}

.origami-field--rsvp .origami:nth-child(1) {
  --size: 90px;
  --alpha: 0.24;
  --turn: 15deg;
  top: 22px;
  left: 36%;
}

.origami-field--rsvp .origami:nth-child(2) {
  --size: 58px;
  --alpha: 0.22;
  --turn: -14deg;
  right: 2%;
  bottom: 30px;
  animation-delay: -2.5s;
}

@keyframes paper-float {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  50% {
    translate: 0 -18px;
    rotate: 3deg;
  }
}

@keyframes paper-glint {
  0%,
  100% {
    filter: drop-shadow(0 16px 18px rgba(23, 12, 10, 0.22)) brightness(1);
  }
  50% {
    filter: drop-shadow(0 18px 22px rgba(23, 12, 10, 0.27)) brightness(1.08);
  }
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.96;
}

.hero__names {
  position: relative;
  z-index: 6;
  display: grid;
  width: min(900px, 58vw);
  max-width: 100%;
  margin: 0;
  padding: clamp(34px, 4.3vw, 68px) 0 clamp(118px, 10.8vw, 184px);
  color: var(--gold);
  font-family: "Ekaterina Velikaya Two", "Pushkin", "Marck Script", "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  line-height: 0.78;
  font-size: clamp(6.7rem, 11.8vw, 11.5rem);
  letter-spacing: 0;
  pointer-events: none;
  overflow: visible;
  text-shadow:
    0 4px 18px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(198, 167, 106, 0.22);
}

.hero__name-line,
.hero__name-and {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
}

.hero__name-line--anna {
  transform: translateX(clamp(-70px, -4.2vw, -26px));
}

.hero__name-and {
  margin: clamp(-8px, -0.5vw, -2px) 0 clamp(-10px, -0.8vw, -4px);
  padding-left: clamp(76px, 9.4vw, 154px);
  font-size: 0.55em;
  line-height: 0.84;
}

.hero__name-line--mark {
  transform: translateX(clamp(128px, 12.8vw, 218px));
}

.hero__copy {
  max-width: 560px;
  margin: 26px 0 0;
  color: rgba(255, 250, 240, 0.84);
  font-size: clamp(1.04rem, 2.2vw, 1.28rem);
}

.hero__actions {
  position: relative;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 2.8vw, 46px);
  padding-left: clamp(96px, 10vw, 176px);
}

.lace-divider {
  position: relative;
  z-index: 20;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.lace-divider img {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--lace-width);
  max-width: none;
  height: var(--lace-height);
  opacity: 0.94;
  object-fit: fill;
  transform: translate(-50%, -50%);
  filter:
    drop-shadow(0 8px 10px rgba(29, 16, 12, 0.13))
    drop-shadow(0 0 8px rgba(255, 250, 240, 0.28));
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--burgundy-dark);
  background: var(--gold);
}

.button--ghost {
  color: var(--ivory-soft);
  border-color: rgba(255, 250, 240, 0.42);
  background: rgba(255, 250, 240, 0.08);
}

.details,
.venue,
.timeline,
.rsvp {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.library-story {
  position: relative;
  z-index: 7;
  min-height: clamp(620px, 72vw, 860px);
  margin-top: -1px;
  overflow: hidden;
  color: var(--ivory-soft);
  background: #160d09;
}

.library-story::before,
.library-story::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
}

.library-story::before {
  background:
    linear-gradient(180deg, rgba(255, 247, 231, 0.18), rgba(255, 247, 231, 0) 22%, rgba(250, 241, 224, 0.16) 100%),
    linear-gradient(90deg, rgba(65, 32, 22, 0.2), rgba(65, 32, 22, 0) 35%, rgba(65, 32, 22, 0) 65%, rgba(35, 72, 55, 0.18)),
    radial-gradient(circle at 50% 52%, transparent 0 26rem, rgba(110, 74, 45, 0.06) 54rem);
}

.library-story::after {
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(250, 241, 224, 0.94) 88%, var(--ivory));
}

.library-story__background {
  position: absolute;
  inset: 0;
}

.library-story__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.9) contrast(1.05);
}

.library-story__content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: inherit;
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.2fr) minmax(260px, 0.9fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: center;
  width: min(1220px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(118px, 10vw, 170px) 0 clamp(96px, 9vw, 150px);
}

.library-story__panel {
  max-width: 360px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.54);
}

.library-story__panel--left {
  justify-self: start;
  align-self: center;
}

.library-story__panel--right {
  grid-column: 3;
  justify-self: end;
  align-self: end;
  margin-bottom: clamp(16px, 4vw, 64px);
}

.library-story__panel h2 {
  color: var(--ivory-soft);
  font-size: clamp(2.25rem, 4.2vw, 4.8rem);
}

.library-story__panel p:not(.eyebrow) {
  margin: 18px 0 0;
  color: rgba(255, 250, 240, 0.82);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.6;
}

.details,
.venue,
.timeline,
.rsvp {
  padding: 84px 0;
}

.section-heading {
  display: grid;
  max-width: 740px;
  gap: 12px;
  margin-bottom: 34px;
}

.section-heading h2,
.rsvp h2 {
  color: var(--burgundy);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.detail-card {
  min-height: 240px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.68);
  box-shadow: var(--shadow);
}

.detail-card span {
  color: var(--gold);
  font-weight: 800;
}

.detail-card h3 {
  margin-top: 34px;
  color: var(--green);
  font-size: 2rem;
}

.detail-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.venue {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1fr);
  gap: clamp(10px, 1.5vw, 18px) clamp(22px, 4vw, 48px);
  align-items: center;
  min-height: 100svh;
}

.venue::before {
  position: absolute;
  inset: 46px -18px auto auto;
  z-index: -1;
  width: 46%;
  height: 58%;
  content: "";
  border-radius: 999px 0 0 999px;
  background:
    linear-gradient(135deg, rgba(101, 31, 43, 0.18), rgba(23, 63, 49, 0.18)),
    rgba(255, 250, 240, 0.36);
  filter: blur(2px);
}

.venue__copy {
  position: relative;
  top: auto;
  z-index: 2;
}

.venue__copy h2 {
  color: var(--green);
  font-size: clamp(2.6rem, 4.8vw, 4.6rem);
}

.venue__copy p:not(.eyebrow) {
  max-width: 460px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.venue__meeting {
  display: grid;
  max-width: 460px;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px 16px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(198, 167, 106, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.78), rgba(255, 250, 240, 0.48)),
    rgba(255, 250, 240, 0.64);
  box-shadow: 0 18px 42px rgba(31, 16, 12, 0.14);
}

.venue__meeting span {
  color: var(--burgundy);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.venue__meeting strong {
  color: var(--green);
  font-weight: 800;
}

.venue__routes {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  margin-bottom: clamp(18px, 2.4vw, 34px);
}

.venue__map-link {
  color: var(--burgundy);
  border-color: rgba(101, 31, 43, 0.24);
  background: rgba(255, 250, 240, 0.62);
}

.venue__map {
  position: relative;
  min-height: clamp(360px, 46svh, 560px);
  overflow: hidden;
  border: 1px solid rgba(198, 167, 106, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(101, 31, 43, 0.08), transparent 40%, rgba(23, 63, 49, 0.08)),
    #f3e5cf;
  box-shadow:
    0 26px 74px rgba(58, 34, 22, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.venue__map::before,
.venue__map::after {
  position: absolute;
  z-index: 2;
  content: "";
  pointer-events: none;
}

.venue__map::before {
  inset: 0;
  border: 10px solid rgba(255, 250, 240, 0.42);
  box-shadow: inset 0 0 0 1px rgba(198, 167, 106, 0.28);
}

.venue__map::after {
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(255, 250, 240, 0.28));
}

.venue__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  filter: saturate(0.82) sepia(0.08) contrast(0.96) brightness(1.03);
}

.venue__carousel {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  margin-top: clamp(-56px, -3.2vw, -24px);
  padding: 34px 22px 36px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(198, 167, 106, 0.76) rgba(255, 250, 240, 0.32);
  border: 1px solid rgba(198, 167, 106, 0.34);
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 250, 240, 0.92) 0 10px,
      transparent 10px 24px
    ) left 14px top 9px / calc(100% - 28px) 13px no-repeat,
    repeating-linear-gradient(
      90deg,
      rgba(255, 250, 240, 0.86) 0 10px,
      transparent 10px 24px
    ) left 14px bottom 9px / calc(100% - 28px) 13px no-repeat,
    linear-gradient(90deg, rgba(255, 250, 240, 0.08), transparent 11%, transparent 89%, rgba(255, 250, 240, 0.07)),
    linear-gradient(180deg, #2d1713, #160d0b 48%, #2b1712);
  box-shadow:
    0 18px 48px rgba(58, 34, 22, 0.18),
    inset 0 1px 0 rgba(255, 250, 240, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.34);
}

.venue__thumb {
  position: relative;
  flex: 0 0 clamp(190px, 19vw, 292px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.11), rgba(255, 250, 240, 0.02)),
    #0e0908;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 250, 240, 0.08);
  cursor: zoom-in;
  scroll-snap-align: start;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.venue__thumb:hover {
  filter: brightness(1.04);
  transform: translateY(-3px);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 250, 240, 0.18);
}

.venue__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 1px;
  filter: saturate(0.9) contrast(1.02) brightness(0.96);
  transform: scale(1.02);
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 58px);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 250, 240, 0.1), transparent 28rem),
    rgba(12, 7, 6, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox img {
  display: block;
  max-width: min(1120px, 92vw);
  max-height: 84svh;
  border: 1px solid rgba(255, 250, 240, 0.46);
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48);
  transform: scale(0.96);
  transition: transform 240ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.photo-lightbox.is-open img {
  transform: scale(1);
}

.photo-lightbox__close {
  position: fixed;
  top: clamp(16px, 3vw, 34px);
  right: clamp(16px, 3vw, 34px);
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.32);
  border-radius: 999px;
  color: var(--ivory-soft);
  background: rgba(25, 14, 12, 0.58);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.venue__gallery {
  display: grid;
  height: 210px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.venue-photo {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 250, 240, 0.32);
  border-radius: 8px;
  background: var(--burgundy-dark);
  box-shadow: 0 22px 54px rgba(31, 16, 12, 0.24);
  transition:
    transform 360ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 240ms ease,
    opacity 240ms ease;
}

.venue-photo--wide {
  grid-column: span 2;
  grid-row: span 2;
}

.venue-photo--tall {
  grid-row: span 1;
}

.venue-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04) brightness(0.9);
  transform: scale(1.02);
  transition:
    filter 240ms ease,
    transform 420ms ease;
}

.venue-photo:hover img {
  filter: saturate(0.98) contrast(1.08) brightness(0.96);
  transform: scale(1.06);
}

@media (hover: hover) and (pointer: fine) {
  .venue__gallery:hover .venue-photo:not(:hover) {
    opacity: 0.72;
  }

  .venue-photo:hover {
    z-index: 5;
    box-shadow: 0 28px 70px rgba(31, 16, 12, 0.32);
    transform: scale(1.42);
  }

  .venue-photo--wide:hover {
    transform: scale(1.18);
  }
}

.venue-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.08), rgba(50, 16, 22, 0.16)),
    radial-gradient(circle at 15% 12%, rgba(198, 167, 106, 0.16), transparent 18rem);
  pointer-events: none;
}

.timeline {
  width: 100%;
  max-width: none;
  padding-right: max(18px, calc((100vw - 1120px) / 2));
  padding-left: max(18px, calc((100vw - 1120px) / 2));
  color: var(--ivory-soft);
  background:
    linear-gradient(120deg, rgba(23, 63, 49, 0.96), rgba(50, 16, 22, 0.92)),
    var(--green);
}

.timeline .section-heading h2 {
  color: var(--ivory-soft);
}

.timeline__list {
  display: grid;
  border-top: 1px solid rgba(255, 250, 240, 0.22);
}

.timeline__item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 250, 240, 0.22);
}

.timeline__item time {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
}

.timeline__item p {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.rsvp {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 42px;
  align-items: start;
}

.rsvp__text p:not(.eyebrow) {
  max-width: 540px;
  color: var(--muted);
  font-size: 1.05rem;
}

.rsvp__flowers {
  max-width: 540px;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(198, 167, 106, 0.42);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.64);
}

.rsvp__flowers h3 {
  margin: 0 0 10px;
  color: var(--green);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  line-height: 1;
}

.rsvp__flowers p {
  margin: 0;
}

.rsvp__flower-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.rsvp__flower-links .button {
  min-height: 44px;
  padding: 10px 18px;
}

.rsvp__flower-link--whatsapp {
  color: var(--ivory-soft);
  border-color: var(--green);
  background: var(--green);
}

.rsvp__form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  color: var(--green);
  font-weight: 700;
}

.rsvp__guest-name[hidden] {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(40, 28, 25, 0.18);
  border-radius: 6px;
  color: var(--ink);
  background: var(--ivory-soft);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(198, 167, 106, 0.58);
  outline-offset: 2px;
}

.rsvp__form .button {
  width: fit-content;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--green);
  font-weight: 700;
}

footer {
  padding: 34px 18px 46px;
  color: var(--ivory-soft);
  text-align: center;
  background: var(--burgundy-dark);
}

footer p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
}

.invitation-note,
.details,
.venue,
.timeline,
.guest-details,
.rsvp,
.final-note {
  position: relative;
  z-index: 6;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 14%, rgba(101, 31, 43, 0.13), transparent 30rem),
    radial-gradient(circle at 88% 20%, rgba(23, 63, 49, 0.14), transparent 28rem),
    radial-gradient(circle at 48% 0%, rgba(198, 167, 106, 0.16), transparent 34rem),
    #fffaf0;
}

.invitation-note::before,
.details::before,
.venue::after,
.timeline::before,
.guest-details::before,
.rsvp::before,
.final-note::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: none;
}

.invitation-note {
  --invitation-lace-height: var(--lace-height);

  display: grid;
  min-height: 0;
  height: 100svh;
  overflow: visible;
  z-index: 8;
  place-items: center;
  width: 100%;
  max-width: none;
  padding: clamp(92px, 9vw, 124px) clamp(58px, 8vw, 126px);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.28), rgba(255, 250, 240, 0.72)),
    url("./assets/botanical-second-bg.png") center / cover no-repeat,
    #fffaf0;
}

.invitation-note::before {
  background: none;
}

.invitation-note__lace {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.invitation-note__lace-edge {
  position: absolute;
  display: block;
  background-image: url("./assets/lace-divider.png");
  background-repeat: repeat-x;
  background-size: auto var(--invitation-lace-height);
  opacity: 0.94;
  filter: none;
}

.invitation-note__lace-edge--bottom {
  bottom: 0;
  left: 50%;
  width: var(--lace-width);
  max-width: none;
  height: var(--invitation-lace-height);
  transform: translate(-50%, 0);
}

.invitation-note__lace-edge--left,
.invitation-note__lace-edge--right {
  top: 50%;
  width: 100svh;
  height: var(--invitation-lace-height);
  transform-origin: 50% 50%;
}

.invitation-note__lace-edge--left {
  left: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

.invitation-note__lace-edge--right {
  right: 0;
  transform: translate(50%, -50%) rotate(-90deg);
}

.invitation-note__paper {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 4.2vw, 54px);
  border: 1px solid rgba(198, 167, 106, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(118deg, rgba(101, 31, 43, 0.08), transparent 30%, transparent 70%, rgba(23, 63, 49, 0.08)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(255, 250, 240, 0.72)),
    #fff8ea;
  box-shadow:
    0 28px 76px rgba(58, 34, 22, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.invitation-note__paper::after {
  position: absolute;
  right: clamp(-46px, -2.4vw, -18px);
  bottom: clamp(14px, 2.6vw, 34px);
  z-index: 0;
  width: clamp(150px, 20vw, 270px);
  height: clamp(150px, 20vw, 270px);
  content: "";
  pointer-events: none;
  background: url("./assets/invitation-doves-watermark.png") center / contain no-repeat;
  opacity: 0.56;
}

.invitation-note__paper > * {
  position: relative;
  z-index: 1;
}

.invitation-note h2,
.section-heading h2,
.venue__copy h2,
.rsvp h2,
.final-note p {
  color: var(--green);
}

.invitation-note h2 {
  max-width: 660px;
  font-size: clamp(2.25rem, 4.7vw, 4.8rem);
}

.invitation-note p:not(.eyebrow) {
  max-width: 590px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
}

.invitation-note__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.invitation-note__meta span {
  padding: 9px 14px;
  border: 1px solid rgba(198, 167, 106, 0.42);
  border-radius: 999px;
  color: var(--burgundy);
  background: rgba(255, 250, 240, 0.72);
  font-weight: 800;
}

.library-story {
  min-height: clamp(540px, 58vw, 760px);
  color: var(--ink);
  background: #f5ead8;
}

.library-story::before {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.82), rgba(255, 250, 240, 0.46) 34%, rgba(255, 250, 240, 0.8)),
    linear-gradient(90deg, rgba(101, 31, 43, 0.18), rgba(247, 240, 228, 0.22) 42%, rgba(23, 63, 49, 0.16));
}

.library-story::after {
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(255, 250, 240, 0.92));
}

.library-story__background img {
  filter: saturate(0.78) contrast(0.94) brightness(1.22);
}

.library-story__content {
  min-height: inherit;
  grid-template-columns: minmax(260px, 0.82fr) minmax(280px, 1fr) minmax(260px, 0.82fr);
  padding: clamp(78px, 8vw, 128px) 0;
}

.library-story__panel {
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid rgba(198, 167, 106, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.82), rgba(255, 250, 240, 0.66)),
    linear-gradient(90deg, rgba(101, 31, 43, 0.08), rgba(23, 63, 49, 0.08));
  box-shadow: none;
  text-shadow: none;
  backdrop-filter: blur(6px);
}

.library-story__panel h2 {
  color: var(--green);
  font-size: clamp(2.1rem, 4vw, 4.4rem);
}

.library-story__panel p:not(.eyebrow) {
  color: var(--muted);
}

.details,
.venue,
.timeline,
.guest-details,
.rsvp {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(70px, 8vw, 118px) max(18px, calc((100vw - 1120px) / 2));
}

@media (min-width: 901px) {
  .rsvp {
    min-height: 100vh;
    min-height: 100svh;
    align-items: center;
  }
}

.details {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(26px, 4vw, 44px);
}

.detail-grid,
.guest-details__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.detail-card,
.guest-details__grid article,
.rsvp__form,
.venue__meeting {
  border: 1px solid rgba(198, 167, 106, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(101, 31, 43, 0.055), transparent 38%, rgba(23, 63, 49, 0.055)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 240, 0.78)),
    #fff6e7;
  box-shadow:
    0 20px 58px rgba(58, 34, 22, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.detail-card {
  min-height: 230px;
}

.detail-card h3,
.guest-details__grid h3 {
  color: var(--green);
}

.venue {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.08fr);
  min-height: 100svh;
  align-content: center;
}

.venue::before {
  display: none;
}

.venue__copy {
  top: auto;
}

.venue__map {
  min-height: clamp(360px, 46svh, 560px);
}

.venue-photo {
  border-color: rgba(198, 167, 106, 0.3);
  background: #f3e5cf;
  box-shadow: 0 18px 48px rgba(58, 34, 22, 0.14);
}

.venue-photo img {
  filter: saturate(0.84) contrast(0.98) brightness(1.04);
}

.timeline {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 20%, rgba(101, 31, 43, 0.12), transparent 28rem),
    radial-gradient(circle at 90% 30%, rgba(23, 63, 49, 0.16), transparent 30rem),
    linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(244, 234, 217, 0.96)),
    var(--ivory);
}

.timeline .section-heading h2 {
  color: var(--green);
}

.timeline__list {
  overflow: visible;
  border: 1px solid rgba(198, 167, 106, 0.28);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.66);
  box-shadow: 0 20px 58px rgba(58, 34, 22, 0.12);
}

.timeline__item {
  grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
  padding: 24px clamp(18px, 3vw, 34px);
  border-bottom: 1px solid rgba(198, 167, 106, 0.22);
}

.timeline__item:last-child {
  border-bottom: 0;
}

.timeline__item p {
  color: var(--green);
}

.guest-details__grid article {
  padding: clamp(22px, 3vw, 32px);
}

.guest-details__grid p {
  margin: 14px 0 0;
  color: var(--muted);
}

.palette {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.palette span {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(40, 28, 25, 0.14);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.rsvp {
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 0.92fr);
  background:
    radial-gradient(circle at 18% 24%, rgba(101, 31, 43, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 72%, rgba(23, 63, 49, 0.16), transparent 30rem),
    linear-gradient(180deg, #fffaf0, #f3e7d6);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-fieldset legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--green);
  font-weight: 700;
}

.choice-pill {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(198, 167, 106, 0.28);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 250, 240, 0.72);
  font-weight: 700;
  cursor: pointer;
}

.choice-pill input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--burgundy);
}

.choice-pill:has(input:checked) {
  border-color: rgba(101, 31, 43, 0.46);
  color: var(--burgundy);
  background: rgba(198, 167, 106, 0.18);
}

.final-note {
  display: grid;
  place-items: center;
  gap: 22px;
  min-height: 0;
  height: 100svh;
  overflow: hidden;
  padding: clamp(58px, 7svh, 86px) 18px clamp(90px, 11svh, 126px);
  text-align: center;
}

.final-note img {
  width: min(220px, 42vw);
  opacity: 0.88;
  filter: drop-shadow(0 12px 22px rgba(58, 34, 22, 0.16));
}

.final-note p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5.8vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.countdown {
  display: grid;
  width: min(820px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
  margin-top: 8px;
}

.countdown__item {
  display: grid;
  min-height: clamp(104px, 12vw, 148px);
  place-items: center;
  padding: 14px 10px;
  border: 1px solid rgba(198, 167, 106, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(101, 31, 43, 0.07), rgba(23, 63, 49, 0.08)),
    rgba(255, 250, 240, 0.64);
  box-shadow:
    0 18px 42px rgba(58, 34, 22, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.countdown__item strong {
  color: var(--burgundy);
  font-family: "Ekaterina Velikaya Two", "Pushkin", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4.8rem, 8.5vw, 8.6rem);
  font-weight: 400;
  line-height: 0.72;
}

.countdown__item span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.venue,
.timeline,
.rsvp,
.final-note {
  isolation: isolate;
  overflow: visible;
  position: relative;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 250, 240, 0.84), rgba(255, 250, 240, 0.84)),
    url("./assets/botanical-second-bg.png") center / cover fixed no-repeat,
    #fffaf0;
}

.venue {
  z-index: 6;
}

.timeline {
  z-index: 5;
}

.rsvp {
  z-index: 4;
}

.final-note {
  z-index: 3;
}

.venue::after,
.timeline::before,
.rsvp::before,
.final-note::before {
  display: none;
}

.invitation-note {
  background-attachment: scroll, fixed, scroll;
}

.venue > :not(.section-lace-frame),
.timeline > :not(.section-lace-frame),
.rsvp > :not(.section-lace-frame),
.final-note > :not(.section-lace-frame) {
  position: relative;
  z-index: 2;
}

.section-lace-frame {
  --section-lace-height: var(--lace-height);

  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.section-lace-frame__edge {
  position: absolute;
  display: block;
}

.section-lace-frame__edge--bottom {
  bottom: 0;
  left: 50%;
  width: var(--lace-width);
  max-width: none;
  height: var(--section-lace-height);
  background-image: url("./assets/lace-divider.png");
  background-repeat: repeat-x;
  background-size: auto var(--section-lace-height);
  filter: none;
  opacity: 0.95;
  transform: translate(-50%, 0);
}

/* On desktop the horizontal lace straddles the actual section boundary. */
@media (min-width: 550px) {
  .venue > .section-lace-frame > .section-lace-frame__edge--bottom {
    transform: translate(-50%, 50%);
  }
}

/* Split shared dividers between adjoining sections so both halves remain visible. */
.invitation-note__lace-edge--bottom {
  height: calc(var(--invitation-lace-height) / 2);
  overflow: hidden;
  background-position: center top;
  background-size: auto var(--invitation-lace-height);
  transform: translate(-50%, 0);
}

.timeline > .section-lace-frame > .section-lace-frame__edge--bottom {
  height: calc(var(--section-lace-height) / 2);
  overflow: hidden;
  background-position: center top;
  background-size: auto var(--section-lace-height);
  transform: translate(-50%, 0);
}

.venue > .section-lace-frame::before,
.rsvp > .section-lace-frame::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--lace-width);
  max-width: none;
  height: calc(var(--section-lace-height) / 2);
  content: "";
  background-image: url("./assets/lace-divider.png");
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto var(--section-lace-height);
  filter: none;
  opacity: 0.95;
  transform: translate(-50%, 0);
}

.section-lace-frame__edge--left,
.section-lace-frame__edge--right {
  top: 0;
  bottom: 0;
  width: var(--section-lace-height);
  overflow: hidden;
  opacity: 0.94;
  transform: translateX(-50%);
}

.section-lace-frame__edge--left::before,
.section-lace-frame__edge--right::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5000px;
  height: var(--section-lace-height);
  content: "";
  background-image: url("./assets/lace-divider.png");
  background-repeat: repeat-x;
  background-size: auto var(--section-lace-height);
  filter: none;
  transform-origin: 50% 50%;
}

.section-lace-frame__edge--left {
  left: 0;
}

.section-lace-frame__edge--right {
  right: 0;
  transform: translateX(50%);
}

.section-lace-frame__edge--left::before {
  transform: translate(-50%, -50%) rotate(90deg);
}

.section-lace-frame__edge--right::before {
  transform: translate(-50%, -50%) rotate(-90deg);
}

.venue__copy {
  max-width: 540px;
  padding: clamp(22px, 3vw, 34px);
}

.venue__copy h2,
.venue__copy p:not(.eyebrow),
.venue__meeting strong,
.timeline .section-heading h2,
.timeline__item p,
.rsvp h2,
.rsvp__text p:not(.eyebrow) {
  color: var(--green);
}

.venue__meeting span,
.timeline__item time,
.rsvp .eyebrow,
.venue .eyebrow,
.timeline .eyebrow {
  color: var(--gold);
}

.venue__map {
  border-width: 2px;
  border-color: rgba(198, 167, 106, 0.56);
}

.timeline {
  display: grid;
  align-content: center;
  min-height: 100svh;
}

.timeline__list {
  background: rgba(255, 250, 240, 0.66);
}

.timeline__item {
  border-bottom-color: rgba(198, 167, 106, 0.22);
}

.rsvp__text {
  align-self: start;
  padding: clamp(24px, 3vw, 38px);
}

.rsvp__form input,
.rsvp__form select,
.rsvp__form textarea,
.choice-pill {
  color: var(--green);
  background: rgba(255, 250, 240, 0.9);
}

.final-note {
  z-index: 9;
  min-height: 0;
  height: 100svh;
  overflow: hidden;
  color: var(--gold);
  background:
    radial-gradient(circle at 16% 18%, rgba(198, 167, 106, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 74%, rgba(101, 31, 43, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(13, 38, 30, 0.96), rgba(23, 63, 49, 0.98)),
    var(--green);
}

.rsvp .section-lace-frame__edge--bottom {
  bottom: 0;
  display: block;
  height: calc(var(--section-lace-height) / 2);
  overflow: hidden;
  background-position: center top;
  background-size: auto var(--section-lace-height);
  transform: translate(-50%, 0);
}

.final-note .section-lace-frame::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--lace-width);
  max-width: none;
  height: calc(var(--section-lace-height) / 2);
  content: "";
  background-image: url("./assets/lace-divider.png");
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto var(--section-lace-height);
  filter: none;
  opacity: 0.95;
  transform: translate(-50%, 0);
}

.final-note .section-lace-frame__edge--bottom {
  bottom: 0;
  height: calc(var(--section-lace-height) / 2);
  overflow: hidden;
  background-position: center top;
  background-size: auto var(--section-lace-height);
  transform: translate(-50%, 0);
}

.final-note .countdown {
  padding: clamp(12px, 2vw, 20px);
}

.final-note > p {
  padding: clamp(18px, 3vw, 30px) clamp(24px, 5vw, 56px);
  color: var(--gold);
  font-family: "Ekaterina Velikaya Two", "Pushkin", "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.final-note .countdown__item {
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.78), rgba(255, 250, 240, 0.58)),
    rgba(255, 250, 240, 0.62);
}

.final-note .countdown__item span {
  color: var(--gold);
}

@media (max-width: 900px) {
  .detail-grid,
  .guest-details__grid,
  .venue,
  .rsvp {
    grid-template-columns: 1fr;
  }

  .library-story__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .library-story__panel,
  .library-story__panel--right {
    max-width: min(100%, 560px);
    align-self: center;
    margin: 0;
  }

  .venue__copy {
    position: static;
  }

  .rsvp__copy {
    display: contents;
  }

  .rsvp__text {
    order: 1;
  }

  .rsvp__form {
    order: 2;
  }

  .rsvp__flowers {
    order: 3;
    max-width: none;
    margin-top: 0;
  }
}

@media (max-width: 549px) {
  .invitation-note {
    padding: 86px 34px;
  }

  .invitation-note__paper,
  .detail-card,
  .guest-details__grid article,
  .rsvp__form {
    padding: 20px;
  }

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

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

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 549px) {
  .topbar {
    --topbar-peek: 21px;
    top: -1px;
    width: 228px;
    min-height: 104px;
    padding: 10px 14px 16px;
  }

  nav a {
    width: 26px;
    min-height: 76px;
    padding: 7px 4px 11px;
    font-size: 0.82rem;
  }

  .brand {
    width: 84px;
    height: 82px;
  }

  .hero {
    height: 100svh;
    min-height: 96svh;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 118px 20px 78px;
  }

  .hero__art img {
    object-position: 58% center;
  }

  .hero__art::after {
    background:
      linear-gradient(180deg, rgba(50, 16, 22, 0.84), rgba(50, 16, 22, 0.66) 58%, rgba(23, 63, 49, 0.32)),
      radial-gradient(circle at 64% 46%, transparent 0 8rem, rgba(0, 0, 0, 0.2) 24rem);
  }

  .hero__monogram {
    top: 18px;
    width: min(34vw, 190px);
  }

  .envelope {
    --envelope-open-scale: 1.18;
    width: 92vw;
    height: min(58vh, 560px);
    min-height: 360px;
  }

  .envelope__seal {
    width: clamp(96px, 15vw, 136px);
  }

  .origami-field--hero .origami:nth-child(1) {
    top: 22%;
    right: -18px;
  }

  .origami-field--hero .origami:nth-child(2) {
    right: 14%;
    bottom: 16%;
  }

  .origami-field--details .origami:nth-child(1),
  .origami-field--rsvp .origami:nth-child(1) {
    right: -12px;
    left: auto;
  }

  .hero__names {
    width: min(100%, 700px);
    max-width: 700px;
    padding-block: 34px 112px;
    font-size: clamp(5.4rem, 18.8vw, 8rem);
    line-height: 0.8;
  }

  .hero__name-line--anna {
    transform: translateX(clamp(-28px, -4vw, -10px));
  }

  .hero__name-and {
    margin-block: -4px -4px;
    padding-left: clamp(58px, 15vw, 112px);
    font-size: 0.55em;
  }

  .hero__name-line--mark {
    transform: translateX(clamp(76px, 20vw, 138px));
  }

  .hero__content {
    justify-self: center;
    margin-top: 0;
    transform: none;
  }

  .hero__actions {
    margin-top: 22px;
    padding-left: clamp(58px, 17vw, 112px);
  }

  .hero__portrait {
    width: min(92vw, 440px);
    min-width: 0;
    min-height: 430px;
    justify-self: center;
    transform: scale(1.06);
  }

  .detail-grid,
  .venue,
  .rsvp {
    grid-template-columns: 1fr;
  }

  .venue__copy {
    position: static;
  }

  .venue__copy p:not(.eyebrow) {
    max-width: 680px;
  }

  .venue__gallery {
    height: 260px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .venue-photo,
  .venue-photo--wide,
  .venue-photo--tall {
    grid-column: span 2;
    grid-row: span 1;
  }

  .venue-photo--wide {
    grid-column: span 2;
    grid-row: span 2;
  }

  .library-story {
    min-height: 720px;
  }

  .library-story__background img {
    object-position: center top;
  }

  .library-story__content {
    grid-template-columns: 1fr 0.55fr 1fr;
    width: min(100% - 32px, 1120px);
    padding-block: 92px 118px;
  }

  .library-story__panel {
    max-width: 300px;
  }

  .library-story__panel h2 {
    font-size: clamp(2rem, 6vw, 3.4rem);
  }

  .details,
  .venue,
  .timeline,
  .rsvp {
    padding-block: 62px;
  }

  .timeline__item {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }

  .timeline__item time {
    font-size: 2rem;
  }
}

@media (max-width: 549px) {
  .brand {
    width: 70px;
    height: 70px;
  }

  .topbar {
    --topbar-peek: 20px;
    width: 198px;
    min-height: 94px;
    padding: 8px 12px 15px;
  }

  nav {
    min-height: 68px;
    gap: 3px;
  }

  nav a {
    width: 24px;
    min-height: 68px;
    padding: 7px 4px 10px;
    font-size: 0.68rem;
  }

  .book-title--horizontal {
    display: none;
  }

  .hero__monogram {
    top: 16px;
    width: min(46vw, 190px);
  }

  .envelope-intro__content {
    gap: 16px;
  }

  .envelope {
    --envelope-open-scale: 1.08;
    width: 94vw;
    height: min(50vh, 380px);
    min-height: 270px;
  }

  .envelope__seal {
    width: clamp(80px, 23vw, 106px);
  }

  .hero__actions {
    display: grid;
    margin-top: 0;
    padding-left: 0;
  }

  .button {
    width: 100%;
  }

  .library-story {
    min-height: 760px;
  }

  .library-story::before {
    background:
      linear-gradient(180deg, rgba(255, 247, 231, 0.12), rgba(255, 247, 231, 0.02) 28%, rgba(250, 241, 224, 0.2) 100%),
      linear-gradient(90deg, rgba(65, 32, 22, 0.26), rgba(35, 72, 55, 0.18)),
      radial-gradient(circle at 50% 47%, transparent 0 12rem, rgba(110, 74, 45, 0.08) 32rem);
  }

  .library-story__background img {
    object-position: 50% top;
  }

  .library-story__content {
    display: flex;
    min-height: 760px;
    flex-direction: column;
    justify-content: space-between;
    width: min(100% - 28px, 1120px);
    padding: 72px 0 96px;
  }

  .library-story__panel,
  .library-story__panel--right {
    max-width: min(100%, 340px);
    align-self: flex-start;
    margin: 0;
  }

  .library-story__panel--right {
    align-self: flex-end;
  }

  .details,
  .venue,
  .rsvp {
    width: min(100% - 28px, 1120px);
  }

  .venue__gallery {
    height: 360px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  .venue-photo,
  .venue-photo--wide,
  .venue-photo--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .venue-photo--wide {
    grid-column: span 2;
    grid-row: span 2;
  }

  .venue__meeting {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px;
  }

  .detail-card,
  .rsvp__form {
    padding: 20px;
  }

  .hero__portrait {
    min-height: 330px;
    gap: 10px;
  }

  .portrait-card {
    padding: 6px;
  }

  .portrait-card::after {
    inset: 6px;
  }

  .portrait-card--groom {
    width: 100%;
    height: 90%;
    transform: translateY(-8px) rotate(-2deg);
  }

  .portrait-card--bride {
    width: 100%;
    height: 90%;
    transform: translateY(10px) rotate(2deg);
  }

  .origami-field--hero .origami:nth-child(3),
  .origami-field--details .origami:nth-child(2),
  .origami-field--rsvp .origami:nth-child(2) {
    display: none;
  }
}

@media (max-width: 549px) {
  :root {
    --lace-width: 760px;
    --lace-height: 64px;
    --section-lace-height: 64px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.intro-active {
    height: 100svh;
    max-height: 100svh;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  body.intro-active main {
    max-height: 100svh;
    overflow: hidden;
  }

  @supports (overflow: clip) {
    html,
    body {
      overflow-x: clip;
    }
  }

  body {
    min-width: 0;
  }

  main,
  .envelope-intro,
  .hero,
  .invitation-note,
  .venue,
  .timeline,
  .rsvp,
  .final-note {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    overflow-y: visible;
  }

  .envelope-intro {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    box-sizing: border-box;
    overflow: hidden;
    align-items: center;
    justify-items: center;
    padding: max(10px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
  }

  .envelope-intro__grain {
    background-size: auto, 760px auto, 38px 38px, 38px 38px;
    mask-image: radial-gradient(circle at 50% 42%, #000 0 20rem, transparent 34rem);
  }

  .envelope-intro__content {
    width: min(100%, 369px);
    max-width: calc(100vw - 24px);
    min-height: 0;
    height: auto;
    max-height: calc(100svh - 28px);
    align-content: center;
    justify-content: center;
    justify-items: center;
    gap: 10px;
    transform: translateY(-6px);
  }

  .envelope-intro__eyebrow {
    width: 100%;
    max-width: 302px;
    font-size: 0.58rem;
    line-height: 1.25;
    letter-spacing: 0.14em;
    text-align: center;
    white-space: normal;
  }

  .envelope {
    --envelope-open-scale: 1.04;
    width: min(88vw, 346px);
    max-width: calc(100vw - 24px);
    height: auto;
    min-height: 0;
    aspect-ratio: 1.72 / 1;
  }

  .envelope__letter {
    inset: 12% 9% 27%;
    border-radius: 4px;
  }

  .envelope__body,
  .envelope__flap {
    border-radius: 7px 7px 0 0;
  }

  .envelope__seal {
    top: 52%;
    width: 76px;
    transform: translate3d(-50%, -50%, 52px);
  }

  .envelope-intro.is-opening .envelope__seal {
    transform: translate3d(-50%, -50%, 52px) scale(0.96);
  }

  .envelope-intro__button {
    width: auto;
    min-height: 42px;
    padding: 9px 24px;
    margin-top: 0;
    color: var(--burgundy);
    background: var(--gold);
  }

  .topbar {
    --topbar-peek: 20px;
    top: -1px;
    right: 8px;
    width: min(318px, calc(100vw - 16px));
    min-height: 88px;
    padding: 8px 12px 16px;
    background-size: auto, 590px 108px, auto;
  }

  nav {
    flex: 1 1 auto;
    min-height: 64px;
    gap: 3px;
    justify-content: flex-end;
  }

  nav a {
    width: 24px;
    min-height: 64px;
    padding: 6px 3px 10px;
    font-size: 0.6rem;
  }

  .hero {
    height: 100svh;
    min-height: 100svh;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 56px 14px 70px;
    overflow: hidden;
  }

  .hero__monogram {
    top: 12px;
    width: 126px;
  }

  .hero__content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    align-self: start;
    justify-self: stretch;
    transform: none;
  }

  .hero__names {
    width: 100%;
    max-width: 100%;
    padding: 58px 0 76px;
    font-size: clamp(4.7rem, 24vw, 6.1rem);
    line-height: 0.74;
  }

  .hero__name-line--anna {
    transform: translateX(-15vw);
  }

  .hero__name-and {
    margin: 0.02em 0 -0.08em;
    padding-left: 30vw;
    font-size: 0.45em;
  }

  .hero__name-line--mark {
    transform: translateX(11vw);
  }

  .hero__actions {
    position: absolute;
    left: 20px;
    bottom: 64px;
    z-index: 25;
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    margin: 0;
    padding: 0;
  }

  .hero .button {
    width: auto;
    min-width: 108px;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 0.8rem;
  }

  .hero__portrait {
    position: absolute;
    right: -16px;
    bottom: 96px;
    width: min(68vw, 270px);
    min-width: 0;
    min-height: 286px;
    gap: 7px;
    justify-self: auto;
    transform: none;
  }

  .portrait-card {
    padding: 5px;
  }

  .lace-divider img {
    width: var(--lace-width);
    height: var(--lace-height);
  }

  .section-lace-frame__edge--left,
  .section-lace-frame__edge--right {
    width: var(--section-lace-height);
  }

  .section-lace-frame__edge--left::before,
  .section-lace-frame__edge--right::before {
    height: var(--section-lace-height);
  }

  .invitation-note,
  .venue,
  .timeline,
  .rsvp,
  .final-note {
    min-height: 100svh;
  }

  .invitation-note {
    height: auto;
    min-height: 100svh;
    place-items: start center;
    padding: 136px 26px 92px;
    background-position: center top;
  }

  .invitation-note__paper {
    width: 100%;
    padding: 28px 22px 30px;
    border-radius: 12px;
  }

  .invitation-note__paper h2 {
    max-width: 100%;
    font-size: clamp(2rem, 9.2vw, 2.35rem);
    line-height: 1.02;
  }

  .invitation-note p:not(.eyebrow) {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.58;
  }

  .invitation-note__meta {
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: 10px;
    margin-top: 24px;
  }

  .invitation-note__meta span {
    display: grid;
    min-height: 48px;
    place-items: center;
    padding: 8px 10px;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: center;
  }

  .invitation-note__meta span:last-child {
    grid-column: 1 / -1;
  }

  .invitation-note__paper::after {
    right: -28px;
    bottom: 8px;
    width: 152px;
    height: 152px;
    opacity: 0.34;
  }

  .venue {
    min-height: 0;
    padding: 104px 20px 92px;
    gap: 22px;
  }

  .venue__copy,
  .venue__map,
  .venue__carousel {
    width: 100%;
    max-width: 100%;
  }

  .venue__map {
    min-height: 280px;
    border-radius: 12px;
  }

  .venue__copy {
    padding: 24px 20px;
    border: 1px solid rgba(198, 167, 106, 0.32);
    border-radius: 12px;
    background: rgba(255, 250, 240, 0.64);
  }

  .venue__copy h2 {
    font-size: 2.35rem;
    line-height: 1;
  }

  .venue__copy p:not(.eyebrow) {
    margin-top: 16px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .venue__meeting {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 9px 12px;
    margin-top: 20px;
    padding: 16px 14px;
  }

  .venue__meeting strong {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .venue__routes {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
  }

  .venue__routes .button {
    width: 100%;
  }

  .venue__carousel {
    margin-top: 0;
    padding: 28px 14px 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .venue__thumb {
    flex-basis: 224px;
  }

  .timeline {
    min-height: 0;
    align-content: start;
    padding: 104px 20px 92px;
  }

  .timeline .section-heading {
    margin-bottom: 26px;
  }

  .timeline .section-heading h2 {
    font-size: 2.35rem;
    line-height: 1;
  }

  .timeline__list {
    border-radius: 12px;
  }

  .timeline__item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 18px 16px;
  }

  .timeline__item time {
    font-size: 1.75rem;
    line-height: 1;
  }

  .timeline__item p {
    font-size: 1rem;
    line-height: 1.35;
  }

  .rsvp {
    min-height: 0;
    gap: 22px;
    padding: 104px 20px 92px;
  }

  .rsvp__text {
    padding: 24px 20px;
    border: 1px solid rgba(198, 167, 106, 0.3);
    border-radius: 12px;
    background: rgba(255, 250, 240, 0.56);
  }

  .rsvp h2 {
    font-size: 2.25rem;
    line-height: 1.02;
  }

  .rsvp__text p:not(.eyebrow) {
    margin: 16px 0 0;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .rsvp__form {
    gap: 18px;
    padding: 22px 18px;
    border-radius: 12px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .choice-pill {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .rsvp__form .button {
    width: 100%;
  }

  .final-note {
    height: auto;
    min-height: 100svh;
    align-content: center;
    gap: 26px;
    padding: 112px 20px 112px;
  }

  .final-note img {
    width: 150px;
    transform: translateY(-18px);
  }

  .final-note .countdown {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
  }

  .final-note .countdown__item {
    min-height: 112px;
    padding: 12px 8px;
    border-radius: 12px;
  }

  .final-note .countdown__item strong {
    font-size: 4.6rem;
  }

  .final-note > p {
    margin-top: 46px;
    padding: 0;
    font-size: 2.55rem;
    line-height: 1;
  }

  .final-note > p span {
    display: block;
    margin-top: 80px;
  }

  .topbar {
    --topbar-peek: 44px;
    left: 50%;
    right: auto;
    top: -1px;
    width: 246px;
    min-height: 118px;
    padding: 10px 10px 16px;
    border-radius: 0 0 8px 8px;
    background-size: auto, 520px 120px, auto;
    transform: translate(-50%, 0);
  }

  .topbar.is-collapsed {
    transform: translate(-50%, calc(-100% + var(--topbar-peek)));
  }

  .topbar__toggle {
    left: 50%;
    right: auto;
    top: auto;
    bottom: -18px;
    width: 48px;
    height: 44px;
    padding: 0;
    transform: translateX(-50%);
  }

  .topbar__toggle span {
    font-size: 1.75rem;
  }

  .topbar__toggle:hover {
    transform: translateX(-50%) scaleY(1.04);
  }

  .topbar.is-collapsed .topbar__toggle span {
    transform: translateY(1px) rotate(-90deg);
  }

  .topbar:not(.is-collapsed) .topbar__toggle span {
    transform: translateY(-2px) rotate(90deg);
  }

  .topbar nav {
    width: 224px;
    min-height: 94px;
    gap: 4px;
    justify-content: center;
    overflow: hidden;
  }

  .topbar nav a {
    flex: 0 0 34px;
    width: 34px;
    min-height: 94px;
    padding: 8px 3px 12px;
    font-size: 0.72rem;
  }

  .hero {
    display: flex;
    height: auto;
    min-height: 0;
    flex-direction: column;
    gap: 44px;
    padding: 154px 14px 82px;
    overflow: hidden;
  }

  .hero__monogram {
    top: 142px;
    width: 136px;
  }

  .hero__content {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-top: 190px;
    align-self: stretch;
    transform: none;
  }

  .hero__names {
    width: 100%;
    max-width: 100%;
    padding: 0;
    row-gap: 0;
    font-size: clamp(5.2rem, 27vw, 6.7rem);
    line-height: 0.78;
  }

  .hero__name-line,
  .hero__name-and {
    max-width: none;
  }

  .hero__name-line--anna {
    justify-self: start;
    transform: none;
    transform-origin: left center;
  }

  .hero__name-and {
    justify-self: center;
    margin: -0.04em 0 -0.1em;
    padding-left: 0;
    font-size: 0.4em;
    transform: translateX(-28vw);
  }

  .hero__name-line--mark {
    justify-self: end;
    transform: none;
    transform-origin: right center;
  }

  .hero__actions {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    z-index: 2;
    display: grid;
    width: min(240px, 68vw);
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 145px auto 0;
    padding: 0;
    transform: none;
  }

  .hero .button {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .hero__portrait {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: calc(100% - 8px);
    height: 340px;
    min-width: 0;
    min-height: 340px;
    flex: 0 0 auto;
    gap: 9px;
    align-self: center;
    justify-self: center;
    transform: none;
  }

  .portrait-card--groom,
  .portrait-card--bride {
    height: 100%;
  }
}

/* Content sections must never become nested vertical scroll containers. */
.invitation-note,
.details,
.venue,
.timeline,
.guest-details,
.rsvp,
.final-note {
  overflow-x: clip;
  overflow-y: visible;
}

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