:root {
  color-scheme: light;
  --brown-900: #422716;
  --brown-700: #8a5233;
  --rose-400: #dda7a5;
  --rose-200: #e7bfb7;
  --olive-700: #777856;
  --sage-300: #c0c2aa;
  --paper: #fbf7f3;
  --paper-soft: #f4ece6;
  --ink: #2e2119;
  --muted: #75665c;
  --line: rgba(66, 39, 22, 0.16);
  --shadow: 0 24px 70px rgba(66, 39, 22, 0.16);
  --radius: 8px;
  --content: min(1060px, calc(100vw - 32px));
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --font-display: "Great Vibes", cursive;
  --intro-asset-portrait: url("assets/envelope-generated-portrait.png");
  --intro-asset-landscape: url("assets/envelope_horizontal.png");
  --intro-asset: var(--intro-asset-portrait);
  --invite-paper: url("assets/paper2.png");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-optical-sizing: auto;
}

body.intro-active {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

section {
  scroll-margin-top: 96px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brown-700);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--brown-900);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(3rem, 13vw, 6.8rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.05rem, 8vw, 3.8rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 40;
  display: flex;
  width: calc(var(--content) + 15px);
  max-width: calc(100vw - 52px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 16px;
  border: 1px solid rgba(66, 39, 22, 0.08);
  border-radius: var(--radius);
  background: rgba(251, 247, 243, 0.42);
  background-clip: padding-box;
  box-shadow: 0 10px 30px rgba(66, 39, 22, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.site-header.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.header-scrim {
  position: fixed;
  top: 0;
  left: var(--header-scrim-left, 50%);
  z-index: 39;
  width: var(--header-scrim-width, max-content);
  height: 22px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(251, 247, 243, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.header-scrim.is-visible {
  opacity: 1;
}

.brand,
.site-header a {
  color: var(--brown-900);
  text-decoration: none;
}

.brand {
  display: grid;
  flex: 0 0 auto;
  min-width: 174px;
  height: 36px;
  place-items: center;
  padding: 0 16px;
  border: 1px solid rgba(66, 39, 22, 0.12);
  border-radius: var(--radius);
  background: rgba(192, 194, 170, 0.42);
  color: var(--brown-900);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__short {
  display: none;
}

.brand__full {
  display: inline;
}

.site-header nav {
  display: flex;
  flex: 0 1 auto;
  gap: 22px;
  align-items: center;
  overflow: visible;
  scrollbar-width: none;
}

.site-header nav::-webkit-scrollbar {
  display: none;
}

.site-header nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 12px rgba(251, 247, 243, 0.75);
}

@media (max-width: 640px) {
  section {
    scroll-margin-top: 118px;
  }

  .site-header {
    top: 10px;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius);
    background: rgba(251, 247, 243, 0.78);
    box-shadow: 0 14px 34px rgba(66, 39, 22, 0.12);
    backdrop-filter: blur(18px);
    overflow: hidden;
  }

  .header-scrim {
    height: 13px;
  }

  .brand {
    flex-basis: 52px;
    min-width: 52px;
    width: 52px;
    height: 38px;
    padding: 0;
    font-size: 0.82rem;
  }

  .brand__short {
    display: inline;
  }

  .brand__full {
    display: none;
  }

  .site-header nav {
    flex: 1;
    gap: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    min-width: 0;
    padding-right: 18px;
    mask-image: linear-gradient(90deg, #000 0 calc(100% - 20px), transparent 100%);
  }

  .site-header nav a {
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 0.78rem;
    text-shadow: none;
  }
}

.site-header nav a:hover,
.site-header nav a.is-active {
  color: var(--brown-900);
}

.site-header nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-header nav a:hover::after,
.site-header nav a.is-active::after {
  opacity: 0.55;
  transform: scaleX(1);
}

@media (max-width: 640px) {
  .site-header nav a:hover,
  .site-header nav a.is-active {
    background: rgba(192, 194, 170, 0.42);
  }

  .site-header nav a::after {
    display: none;
  }
}

.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  overflow: hidden;
  background: var(--brown-900);
  transition: opacity 780ms ease, visibility 780ms ease;
}

.envelope-screen::before,
.envelope-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.envelope-screen::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(66, 39, 22, 0.24), rgba(66, 39, 22, 0.34)),
    var(--intro-asset) center / cover no-repeat,
    var(--brown-900);
  filter: blur(18px) saturate(0.9);
  transform: scale(1.08);
  transition:
    opacity 900ms ease,
    transform 1150ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 900ms ease;
}

.envelope-screen::after {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(66, 39, 22, 0.08), rgba(66, 39, 22, 0.16)),
    var(--intro-asset) center / cover no-repeat;
  box-shadow: 0 0 80px rgba(15, 10, 8, 0.28);
  transition:
    opacity 880ms ease,
    transform 1150ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 880ms ease;
}

.envelope-screen.is-opening::after {
  transform: scale(1.015);
}

.envelope-screen.is-open::after {
  transform: scale(1.01);
}

.envelope-screen.is-hidden::before {
  opacity: 0;
  filter: blur(24px) saturate(0.75);
  transform: scale(1.14);
}

.envelope-screen.is-hidden::after {
  opacity: 0;
  filter: blur(10px) brightness(0.92);
  transform: scale(1.04) translateY(-20px);
}

.envelope-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.envelope-screen.is-hidden .envelope {
  opacity: 0;
}

.envelope {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 250, 246, 0.9);
  cursor: pointer;
  transition: opacity 520ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(255, 250, 246, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(66, 39, 22, 0.12), rgba(66, 39, 22, 0.28));
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 800ms ease;
}

