/* ==========================================================================
   Isabella & Sebastian — Wedding Invitation
   A warm, editorial one-page site. Palette: ivory, sage, dusty rose, gold.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ivory: #FBF8F3;
  --ivory-deep: #F6F1E8;
  --cream: #F3EDE3;
  --sand: #E4D9C9;
  --sand-deep: #CDBDA6;
  --sage: #7D8D73;
  --sage-deep: #52624C;
  --sage-dark: #3B4737;
  --sage-ink: #2F3A2C;
  --rose: #C3958E;
  --rose-deep: #8E5A53;
  --gold: #B08D57;
  --gold-deep: #8E6C3F;
  --gold-light: #E2C79E;
  --ink: #2C2823;
  --muted: #71675C;
  --muted-light: #786E63;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --script: "Great Vibes", "Segoe Script", cursive;

  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(76px, 10vw, 136px);
  --header-h: 92px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --shadow-soft: 0 30px 80px -30px rgba(58, 48, 34, .30);
  --shadow-card: 0 40px 100px -40px rgba(50, 42, 30, .35);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

body.is-loading,
body.nav-open,
body.is-locked { overflow: hidden; }

:where(#welcome, #story, #day, #venue, #gallery, #party, #rsvp) { scroll-margin-top: 84px; }

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

::selection { background: var(--sage-deep); color: var(--ivory); }

:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
}

/* Dark contexts */
.hero :focus-visible,
.gallery :focus-visible,
.site-footer :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--gold-light);
}

html { scrollbar-color: var(--sand-deep) var(--ivory); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--sand-deep); border: 3px solid var(--ivory); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage); }

.container {
  width: 100%;
  max-width: 1264px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1200;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .3s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 3. Type helpers ---------- */
.eyebrow {
 display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 18px;
    color: var(--gold-deep);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: .34em;
    line-height: 1.4;
    text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .55;
  flex: none;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .55;
  flex: none;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4.6vw, 3.7rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: .002em;
  color: var(--ink);
}
.section-title em {
  font-style: italic;
  color: var(--rose-deep);
  font-weight: 300;
}

.section-head {
  max-width: 740px;
  margin: 0 auto clamp(48px, 6vw, 76px);
  text-align: center;
}
.section-head .section-title { margin-top: 18px; }
.section-lede {
  max-width: 58ch;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}
.section-head--light .eyebrow { color: var(--gold-light); }
.section-head--light .section-title { color: var(--ivory); }
.section-head--light .section-title em { color: var(--rose); }
.section-head--light .section-lede { color: rgba(251, 248, 243, .66); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--sage-deep);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.6;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.text-link svg { width: 15px; height: 15px; flex: none; }
.text-link:hover { color: var(--rose-deep); border-bottom-color: var(--rose-deep); }
.text-link--inline {
  display: inline;
  padding: 0;
  border: 0;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: var(--sage-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .4s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease), transform .4s var(--ease),
              box-shadow .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }

.btn--solid { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--ivory); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); }

