/* =========================================================
   Bride & Groom — Wedding Invitation
   Ivory, taupe & coffee-brown editorial styling with a
   lace-trimmed envelope intro.
   ========================================================= */

:root{
  --cream: #faf5ea;
  --cream-deep: #f1e8d7;
  --taupe: #8f8272;
  --taupe-deep: #5f5546;
  --brown: #6b4630;
  --brown-deep: #4a3222;
  --ink: #362a1f;
  --pill: #e7e1d3;
  --black: #1c1a17;
  --font-script: 'Alex Brush', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}
body.no-scroll{ overflow: hidden; height: 100%; }
/* Fixed, viewport-covering background layer — kept as a pseudo-element
   (rather than `background-attachment: fixed` on body) so it sizes
   against the viewport instead of the full scrollable page height, and
   avoids old iOS Safari quirks with fixed backgrounds on scrolling
   elements. */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../assets/bg-texture.webp') center/cover no-repeat;
}

h1,h2{ margin: 0; font-weight: 500; }
a{ color: inherit; text-decoration: none; }

.reveal{
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* =========================================================
   MUSIC TOGGLE
   ========================================================= */
.music-toggle{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1001;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(250,245,234,.92);
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  cursor: pointer;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.music-toggle[hidden]{ display: none; }
.music-toggle:hover{ transform: translateY(-2px); }
.music-toggle.is-muted{ color: var(--brown-deep); opacity: .55; }
.music-toggle.is-muted svg{ position: relative; }
.music-toggle.is-muted::after{
  content: "";
  position: absolute;
  width: 26px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}

/* =========================================================
   ENVELOPE INTRO
   ========================================================= */
.envelope-overlay{
  position: fixed;
  inset: 0;
  z-index: 999;
  overflow: hidden;
  background: var(--cream);
  transition: opacity 1s var(--ease), visibility 1s;
}
.envelope-overlay.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.skip-intro{
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 2;
  background: transparent;
  border: 1px solid rgba(107,70,48,.45);
  color: var(--brown-deep);
  font-family: var(--font-serif);
  letter-spacing: .08em;
  font-size: .8rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s;
}
.skip-intro:hover{ background: rgba(107,70,48,.08); }

/* Mobile variant: lace fills the whole screen, seal + text sit on it. */
.envelope-variant--desktop{ display: none; }

.envelope-variant--mobile .envelope-overlay__lace{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.envelope-variant--mobile .envelope-stage{
  position: absolute;
  z-index: 1;
  inset: 0;
}
.envelope-variant--mobile .envelope{
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: min(22vw, 92px);
  cursor: pointer;
}
.envelope-variant--mobile .envelope__seal{
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.3));
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.envelope-variant--mobile .envelope.is-opening .envelope__seal{
  opacity: 0;
  transform: scale(.85);
}
.envelope-variant--mobile .tap-hint{
  position: absolute;
  left: 50%;
  top: 80%;
  transform: translateX(-50%);
  color: var(--brown-deep);
  font-size: .82rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .4s;
}

/* Desktop/laptop variant: the original boxed envelope + quote. */
@media (min-width: 900px){
  .envelope-variant--mobile{ display: none; }
  .envelope-variant--desktop{
    display: flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: url('../assets/bg-texture.webp') center/cover no-repeat;
  }
}
.envelope-variant--desktop .envelope-stage{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  padding: 0 8vw;
}
.envelope-variant--desktop .envelope{
  position: relative;
  width: min(80vw, 340px);
  aspect-ratio: 700 / 494;
  cursor: pointer;
}
.envelope-variant--desktop .envelope__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.25));
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.envelope-variant--desktop .envelope.is-opening .envelope__img{
  opacity: 0;
  transform: scale(.92);
}
.envelope-variant--desktop .tap-hint{
  color: var(--brown-deep);
  font-size: .82rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  transition: opacity .4s;
}

/* =========================================================
   NAV
   ========================================================= */
.site-nav{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 500;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 18px 6vw;
  background: transparent;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}
