/* =========================================================
   Caroline & Julius — wedding invitation
   A classical, editorial, immersive experience
   ========================================================= */

:root {
  --ivory:   #f6f1e7;
  --paper:   #efe7d6;
  --paper-2: #e8dfca;
  --ink:     #1c1a17;
  --ink-2:   #2a2620;
  --ink-soft:#4a443c;
  --ink-mute:#6f6557;
  --gold:    #b08d4a;
  --gold-2:  #c9a86a;
  --gold-3:  #d8c08a;
  --gold-soft:#e3d4ac;
  --oxblood: #6b2c2c;
  --blush:   #e8d5cf;
  --line:    rgba(28,26,23,.16);
  --line-2:  rgba(28,26,23,.10);
  --serif:   "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans:    "Jost", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1280px;
  --read: 680px;
  --gut: clamp(1.25rem, 4vw, 4rem);
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100vh; }
/* No-JS fallback: hide the interactive envelope overlay and unlock scrolling so
   the <noscript> static version of the invitation is readable. */
html:not(.js) body.is-locked { overflow: auto; height: auto; }
html:not(.js) .envelope { display: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--ivory); }

/* paper grain overlay */
body::before {
  content:""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(176,141,74,.05), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(107,44,44,.04), transparent 55%);
}
body::after {
  content:""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* three.js dust canvas */
#dust {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%;
}

/* progress */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: transparent;
}
.progress__bar {
  height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--gold-3));
}

/* ============================ ENVELOPE ============================ */
.envelope {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 50% 0%, #f6f1e7 0%, #e7dcc4 55%, #d8cbb0 100%);
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}
.envelope.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.envelope__stage {
  position: relative; display: grid; justify-items: center; gap: 2.2rem;
  padding: 2rem;
}
.envelope__credit {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--sans); font-size: .72rem; letter-spacing: .42em;
  text-transform: uppercase; color: var(--ink-mute);
  opacity: 0; animation: fadeIn 1.2s .6s forwards, hintFloat 4s ease-in-out 1.6s infinite;
}
.envelope__credit-text { animation: breathe 2.6s ease-in-out 1.6s infinite; }
.envelope__hint {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--sans); font-size: .7rem; letter-spacing: .38em;
  text-transform: uppercase; color: var(--ink-soft);
  opacity: 0; animation: hintFloat 4s ease-in-out 1.6s infinite, fadeIn 1.2s .9s forwards;
}
.envelope__hint-line { width: 38px; height: 1px; background: var(--ink-mute); opacity: .5; }
.envelope__hint-text { animation: breathe 2.6s ease-in-out 1.6s infinite; }

.envelope__veil {
  position: absolute; inset: 0; background: var(--ivory); opacity: 0;
  pointer-events: none; z-index: 5;
}

/* the envelope itself */
.envelope__wrap { position: relative; width: min(78vw, 420px); height: min(58vw, 300px); perspective: 1400px; }

