:root {
  --color-primary: #d8c3a5;
  --color-secondary: #afcfea;
  --color-background: #ffffff;
  --color-surface: #fafaf7;
  --color-text: #2f2a24;
  --color-muted-text: #6f665c;
  --color-line: rgba(216, 195, 165, 0.42);
  --shadow: 0 18px 48px rgba(47, 42, 36, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --envelope-poster-scale: 1;
  --envelope-media-offset-x: 1px;
  --envelope-media-bleed: 1px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
  scrollbar-color: rgba(216, 195, 165, 0.55) transparent;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--color-text);
  background: var(--color-background);
  font-family: "Libre Baskerville", Georgia, serif;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background: rgba(216, 195, 165, 0.42);
  border-radius: 999px;
}

main {
  width: 100%;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  min-height: 100vh;
  overflow: hidden;
  background: #f4dfcf;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: none;
}

.envelope-screen.is-loading {
  cursor: default;
}

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

.envelope-screen.is-dissolving {
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope-screen.is-alpha-playing {
  background: transparent;
}

.envelope-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  opacity: 0;
  transition: opacity 520ms ease;
}

.envelope-screen.is-ready .envelope-stage,
.envelope-screen.is-opening .envelope-stage {
  opacity: 1;
}

.envelope-media {
  position: absolute;
  top: 0;
  left: calc(var(--envelope-media-offset-x) - (var(--envelope-media-bleed) / 2));
  width: calc(100% + var(--envelope-media-bleed));
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  -webkit-tap-highlight-color: transparent;
  filter: saturate(1.02);
  transform: scale(1);
  transform-origin: center center;
  transition:
    transform 860ms cubic-bezier(0.12, 0.86, 0.2, 1),
    filter 860ms ease;
}

.envelope-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--envelope-poster-scale));
}

.envelope-media.is-active {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1.02);
}

.envelope-alpha-media {
  z-index: 1;
}

.envelope-screen.is-zooming-out .envelope-alpha-media.is-active {
  transform: scale(2);
  filter: saturate(1.06) brightness(1.06);
}

.envelope-screen::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background: linear-gradient(180deg, transparent 46%, rgba(47, 42, 36, 0.24));
  pointer-events: none;
}

.envelope-screen.is-alpha-playing::after,
.envelope-screen.is-dissolving::after {
  opacity: 0;
}

.invite-loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 18px;
  color: var(--color-text);
  background: #f4dfcf;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
  opacity: 1;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.envelope-screen.is-ready .invite-loader,
.envelope-screen.is-opening .invite-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  position: relative;
  width: 200px;
  height: 250px;
  margin: 0 auto;
  display: flex;
  place-items: center;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  filter: drop-shadow(0 18px 18px rgba(47, 42, 36, 0.16));
}

.loader-ring::before,
.loader-ring::after {
  content: none;
}

.ring-assembly {
  position: relative;
  width: 120px;
  height: 120px;
  animation: loader-coin-spin 3s infinite linear;
  transform-style: preserve-3d;
}

.loader-ring .layer,
.loader-ring .diamond-setting {
  position: absolute;
  transform-style: preserve-3d;
}

.loader-ring .layer {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 14px solid #d4af37;
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
}

.loader-ring .l1 {
  border-color: #aa8c2c;
  transform: translateZ(-3px);
}

.loader-ring .l2 {
  border-color: #bfa133;
  transform: translateZ(-2px);
}

.loader-ring .l3 {
  border-color: #d4af37;
  transform: translateZ(-1px);
}

.loader-ring .l4 {
  border-color: #dfba43;
  transform: translateZ(0);
}

.loader-ring .l5 {
  border-color: #e5c353;
  transform: translateZ(1px);
}

.loader-ring .l6 {
  border-color: #ebd174;
  transform: translateZ(2px);
}

.loader-ring .diamond-setting {
  top: -24px;
  left: 50%;
  width: 36px;
  height: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0 42%, transparent 43%),
    linear-gradient(35deg, rgba(194, 238, 249, 0.82) 0 48%, transparent 49%),
    linear-gradient(135deg, #ffffff 0 30%, #dff8ff 31% 56%, #bcecf7 57% 100%);
  box-shadow:
    0 0 15px rgba(255, 255, 255, 0.9),
    inset -2px -2px 5px rgba(0, 188, 212, 0.2);
  clip-path: polygon(18% 0, 82% 0, 100% 28%, 50% 100%, 0 28%);
  transform: translateX(-50%) translateZ(1px);
}