.btn--light { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.btn--light:hover { background: #fff; border-color: #fff; box-shadow: 0 14px 34px -16px rgba(0,0,0,.5); }

.btn--ghost { background: rgba(251,248,243,.03); border-color: rgba(251,248,243,.48); color: var(--ivory); }
.btn--ghost:hover { background: rgba(251,248,243,.12); border-color: var(--ivory); }

.btn--outline { background: transparent; border-color: rgba(44,40,35,.32); color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--ivory); }

.btn--full { width: 100%; }
.btn--nav {
  padding: 11px 22px;
  border-color: rgba(251, 248, 243, .55);
  color: var(--ivory);
  font-size: 9.5px;
}
.btn--nav:hover { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }

/* ---------- 5. Texture, progress, preloader ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 700;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--gold), var(--rose));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .1s linear;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--ivory);
  transition: opacity .8s var(--ease), visibility .8s var(--ease);
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader[hidden] { display: none; }
.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.preloader__monogram {
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 300;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--ink);
}
.preloader__monogram span {
  font-family: var(--script);
  font-size: .72em;
  color: var(--gold);
  margin: 0 -2px;
}
.preloader__line {
  display: block;
  width: 150px;
  height: 1px;
  background: var(--sand);
  overflow: hidden;
}
.preloader__line span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--sage-deep);
  transform: scaleX(0);
  transform-origin: left center;
  animation: preloadLine 1.25s var(--ease-soft) forwards;
}
.preloader__date {
  font-size: 9px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--muted-light);
}
@keyframes preloadLine { to { transform: scaleX(1); } }

/* ---------- 6. Botanical decoration ---------- */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.branch {
  position: absolute;
  width: 300px;
  height: auto;
  color: var(--sage);
  opacity: .14;
  pointer-events: none;
  z-index: 0;
}
.branch--story { top: -20px; right: -70px; width: 320px; transform: rotate(155deg); opacity: .10; }
.branch--gallery { top: 40px; left: -100px; width: 380px; color: var(--ivory); opacity: .07; transform: rotate(15deg); }
.branch--menu { top: 84px; right: -60px; width: 260px; opacity: .12; }
.branch--footer { right: -70px; bottom: -100px; width: 380px; color: var(--ivory); opacity: .07; transform: rotate(160deg); }
.branch--hero {
  color: #F6EBD6;
  opacity: .17;
  width: 250px;
  z-index: 2;
}
.branch--hero-l { left: -60px; top: 16%; transform: rotate(10deg); }
.branch--hero-r { right: -60px; bottom: 4%; transform: rotate(190deg); }

/* ---------- 7. Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 460;
  color: var(--ivory);
  transition: background-color .5s var(--ease), color .5s var(--ease),
              box-shadow .5s var(--ease), backdrop-filter .5s var(--ease);
}
.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: clamp(20px, 3vw, 48px);
  align-items: center;
  height: var(--header-h);
  transition: height .45s var(--ease);
}
.site-header__side {
  display: flex;
  align-items: center;
  min-width: 0;
}
.site-header__side--left { justify-content: flex-end; }
.site-header__side--right { justify-content: flex-start; }
.site-header__actions { margin-left: auto; }
.site-header.is-scrolled {
  background: rgba(251, 248, 243, .90);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(44, 40, 35, .10);
  color: var(--ink);
}
.site-header.is-scrolled .site-header__inner { height: 74px; }
.site-header.is-scrolled .btn--nav {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: var(--ivory);
}
.site-header.is-scrolled .btn--nav:hover { background: var(--ink); border-color: var(--ink); }

.brand {
  position: relative;
  justify-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  line-height: 1;
}
.brand__mark {
  position: relative;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .04em;
  background-image: linear-gradient(
    105deg,
    currentColor 0%,
    currentColor 34%,
    #DFC08A 44%,
    #FFF7E4 50%,
    #DFC08A 56%,
    currentColor 66%,
    currentColor 100%
  );
  background-size: 300% 100%;
  background-repeat: repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  
}
@keyframes brandSheen {
  0%, 52% { background-position: 150% 50%; }
  82%, 100% { background-position: -50% 50%; }
}
@keyframes brandBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@keyframes brandUnderline {
  0%, 12% { transform: translateX(-50%) scaleX(0); opacity: 0; }
  30%, 72% { transform: translateX(-50%) scaleX(1); opacity: .8; }
  88%, 100% { transform: translateX(-50%) scaleX(0); opacity: 0; }
}
.brand:hover::after {
  animation: none;
  transform: translateX(-50%) scaleX(1);
  opacity: .9;
}

@keyframes brandDiamond {
  0%, 20% { transform: translateX(-50%) rotate(45deg) scale(0); opacity: 0; }
  34%, 72% { transform: translateX(-50%) rotate(45deg) scale(1); opacity: .9; }
  86%, 100% { transform: translateX(-50%) rotate(45deg) scale(0); opacity: 0; }
}
.brand:hover::before {
  animation: none;
  transform: translateX(-50%) rotate(45deg) scale(1);
  opacity: .9;
}
@media (prefers-reduced-motion: reduce) {
  .brand__mark {
    background: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
  }
  .brand::after,
  .brand::before { display: none; }
}
.brand__mark span {
  font-family: var(--script);
  font-size: .9em;
  color: var(--gold);
  margin: 0 1px;
}
.site-header.is-scrolled .brand__mark span { color: var(--gold); }
.brand__date {
  font-size: 7.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .62;
}

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px); }
.site-nav__link {
  position: relative;
  padding: 8px 0;
  color: inherit;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .19em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: .86;
  transition: opacity .3s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .45s var(--ease);
}
.site-nav__link:hover,
.site-nav__link.is-active { opacity: 1; }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); transform-origin: left center; }

.site-header__actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(251, 248, 243, .35);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
  transition: transform .4s var(--ease), opacity .3s var(--ease), top .4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 24px; }
.site-header.is-scrolled .nav-toggle { border-color: rgba(44, 40, 35, .25); }
body.nav-open .site-header { color: var(--ink); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.nav-open .nav-toggle { border-color: rgba(44, 40, 35, .25); }
body.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: translateX(-50%) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { top: 21px; transform: translateX(-50%) rotate(-45deg); }

/* ---------- 8. Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 30px) var(--gutter) 40px;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(228, 217, 201, .55), transparent 60%),
    var(--cream);
  overflow-y: auto;
  visibility: hidden;
  clip-path: circle(0% at calc(100% - var(--gutter) - 21px) calc(var(--header-h) / 2));
  transition: clip-path .75s var(--ease), visibility .75s;
}
.mobile-menu.is-open {
  visibility: visible;
  clip-path: circle(150% at calc(100% - var(--gutter) - 21px) calc(var(--header-h) / 2));
}
.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 460px;
  width: 100%;
  margin-inline: auto;
}
.mobile-menu__nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(44, 40, 35, .10);
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .3s var(--ease);
}
.mobile-menu.is-open .mobile-menu__nav a { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(1) { transition-delay: .18s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(2) { transition-delay: .24s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(3) { transition-delay: .30s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(4) { transition-delay: .36s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(5) { transition-delay: .42s; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(6) { transition-delay: .48s; }
.mobile-menu__nav a span {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--muted-light);
}
.mobile-menu__nav a:hover { color: var(--rose-deep); }
.mobile-menu__foot {
  max-width: 460px;
  width: 100%;
  margin: 34px auto 0;
  text-align: center;
}
.mobile-menu__date {
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.mobile-menu__foot .btn { margin-top: 18px; }
.mobile-menu__place {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 30px) 0 120px;
  overflow: hidden;
  text-align: center;
  color: var(--ivory);
}
.hero__media {
  position: absolute;
  inset: -6%;
  z-index: 0;
  background-image: url("../assets/images/hero.jpg");
  background-position: center 42%;
  background-size: cover;
  filter: sepia(.16) saturate(.82) brightness(.92) contrast(1.02);
  transform: scale(1.06);
  animation: kenBurns 30s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenBurns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(1.2%, -1.5%, 0); }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(90% 70% at 50% 42%, rgba(30, 27, 22, .08), rgba(30, 27, 22, .48) 100%),
    linear-gradient(180deg, rgba(24, 22, 18, .52) 0%, rgba(24, 22, 18, .22) 34%, rgba(24, 22, 18, .40) 68%, rgba(20, 18, 15, .72) 100%);
}
.hero__content {
  position: relative;
  z-index: 3;
  max-width: 1000px;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: rgba(251, 248, 243, .82);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .42em;
  line-height: 1.5;
  text-transform: uppercase;
}
.hero__eyebrow::before,
.hero__eyebrow::after {
  content: "";
  width: clamp(26px, 4vw, 46px);
  height: 1px;
  background: rgba(251, 248, 243, .55);
}
.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 26px;
}
.hero__name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(64px, 11.6vw, 148px);
  font-weight: 300;
  letter-spacing: .012em;
  line-height: .88;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .18);
}
.hero__amp {
  display: block;
  font-family: var(--script);
  font-size: clamp(52px, 7.4vw, 92px);
  line-height: .9;
  color: var(--gold-light);
  margin: .03em 0 -.02em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .22);
}
.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
  color: rgba(251, 248, 243, .86);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .30em;
  line-height: 1.8;
  text-transform: uppercase;
}
.hero__meta i {
  display: block;
  width: 4px;
  height: 4px;
  background: var(--gold-light);
  transform: rotate(45deg);
  opacity: .85;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}
.hero__actions .btn { min-width: 218px; }

.reveal-hero { opacity: 0; }
body.is-loaded .reveal-hero {
  animation: heroIn 1s var(--ease-soft) forwards;
  animation-delay: calc(.18s + var(--i) * .10s);
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ---------- 10. Invitation card + countdown ---------- */
.intro { padding-top: 0; padding-bottom: clamp(70px, 9vw, 120px); }
.invite-card {
  position: relative;
  z-index: 4;
  max-width: 1000px;
  margin: calc(-1 * clamp(60px, 8vw, 96px)) auto 0;
  padding: clamp(46px, 6vw, 78px) clamp(24px, 6vw, 86px) clamp(34px, 4vw, 48px);
  background: var(--ivory);
  border: 1px solid rgba(205, 189, 166, .55);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.invite-card__corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--sand-deep);
  border-style: solid;
  pointer-events: none;
  opacity: .9;
}
.invite-card__corner--tl { top: 14px; left: 14px; border-width: 1px 0 0 1px; }
.invite-card__corner--tr { top: 14px; right: 14px; border-width: 1px 1px 0 0; }
.invite-card__corner--bl { bottom: 14px; left: 14px; border-width: 0 0 1px 1px; }
.invite-card__corner--br { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; }