.envelope__body { position: absolute; inset: 0; }
.envelope__front {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, #7a8456 0%, #5a6240 100%);
  border: 1px solid rgba(20,24,14,.28);
  box-shadow: 0 30px 60px -28px rgba(20,24,14,.6), inset 0 0 0 1px rgba(246,241,231,.18);
}
.envelope__front::after {
  content:""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence baseFrequency='0.7' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.28 0 0 0 0 0.34 0 0 0 0 0.2 0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply; opacity: .55;
}
.envelope__pocket {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%; z-index: 3;
  background: linear-gradient(180deg, #6a7350 0%, #4a5238 100%);
  box-shadow: inset 0 14px 20px -14px rgba(20,24,14,.55);
  clip-path: polygon(0 0, 50% 60%, 100% 0, 100% 100%, 0 100%);
}
.envelope__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 4;
  transform-origin: top center; transform: rotateX(0deg);
  background: linear-gradient(180deg, #828c5e 0%, #626b44 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  box-shadow: 0 6px 14px -8px rgba(20,24,14,.55);
  border-bottom: 1px solid rgba(20,24,14,.18);
}
.envelope__flap::after {
  content:""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p2'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.28 0 0 0 0 0.34 0 0 0 0 0.2 0 0 0 0.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p2)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply; opacity: .5;
}

/* letter inside */
.envelope__letter {
  position: absolute; left: 6%; right: 6%; bottom: 6%; height: 88%; z-index: 2;
  background: linear-gradient(180deg, #fbf6ec 0%, #f3ead6 100%);
  border: 1px solid rgba(28,26,23,.1);
  box-shadow: 0 8px 20px -10px rgba(28,26,23,.3);
  display: grid; place-items: center; text-align: center;
  transform: translateY(0);
}
.envelope__letter-inner { padding: 1rem; display: grid; gap: .5rem; justify-items: center; position: relative; z-index: 1; }
.env-rings { width: clamp(52px, 13vw, 70px); height: auto; opacity: .9; display: block; }
.env-names { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1; color: var(--ink); margin-top: .35rem; }
.env-names em { font-style: normal; font-family: var(--serif); color: var(--ink); font-weight: 400; font-size: 1.1em; }
.env-date { font-family: var(--sans); font-size: .78rem; letter-spacing: .4em; color: var(--ink-soft); }

/* wax seal */
.envelope__seal {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  width: clamp(86px, 26vw, 116px); height: clamp(86px, 26vw, 116px);
  transform: translate(-50%,-50%);
  cursor: pointer; outline: none;
  transition: transform .4s var(--ease);
  border-radius: 50%;
  overflow: visible;
  background: transparent;
  padding: 0;
  display: grid; place-items: center;
}
.envelope__seal img {
  width: 95%; height: 95%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  pointer-events: none;
}
.envelope__seal:hover, .envelope__seal:focus-visible { transform: translate(-50%,-50%) scale(1.05); }
.envelope__seal:active { transform: translate(-50%,-50%) scale(.97); }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes breathe { 0%,100%{opacity:.55} 50%{opacity:1} }

/* ============================ INVITE ============================ */
.invite {
  position: relative; z-index: 2;
  opacity: 0; visibility: hidden;
  transition: opacity 1.2s var(--ease) .2s, visibility 1.2s;
}
.invite.is-open { opacity: 1; visibility: visible; }

/* shared section label */
.section-label {
  display: block; font-family: var(--sans); font-size: .66rem; letter-spacing: .42em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1.4rem;
}
[data-reveal] { /* will-change is applied transiently by GSAP during animation */ }

/* ============================ HERO ============================ */
.hero {
  position: relative; min-height: 100svh; min-height: 100vh;
  display: grid; align-items: center; justify-items: center;
  overflow: hidden; padding: 0;
}
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__media img {
  width: 100%; height: 116%; object-fit: cover; object-position: center 30%;
  filter: grayscale(.15) contrast(1.02) brightness(.92);
  transform: scale(1.06);
}
.hero__media-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,26,23,.55) 0%, rgba(28,26,23,.15) 30%, rgba(28,26,23,.1) 60%, rgba(28,26,23,.75) 100%),
    radial-gradient(80% 70% at 50% 45%, transparent 30%, rgba(28,26,23,.45) 100%);
}
.hero__inner {
  position: relative; z-index: 2; text-align: center; color: var(--ivory);
  padding: 0 var(--gut); max-width: 1000px;
}
.hero__names {
  font-family: var(--serif); font-weight: 300; line-height: .92;
  font-size: clamp(3.2rem, 13vw, 9.5rem);
  letter-spacing: -.01em; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .2em;
}
.hero__name { display: inline-block; }
.hero__amp {
  font-style: normal; font-family: var(--serif); font-weight: 400; color: var(--ivory); font-size: .7em;
  transform: translateY(.08em);
}
.hero__kicker {
  display: block; font-family: var(--sans); font-size: clamp(1rem,2.8vw,1.4rem);
  letter-spacing: .42em; text-transform: uppercase; color: var(--ivory);
  margin-bottom: clamp(1.2rem,4vw,2.4rem); opacity: .9;
}
.hero__date {
  display: flex; align-items: center; justify-content: center; gap: clamp(.8rem,2.4vw,1.6rem);
  margin-top: clamp(1.6rem,4vw,2.6rem);
  font-family: var(--sans); font-weight: 400; letter-spacing: .3em; text-transform: uppercase;
  font-size: clamp(1.05rem,3vw,1.5rem); color: var(--ivory);
}
.hero__date-day { letter-spacing: 0; color: var(--ivory); font-weight: 400; }
.hero__date-sep { width: 6px; height: 6px; border-radius: 50%; background: var(--ivory); opacity: .8; align-self: center; }
.hero__date-month, .hero__date-year { font-weight: 400; }
.hero__scroll {
  position: absolute; left: 50%; bottom: clamp(1.2rem, 4vh, 2.4rem); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  font-family: var(--sans); font-size: .6rem; letter-spacing: .4em; text-transform: uppercase;
  color: rgba(246,241,231,.7);
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(180deg, var(--gold-3), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content:""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--gold-3); animation: scrollDot 2.2s var(--ease) infinite; }
@keyframes scrollDot { 0%{top:-50%} 60%{top:120%} 100%{top:120%} }

/* ============================ PROLOGUE ============================ */
.prologue { padding: clamp(6rem,16vh,11rem) var(--gut); background: var(--ivory); position: relative; }
.prologue__inner { max-width: var(--read); margin: 0 auto; text-align: center; }
.prologue__text {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem,3.2vw,2rem);
  line-height: 1.6; color: var(--ink-2); letter-spacing: .005em;
}
.prologue__text em { font-style: italic; color: var(--gold); }
.prologue__sign {
  margin-top: 2.6rem; font-family: var(--serif); font-style: italic; font-size: 1.8rem;
  display: inline-flex; gap: .5rem; color: var(--ink-soft); letter-spacing: .02em;
}
.prologue__sign-amp { color: var(--gold); }