.loader-ring .diamond-setting::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.82) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: loader-ring-gleam 3s infinite linear;
}

.loader-ring .diamond-setting::before {
  content: none;
}

@keyframes loader-coin-spin {
  0% {
    transform: rotateX(10deg) rotateY(0deg);
  }

  100% {
    transform: rotateX(10deg) rotateY(360deg);
  }
}

@keyframes loader-ring-gleam {
  from {
    background-position: -200% -200%;
  }

  to {
    background-position: 200% 200%;
  }
}

.envelope-button {
  position: absolute;
  left: 50%;
  bottom: clamp(34px, 8vh, 86px);
  z-index: 2;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--color-text);
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transform: translateX(-50%);
  transition: opacity 220ms ease, transform 220ms ease;
}

.envelope-screen.is-loading .envelope-button,
.envelope-button:disabled {
  opacity: 0;
  pointer-events: none;
}

.envelope-screen.is-opening .envelope-button {
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
}

.envelope-button span {
  min-width: 184px;
  padding: 15px 25px 13px;
  color: var(--color-text);
  background: rgba(250, 250, 247, 0.92);
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: transform 220ms ease, background 220ms ease;
}

.envelope-button:hover span {
  background: var(--color-text);
  color: var(--color-background);
  transform: translateY(-3px);
}

.site-shell {
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  transition: none;
}

.site-shell.is-visible {
  opacity: 1;
  visibility: visible;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100svh;
  padding: clamp(3.5rem, 7vw, 6rem) 1.5rem;
  overflow: hidden;
  place-items: center;
  text-align: center;
  color: #fff;
  background: #211b19;
}

.hero-video,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(180deg, rgba(22, 20, 18, 0.2), rgba(22, 20, 18, 0.28)),
    radial-gradient(circle at center, rgba(22, 20, 18, 0.08), rgba(22, 20, 18, 0.34));
  opacity: 1;
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(880px, 100%);
  transform: translateY(-1vh);
}

.hero-script,
.sec-script,
.footer-script {
  margin: 0;
  font-family: "Dancing Script", cursive;
  font-weight: 500;
}

.hero-script {
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.hero-script,
.hero h1,
.flower-divider,
.hero-date-line,
.hero-venue-line,
.hero-copy,
.countdown {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 720ms ease, transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-shell.hero-revealed .hero-script {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 80ms;
}

.site-shell.hero-revealed .hero h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 240ms;
}

.site-shell.hero-revealed .flower-divider {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 520ms;
}

.site-shell.hero-revealed .hero-date-line {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 680ms;
}

.site-shell.hero-revealed .hero-venue-line {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 820ms;
}

.site-shell.hero-revealed .hero-copy {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 980ms;
}

.site-shell.hero-revealed .countdown {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1160ms;
}

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

.hero h1 {
  margin: 0;
  color: #fff;
  font-family: "Dancing Script", cursive;
  font-size: clamp(4rem, 12vw, 8.9rem);
  font-weight: 600;
  line-height: 0.9;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.hero h1 span {
  display: block;
  color: var(--color-primary);
  font-size: 0.55em;
  line-height: 1.25;
}

.flower-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(340px, 75vw);
  margin: 1.25rem auto 1.1rem;
}

.flower-divider::before,
.flower-divider::after,
.sec-ornament::before,
.sec-ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-primary));
}

.flower-divider::after,
.sec-ornament::after {
  background: linear-gradient(to left, transparent, var(--color-primary));
}

.hero-date-line,
.hero-venue-line {
  color: rgba(255, 255, 255, 0.86);
}

.hero-date-line {
  margin-bottom: 0.45rem;
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.15rem);
  font-weight: 200;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-venue-line {
  margin-bottom: 1.3rem;
  font-style: italic;
  opacity: 0.86;
}

.hero-copy {
  max-width: 620px;
  margin: 0 auto 1.45rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.85;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.7rem, 2vw, 1.2rem);
  flex-wrap: wrap;
}

.countdown div {
  display: flex;
  min-width: 92px;
  padding: 0.72rem 0.9rem;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(216, 195, 165, 0.48);
  border-radius: var(--radius-md);
  background: rgba(196, 168, 115, 0.09);
  backdrop-filter: blur(2px);
}

.countdown strong {
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 100;
  line-height: 1;
}

.countdown span {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.74);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.sec {
  position: relative;
  padding: clamp(2.5rem, 8vw, 6.5rem) clamp(1.25rem, 5vw, 2rem);
}