.envelope.is-open::before {
  opacity: 0.18;
}

.envelope.is-opening {
  transform: scale(1.025);
}

.envelope:not(.is-opening):not(.is-open) .envelope__seal {
  animation: seal-pulse 2.4s ease-in-out infinite;
}

.envelope.is-opening .envelope__seal {
  animation: none;
  transform: translate(-50%, -50%) scale(1.2);
  transition:
    opacity 420ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope:focus {
  outline: none;
}

.envelope:focus-visible .envelope__seal {
  box-shadow:
    inset 0 0 0 2px rgba(255, 250, 246, 0.12),
    0 0 0 5px rgba(255, 250, 246, 0.56),
    0 0 0 9px rgba(138, 82, 51, 0.38),
    0 16px 32px rgba(15, 10, 8, 0.42);
}

.envelope__paper,
.envelope__seal {
  position: absolute;
}

.envelope__paper {
  top: 50%;
  left: 50%;
  z-index: 8;
  display: none;
  width: min(88vw, 560px);
  aspect-ratio: 3 / 2;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26% 20% 22%;
  border: 0;
  border-radius: 0;
  outline: none;
  background: var(--invite-paper) center / contain no-repeat;
  box-shadow: none;
  color: var(--brown-900);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -38%) scale(0.94);
  transition:
    opacity 720ms ease 120ms,
    transform 1000ms cubic-bezier(0.22, 1, 0.36, 1) 120ms;
}

.envelope.is-opening .envelope__paper {
  display: flex;
}

.envelope.is-open .envelope__paper {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.envelope-screen.is-hidden .envelope__paper {
  opacity: 0;
  transform: translate(-50%, -46%) scale(0.98);
  transition:
    opacity 700ms ease,
    transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope__paper > span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown-700);
}

.envelope__paper strong {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 6.5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--brown-900);
}

.envelope__paper small {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brown-700);
}

@media (min-width: 760px) {
  .envelope__paper {
    width: min(62vw, 520px);
    padding: 25% 19% 21%;
  }
}

.envelope__seal {
  top: 56.5%;
  left: 50%;
  z-index: 4;
  display: grid;
  width: clamp(124px, 31vw, 164px);
  height: clamp(124px, 31vw, 164px);
  place-items: center;
  border-radius: 50%;
  background: url("assets/seal_vl.png") center / contain no-repeat;
  color: rgba(66, 39, 22, 0.62);
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 2.9vw, 1rem);
  font-weight: 400;
  line-height: 0.96;
  text-align: center;
  text-transform: lowercase;
  text-shadow: 0 1px 4px rgba(255, 250, 246, 0.22);
  filter: drop-shadow(0 12px 22px rgba(15, 10, 8, 0.34));
  transform: translate(-50%, -50%);
  transition: opacity 320ms ease, transform 520ms ease;
}