/* ============================ LOCATION ============================ */
.location {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem,6vw,6rem);
  padding: clamp(6rem,14vh,10rem) var(--gut); align-items: center;
  background: linear-gradient(180deg, var(--ivory) 0%, var(--paper) 100%);
  position: relative;
}
.location__media { position: relative; overflow: hidden; aspect-ratio: 3/4; box-shadow: 0 40px 80px -40px rgba(28,26,23,.5); }
.location__media img { width: 100%; height: 112%; object-fit: cover; filter: grayscale(.2) contrast(1.03) sepia(.06); transform: translateY(-6%); }
.location__media-frame {
  position: absolute; inset: 14px; border: 1px solid rgba(246,241,231,.4); pointer-events: none; z-index: 2;
}
.location__content { max-width: 540px; }
.location__title {
  font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem,7vw,5rem); line-height: .95;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 1.4rem;
}
.location__title::after { content:""; display: block; width: 60px; height: 1px; background: var(--gold); margin-top: 1.4rem; transform-origin: 0 50%; transform: scaleX(var(--rule, 0)); }
.location__address { font-family: var(--serif); font-size: clamp(1.1rem,2.4vw,1.4rem); display: grid; gap: .15rem; color: var(--ink-2); }
.location__line--soft { color: var(--ink-mute); font-style: italic; font-size: .92em; }
.location__parking { margin-top: 1.6rem; color: var(--ink-soft); font-style: italic; font-size: .95rem; line-height: 1.6; max-width: 48ch; }
.location__meta {
  margin-top: 2.6rem; display: inline-flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  border-top: 1px solid var(--gold-3); border-bottom: 1px solid var(--gold-3); padding: 1rem 0;
  width: fit-content; color: var(--ink-2);
}
.location__meta-icon { width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; }
.location__meta-text { font-family: "Jost", "Helvetica Neue", Arial, sans-serif; font-size: .9rem; font-weight: 300; letter-spacing: .18em; text-transform: uppercase; color: currentColor; }
.location__actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 2.2rem; }
.location__cta {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--sans); font-size: .7rem; letter-spacing: .32em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid var(--ink); padding-bottom: .5rem; transition: color .4s, border-color .4s, gap .4s;
}
.location__cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform .4s; }
.location__cta:hover { color: var(--gold); border-color: var(--gold); gap: .85rem; }
.location__cta:hover svg { transform: translateY(2px); }
.location__cta--map svg { fill: currentColor; fill-opacity: .12; }
.location__cta--map:hover svg { transform: scale(1.05); }

/* ============================ WARDROBE ============================ */
.wardrobe { padding: clamp(6rem,14vh,10rem) var(--gut); background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); position: relative; }
.wardrobe__head { text-align: center; max-width: var(--read); margin: 0 auto clamp(3rem,7vw,5rem); }
.wardrobe__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem,6vw,4rem); line-height: 1; color: var(--ink); }
.wardrobe__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3rem); max-width: 880px; margin: 0 auto; }
.wardrobe__card {
  background: var(--ivory); border: 1px solid var(--line-2); padding: clamp(1.6rem,4vw,2.6rem);
  display: grid; gap: 1.4rem; text-align: center; box-shadow: 0 30px 60px -45px rgba(28,26,23,.5);
  position: relative; overflow: hidden;
}
.wardrobe__card::before { content:""; position: absolute; inset: 10px; border: 1px solid var(--line-2); pointer-events: none; }
.wardrobe__figure { display: grid; place-items: center; padding: .6rem 0; position: relative; }
.wardrobe__svg { width: clamp(140px, 30vw, 200px); height: auto; }
.wardrobe__eyebrow { font-family: var(--sans); font-size: .7rem; letter-spacing: .36em; text-transform: uppercase; color: var(--gold); }
.wardrobe__name { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem,3vw,1.7rem); color: var(--ink); margin: .3rem 0 .5rem; }
.wardrobe__desc { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; max-width: 34ch; margin: 0 auto; min-height: 1.6em; }
.wardrobe__card--alt .wardrobe__figure { margin-top: clamp(28px, 6vw, 40px); }