.invite-card__text {
  margin-top: 24px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 400;
  line-height: 1.95;
  letter-spacing: .01em;
}
.invite-card__text strong {
  display: inline-block;
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: clamp(27px, 3.6vw, 38px);
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.25;
}

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(14px, 3.4vw, 38px);
  margin-top: clamp(34px, 4vw, 46px);
  padding-top: clamp(30px, 4vw, 40px);
  border-top: 1px solid rgba(205, 189, 166, .5);
}
.countdown__unit {
  min-width: clamp(54px, 7vw, 82px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown__value {
  font-family: var(--serif);
  font-size: clamp(38px, 5.4vw, 60px);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: .015em;
  line-height: 1;
  color: var(--ink);
}
.countdown__label {
  margin-top: 10px;
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .27em;
  text-transform: uppercase;
}
.countdown__sep {
  width: 1px;
  height: 46px;
  margin-top: 8px;
  background: rgba(205, 189, 166, .55);
  flex: none;
}

.invite-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(205, 189, 166, .5);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .06em;
  text-align: left;
}
.invite-card__foot strong { color: var(--ink); font-weight: 500; }

/* ---------- 11. Story ---------- */
.story {
  background: var(--cream);
  overflow: hidden;
  border-top: 1px solid rgba(205, 189, 166, .35);
  border-bottom: 1px solid rgba(205, 189, 166, .35);
}
.story__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(52px, 8vw, 112px);
  align-items: center;
}
.story__media {
  position: relative;
  padding-bottom: 68px;
}
.story__figure {
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow-soft);
}
.story__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) contrast(.98);
  transition: transform 1.4s var(--ease);
}
.story__figure:hover img { transform: scale(1.035); }
.story__figure--main {
  width: 88%;
  aspect-ratio: 4 / 5;
}
.story__figure--small {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52%;
  aspect-ratio: 4 / 3;
  border: 8px solid var(--cream);
  box-shadow: 0 26px 60px -26px rgba(50, 42, 30, .4);
}
.story__seal {
  position: absolute;
  top: 22px;
  left: -26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border: 1px solid var(--sand-deep);
  border-radius: 50%;
  background: var(--ivory);
  color: var(--sage-deep);
  transform: rotate(-6deg);
  box-shadow: 0 12px 26px -14px rgba(50, 42, 30, .35);
}
.story__seal::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(205, 189, 166, .7);
  border-radius: 50%;
}
.story__seal em {
  font-family: var(--script);
  font-size: 22px;
  line-height: 1;
  color: var(--rose-deep);
}
.story__seal strong {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .24em;
}
.story__copy .section-title { margin-top: 18px; }
.story__body { margin-top: 24px; max-width: 54ch; }
.story__body p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.9;
}
.story__body p + p { margin-top: 16px; }
.story__signature {
  margin-top: 26px;
  font-family: var(--script);
  font-size: 38px;
  line-height: 1.2;
  color: var(--sage-deep);
}