.envelope__seal::after {
  content: "Тиць";
  position: absolute;
  top: calc(100% - 0.25rem);
  left: 50%;
  width: max-content;
  max-width: min(72vw, 240px);
  color: rgba(255, 250, 246, 0.9);
  font-family: var(--font-body, inherit);
  font-size: clamp(1.12rem, 4vw, 1.42rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 6px 18px rgba(15, 10, 8, 0.56);
  text-transform: none;
  transform: translateX(-50%);
  transition: transform 220ms ease, text-shadow 220ms ease, opacity 220ms ease;
  pointer-events: none;
}

.envelope:not(.is-opening):not(.is-open) .envelope__seal::after {
  animation: seal-hint-pulse 2.4s ease-in-out infinite;
}

.envelope.is-opening .envelope__seal::after,
.envelope.is-open .envelope__seal::after {
  animation: none;
  opacity: 0;
}

.envelope:hover .envelope__seal::after,
.envelope:focus-visible .envelope__seal::after {
  transform: translateX(-50%) translateY(-2px) scale(1.06);
  text-shadow:
    0 8px 24px rgba(15, 10, 8, 0.58),
    0 0 18px rgba(231, 191, 183, 0.34);
}

@media (min-width: 760px) {
  .envelope__seal {
    top: 62%;
    width: clamp(146px, 15vh, 182px);
    height: clamp(146px, 15vh, 182px);
    font-size: clamp(0.82rem, 1.55vh, 1rem);
  }

  .envelope__seal::after {
    top: calc(100% - 0.15rem);
    font-size: clamp(1.32rem, 2.35vh, 1.68rem);
  }

  .envelope-screen.is-hidden::after {
    transform: scale(1.03) translateY(-16px);
  }
}

@media (min-width: 900px) {
  :root {
    --intro-asset: var(--intro-asset-landscape);
  }
}

.envelope.is-open {
  transform: scale(1.035);
}

.envelope.is-open .envelope__seal {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.55);
  transition:
    opacity 480ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.petals,
.petal-burst {
  position: fixed;
  inset: 0;
  z-index: 35;
  overflow: hidden;
  pointer-events: none;
}

.petal-burst {
  z-index: 95;
}

.petals span {
  position: absolute;
  top: -28px;
  left: var(--left);
  width: var(--size);
  height: calc(var(--size) * 1.35);
  border-radius: 60% 40% 65% 35%;
  background: rgba(231, 191, 183, 0.72);
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation: petal-fall var(--duration) var(--delay) linear forwards;
}

.petal-burst span {
  position: absolute;
  top: var(--origin-y);
  left: var(--origin-x);
  width: var(--size);
  height: calc(var(--size) * 1.45);
  border-radius: 60% 42% 64% 38%;
  background: var(--petal-color);
  box-shadow: 0 0 16px rgba(231, 191, 183, 0.24);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(0.3);
}

.petal-burst.is-bursting span {
  animation: petal-burst var(--burst-duration) var(--delay) cubic-bezier(0.12, 0.82, 0.18, 1) forwards;
}

@keyframes petal-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  12% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 108vh, 0) rotate(var(--spin));
  }
}

@keyframes petal-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.28);
  }
  14% {
    opacity: 0.95;
  }
  72% {
    opacity: 0.82;
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--x)), calc(-50% + var(--y)))
      rotate(var(--rotation))
      scale(var(--scale));
  }
}

@keyframes seal-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 12px 22px rgba(15, 10, 8, 0.34));
  }
  50% {
    transform: translate(-50%, -50%) scale(1.07);
    filter:
      drop-shadow(0 14px 26px rgba(15, 10, 8, 0.38))
      drop-shadow(0 0 28px rgba(231, 191, 183, 0.45));
  }
}

@keyframes seal-hint-pulse {
  0%,
  100% {
    opacity: 0.62;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px);
  }
}

main {
  width: 100%;
  background:
    linear-gradient(180deg, transparent 0, rgba(192, 194, 170, 0.18) 28%, transparent 52%),
    var(--paper);
  opacity: 0;
  transition: opacity 820ms ease;
}

main.is-visible {
  opacity: 1;
}

.hero {
  position: relative;
  display: grid;
  width: var(--content);
  min-height: 92svh;
  margin: 0 auto;
  padding: 48px 0 24px;
  align-content: center;
  align-items: center;
  gap: clamp(16px, 2.4svh, 24px);
  overflow: visible;
  color: var(--ink);
}

.hero__image {
  position: relative;
  width: 100%;
  max-width: min(860px, 78vw);
  height: clamp(360px, 52svh, 560px);
  justify-self: center;
  overflow: hidden;
  border-radius: 0;
}

.hero__image.image-slot {
  min-height: 0;
  border-radius: var(--radius);
}