/* ============================ GIFTS ============================ */
.gifts { padding: clamp(6rem,14vh,10rem) var(--gut); background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 100%); position: relative; }
.gifts__head { text-align: center; max-width: var(--read); margin: 0 auto clamp(3rem,7vw,5rem); }
.gifts__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem,6vw,4rem); line-height: 1; color: var(--ink); }
.gifts__sub { margin-top: 1.2rem; color: var(--ink-soft); font-style: italic; font-size: 1.1rem; line-height: 1.7; max-width: 52ch; margin-left: auto; margin-right: auto; }
.gifts__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; max-width: 1240px; margin: 0 auto; }
.gifts__card[hidden] { display: none; }
.gifts__card {
  flex: 1 1 225px; max-width: 300px; background: var(--ivory); border: 1px solid var(--line-2); padding: 1.3rem 1.4rem;
  display: grid; gap: .85rem; text-align: left; box-shadow: 0 8px 20px -12px rgba(28,26,23,.35);
  position: relative; overflow: hidden;
}
.gifts__currency { font-family: var(--sans); font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.gifts__bank-icon {
  width: 42px; height: 42px; margin: 0 0 .1rem;
  border-radius: 50%; border: 1px solid var(--gold);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
}
.gifts__bank-icon--img { border: none; }
.gifts__bank-icon svg { width: 21px; height: 21px; display: block; }
.gifts__bank-icon img { width: 100%; height: 100%; object-fit: contain; display: block; filter: brightness(0) saturate(100%) invert(55%) sepia(42%) saturate(580%) hue-rotate(5deg) brightness(90%) contrast(88%); }
.gifts__bank { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--ink); margin-top: -.1rem; }
.gifts__details { display: grid; gap: .6rem; text-align: left; }
.gifts__row { display: grid; gap: .18rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line-2); }
.gifts__row:last-child { border-bottom: none; padding-bottom: 0; }
.gifts__row dt { font-family: var(--sans); font-size: .69rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-mute); }
.gifts__row dd { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); word-break: break-word; }
.gifts__num { font-variant-numeric: tabular-nums; letter-spacing: .01em; font-size: .98rem; }

/* ============================ PHOTO INTERLUDE ============================ */
.photo-interlude { padding: clamp(3rem,6vh,5rem) var(--gut); background: var(--paper); }
.photo-interlude__inner { max-width: 620px; margin: 0 auto; position: relative; overflow: hidden; border-radius: 4px; box-shadow: 0 20px 50px -20px rgba(28,26,23,.45); }
.photo-interlude img { width: 100%; height: auto; display: block; }
.photo-interlude__frame { position: absolute; inset: 14px; border: 1px solid rgba(246,241,231,.4); pointer-events: none; z-index: 2; }

/* ============================ ADULTS ONLY ============================ */
.adults-only { padding: clamp(4rem,8vh,6rem) var(--gut); background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); position: relative; text-align: center; }
.adults-only__inner { max-width: var(--read); margin: 0 auto; }
.adults-only__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem,5vw,3.5rem); line-height: 1; color: var(--ink); margin-top: clamp(2rem,4vw,3rem); }
.adults-only__text { margin-top: 1.2rem; color: var(--ink-soft); font-style: italic; font-size: 1.1rem; line-height: 1.8; max-width: 52ch; margin-left: auto; margin-right: auto; }
/* ============================ RSVP ============================ */
.rsvp { padding: clamp(6rem,14vh,10rem) var(--gut); background: var(--paper-2); position: relative; }
.rsvp__inner { max-width: 620px; margin: 0 auto; text-align: center; }
.rsvp__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem,6vw,4rem); line-height: 1; color: var(--ink); }
.rsvp__sub { margin-top: 1rem; color: var(--ink-soft); font-style: italic; font-size: 1.05rem; }
.rsvp__deadline { color: var(--ink); font-style: normal; font-weight: 600; }
.rsvp__form { margin-top: clamp(2.4rem,5vw,3.4rem); display: grid; gap: 1.3rem; text-align: left; }
.field { display: grid; gap: .5rem; }
.field label { font-family: var(--sans); font-size: .58rem; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-mute); }
.field input, .field select, .field textarea {
  font-family: var(--serif); font-size: 1.1rem; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: .55rem 0; transition: border-color .35s, background .35s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; line-height: 1.5; }
.char-count { font-size: .52rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); text-align: right; margin-top: .25rem; display: block; }

.attend { border: none; display: grid; gap: .8rem; padding: 0; }
.attend legend { font-family: var(--sans); font-size: .58rem; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-mute); }
.attend__opt { display: flex; align-items: center; gap: .8rem; cursor: pointer; font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); }
.attend__opt input { position: absolute; opacity: 0; }
.attend__opt span::before { content:""; display: inline-block; width: 16px; height: 16px; margin-right: .7rem; border: 1px solid var(--ink-mute); border-radius: 50%; vertical-align: -3px; transition: .3s; }
.attend__opt input:checked + span::before { border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--gold); }
.attend__opt input:focus-visible + span::before { outline: 2px solid var(--gold-3); outline-offset: 2px; }