.sec-inner {
  width: min(960px, 100%);
  margin: 0 auto;
}

.sec-script {
  color: var(--color-primary);
  text-align: center;
  font-size: clamp(3rem, 4.5vw, 2.8rem);
}

.sec-heading {
  margin: 0.2rem 0 0.5rem;
  color: var(--color-muted-text);
  text-align: center;
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.sec-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(180px, 60vw);
  margin: 0 auto 3rem;
  color: var(--color-primary);
}

.sec-ornament.left {
  margin-left: 0;
}

.story {
  background: var(--color-background);
}

.story-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.story-card {
  position: relative;
  padding: 2rem;
  background: var(--color-surface);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.story-card::before {
  position: absolute;
  top: 0.45rem;
  left: 1rem;
  content: "\"";
  color: var(--color-primary);
  opacity: 0.2;
  font-family: "Dancing Script", cursive;
  font-size: 5rem;
  line-height: 1;
}

.story-card-mark {
  margin-bottom: 0.7rem;
  color: var(--color-secondary);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
}

.story-card h2,
.wreath-card h2,
.tbi h2 {
  font-family: "Dancing Script", cursive;
  font-weight: 500;
}

.story-card h2 {
  margin-bottom: 0.55rem;
  font-size: 1.55rem;
}

.story-card p,
.wreath-card p,
.tbi p,
.location-copy,
.rsvp-intro {
  color: var(--color-muted-text);
  font-size: 1 rem;
  font-style: italic;
  line-height: 1.85;
}

.details,
.party-sec,
footer {
  background: var(--color-surface);
}

.details-wreath {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  perspective: 900px;
}

.wreath-card {
  --card-delay: 0ms;
  position: relative;
  padding: clamp(1.8rem, 4vw, 2.4rem) 1.2rem;
  overflow: hidden;
  text-align: center;
  background: var(--color-background);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(26px) rotateX(5deg) scale(0.97);
  transition:
    opacity 620ms ease var(--card-delay),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1) var(--card-delay),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.wreath-card:nth-child(2) {
  --card-delay: 130ms;
}

.wreath-card:nth-child(3) {
  --card-delay: 260ms;
}

.wreath-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 195, 165, 0.24), transparent 42%),
    linear-gradient(135deg, rgba(175, 207, 234, 0.12), transparent 48%);
  opacity: 0;
  transition: opacity 420ms ease;
  pointer-events: none;
}

.wreath-card.is-visible {
  opacity: 1;
  transform: translateY(0) rotateX(0) scale(1);
}

.wreath-card:hover {
  border-color: rgba(216, 195, 165, 0.78);
  box-shadow: 0 18px 42px rgba(216, 195, 165, 0.24);
  transform: translateY(-6px) scale(1.012);
}

.wreath-card:hover::before {
  opacity: 1;
}

.wc-ring {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 1.2rem;
  place-items: center;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  color: var(--color-text);
  font-family: "Josefin Sans", sans-serif;
  font-weight: 300;
  transition: transform 360ms ease, border-color 360ms ease, background 360ms ease;
}

.wreath-card:hover .wc-ring {
  background: rgba(216, 195, 165, 0.12);
  border-color: rgba(201, 170, 125, 0.9);
  transform: translateY(-3px) rotate(8deg);
}

.wc-ring::after {
  position: absolute;
  inset: 4px;
  content: "";
  border: 1px solid rgba(175, 207, 234, 0.44);
  border-radius: 50%;
}

.wc-map-pin {
  width: 30px;
  height: 30px;
  fill: #000;
}

.wreath-card h2 {
  margin-bottom: 0.45rem;
  font-size: 2rem;
}

.wreath-card span {
  display: inline-block;
  margin-top: 0.55rem;
  padding-bottom: 2px;
  color: var(--color-secondary);
  border-bottom: 1px solid var(--color-secondary);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 0.8rem;
  padding: 0.62rem 0.95rem 0.52rem;
  color: var(--color-text);
  background: rgba(216, 195, 165, 0.16);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  text-decoration: none;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.56rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.card-action:hover {
  color: var(--color-background);
  background: var(--color-text);
  border-color: var(--color-text);
}

.map-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: clamp(2.3rem, 4vw, 3.2rem) 1.5rem;
  text-align: center;
  background: var(--color-text);
}