.site-nav.is-visible{ opacity:1; transform: translateY(0); pointer-events:auto; }
.site-nav.is-scrolled{
  background: rgba(250,245,234,.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 18px rgba(0,0,0,.06);
  padding: 12px 6vw;
}
.site-nav__brand{
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--brown);
}
.site-nav__countdown{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15em;
  white-space: nowrap;
}
.site-nav__countdown-label{
  font-style: italic;
  font-size: clamp(.62rem, 1.8vw, .8rem);
  letter-spacing: .06em;
  color: var(--brown-deep);
}
.site-nav__countdown-time{
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--brown);
  font-size: clamp(.85rem, 3vw, 1.15rem);
  letter-spacing: .03em;
}
.site-nav__countdown-time i{ font-style:normal; opacity:.5; padding: 0 .12em; }

/* =========================================================
   INVITATION
   ========================================================= */
.invitation{
  min-height: 100vh;
  padding: 5.5rem 6vw 5rem;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.invitation__photo{
  width: min(50vw, 210px);
  height: auto;
  margin: 0 0 1.6rem;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.2));
}
.invitation__eyebrow{
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  color: var(--brown-deep);
  margin: 0 0 .8rem;
}
.invitation__names{
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 11.5vw, 5.4rem);
  color: var(--brown);
  line-height: 1.15;
  margin-bottom: 1rem;
  white-space: nowrap;
}
.invitation__names span{ padding: 0 .1em; }
.invitation__request{
  font-style: italic;
  color: var(--ink);
  font-size: 1.1rem;
  margin: 0 0 1.6rem;
}
.invitation__date{
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .95rem;
  color: var(--brown-deep);
  margin-bottom: 2.6rem;
}

.invitation__event{ margin-bottom: 2.2rem; }
.swan-icon{ width: min(42vw, 100px); height: auto; margin-bottom: .6rem; }
.candelabra-icon{ width: min(20vw, 45px); height: auto; margin-bottom: .6rem; }
.invitation__event-label{
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .82rem;
  color: var(--brown-deep);
  margin: 0 0 .3rem;
}
.invitation__event-venue{
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 .3rem;
}
.invitation__event-time{
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 .7rem;
}
.invitation__map-btn{
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid rgba(107,70,48,.45);
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brown-deep);
  transition: background .3s;
}
.invitation__map-btn:hover{ background: rgba(107,70,48,.08); }

.invitation__registry{
  margin-top: 1rem;
  font-style: italic;
  font-size: .95rem;
  color: var(--brown-deep);
  line-height: 1.6;
}
.gift-icon{ width: min(16vw, 52px); height: auto; margin-bottom: .5rem; }
.invitation__registry-heading{
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .85rem;
  color: var(--brown-deep);
  margin: 0 0 .8rem;
}
.invitation__registry p{ margin: 0 0 1rem; }
.invitation__registry-details{
  display: flex;
  flex-direction: column;
  gap: .7rem;
  font-style: normal;
  letter-spacing: .03em;
}
.registry-card{
  background: var(--cream-deep);
  border: 1px solid rgba(107,70,48,.15);
  border-radius: 10px;
  padding: .9rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
.registry-card__label{
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  color: var(--brown);
}
.registry-card__value{
  font-style: normal;
  font-size: 1rem;
  letter-spacing: .04em;
  color: var(--ink);
}

/* =========================================================
   RSVP TEASER ENVELOPE
   ========================================================= */
.rsvp-teaser{
  position: relative;
  overflow:hidden;
  padding: 6rem 6vw;
  display:flex;
  justify-content:center;
}
.teaser-envelope{
  position: relative;
  display:block;
  width: min(70vw, 300px);
  transition: transform .4s var(--ease);
}
.teaser-envelope:hover{ transform: translateY(-6px); }
.teaser-envelope__img{
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.2));
}
.teaser-envelope__card{
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center;
}
.teaser-envelope__script{
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  color: var(--brown);
  margin: 0;
}
.teaser-envelope__cta{
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
  color: var(--brown-deep);
  margin: .3rem 0 0;
}
.teaser-envelope__cheers{
  width: min(14vw, 46px);
  height: auto;
  margin-top: .5rem;
  color: var(--brown-deep);
  opacity: .85;
}

/* =========================================================
   RSVP FORM
   ========================================================= */