.field--checkbox { align-items: start; }
.field .checkbox__opt { display: flex; align-items: flex-start; gap: .8rem; cursor: pointer; font-family: var(--serif); font-size: 1.1rem; line-height: 1.4; color: var(--ink-2); letter-spacing: 0; text-transform: none; }
.field .checkbox__opt input { position: absolute; opacity: 0; }
.field .checkbox__opt span { position: relative; display: inline-block; padding-left: 2rem; }
.field .checkbox__opt span::before { content:""; position: absolute; left: 0; top: .15em; width: 18px; height: 18px; border: 1px solid var(--ink-mute); border-radius: 3px; transition: .3s; }
.field .checkbox__opt input:checked + span::before { border-color: var(--gold); background: var(--gold); }
.field .checkbox__opt input:checked + span::after { content: ""; position: absolute; left: 5px; top: .42em; width: 5px; height: 9px; border: solid var(--ivory); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.field .checkbox__opt input:focus-visible + span::before { outline: 2px solid var(--gold-3); outline-offset: 2px; }

.rsvp__submit {
  margin-top: .6rem; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  font-family: var(--sans); font-size: .7rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ivory); background: var(--ink); padding: 1.1rem 1.8rem; border: 1px solid var(--ink);
  transition: background .4s, color .4s, gap .4s; align-self: center;
}
.rsvp__submit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .4s; }
.rsvp__submit:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); gap: 1.1rem; }
.rsvp__submit:hover svg { transform: translateX(4px); }
.rsvp__status { text-align: center; font-style: italic; color: var(--ink-soft); min-height: 1.4em; font-size: 1.05rem; }

/* ============================ FOOTER ============================ */
.footer { padding: clamp(4rem,10vh,7rem) var(--gut) clamp(3rem,7vh,5rem); text-align: center; background: var(--ink); color: var(--ivory); position: relative; }
.footer__names { font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem,5vw,3rem); margin-top: 1.6rem; }
.footer__date { font-family: var(--sans); font-size: .7rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold-soft); margin-top: 1rem; }
.footer__sign { font-style: italic; color: rgba(246,241,231,.6); margin-top: 2rem; font-size: 1rem; }

/* ============================ MUSIC ============================ */
.music {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  margin-right: env(safe-area-inset-right, 0);
  margin-bottom: env(safe-area-inset-bottom, 0);
  z-index: 40;
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(28,26,23,.82); color: var(--gold-3);
  border: 1px solid rgba(216,192,138,.4);
  display: grid; place-items: center; backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px -12px rgba(28,26,23,.6);
  transition: transform .4s var(--ease), opacity .5s, background .4s;
  opacity: 0; transform: translateY(10px);
}
.music.is-shown { opacity: 1; transform: translateY(0); }
.music:hover { background: rgba(28,26,23,.95); transform: scale(1.06); }
.music svg { width: 18px; height: 18px; fill: currentColor; }
.music__on, .music__off { position: absolute; transition: opacity .3s; }
.music.is-playing .music__on { opacity: 1; } .music.is-playing .music__off { opacity: 0; }
.music.is-paused .music__on { opacity: 0; } .music.is-paused .music__off { opacity: 1; }

/* language switch */
.lang {
  position: fixed;
  left: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  margin-left: env(safe-area-inset-left, 0);
  margin-bottom: env(safe-area-inset-bottom, 0);
  z-index: 40;
  height: 50px; padding: 0 1.1rem; border-radius: 999px;
  background: rgba(28,26,23,.82); color: var(--gold-3);
  border: 1px solid rgba(216,192,138,.4);
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px -12px rgba(28,26,23,.6);
  transition: transform .4s var(--ease), opacity .5s, background .4s;
  opacity: 0; transform: translateY(10px);
}
.lang.is-shown { opacity: 1; transform: translateY(0); }
.lang:hover { background: rgba(28,26,23,.95); transform: scale(1.06); }
.lang__current { color: var(--ivory); }
.lang__sep { opacity: .4; }
.lang__other { opacity: .65; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) {
  .location { grid-template-columns: 1fr; gap: 2.5rem; }
  .location__media { max-width: 480px; margin: 0 auto; order: 2; }
  .location__content { order: 1; max-width: 100%; }
  .wardrobe__grid { grid-template-columns: 1fr; gap: 1.6rem; max-width: 440px; }
  .gifts__grid { gap: .75rem; max-width: 440px; }
}
@media (max-width: 560px) {
  .location__meta { display: inline-flex; flex-direction: row; gap: .85rem; padding: 1rem 0; }
  .location__meta-text { font-size: .8rem; font-weight: 300; letter-spacing: .16em; }
  .location__actions { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
  .hero__names { font-size: clamp(2.8rem, 16vw, 4.2rem); }
  .music { width: 44px; height: 44px; }
}

/* ============================ FLORAL WATERMARKS ============================ */
/* Sections need position context for absolute florals */
.prologue, .location, .wardrobe, .gifts, .rsvp, .footer { position: relative; }

.floral {
  position: absolute; z-index: 0; pointer-events: none;
  color: var(--gold);
  opacity: 0.55;
  overflow: visible;
  width: clamp(180px, 26vw, 320px);
  height: auto;
  min-height: 120px;
}

/* corner placements (kept inside section bounds to avoid body overflow-x clipping) */
.floral--tl { top: 3%; left: 2%; }
.floral--tr { top: 3%; right: 2%; transform: scaleX(-1); }
.floral--bl { bottom: 3%; left: 2%; transform: scaleY(-1); }
.floral--br { bottom: 3%; right: 2%; transform: scale(-1, -1); }
.floral--top { top: 6%; left: 50%; transform: translateX(-50%); width: clamp(220px, 32vw, 380px); opacity: 0.32; }

/* letter olive watermarks (override base .floral by source order) */
.envelope__floral { width: 70px; height: 54px; min-height: 0; opacity: 0.5; color: var(--gold); }
.envelope__floral.floral--tl { top: 6%; left: 4%; }
.envelope__floral.floral--br { bottom: 6%; right: 4%; }

/* keep section content above florals */
.prologue__inner, .location__media, .location__content,
.wardrobe__head, .wardrobe__grid,
.gifts__head, .gifts__grid,
.rsvp__inner, .footer > *:not(.floral) { position: relative; z-index: 1; }

/* subtler on the darker footer */
.footer .floral { color: var(--gold-2); opacity: 0.25; }

/* ----- footer starfield ----- */
.footer__stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.footer__star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%; background: rgba(246,241,231,.55);
  box-shadow: 0 0 5px rgba(246,241,231,.35);
  animation: starTwinkle 3s ease-in-out infinite;
}
@keyframes starTwinkle { 0%,100%{ opacity:.25; transform: scale(.8);} 50%{ opacity:.9; transform: scale(1.4);} }
@media (prefers-reduced-motion: reduce) { .footer__stars { display: none; } }