.milestones {
  margin-top: 32px;
  border-top: 1px solid rgba(205, 189, 166, .65);
}
.milestones li {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(205, 189, 166, .5);
}
.milestones__year {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--rose-deep);
  line-height: 1.4;
}
.milestones strong {
  display: block;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.milestones p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- 12. The Day ---------- */
.day { background: var(--ivory); overflow: hidden; }

.schedule {
  position: relative;
  max-width: 920px;
  margin-inline: auto;
  --time-col: 112px;
  --line-col: 52px;
}
.schedule__line {
  position: absolute;
  top: 12px;
  bottom: 34px;
  left: calc(var(--time-col) + 26px);
  width: 1px;
  background: rgba(205, 189, 166, .6);
  pointer-events: none;
}
.schedule__progress {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--sage), var(--gold));
  transform: scaleY(var(--progress, 0));
  transform-origin: top center;
  transition: transform .2s linear;
}
.schedule__list { position: relative; }
.schedule__item {
  display: grid;
  grid-template-columns: var(--time-col) var(--line-col) minmax(0, 1fr);
  padding-bottom: 40px;
}
.schedule__item:last-child { padding-bottom: 0; }
.schedule__time {
  padding-top: 2px;
  padding-right: 24px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}
.schedule__time span {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .16em;
  color: var(--muted-light);
}
.schedule__dot {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 11px;
  height: 11px;
  margin-top: 9px;
  border: 1px solid var(--sage-deep);
  border-radius: 50%;
  background: var(--ivory);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.schedule__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--sage-deep);
  transform: rotate(45deg) scale(0);
  transition: transform .4s var(--ease);
}
.schedule__item:hover .schedule__dot { background: var(--sage-deep); box-shadow: 0 0 0 6px rgba(125, 141, 115, .14); }
.schedule__item:hover .schedule__dot::after { transform: rotate(45deg) scale(1); background: var(--ivory); }
.schedule__body { padding-left: 30px; }
.schedule__body h3 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}
.schedule__body p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1100px;
  margin: clamp(58px, 7vw, 82px) auto 0;
}
.note {
  padding: 32px 30px;
  border: 1px solid rgba(205, 189, 166, .55);
  background: transparent;
  transition: background-color .5s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease);
}
.note:hover {
  background: var(--ivory-deep);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -34px rgba(50, 42, 30, .4);
}
.note__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--sand);
  border-radius: 50%;
  color: var(--sage-deep);
}
.note__icon svg { width: 22px; height: 22px; }
.note h3 {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}
.note p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

/* ---------- 13. Venue ---------- */
.venue { background: var(--cream); }
.venue__grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(44px, 7vw, 96px);
  align-items: center;
}
.venue__media { position: relative; }
.venue__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(.82) contrast(1.02) brightness(.96);
  box-shadow: var(--shadow-soft);
}
.venue__media::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(251, 248, 243, .38);
  pointer-events: none;
}
.venue__stamp {
  position: absolute;
  right: -18px;
  bottom: -26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 20px 26px;
  background: var(--ivory);
  border: 1px solid var(--sand);
  box-shadow: 0 18px 40px -24px rgba(50, 42, 30, .45);
  text-align: center;
}
.venue__stamp-top {
  color: var(--muted-light);
  font-size: 7.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.venue__stamp-date {
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: .08em;
  color: var(--ink);
  line-height: 1.2;
}
.venue__stamp-place {
  color: var(--rose-deep);
  font-family: var(--script);
  font-size: 18px;
  line-height: 1.2;
}
.venue__copy .section-title { margin-top: 18px; }
.venue__address {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .05em;
}
.venue__address svg { width: 16px; height: 16px; color: var(--sage-deep); flex: none; }
.venue__text {
  max-width: 52ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

.travel { margin-top: 34px; border-top: 1px solid rgba(205, 189, 166, .65); }
.travel__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 19px 0;
  border-bottom: 1px solid rgba(205, 189, 166, .55);
}
.travel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--sand-deep);
  border-radius: 50%;
  color: var(--sage-deep);
}
.travel__icon svg { width: 18px; height: 18px; }
.travel__item h3 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .19em;
  line-height: 1.6;
  text-transform: uppercase;
}
.travel__item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}
.venue__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 30px;
}