.map-band-label,
.map-band-addr {
  margin: 0;
  color: var(--color-primary);
  font-family: "Josefin Sans", sans-serif;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.map-band-label {
  margin-bottom: 0.45rem;
  font-size: 0.58rem;
  opacity: 0.72;
}

.map-band-name {
  margin: 0;
  color: var(--color-primary);
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.map-band-addr {
  margin-top: 0.4rem;
  font-size: 0.58rem;
  opacity: 0.62;
}

.map-band-pin {
  font-size: 2.1rem;
  opacity: 0.48;
}

.program-sec,
.location-sec,
.rsvp-sec {
  background: var(--color-background);
}

.timeline-boho {
  --timeline-progress: 0%;
  position: relative;
  display: grid;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.2rem 0;
  gap: clamp(2rem, 7vw, 4.4rem);
}

.timeline-boho::before,
.timeline-boho::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  content: "";
  transform: translateX(-50%);
}

.timeline-boho::before {
  background: repeating-linear-gradient(
    to bottom,
    rgba(216, 195, 165, 0.48) 0,
    rgba(216, 195, 165, 0.48) 8px,
    transparent 8px,
    transparent 17px
  );
}

.timeline-boho::after {
  bottom: auto;
  height: var(--timeline-progress);
  background: linear-gradient(180deg, var(--color-primary), rgba(175, 207, 234, 0.76));
  transition: height 120ms linear;
}

.tbi {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 150px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.tbi::before {
  position: absolute;
  top: 2.2rem;
  left: 50%;
  z-index: 2;
  width: 18px;
  height: 18px;
  content: "";
  background: var(--color-primary);
  border: 3px solid var(--color-background);
  box-shadow: 0 0 0 1px rgba(216, 195, 165, 0.55);
  transform: translate(-50%, -50%) rotate(45deg) scale(0.72);
  transition: transform 420ms ease, background 420ms ease;
}

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

.tbi.is-visible::before {
  background: #c9aa7d;
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

.tbi-card {
  width: min(270px, calc(100% - 2rem));
  padding: 0 1.5rem 1rem 0;
}

.tbi-card time,
.tbi-card h2,
.tbi-card p {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.tbi.is-visible .tbi-card time {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 80ms;
}

.tbi.is-visible .tbi-card h2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 210ms;
  font-size: 2rem;
}

.tbi.is-visible .tbi-card p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 340ms;
  font-size: 1rem;
}

.tbi:nth-child(even) .tbi-card {
  grid-column: 2;
  justify-self: end;
  padding: 0 0 1rem 1.5rem;
}

.tbi:nth-child(odd) .tbi-card {
  grid-column: 1;
  justify-self: start;
  text-align: right;
}

.tbi time {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-primary);
  font-family: "Josefin Sans", sans-serif;
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 200;
  line-height: 1;
}

.tbi h2 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.55rem);
  line-height: 1;
}

.tbi p {
  margin: 0;
  color: var(--color-muted-text);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.75;
}

.party-copy {
  display: grid;
  width: min(760px, 100%);
  margin: 0 auto 2.3rem;
  gap: 0.45rem;
  color: var(--color-text);
  text-align: center;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  font-style: italic;
  line-height: 1.65;
}

.party-sec .sec-script,
.party-sec .sec-heading,
.party-sec .sec-ornament,
.party-copy span,
.party-copy strong,
.party-collage {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 680ms ease, transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.party-sec.is-visible .sec-script {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 80ms;
}

.party-sec.is-visible .sec-heading {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 190ms;
}

.party-sec.is-visible .sec-ornament {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 300ms;
}

.party-sec.is-visible .party-copy span:first-child {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 430ms;
}

.party-sec.is-visible .party-copy strong {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 580ms;
}

.party-sec.is-visible .party-copy span:last-child {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 730ms;
}

.party-sec.is-visible .party-collage {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 900ms;
}

.party-copy span,
.party-copy strong {
  display: block;
}

.party-copy strong {
  color: var(--color-primary);
  font-family: "Dancing Script", cursive;
  font-size: clamp(2.35rem, 5.2vw, 4.2rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.05;
}

.party-collage {
  position: relative;
  width: min(760px, 100%);
  height: clamp(820px, 112vw, 1040px);
  margin: 0 auto;
  isolation: isolate;
}

.party-collage::before {
  display: none;
}

.collage-photo {
  --x: 0%;
  --y: 0%;
  --r: 0deg;
  --w: 42%;
  --fall-x: -22px;
  position: absolute;
  top: var(--y);
  left: var(--x);
  z-index: 1;
  width: var(--w);
  aspect-ratio: 1.03;
  margin: 0;
  overflow: hidden;
  background: transparent;
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 36px rgba(47, 42, 36, 0.18);
  opacity: 0;
  transform: translate3d(var(--fall-x), -96px, 0) rotate(calc(var(--r) - 18deg)) scale(0.92);
  transform-origin: 50% 18%;
}

.collage-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 34%),
    rgba(216, 195, 165, 0.08);
  mix-blend-mode: screen;
  border-radius: inherit;
  pointer-events: none;
}