/* mobile: shrink + tuck florals so they never crowd content */
@media (max-width: 700px) {
  .floral { width: 150px; opacity: 0.45; }
  .floral--tl { top: 1%; left: 1%; }
  .floral--tr { top: 1%; right: 1%; }
  .floral--bl { bottom: 1%; left: 1%; }
  .floral--br { bottom: 1%; right: 1%; }
  .floral--top { width: 180px; top: 1%; }
}

/* ============================ REDUCED MOTION ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero__media img { transform: none; }
  .location__media img { transform: none; }
}

/* =========================================================
   FANCY LAYER — animations & interactions
   ========================================================= */

/* ----- split chars & words ----- */
.char { display: inline-block; will-change: transform, opacity; }
.char-mask { display: inline-block; overflow: hidden; vertical-align: top; white-space: nowrap; line-height: 1; padding-bottom: .1em; }
.word { display: inline-block; will-change: transform, opacity; white-space: nowrap; }

/* hero names: solid white */
.hero__name {
  color: var(--ivory);
}
.hero__name .char {
  color: var(--ivory);
}

/* ampersand solid white */
.hero__amp {
  color: var(--ivory);
}

/* ----- SVG floral path draw + sway ----- */
.floral { will-change: transform; transform-style: preserve-3d; }
.floral path, .floral circle { transition: none; }
.floral.is-swaying { animation: floralSway 9s ease-in-out infinite; }
.floral--tl.is-swaying { animation-name: floralSwayTL; }
.floral--tr.is-swaying { animation-name: floralSwayTR; }
.floral--bl.is-swaying { animation-name: floralSwayBL; }
.floral--br.is-swaying { animation-name: floralSwayBR; }
.floral--top.is-swaying { animation-name: floralSwayTop; }
@keyframes floralSwayTL { 0%,100%{ transform: rotate(0deg) translateY(0);} 50%{ transform: rotate(2deg) translateY(-6px);} }
@keyframes floralSwayTR { 0%,100%{ transform: scaleX(-1) rotate(0deg) translateY(0);} 50%{ transform: scaleX(-1) rotate(2deg) translateY(-6px);} }
@keyframes floralSwayBL { 0%,100%{ transform: scaleY(-1) rotate(0deg) translateY(0);} 50%{ transform: scaleY(-1) rotate(2deg) translateY(-6px);} }
@keyframes floralSwayBR { 0%,100%{ transform: scale(-1,-1) rotate(0deg) translateY(0);} 50%{ transform: scale(-1,-1) rotate(2deg) translateY(-6px);} }
@keyframes floralSwayTop { 0%,100%{ transform: translateX(-50%) rotate(0deg);} 50%{ transform: translateX(-50%) rotate(1deg);} }

/* wardrobe figure silhouette gentle float */
.wardrobe__svg { animation: silhouetteFloat 7s ease-in-out infinite; transform-origin: 50% 90%; }
.wardrobe__card--alt .wardrobe__svg { animation-delay: -3.5s; }
@keyframes silhouetteFloat { 0%,100%{ transform: translateY(0) rotate(0deg);} 50%{ transform: translateY(-8px) rotate(-.6deg);} }