.hero__overlay {
  display: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.hero .eyebrow,
.hero__date,
.hero__text {
  color: var(--muted);
}

.hero__date {
  margin-bottom: 10px;
  color: var(--brown-900);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 253, 251, 0.7);
}

.hero__text {
  max-width: 580px;
  margin-top: 22px;
  margin-bottom: 26px;
}

.hero h1 {
  color: var(--brown-900);
  font-size: clamp(4rem, 7vw, 5.8rem);
}

.hero__actions {
  display: inline-flex;
  width: auto;
  min-width: 56px;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 0;
  margin-top: 4px;
}

.hero__actions .music-toggle {
  width: 56px;
  min-height: 56px;
  padding: 0;
  border-color: rgba(66, 39, 22, 0.18);
  border-radius: 50%;
  background: rgba(255, 253, 251, 0.78);
  box-shadow: 0 12px 30px rgba(66, 39, 22, 0.14);
  color: var(--muted);
  text-shadow: none;
}

.music-toggle,
.rsvp-form button,
.button-link,
.text-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.music-toggle {
  position: relative;
  display: flex;
  width: fit-content;
  min-height: 52px;
  margin: 0;
  border: 1px solid rgba(255, 250, 246, 0.34);
  background: rgba(34, 22, 14, 0.18);
  box-shadow:
    0 6px 16px rgba(15, 10, 8, 0.18),
    0 0 12px rgba(231, 191, 183, 0.12);
  color: rgba(255, 250, 246, 0.88);
  gap: 0;
  padding: 0;
  font-size: 0.88rem;
  backdrop-filter: blur(10px);
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(255, 250, 246, 0.18);
  transition:
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease,
    opacity 220ms ease,
    transform 260ms ease;
}

.music-toggle.is-floating {
  position: fixed;
  right: max(28px, calc(env(safe-area-inset-right) + 18px));
  bottom: max(42px, calc(env(safe-area-inset-bottom) + 32px));
  z-index: 45;
  width: 52px;
  min-height: 52px;
  margin: 0;
  padding: 0;
  border-color: rgba(66, 39, 22, 0.12);
  border-radius: 50%;
  background: rgba(251, 247, 243, 0.62);
  box-shadow: 0 12px 30px rgba(66, 39, 22, 0.14);
  color: var(--muted);
  text-shadow: none;
}

.music-toggle.is-floating::before,
.music-toggle.is-floating::after {
  display: none;
}

.music-toggle.is-floating[aria-pressed="true"] {
  border-color: rgba(172, 124, 63, 0.28);
  animation: music-float-pulse 3.2s ease-in-out infinite;
}

.music-toggle.is-floating #musicLabel {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.music-toggle__icon {
  flex: 0 0 auto;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  font-size: 0;
}

.music-toggle__icon::before {
  content: "";
  width: 15px;
  height: 17px;
  margin-left: 3px;
  border: 0;
  border-radius: 3px;
  background: currentColor;
  clip-path: polygon(18% 8%, 18% 92%, 90% 50%);
  opacity: 0.9;
}

.music-toggle[aria-pressed="true"] .music-toggle__icon::before {
  content: "";
  width: 5px;
  height: 18px;
  margin-left: 0;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-right: 5px solid currentColor;
  border-left: 5px solid currentColor;
  background: transparent;
  clip-path: none;
}

.music-toggle #musicLabel {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.music-toggle.is-floating .music-toggle__icon {
  width: 100%;
  height: 100%;
  background: transparent;
  color: var(--muted);
}

.music-toggle:hover,
.music-toggle:focus-visible {
  border-color: rgba(255, 250, 246, 0.58);
  background: rgba(34, 22, 14, 0.26);
  box-shadow:
    0 8px 20px rgba(15, 10, 8, 0.22),
    0 0 18px rgba(231, 191, 183, 0.2);
}

.music-toggle.is-floating:hover,
.music-toggle.is-floating:focus-visible {
  border-color: rgba(66, 39, 22, 0.26);
  background: rgba(251, 247, 243, 0.82);
  box-shadow: 0 16px 36px rgba(66, 39, 22, 0.22);
  transform: translateY(-2px);
}