.collage-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--radius-sm);
  filter: sepia(0.88) saturate(0.48) contrast(1.04) brightness(1.03);
  transition: transform 700ms ease, filter 700ms ease;
}

.collage-photo:hover img {
  filter: sepia(0.78) saturate(0.58) contrast(1.05) brightness(1.05);
  transform: scale(1.045);
}

.collage-main {
  --x: 43%;
  --y: 0%;
  --r: 4deg;
  --w: 45%;
  --fall-x: 28px;
  z-index: 2;
}

.collage-side {
  --x: 8%;
  --y: 26%;
  --r: -5deg;
  --w: 50%;
  --fall-x: -30px;
  z-index: 3;
}

.collage-small {
  --x: 48%;
  --y: 48%;
  --r: 7deg;
  --w: 46%;
  --fall-x: 30px;
  z-index: 4;
}

.collage-wide {
  --x: 17%;
  --y: 72%;
  --r: -6deg;
  --w: 47%;
  --fall-x: -24px;
  z-index: 5;
}

.party-sec.is-visible .collage-photo {
  animation: photoDrop 820ms cubic-bezier(0.2, 1.12, 0.32, 1) both;
}

.party-sec.is-visible .collage-main {
  animation-delay: 980ms;
}

.party-sec.is-visible .collage-side {
  animation-delay: 1120ms;
}

.party-sec.is-visible .collage-small {
  animation-delay: 1260ms;
}

.party-sec.is-visible .collage-wide {
  animation-delay: 1400ms;
}

@keyframes photoDrop {
  from {
    opacity: 0;
    transform: translate3d(var(--fall-x), -96px, 0) rotate(calc(var(--r) - 18deg)) scale(0.92);
  }
  72% {
    opacity: 1;
    transform: translate3d(0, 8px, 0) rotate(calc(var(--r) + 1.5deg)) scale(1.015);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(var(--r)) scale(1);
  }
}

.location-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1.22fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.location-sec .sec-script,
.location-sec .sec-heading {
  text-align: left;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem 0.75rem;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-text);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-family: "Dancing Script", cursive;
  font-size: 1.18rem;
  letter-spacing: 0.03em;
  transition: background 0.25s ease, color 0.25s ease;
}

.button:hover,
.button.submit {
  color: var(--color-background);
  background: var(--color-text);
}

.button.submit:hover {
  background: transparent;
  color: var(--color-text);
}

.map {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.rsvp-form {
  position: relative;
  display: grid;
  max-width: 620px;
  margin: 0 auto;
  gap: 1.05rem;
  padding: clamp(2rem, 5vw, 3.4rem);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
}

.rsvp-form.is-submitted {
  place-items: center;
  min-height: 220px;
}

.rsvp-form::before {
  position: absolute;
  top: -0.78rem;
  left: 50%;
  padding: 0 0.5rem;
  content: "✿";
  color: var(--color-primary);
  background: var(--color-background);
  transform: translateX(-50%);
}

.rsvp-intro {
  margin-bottom: 0.7rem;
  text-align: center;
}

.rsvp-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--color-muted-text);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.rsvp-form input,
.rsvp-form textarea {
  width: 100%;
  padding: 0.78rem 1rem;
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid rgba(216, 195, 165, 0.55);
  border-radius: var(--radius-sm);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.9rem;
  outline: none;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
  border-color: var(--color-secondary);
}

.button:focus-visible,
.envelope-button:focus-visible {
  outline: 3px solid rgba(175, 207, 234, 0.58);
  outline-offset: 3px;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--color-muted-text);
  text-align: center;
  font-size: 0.82rem;
  font-style: italic;
}