/* ----- magnetic buttons ----- */
.magnetic { will-change: transform; transition: transform .5s var(--ease-out); }
.magnetic > * { display: inline-block; will-change: transform; transition: transform .5s var(--ease-out); }

/* ----- music button audio-reactive ring ----- */
.music::before, .music::after {
  content:""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(216,192,138,.45);
  opacity: 0; pointer-events: none;
}
.music.is-playing::before { animation: ringPulse 2.4s ease-out infinite; }
.music.is-playing::after { animation: ringPulse 2.4s ease-out .8s infinite; }
@keyframes ringPulse { 0%{ transform: scale(.9); opacity: .6; } 100%{ transform: scale(1.7); opacity: 0; } }

/* RSVP success petals burst container */
.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; width: 8px; height: 12px; border-radius: 0 100% 0 100%;
  will-change: transform, opacity; top: 0; left: 0;
}

/* section edge vignette pulse */
.invite { position: relative; }
.invite::before {
  content:""; position: fixed; inset: 0; z-index: 3; pointer-events: none;
  box-shadow: inset 0 0 140px rgba(28,26,23,.18);
  opacity: 0; transition: opacity 1s;
}
.invite.is-open::before { opacity: 1; }

/* reveal helper for split text fallback */
[data-reveal].is-ready { opacity: 1; }

/* gentle float for envelope hint */
@keyframes hintFloat { 0%,100%{ translate: 0 0; } 50%{ translate: 0 4px; } }


/* progress bar glow */
.progress__bar { box-shadow: 0 0 10px rgba(216,192,138,.6); }

/* scroll hint chevron extra */
.hero__scroll-line::before { content:""; position: absolute; top: 0; left: 0; width: 100%; height: 30%; background: linear-gradient(180deg, var(--ivory), transparent); opacity: .4; animation: scrollDot 2.2s var(--ease) infinite reverse; }

/* mobile: trim some heavy effects */
@media (max-width: 700px) {
  .wardrobe__card .wardrobe__figure, .wardrobe__card .wardrobe__body { transform: none; }
  .envelope__floral { width: 44px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__name { background: none; -webkit-text-fill-color: var(--ivory); color: var(--ivory); }
  .hero__amp { color: var(--ivory); animation: none; }
  .hero__media img, .wardrobe__svg, .envelope__hint, .envelope__seal, .floral.is-swaying { animation: none !important; }
}

/* =========================================================
   OVERDRIVE — extra cinematic animations
   ========================================================= */

/* ----- god rays behind hero ----- */
.hero__godrays {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    conic-gradient(from 200deg at 30% 20%, transparent 0deg, rgba(216,192,138,.09) 12deg, transparent 24deg),
    conic-gradient(from 160deg at 70% 25%, transparent 0deg, rgba(216,192,138,.07) 16deg, transparent 32deg),
    conic-gradient(from 180deg at 50% 10%, transparent 0deg, rgba(246,241,231,.06) 20deg, transparent 40deg);
  filter: blur(18px);
  opacity: 0; transform: scale(1.1);
  animation: godraysIn 2.4s var(--ease-out) 1.2s forwards, godraysShift 16s ease-in-out infinite 3.6s;
}
@keyframes godraysIn { to { opacity: 1; transform: scale(1); } }
@keyframes godraysShift { 0%,100%{ opacity:.85; transform: scale(1) rotate(0deg);} 50%{ opacity:1; transform: scale(1.06) rotate(1.5deg);} }

/* ----- hero vignette breathing ----- */
.hero::after {
  content:""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 20%, rgba(28,26,23,.55) 100%);
  opacity: .85; animation: heroVignette 10s ease-in-out infinite;
}
@keyframes heroVignette { 0%,100%{ opacity:.82;} 50%{ opacity:.95;} }

/* ----- hero inner 3D depth layer ----- */
.hero__inner { transform-style: preserve-3d; perspective: 1200px; }
.hero__names { transform-style: preserve-3d; }

/* ----- richer wax seal idle state ----- */
.envelope__seal::after {
  content:""; position: absolute; inset: -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(219,164,37,.25), transparent 70%);
  opacity: 0; animation: sealAura 3s ease-in-out infinite;
}
@keyframes sealAura { 0%,100%{ opacity:0; transform: scale(.9);} 50%{ opacity:1; transform: scale(1.15);} }

/* ----- envelope paper curl shadow on hover ----- */
.envelope__front, .envelope__flap { transition: filter .5s var(--ease-out); }
#envWrap:not(.is-opened):hover .envelope__front,
#envWrap:not(.is-opened):hover .envelope__flap { filter: brightness(1.02); }
.envelope__letter { transform-style: preserve-3d; }