/* ---------- 14. Gallery ---------- */
.gallery {
  background: var(--sage-dark);
  color: var(--ivory);
  overflow: hidden;
}
.gallery .container { position: relative; z-index: 1; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(200px, 22vw, 272px);
  gap: 14px;
}
.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--sage-ink);
  overflow: hidden;
  cursor: zoom-in;
}
.gallery__item:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
.gallery__item:nth-child(2) { grid-column: 3; grid-row: 1 / 3; }
.gallery__item:nth-child(3) { grid-column: 4; grid-row: 1; }
.gallery__item:nth-child(4) { grid-column: 4; grid-row: 2; }
.gallery__item:nth-child(5) { grid-column: 1 / 3; grid-row: 2; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.78) contrast(1.02) brightness(.94);
  transition: transform 1.2s var(--ease), filter .8s var(--ease);
}
.gallery__item:nth-child(3) img { object-position: 50% 32%; }
.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.06);
  filter: saturate(.95) contrast(1.02) brightness(1);
}
.gallery__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(30, 37, 27, .06), rgba(30, 37, 27, .52));
  color: var(--ivory);
  opacity: 0;
  transition: opacity .55s var(--ease);
}
.gallery__overlay svg { width: 26px; height: 26px; }
.gallery__overlay span {
  font-size: 9px;
  letter-spacing: .32em;
  text-transform: uppercase;
}
.gallery__item:hover .gallery__overlay,
.gallery__item:focus-visible .gallery__overlay { opacity: 1; }
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(251, 248, 243, .28);
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.gallery__item:hover::after { opacity: 1; transform: scale(1); }