.form-note.is-error {
  padding: 0.9rem 1rem;
  color: #9f1d1d;
  background: rgba(159, 29, 29, 0.08);
  border: 1px solid rgba(159, 29, 29, 0.34);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.rsvp-form.is-submitted .rsvp-intro,
.rsvp-form.is-submitted label,
.rsvp-form.is-submitted .button {
  display: none;
}

.rsvp-form.is-submitted .form-note {
  max-width: 420px;
  min-height: 0;
  padding: 1.1rem 1.25rem;
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid rgba(216, 195, 165, 0.72);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 34px rgba(47, 42, 36, 0.08);
  font-size: 1rem;
  line-height: 1.65;
}

footer {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
  text-align: center;
}

footer::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.footer-script {
  font-size: clamp(2.7rem, 7vw, 5rem);
}

.footer-meta {
  margin-top: 0.7rem;
  color: var(--color-muted-text);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.65rem;
  font-weight: 200;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.footer-flowers {
  margin: 1.4rem 0 0;
  opacity: 0.42;
  letter-spacing: 0.45rem;
}

@media (max-width: 880px) {
  .story-cards,
  .details-wreath,
  .location-layout {
    grid-template-columns: 1fr;
  }

  .details-wreath {
    max-width: 520px;
    margin: 0 auto;
  }

  .party-collage {
    width: min(620px, 100%);
    height: 940px;
  }

  .collage-main {
    --x: 42%;
    --y: 0%;
    --w: 50%;
    --r: 4deg;
  }

  .collage-side {
    --x: 4%;
    --y: 25%;
    --w: 56%;
    --r: -5deg;
  }

  .collage-small {
    --x: 46%;
    --y: 48%;
    --w: 51%;
    --r: 7deg;
  }

  .collage-wide {
    --x: 14%;
    --y: 72%;
    --w: 52%;
    --r: -6deg;
  }

}

@media (max-width: 620px) {
  .envelope-screen {
    background:
      radial-gradient(circle at center, rgba(216, 195, 165, 0.34), transparent 58%),
      #f4dfcf;
    --envelope-media-offset-x: -1px;
    --envelope-media-bleed: 12px;
  }

  .envelope-media {
    object-fit: cover;
    padding: 0;
  }

  .envelope-media img {
    transform: scale(1);
  }

  .envelope-button {
    bottom: max(140px, env(safe-area-inset-bottom));
  }

  .hero h1 {
    font-size: clamp(3.7rem, 19vw, 5.5rem);
  }

  .countdown div {
    min-width: 118px;
  }

  .timeline-boho {
    max-width: 420px;
    gap: 2.7rem;
  }

  .tbi {
    grid-template-columns: 1fr 1fr;
    min-height: 128px;
  }

  .tbi-card,
  .tbi:nth-child(even) .tbi-card,
  .tbi:nth-child(odd) .tbi-card {
    width: calc(100% - 1rem);
    padding: 0;
  }

  .tbi:nth-child(odd) .tbi-card {
    padding-right: 1rem;
  }

  .tbi:nth-child(even) .tbi-card {
    padding-left: 1rem;
  }

  .tbi time {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }

  .tbi h2 {
    font-size: clamp(1.35rem);
  }

  .tbi p {
    font-size: 0.78rem;
    line-height: 1.55;
  }

  .map-band {
    gap: 1rem;
  }

  .map-band-pin {
    display: none;
  }

  .party-copy {
    gap: 0.35rem;
    font-size: 1rem;
    line-height: 1.7;
  }

  .party-copy strong {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .party-collage {
    width: min(390px, 100%);
    height: 730px;
    margin-top: 0.5rem;
  }

  .party-collage::before {
    display: none;
  }

  .collage-photo {
    border-radius: var(--radius-sm);
  }

  .collage-main {
    --x: 40%;
    --y: 0%;
    --w: 58%;
    --r: 4deg;
  }

  .collage-side {
    --x: 0%;
    --y: 25%;
    --w: 62%;
    --r: -5deg;
  }

  .collage-small {
    --x: 43%;
    --y: 48%;
    --w: 56%;
    --r: 7deg;
  }

  .collage-wide {
    --x: 10%;
    --y: 72%;
    --w: 58%;
    --r: -6deg;
  }

  .action-row,
  .button {
    width: 100%;
  }

  .map {
    height: 330px;
  }
}

@media (max-height: 820px) and (min-width: 760px) {
  .hero {
    padding-block: 1.5rem;
  }

  .hero-script {
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
  }

  .hero h1 {
    font-size: clamp(4.8rem, 10vw, 7.4rem);
  }

  .flower-divider {
    margin: 0.75rem auto 0.7rem;
  }

  .hero-date-line {
    margin-bottom: 0.25rem;
  }

  .hero-venue-line {
    margin-bottom: 0.85rem;
  }

  .hero-copy {
    max-width: 680px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .countdown div {
    min-width: 88px;
    padding: 0.6rem 0.8rem;
  }

  .countdown strong {
    font-size: 2.65rem;
  }
}