/* ----- floral path draw (works with JS adding stroke-dasharray) ----- */
.floral path[stroke] { stroke-dasharray: var(--path-len, 2000); stroke-dashoffset: var(--path-len, 2000); transition: stroke-dashoffset 2.2s var(--ease-out); }
.floral.is-drawn path[stroke] { stroke-dashoffset: 0; }

/* ----- section cinematic entrance ----- */
/* Sections are visible by default. JS adds .js-fancy (on <html>) only when GSAP
   is available; otherwise the entrance animation is skipped and content stays
   readable without any library. */
.cine-section { transition: opacity 1.1s var(--ease-out); }
.js-fancy .cine-section { opacity: 0; }
.cine-section.is-visible { opacity: 1; }

/* ----- velocity skew on scroll ----- */
.is-scrolling .hero__inner,
.is-scrolling .prologue__inner,
.is-scrolling .location__content,
.is-scrolling .wardrobe__head,
.is-scrolling .wardrobe__grid,
.is-scrolling .rsvp__inner { transition: transform .15s linear; }

/* ----- image hover depth for location ----- */
.location__media { transform-style: preserve-3d; transition: transform .6s var(--ease-out); }
.location__media.is-depth { transition: none; }

/* ----- liquid-fill buttons ----- */
.location__cta, .rsvp__submit { position: relative; overflow: hidden; }
.location__cta::before, .rsvp__submit::before {
  content:""; position: absolute; inset: 0; z-index: -1;
  background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .55s var(--ease-out);
}
.rsvp__submit::before { background: var(--gold-2); }
.rsvp__submit:hover::before { transform: scaleX(1); }
.location__cta:hover { color: var(--gold); border-color: var(--gold); }
.rsvp__submit:hover { color: var(--ink); }

/* ----- form field animated underline ----- */
.field { position: relative; }
.field::after {
  content:""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform .5s var(--ease-out); pointer-events: none;
}
.field:focus-within::after { transform: scaleX(1); }
.field input:focus, .field select:focus, .field textarea:focus { background: rgba(176,141,74,.04); }

/* ----- radio/checkbox ripple ----- */
.attend__opt span { position: relative; }
.attend__opt input:checked + span::after {
  content:""; position: absolute; left: -24px; top: 50%; width: 8px; height: 8px;
  margin: -4px 0 0 0; border-radius: 50%; background: var(--gold-3);
  animation: radioRipple .6s var(--ease-out) forwards;
}
@keyframes radioRipple { 0%{ transform: scale(1); opacity:.6;} 100%{ transform: scale(4); opacity:0;} }

/* ----- success checkmark draw ----- */
.checkmark { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--gold); margin: 0 auto 1rem; position: relative; }
.checkmark svg { position: absolute; inset: 0; width: 100%; height: 100%; padding: 12px; }
.checkmark path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; }
.checkmark.is-drawn path { animation: checkDraw .6s var(--ease-out) forwards; }
@keyframes checkDraw { to { stroke-dashoffset: 0;} }

/* ----- ambient floating motes layer ----- */
.motes { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; opacity: .7; }
.mote {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(216,192,138,.55);
  box-shadow: 0 0 6px rgba(216,192,138,.4);
  will-change: transform, opacity;
}

/* ----- RSVP success golden wash ----- */
.gold-wash {
  position: fixed; inset: 0; z-index: 65; pointer-events: none;
  background: radial-gradient(circle at var(--cx,50%) var(--cy,50%), rgba(216,192,138,.25), transparent 50%);
  opacity: 0; transition: opacity 1.2s var(--ease-out);
}
.gold-wash.is-active { opacity: 1; }

/* ----- prologue top gradient ----- */
.prologue::before { content:""; position: absolute; top: 0; left: 0; right: 0; height: 12vh; background: linear-gradient(180deg, rgba(28,26,23,.12), transparent); pointer-events: none; }

/* ----- location image frame shimmer ----- */
.location__media-frame::after {
  content:""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.12) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform .8s;
}
.location__media:hover .location__media-frame::after { transform: translateX(100%); }

/* ----- prologue quote marks ----- */
.prologue__text { position: relative; }
.prologue__text::before, .prologue__text::after {
  position: absolute; font-family: var(--serif); font-size: 4rem; color: var(--gold); opacity: .12; line-height: 1; pointer-events: none;
}
.prologue__text::before { content:"“"; top: -.35em; left: -.18em; }
.prologue__text::after { content:"”"; bottom: -.55em; right: -.12em; }

/* ----- reduced motion overdrive overrides ----- */
@media (prefers-reduced-motion: reduce) {
  .hero__godrays, .hero::after, .envelope__seal::after, .motes, .gold-wash { display: none !important; }
  .cine-section { opacity: 1; }
  .floral path[stroke] { stroke-dashoffset: 0 !important; }
  .checkmark path { stroke-dashoffset: 0; }
}