.rsvp{
  padding: 6rem 6vw 5rem;
  text-align:center;
  max-width: 560px;
  margin: 0 auto;
}
.rsvp__title{
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  color: var(--brown);
}
.rsvp__intro{ color: var(--ink); margin: 1rem 0 .6rem; }
.rsvp__deadline{
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .85rem;
  color: var(--brown-deep);
  margin-bottom: 2.4rem;
}

.rsvp__form:not([hidden]){ display:flex; flex-direction:column; gap: 1.5rem; text-align:left; }
.form-row label{
  display:block;
  font-size: .95rem;
  color: var(--ink);
  margin-bottom: .5rem;
}
.form-row input[type="text"],
.form-row input[type="number"]{
  width:100%;
  background: var(--cream);
  border: 1px solid rgba(107,70,48,.4);
  padding: .7rem .9rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  border-radius: 4px;
  color: var(--ink);
}

.pill-group{ display:flex; flex-direction:column; gap: .7rem; }
.pill{
  width:100%;
  background: var(--pill);
  border: none;
  padding: .8rem 1rem;
  font-family: var(--font-serif);
  font-size: .98rem;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  text-align:left;
  transition: background .25s, color .25s;
}
.pill.is-active{ background: var(--black); color: var(--cream); }

/* ---------- RSVP: guest-list search + party checklist ---------- */
.rsvp__search:not([hidden]){ display:flex; flex-direction:column; gap: 1rem; text-align:left; margin-bottom: 1.5rem; }
.rsvp__search .btn-dark{ align-self:center; }
.rsvp__search-message{
  text-align:center;
  font-size: .9rem;
  color: var(--brown-deep);
  line-height: 1.6;
}
.rsvp__search-message a{ text-decoration: underline; }

.rsvp__party-label{
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: .03em;
  color: var(--brown);
  text-align: center;
  margin: 0;
}
.rsvp__party-hint{
  font-size: .85rem;
  color: var(--brown-deep);
  text-align: center;
  margin: 0;
}
.rsvp__party-list{ display:flex; flex-direction:column; gap: .6rem; }
.rsvp__party-item{
  display:flex;
  align-items:center;
  gap: .7rem;
  background: var(--pill);
  border-radius: 6px;
  padding: .7rem 1rem;
  cursor: pointer;
  transition: opacity .25s;
}
.rsvp__party-item input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: var(--black);
  cursor: pointer;
  flex-shrink: 0;
}
.rsvp__party-item.is-declined{ opacity: .5; text-decoration: line-through; }

.rsvp__change-search{
  align-self: center;
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: .82rem;
  text-decoration: underline;
  color: var(--brown-deep);
  cursor: pointer;
  margin-top: -.6rem;
}

.btn-dark{
  margin-top: .4rem;
  background: var(--black);
  border: none;
  color: var(--cream);
  padding: .9rem 2rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-dark:hover{ transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.btn-dark:disabled{ opacity: .6; cursor: default; transform: none; box-shadow: none; }

.rsvp__error{ color: #a33b2b; font-size: .9rem; margin-top: .4rem; text-align:center; }

.rsvp-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6vw;
  background: rgba(28, 26, 23, .55);
}
.rsvp-modal-overlay:not([hidden]){ display: flex; }
.rsvp-modal{
  background: var(--cream) url('../assets/bg-texture.webp') center/cover no-repeat;
  border-radius: 10px;
  padding: 2.4rem 2rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.rsvp-modal__title{
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--brown);
  margin: 0 0 .6rem;
}
.rsvp-modal__text{
  font-size: .98rem;
  color: var(--ink);
  line-height: 1.6;
  margin: 0 0 1.4rem;
}
.rsvp-modal .btn-dark{ margin-top: 0; }

.rsvp__back{
  display:inline-block;
  margin-top: 2.4rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .78rem;
  color: var(--brown-deep);
  border-bottom: 1px solid var(--brown-deep);
  padding-bottom: 2px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  padding: 4rem 6vw 3rem;
  text-align:center;
}
.site-footer__monogram{
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--brown);
  margin-bottom: .6rem;
}
.site-footer p{ margin: .3rem 0; color: var(--ink); }
.site-footer__copy{ font-size: .78rem; opacity: .6; margin-top: 1rem; }

/* =========================================================
   SITE CONTENT REVEAL
   ========================================================= */
.site-content{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.site-content.is-visible{ opacity: 1; transform: translateY(0); }