@keyframes music-float-pulse {
  0%,
  100% {
    box-shadow:
      0 12px 30px rgba(66, 39, 22, 0.13),
      0 0 0 0 rgba(194, 145, 79, 0),
      0 0 24px rgba(194, 145, 79, 0.08);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 16px 38px rgba(66, 39, 22, 0.16),
      0 0 0 14px rgba(194, 145, 79, 0.08),
      0 0 34px rgba(194, 145, 79, 0.18);
    transform: scale(1.025);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 92svh;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    gap: clamp(9px, 1.3svh, 14px);
  }

  .hero__image {
    max-width: min(100%, 360px);
    height: clamp(575px, 72svh, 700px);
  }

  .hero__content {
    justify-items: center;
    padding-bottom: 0;
    text-align: center;
  }

  .hero .eyebrow {
    margin-bottom: 8px;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
  }

  .hero h1 {
    margin-bottom: 6px;
    font-size: clamp(3.25rem, 12.5vw, 4.2rem);
    line-height: 0.92;
  }

  .hero__date {
    margin-bottom: 6px;
    font-size: 1rem;
  }

  .hero__text {
    width: 100%;
    max-width: none;
    margin-top: 18px;
    margin-bottom: 24px;
    font-size: 0.98rem;
    hyphens: auto;
    line-height: 1.48;
    text-align: justify;
    text-align-last: left;
    word-spacing: -0.02em;
  }

  .music-toggle {
    width: 54px;
    min-height: 54px;
    padding: 0;
  }

  .hero__actions {
    display: inline-flex;
    width: auto;
    min-width: 54px;
    min-height: 54px;
    flex-direction: column;
    gap: 0;
    margin-top: 2px;
  }

}

@media (min-width: 641px) {
  .hero {
    width: 100%;
    min-height: 100svh;
    padding: 0;
    align-content: end;
    align-items: end;
    gap: 0;
    overflow: hidden;
    color: white;
  }

  .hero__image {
    position: absolute;
    inset: 0;
    width: auto;
    max-width: none;
    height: auto;
    justify-self: stretch;
  }

  .hero__image.image-slot {
    min-height: 100%;
    border-radius: 0;
  }

  .hero__overlay {
    position: absolute;
    inset: 0;
    display: block;
    background:
      linear-gradient(180deg, rgba(34, 22, 14, 0.1) 0%, rgba(34, 22, 14, 0.18) 34%, rgba(34, 22, 14, 0.72) 100%),
      linear-gradient(90deg, rgba(66, 39, 22, 0.22), transparent 62%);
  }

  .hero__content {
    justify-items: start;
    width: var(--content);
    padding: 0 0 max(28px, env(safe-area-inset-bottom));
    text-align: left;
  }

  .hero__date {
    color: rgba(255, 250, 246, 0.9);
    text-shadow: 0 1px 12px rgba(15, 10, 8, 0.32);
  }

  .hero h1 {
    color: rgba(255, 250, 246, 0.92);
    font-size: clamp(4rem, 9vw, 6.8rem);
  }

  .hero__actions {
    align-items: flex-start;
  }

  .hero__actions .music-toggle {
    border-color: rgba(255, 250, 246, 0.34);
    background: rgba(255, 253, 251, 0.78);
    box-shadow:
      0 6px 16px rgba(15, 10, 8, 0.18),
      0 0 12px rgba(231, 191, 183, 0.12);
    color: var(--muted);
  }
}

.section,
.countdown-section,
.footer {
  width: var(--content);
  margin: 0 auto;
}

.section {
  display: grid;
  gap: 26px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.intro-note {
  scroll-margin-top: 0;
  padding-top: 36px;
  border-top: 0;
}

.intro-note .eyebrow {
  margin-bottom: 18px;
}

.love-story {
  align-items: center;
}

.love-story > * {
  min-width: 0;
}

.love-story__header,
.love-story__text {
  width: 100%;
  max-width: 700px;
}

.love-story__header {
  justify-self: start;
}

.love-story h2 {
  margin-bottom: 0;
  overflow-wrap: break-word;
}

.love-story__text {
  display: grid;
  gap: 14px;
  max-width: 100%;
}

.love-story__text p {
  margin-bottom: 0;
  overflow-wrap: break-word;
}

.love-story__photo {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  justify-self: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.love-story__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 250, 246, 0.34);
  border-radius: inherit;
  pointer-events: none;
}

.love-story__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-break {
  width: var(--content);
  margin: 0 auto;
  padding: 20px 0 42px;
}

.photo-break img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.photo-break--wide {
  padding-top: 6px;
}

.photo-break--wide img {
  max-width: 100%;
  height: clamp(360px, 54vw, 560px);
  margin: 0 auto;
}

.photo-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 0;
}