/* ---------- 15. Wedding party ---------- */
.party { background: var(--ivory); }
.party__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.party__card {
  position: relative;
  padding: 38px 24px 32px;
  border: 1px solid rgba(205, 189, 166, .55);
  text-align: center;
  transition: background-color .5s var(--ease), transform .5s var(--ease),
              box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.party__card:hover {
  background: var(--ivory-deep);
  border-color: var(--sand-deep);
  transform: translateY(-6px);
  box-shadow: 0 28px 56px -38px rgba(50, 42, 30, .45);
}
.party__seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  margin-inline: auto;
  border: 1px solid var(--sand-deep);
  border-radius: 50%;
  transition: transform .6s var(--ease);
}
.party__card:hover .party__seal { transform: rotate(-4deg); }
.party__seal::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(205, 189, 166, .7);
  border-radius: 50%;
}
.party__seal span {
  font-family: var(--serif);
  font-size: 25px;
  font-style: italic;
  letter-spacing: .06em;
  color: var(--sage-deep);
}
.party__seal--sage { background: #E9EDE4; }
.party__seal--rose { background: #F3E7E4; }
.party__seal--rose span { color: var(--rose-deep); }
.party__seal--sand { background: #F1E9DB; }
.party__seal--sand span { color: var(--gold-deep); }
.party__role {
  margin-top: 24px;
  color: var(--muted-light);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.party__name {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
}
.party__note {
  margin: 10px auto 0;
  max-width: 28ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

/* ---------- 16. RSVP ---------- */
.rsvp {
  background: var(--cream);
  overflow: hidden;
  border-top: 1px solid rgba(205, 189, 166, .35);
}
.rsvp .container { position: relative; z-index: 1; }
.rsvp__grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(44px, 6vw, 84px);
  align-items: start;
}
.rsvp__intro { padding-top: 28px; }
.rsvp__intro .section-title { margin-top: 18px; }
.rsvp__lede {
  max-width: 42ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}
.rsvp__lede strong { color: var(--ink); font-weight: 500; }
.rsvp__meta { margin-top: 32px; border-top: 1px solid rgba(205, 189, 166, .65); }
.rsvp__meta > div {
  display: flex;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(205, 189, 166, .55);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.rsvp__meta svg { width: 17px; height: 17px; margin-top: 3px; color: var(--sage-deep); flex: none; }
.rsvp__meta strong { color: var(--ink); font-weight: 500; }
.rsvp__meta a { color: var(--sage-deep); }
.rsvp__dress {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.rsvp__dress-label {
  color: var(--muted-light);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.rsvp__dress p {
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  color: var(--ink);
}

.rsvp__card {
  position: relative;
  padding: clamp(28px, 3.6vw, 46px);
  background: var(--ivory);
  border: 1px solid rgba(205, 189, 166, .7);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.rsvp__card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(205, 189, 166, .35);
  pointer-events: none;
}
.rsvp__card-head {
  position: relative;
  z-index: 1;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(205, 189, 166, .55);
  text-align: center;
}
.rsvp__monogram {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: .06em;
  color: var(--ink);
  line-height: 1;
}
.rsvp__monogram span {
  font-family: var(--script);
  font-size: .9em;
  color: var(--gold);
  margin: 0 1px;
}
.rsvp__card-head p {
  margin-top: 6px;
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.rsvp-form { position: relative; z-index: 1; }
.field { margin-bottom: 20px; }
.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.5;
  text-transform: uppercase;
}
.field label span[aria-hidden],
.field legend span[aria-hidden] { color: var(--rose-deep); }
.optional {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: none;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 9px 2px 10px;
  border: 0;
  border-bottom: 1px solid rgba(125, 141, 115, .45);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.field textarea { min-height: 78px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-light); opacity: .85; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--sage-deep);
  box-shadow: 0 1px 0 var(--sage-deep);
}
.field input.is-invalid,
.field textarea.is-invalid { border-bottom-color: var(--rose-deep); box-shadow: 0 1px 0 var(--rose-deep); }
.field__error {
  display: block;
  color: var(--rose-deep);
  font-size: 10.5px;
  letter-spacing: .02em;
  line-height: 1.5;
}
.field__error:not(:empty) { margin-top: 6px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 24px;
  cursor: pointer;
}
.select-wrap svg {
  position: absolute;
  right: 2px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.field--choice { margin-bottom: 22px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.choice__box {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(205, 189, 166, .85);
  background: transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.choice:hover .choice__box { border-color: var(--sand-deep); background: var(--ivory-deep); }
.choice input:checked + .choice__box {
  border-color: var(--sage-deep);
  background: #F2F5EF;
  box-shadow: inset 0 0 0 1px var(--sage-deep);
}
.choice input:focus-visible + .choice__box {
  outline: 2px solid var(--sage-deep);
  outline-offset: 2px;
}
.choice__mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--sand-deep);
  border-radius: 50%;
  color: var(--ivory);
  flex: none;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.choice__mark svg { width: 11px; height: 11px; opacity: 0; transition: opacity .2s var(--ease); }
.choice input:checked + .choice__box .choice__mark { background: var(--sage-deep); border-color: var(--sage-deep); }
.choice input:checked + .choice__box .choice__mark svg { opacity: 1; }
.choice__label strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1.4;
}
.choice__label small {
  display: block;
  color: var(--muted-light);
  font-size: 10px;
  line-height: 1.5;
}

.rsvp__details[hidden] { display: none; }
.rsvp__details.is-entering { animation: softIn .55s var(--ease) both; }
@keyframes softIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.rsvp-form .btn--solid { margin-top: 6px; min-height: 54px; position: relative; }
.btn__loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(251, 248, 243, .35);
  border-top-color: var(--ivory);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__label { opacity: 0; }
.btn.is-loading .btn__loader { display: block; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-note {
  margin-top: 13px;
  color: var(--muted-light);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.rsvp-success {
  position: relative;
  z-index: 1;
  padding: 18px 0 8px;
  text-align: center;
}
.rsvp-success[hidden] { display: none; }
.rsvp-success.is-entering { animation: softIn .6s var(--ease) both; }
.rsvp-success__seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 86px;
  height: 86px;
  margin: 0 auto 22px;
  border: 1px solid var(--sand-deep);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
}
.rsvp-success__seal span {
  font-family: var(--script);
  font-size: .9em;
  color: var(--gold);
  margin: 0 1px;
}
.rsvp-success__title {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 400;
  line-height: 1.2;
}
.rsvp-success__copy {
  max-width: 38ch;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}
.rsvp-success__details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-top: 24px;
  padding: 18px 0;
  border-top: 1px solid rgba(205, 189, 166, .6);
  border-bottom: 1px solid rgba(205, 189, 166, .6);
}
.rsvp-success__details span {
  display: block;
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.rsvp-success__details strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}
.rsvp-success__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petal {
  position: absolute;
  top: -24px;
  width: var(--size, 10px);
  height: calc(var(--size, 10px) * 1.35);
  border-radius: 50% 0 50% 50%;
  background: var(--petal-color, var(--rose));
  opacity: .85;
  animation: petalFall var(--duration, 4s) linear forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes petalFall {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: translate3d(var(--drift, 30px), 760px, 0) rotate(540deg); opacity: 0; }
}

/* ---------- 18. Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(65px, 8vw, 65px) 0 30px;
  background: var(--sage-dark);
  color: var(--ivory);
  text-align: center;
}
.site-footer__inner { position: relative; z-index: 1; }
.site-footer__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(251, 248, 243, .32);
  border-radius: 50%;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .05em;
  text-decoration: none;
  transition: background-color .4s var(--ease), transform .4s var(--ease);
}
.site-footer__mark:hover { background: rgba(251, 248, 243, .08); transform: translateY(-3px); }
.site-footer__mark span {
  font-family: var(--script);
  font-size: 1.1em;
  color: var(--gold-light);
  margin: 0 1px;
}
.site-footer__names {
  margin-top: 22px;
  font-family: var(--script);
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.2;
  color: var(--ivory);
}
.site-footer__date {
  margin-top: 8px;
  color: rgba(251, 248, 243, .68);
  font-size: 9px;
  letter-spacing: .24em;
  line-height: 1.8;
  text-transform: uppercase;
}
.site-footer__date span + span::before { content: " · "; }
.site-footer__copy {
  margin-top: 10px;
  color: rgba(251, 248, 243, .6);
  font-size: 9.5px;
  letter-spacing: .08em;
}

/* ---------- 20. Mobile RSVP bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 440;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 243, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(205, 189, 166, .65);
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .45s var(--ease), visibility .45s;
}
.mobile-bar.is-visible { transform: translateY(0); visibility: visible; pointer-events: auto; }
.mobile-bar__label {
  display: block;
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.mobile-bar__copy strong {
  display: block;
  margin-top: 1px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}
.mobile-bar .btn { padding: 12px 24px; flex: none; }

/* ---------- 21. Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px clamp(16px, 6vw, 90px) 54px;
  background: rgba(18, 21, 16, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ivory);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure {
  max-width: min(86vw, 1080px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  transform: scale(.97);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .4s var(--ease);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .8);
}
.lightbox.is-open .lightbox__img { transform: scale(1); opacity: 1; }
.lightbox__caption {
  margin-top: 20px;
  color: rgba(251, 248, 243, .75);
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(251, 248, 243, .28);
  border-radius: 50%;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(251, 248, 243, .1); border-color: rgba(251, 248, 243, .6); }
.lightbox__close svg,
.lightbox__nav svg { width: 20px; height: 20px; }
.lightbox__close { top: 22px; right: 22px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(251, 248, 243, .45);
  font-size: 9.5px;
  letter-spacing: .24em;
}
.lightbox__counter i { font-style: normal; margin: 0 6px; }

/* ---------- 22. Scroll reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal="left"] { transform: translateX(-44px); }
.js [data-reveal="right"] { transform: translateX(44px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal].is-visible { will-change: auto; }

/* ---------- 23. Responsive ---------- */
@media (max-width: 1120px) {
  .site-nav { gap: 22px; }
  .party__grid { grid-template-columns: repeat(2, 1fr); }
  .party__card { padding: 34px 24px 30px; }
}

@media (max-width: 1024px) {
  :root { --header-h: 80px; }
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .site-header__actions .btn--nav { display: none; }
   

  .story__grid { grid-template-columns: 1fr; gap: 56px; }
  .story__media { max-width: 620px; width: 100%; margin-inline: auto; }
  .story__copy { max-width: 680px; margin-inline: auto; }
  .story__body { max-width: none; }

  .venue__grid { grid-template-columns: 1fr; gap: 56px; }
  .venue__media { max-width: 640px; width: 100%; }
  .venue__copy { max-width: 680px; }

  .rsvp__grid { grid-template-columns: 1fr; gap: 44px; }
  .rsvp__intro { padding-top: 0; max-width: 680px; }
  .rsvp__lede { max-width: 56ch; }
  .rsvp__card { max-width: 680px; width: 100%; }

  .gallery__grid { grid-auto-rows: clamp(190px, 26vw, 250px); }
}

@media (max-width: 900px) {
  .notes { grid-template-columns: 1fr; max-width: 620px; }
  .note { padding: 26px 26px; }
  .schedule { --time-col: 84px; --line-col: 44px; }
  .schedule__line { left: calc(var(--time-col) + 22px); }
  .schedule__time { font-size: 22px; padding-right: 16px; }
  .schedule__body { padding-left: 22px; }
  .schedule__body h3 { font-size: 24px; }
}

@media (max-width: 820px) {
  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 210px;
    gap: 10px;
  }
  .gallery__item:nth-child(1) { grid-column: 1 / 3; grid-row: auto; }
  .gallery__item:nth-child(2) { grid-column: auto; grid-row: auto; }
  .gallery__item:nth-child(3) { grid-column: auto; grid-row: auto; }
  .gallery__item:nth-child(4) { grid-column: auto; grid-row: auto; }
  .gallery__item:nth-child(5) { grid-column: auto; grid-row: auto; }
}

@media (max-width: 720px) {
  :root { --section-y: 72px; --header-h: 72px; }
  .mobile-bar { display: flex; }
  .site-header__inner { height: var(--header-h); }
  .site-header.is-scrolled .site-header__inner { height: 64px; }
  .site-header.is-scrolled { background: rgba(251, 248, 243, .94); }

  .hero { padding-bottom: 100px; }
  .hero__meta { gap: 10px; font-size: 8.5px; letter-spacing: .22em; }
  .hero__actions { margin-top: 32px; gap: 10px; }
  .hero__actions .btn { min-width: 0; padding: 14px 22px; }
  .branch--hero { width: 170px; opacity: .12; }
  .branch--hero-l { left: -70px; top: 9%; }
  .branch--hero-r { right: -80px; bottom: 4%; }

  .invite-card {
    margin-top: -52px;
    padding-inline: 20px;
    padding-top: 44px;
  }
  .invite-card__foot { justify-content: center; text-align: center; }
  .countdown { gap: 0; justify-content: space-between; }
  .countdown__unit { min-width: 0; flex: 1; }
  .countdown__sep { height: 36px; }
  .countdown__value { font-size: clamp(31px, 9vw, 42px); }
  .countdown__label { font-size: 7.5px; letter-spacing: .2em; margin-top: 8px; }
  .br-desktop { display: none; }

  .story__media { padding-bottom: 54px; }
  .story__seal { width: 88px; height: 88px; left: -10px; top: 14px; }
  .story__seal em { font-size: 19px; }
  .story__signature { font-size: 32px; }
  .milestones li { grid-template-columns: 54px 1fr; gap: 14px; }

  .schedule { --time-col: 62px; --line-col: 32px; }
  .schedule__line { top: 8px; bottom: 10px; left: calc(var(--time-col) + 16px); }
  .schedule__time { font-size: 18px; padding-right: 10px; padding-top: 1px; }
  .schedule__time span { display: block; font-size: 7px; letter-spacing: .12em; }
  .schedule__dot { width: 9px; height: 9px; margin-top: 7px; }
  .schedule__dot::after { inset: 2.5px; }
  .schedule__body { padding-left: 16px; padding-bottom: 4px; }
  .schedule__body h3 { font-size: 21px; }
  .schedule__body p { font-size: 12.5px; }
  .schedule__item { padding-bottom: 30px; }

  .notes { margin-top: 44px; gap: 14px; }

  .venue__stamp { right: 8px; bottom: -20px; padding: 16px 20px; }
  .venue__stamp-date { font-size: 19px; }
  .venue__media img { aspect-ratio: 4 / 4.4; }

  .party__grid { gap: 14px; }
  .party__card { padding: 28px 16px 26px; }
  .party__seal { width: 78px; height: 78px; }
  .party__seal span { font-size: 21px; }
  .party__name { font-size: 22px; }
  .party__note { font-size: 12px; }

  .rsvp__card { padding: 26px 20px 30px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice__box { padding: 12px 14px; }

  .site-footer { padding-bottom: 96px; }
  .site-footer__date span { display: block; }
  .site-footer__date span + span::before { content: none; }

  .lightbox { padding: 70px 16px 64px; }
  .lightbox__nav { top: auto; bottom: 16px; transform: none; width: 44px; height: 44px; }
  .lightbox__nav--prev { left: 18px; }
  .lightbox__nav--next { right: 18px; }
  .lightbox__counter { bottom: 30px; }
  .lightbox__caption { font-size: 16px; margin-top: 14px; }
}

@media (max-width: 560px) {
  .hero__meta i { display: none; }
  .hero__meta { flex-direction: column; gap: 4px; margin-top: 26px; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .hero__title { margin-top: 20px; }
  .hero__eyebrow { letter-spacing: .3em; font-size: 9px; }
  .hero__eyebrow::before, .hero__eyebrow::after { width: 18px; }

  .invite-card { margin-top: -40px; }
  .invite-card__corner { width: 20px; height: 20px; }
  .invite-card__text { font-size: 15px; line-height: 1.9; }
  .invite-card__text strong { font-size: 26px; }
  .countdown__value { font-size: clamp(28px, 9.6vw, 36px); }
  .countdown__label { font-size: 8px; letter-spacing: .12em; }
  .countdown__sep { height: 30px; margin-top: 5px; }

  .section-head { margin-bottom: 40px; }
  .section-lede { font-size: 14px; }

  .story__figure--small { width: 55%; border-width: 6px; }
  .story__seal { left: 0; }
  .story__signature { font-size: 28px; }

  .venue__actions { flex-direction: column; align-items: flex-start; gap: 18px; }
  .travel__item { grid-template-columns: 38px 1fr; gap: 13px; }
  .travel__icon { width: 36px; height: 36px; }

  .gallery__grid { grid-auto-rows: 170px; }

  .party__grid { grid-template-columns: 1fr; }
  .party__note { max-width: 34ch; }

  .rsvp-success__actions .btn { width: 100%; }

  .lightbox__caption { font-size: 15px; max-width: 80vw; }
}

/* ---------- 24. Reduced motion & no-JS ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero__media { animation: none; transform: scale(1.02); }
  .js [data-reveal], .reveal-hero { opacity: 1 !important; transform: none !important; }
  .preloader { display: none; }
  body.is-loading { overflow: auto; }
  .petal { display: none; }
}

.no-js .preloader { display: none; }
.no-js .reveal-hero,
.no-js [data-reveal] { opacity: 1; transform: none; }
.no-js .mobile-menu { display: none; }
.no-js body.is-loading { overflow: auto; }