.photo-pair img {
  height: clamp(300px, 34vw, 460px);
}

.photo-break--quiet {
  padding-top: 4px;
  padding-bottom: 18px;
}

.photo-break--quiet img {
  max-width: 100%;
  height: clamp(300px, 42vw, 460px);
  margin: 0 auto;
}

@media (max-width: 640px) {
  .intro-note {
    scroll-margin-top: 0;
    padding-top: 34px;
  }

  .love-story {
    gap: 28px;
  }

  .love-story__photo {
    max-width: 100%;
    aspect-ratio: 1 / 1.18;
  }

  .photo-break {
    padding: 8px 0 34px;
  }

  .photo-break--wide img,
  .photo-break--quiet img,
  .photo-pair img {
    max-width: 100%;
    height: clamp(420px, 66svh, 560px);
    margin: 0 auto;
  }

  .photo-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-top: 2px;
  }

  .photo-break--quiet {
    padding-bottom: 8px;
  }

  .love-story__header,
  .love-story__text {
    max-width: 100%;
  }

  .love-story h2 {
    font-size: clamp(2.4rem, 12vw, 3.15rem);
    line-height: 1.04;
  }

  .love-story__text {
    gap: 12px;
  }

  .love-story__text p {
    line-height: 1.56;
  }
}

.section__copy {
  max-width: 670px;
}

@media (max-width: 640px) {
  .section__copy {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .section__copy > p:not(.eyebrow),
  .timeline__item p {
    width: 100%;
    max-width: none;
    font-size: clamp(1rem, 4vw, 1.08rem);
    hyphens: none;
    line-height: 1.62;
    overflow-wrap: break-word;
    text-align: left;
    text-align-last: left;
    text-wrap: pretty;
  }
}

.image-slot {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(66, 39, 22, 0.28), rgba(119, 120, 86, 0.3)),
    linear-gradient(45deg, var(--rose-200), var(--sage-300));
  color: rgba(255, 250, 246, 0.88);
  text-align: center;
}

.image-slot span {
  width: min(230px, 72%);
  padding: 12px 14px;
  border: 1px solid rgba(255, 250, 246, 0.38);
  border-radius: var(--radius);
  background: rgba(66, 39, 22, 0.18);
  font-weight: 700;
}

.image-slot .fallback-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.image-slot--hero {
  background:
    linear-gradient(180deg, rgba(34, 22, 14, 0.06), rgba(34, 22, 14, 0.22)),
    url("assets/photo1.jpg") center / cover no-repeat;
}

.image-slot--portrait {
  min-height: 360px;
  background:
    linear-gradient(180deg, rgba(66, 39, 22, 0.08), rgba(66, 39, 22, 0.2)),
    url("assets/wax-floral-detail.png") center / cover no-repeat;
}

.image-slot--wide {
  height: clamp(220px, 58vw, 280px);
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 250, 246, 0.08), rgba(66, 39, 22, 0.08)),
    url("assets/paper-floral-divider.png") center / cover no-repeat;
  color: var(--brown-900);
}

.image-slot--small {
  min-height: 230px;
  background:
    linear-gradient(180deg, rgba(255, 250, 246, 0.06), rgba(66, 39, 22, 0.08)),
    url("assets/wax-floral-detail.png") center / cover no-repeat;
  color: var(--brown-900);
}

.image-slot--wide span,
.image-slot--small span {
  border-color: rgba(66, 39, 22, 0.16);
  background: rgba(255, 250, 246, 0.5);
}

.timeline-section {
  position: relative;
}

.timeline {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 28px;
}

.timeline__path {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 11px;
  width: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(66, 39, 22, 0.12);
}

.timeline__path::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--rose-400), var(--olive-700), var(--brown-700));
  transform: scaleY(var(--timeline-progress, 0));
  transform-origin: top;
}

.timeline__item {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px 0 18px 18px;
  opacity: 0.38;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 25px;
  left: -26px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--rose-400);
  box-shadow: 0 0 0 1px rgba(66, 39, 22, 0.18);
}

.timeline__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline time {
  color: var(--brown-700);
  font-family: var(--font-display);
  font-size: 2rem;
}

.timeline__item h3 {
  color: var(--brown-900);
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.1rem);
  font-weight: 400;
  line-height: 0.92;
}

.location-section {
  padding-top: 54px;
}

.location-section .section__copy {
  max-width: 760px;
}

.location-section .image-slot {
  margin: 24px 0 28px;
}

.map-frame {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sage-300);
  box-shadow: 0 12px 32px rgba(66, 39, 22, 0.1);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}

.text-link,
.gifts-section .button-link {
  display: flex;
  width: fit-content;
  margin-inline: auto;
  border: 1px solid rgba(66, 39, 22, 0.2);
  background: rgba(255, 253, 251, 0.62);
  color: var(--brown-700);
  padding: 0 16px;
  backdrop-filter: blur(12px);
  box-shadow: none;
  text-align: center;
}

.text-link:hover,
.text-link:focus-visible,
.gifts-section .button-link:hover,
.gifts-section .button-link:focus-visible {
  border-color: rgba(66, 39, 22, 0.32);
  background: rgba(255, 253, 251, 0.78);
}

.gifts-section .image-slot {
  margin: 16px 0 0;
}

.gifts-section .button-link {
  margin-top: 4px;
}

.button-link {
  width: fit-content;
  padding: 0 18px;
  background: var(--brown-900);
  color: var(--paper);
}

.button-link--disabled {
  cursor: default;
  opacity: 0.78;
}

.dress-section__image {
  overflow: hidden;
  border: 1px solid rgba(66, 39, 22, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.72);
  box-shadow: 0 12px 32px rgba(66, 39, 22, 0.08);
}

.dress-section__image img {
  display: block;
  width: 100%;
  height: auto;
}

.rsvp-section {
  border-top: 1px solid var(--line);
}

.success-message {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 22px;
  margin-inline: auto;
  padding: 0 18px;
  border: 1px solid rgba(66, 39, 22, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.78);
  color: var(--brown-700);
  box-shadow: 0 12px 28px rgba(66, 39, 22, 0.08);
  font-weight: 700;
  text-align: center;
}

.form-message[hidden],
.success-message[hidden] {
  display: none !important;
}

.form-message {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 0 18px;
  border: 1px solid rgba(66, 39, 22, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.78);
  color: var(--brown-700);
  box-shadow: 0 12px 28px rgba(66, 39, 22, 0.08);
  font-weight: 700;
  text-align: center;
}

.form-message--error {
  border-color: rgba(138, 82, 51, 0.28);
  background: rgba(231, 191, 183, 0.26);
  color: var(--brown-900);
}

.success-message strong {
  color: var(--brown-900);
}

.success-message span {
  color: inherit;
}

.rsvp-edit-button {
  margin-top: 14px;
}

.rsvp-edit-button[hidden] {
  display: none !important;
}

.success-title {
  display: none;
}

.rsvp-section.is-submitted {
  grid-template-columns: minmax(0, 1fr);
}

.rsvp-section.is-submitted .section__copy {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.rsvp-section.is-submitted h2 {
  display: none;
}

.rsvp-section.is-submitted .success-title {
  display: block;
  margin-bottom: 18px;
}

.rsvp-section.is-submitted .section__copy > p:not(.eyebrow),
.rsvp-section.is-submitted .rsvp-form {
  display: none;
}

.rsvp-section.is-submitted .success-message {
  margin-top: 0;
}

.rsvp-section.is-submitted .rsvp-edit-button {
  display: inline-flex;
}

.rsvp-form {
  display: grid;
  gap: 16px;
}

.rsvp-form label,
.rsvp-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--brown-900);
  font-size: 0.9rem;
  font-weight: 700;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdfb;
  color: var(--muted);
  padding: 13px 14px;
  outline: 0;
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: rgba(117, 102, 92, 0.82);
}

.rsvp-form input:not([type="radio"]):not([type="checkbox"]):focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: var(--brown-700);
  box-shadow: 0 0 0 3px rgba(138, 82, 51, 0.14);
}

.rsvp-form input[type="radio"]:focus,
.rsvp-form input[type="checkbox"]:focus {
  outline: 0;
  box-shadow: none;
}

.rsvp-form fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.rsvp-form legend {
  color: var(--brown-900);
  padding: 0 6px;
}

.rsvp-disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.72);
}

.rsvp-disclosure summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 44px 14px 14px;
  color: var(--brown-900);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.rsvp-disclosure summary::-webkit-details-marker {
  display: none;
}

.rsvp-disclosure summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(117, 102, 92, 0.9);
  border-bottom: 2px solid rgba(117, 102, 92, 0.9);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 180ms ease;
}

.rsvp-disclosure[open] summary::after {
  transform: translateY(-35%) rotate(225deg);
}

.rsvp-disclosure__content {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(66, 39, 22, 0.08);
}

.choice,
.checkbox {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 10px !important;
  min-height: 44px;
  color: var(--brown-900) !important;
  font-weight: 650 !important;
}

.choice input,
.checkbox input {
  width: auto;
  min-width: 18px;
  accent-color: var(--rose-400);
  box-shadow: none;
}

.rsvp-form button {
  min-height: 52px;
  border: 1px solid rgba(66, 39, 22, 0.16);
  background: rgba(192, 194, 170, 0.42);
  box-shadow: 0 12px 28px rgba(66, 39, 22, 0.08);
  color: var(--brown-900);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.rsvp-form button:hover,
.rsvp-form button:focus-visible {
  border-color: rgba(66, 39, 22, 0.28);
  background: rgba(192, 194, 170, 0.58);
  box-shadow: 0 16px 34px rgba(66, 39, 22, 0.12);
  transform: translateY(-1px);
}

.countdown-section {
  display: grid;
  padding: 58px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.countdown-section[hidden] {
  display: none;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 10px);
  margin-top: 20px;
}

.countdown div {
  display: grid;
  gap: 2px;
  min-height: 0;
  padding: 10px 4px;
  place-items: center;
  border: 1px solid rgba(66, 39, 22, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.78);
}

.countdown strong {
  color: var(--brown-900);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 6.8vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
}

.countdown span {
  color: var(--muted);
  font-size: clamp(0.58rem, 2.4vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.footer {
  position: relative;
  display: grid;
  min-height: clamp(260px, 32vw, 340px);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  padding: 44px 0 34px;
  border-top: 0;
  background: linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat;
  text-align: center;
}

.footer::before,
.footer::after {
  content: "♡";
  position: absolute;
  top: 50%;
  color: rgba(138, 82, 51, 0.5);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  pointer-events: none;
}

.footer::before {
  left: clamp(18px, 4vw, 48px);
  transform: translateY(-50%) rotate(-10deg);
}

.footer::after {
  right: clamp(18px, 4vw, 48px);
  transform: translateY(-50%) scaleX(-1) rotate(-10deg);
}

.footer p {
  align-self: center;
  margin: 0 auto;
}

.footer__signature {
  display: inline-grid;
  align-self: end;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.footer strong {
  color: var(--brown-900);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
}

.footer small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--brown-900);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.footer small::before,
.footer small::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brown-700);
}

@media (max-width: 640px) {
  .footer::before,
  .footer::after {
    top: auto;
    bottom: 42px;
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .footer::before {
    left: 42px;
  }

  .footer::after {
    right: 42px;
  }
}

@media (min-width: 760px) {
  :root {
    --content: min(1120px, calc(100vw - 64px));
  }

  .section {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
    align-items: center;
    gap: 52px;
    padding: 72px 0;
  }

  .intro-note {
    padding-top: 104px;
  }

  .love-story {
    align-items: start;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  }

  .love-story__header {
    grid-column: 1 / -1;
  }

  .love-story__photo {
    grid-column: 1;
    align-self: center;
  }

  .love-story__text {
    grid-column: 2;
    align-self: center;
  }

  .timeline-section,
  .rsvp-section {
    grid-template-columns: 0.86fr 1.14fr;
  }

  .timeline-section {
    align-items: start;
  }

  .timeline-section .section__copy {
    position: sticky;
    top: 118px;
  }

  .rsvp-section {
    align-items: start;
  }

  .rsvp-section .section__copy {
    position: sticky;
    top: 118px;
  }

  .rsvp-section.is-submitted .section__copy {
    position: static;
  }

  .location-section {
    grid-template-columns: 0.86fr 1.14fr;
    align-items: center;
  }

  .location-section .section__copy {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .location-section .image-slot {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    height: auto;
    min-height: 100%;
    margin: 0;
  }

  .location-section__link {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin-inline: 0;
  }

  .gifts-section {
    grid-template-columns: 0.75fr 1fr;
  }

  .gifts-section .image-slot {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    height: auto;
    min-height: 100%;
    margin: 0;
  }

  .gifts-section .section__copy {
    grid-column: 2;
    grid-row: 1;
  }

  .location-section .map-frame iframe {
    height: 300px;
  }

  .dress-section {
    grid-template-columns: 0.82fr 1.18fr;
  }

  .countdown div {
    min-height: 108px;
    padding: 16px 10px;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .petals {
    display: none;
  }
}
