/* Layout concept: a letterpress invitation unfolding as a single column of
   alternating ivory and cream "cards", framed by arches and hairline gold rules.
   Single deliberate light look (an invitation on paper), so no dark theme. */
:root {
  --ivory: #FFFDF8;
  --cream: #F5EFE6;
  --champagne: #E5D6C5;
  --taupe: #A99A89;
  --ink: #51463D;
  --gold: #C5A46D;
  --gold-soft: rgba(197, 164, 109, .45);
  --ink-soft: #6f6359;

  --f-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-body: "Jost", "Helvetica Neue", Arial, sans-serif;
  --f-script: "Pinyon Script", "Snell Roundhand", cursive;

  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--champagne); }

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--f-body);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0;
}
.heading {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: .4rem 0 0;
}
.heading--left { text-align: left; }
.display {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.45rem, 4.6vw, 2rem);
  line-height: 1.3;
  text-wrap: balance;
  margin: 0;
}
.bigdate {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: .6rem 0 0;
}
.script {
  font-family: var(--f-script);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  color: var(--gold);
  line-height: 1.2;
  margin: .5rem 0 0;
}
.lede { font-size: 1.05rem; max-width: 34rem; margin: 1rem auto 0; color: var(--ink); }
.muted { color: var(--taupe); font-size: .95rem; margin: 1rem 0 0; }
.signature {
  font-family: var(--f-display);
  font-size: 1.35rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin: 1.6rem 0 0;
}
.signature i, .finale__names i, .topbar__mono i {
  font-family: var(--f-script);
  text-transform: none;
  letter-spacing: 0;
  color: var(--gold);
  font-style: normal;
  font-size: 1.3em;
  padding: 0 .15em;
}

.rule {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 1.6rem auto; color: var(--gold);
}
.rule span { height: 1px; width: min(80px, 22vw); background: var(--gold-soft); }
.rule svg { width: 22px; height: 22px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--f-body); font-size: .78rem; font-weight: 400;
  letter-spacing: .28em; text-transform: uppercase; text-decoration: none;
  min-height: 48px; padding: .9em 2.2em;
  border-radius: 0; cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--ivory); border: 1px solid var(--ink); }
.btn--solid:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--champagne); }
.btn--ghost:hover { border-color: var(--gold); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ink); color: var(--ivory); }

/* ---------- layout ---------- */
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.narrow { max-width: 680px; }
.center { text-align: center; }
.section { padding-block: clamp(4.5rem, 12vw, 8rem); position: relative; }
.section--cream { background: var(--cream); }
.section--cream + .section:not(.section--cream)::before,
.section:not(.section--cream) + .section--cream::before { content: none; }

/* ---------- opening cover ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--ivory) 0%, var(--cream) 70%, #EFE6D9 100%);
  padding: calc(24px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}
.cover.is-leaving { opacity: 0; visibility: hidden; }
.cover.is-leaving .cover__inner { transform: scale(1.03); }
.cover__inner {
  position: relative; text-align: center;
  width: min(100%, 460px);
  padding: 3.4rem 1.6rem 3rem;
  border: 1px solid var(--gold-soft);
  outline: 1px solid var(--gold-soft); outline-offset: -9px;
  background: rgba(255, 253, 248, .7);
  display: grid; gap: 1.1rem; justify-items: center;
  transition: transform 1.1s var(--ease);
  animation: rise 1.4s var(--ease) both;
}
.cover__names {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(3.2rem, 15vw, 4.6rem);
  line-height: .95; letter-spacing: .1em; text-transform: uppercase;
  margin: .3rem 0; display: grid;
}
.cover__names .amp { font-family: var(--f-script); text-transform: none; letter-spacing: 0; color: var(--gold); font-size: .75em; line-height: 1.1; }
.cover__date { font-family: var(--f-display); font-size: 1.25rem; letter-spacing: .3em; text-transform: uppercase; margin: 0 0 .8rem; }
.cover .rule { margin: 0; }
.cover__sprig { position: absolute; width: 140px; height: 70px; color: var(--gold); opacity: .8; }
.cover__sprig--tl { top: -18px; left: -26px; transform: rotate(-8deg); }
.cover__sprig--br { bottom: -18px; right: -26px; transform: rotate(172deg); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; z-index: 30; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
  pointer-events: none;
  opacity: 0; transition: opacity .8s var(--ease) .4s;
}
body.is-open .topbar { opacity: 1; }
.topbar > * { pointer-events: auto; }
.topbar__mono {
  font-family: var(--f-display); letter-spacing: .3em; text-decoration: none; font-size: 1rem;
  padding: .3rem .8rem; background: rgba(255,253,248,.82); border: 1px solid var(--gold-soft);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.iconbtn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,253,248,.88); border: 1px solid var(--gold-soft); color: var(--ink);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  position: relative;
}
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.eq { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 2px; background: var(--gold); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 14px; } }
#music-btn.is-playing .ic-note { display: none; }
#music-btn.is-playing .eq { display: flex; }
#music-btn.is-unavailable { opacity: .55; }
#music-btn.is-unavailable::after {
  content: ""; position: absolute; width: 24px; height: 1px; background: var(--ink); transform: rotate(-45deg);
}

.menu {
  position: fixed; z-index: 29; inset: 0;
  background: rgba(255,253,248,.97);
  display: grid; place-items: center;
  padding: calc(70px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.menu ul { list-style: none; margin: 0; padding: 0; text-align: center; display: grid; gap: .35rem; }
.menu a {
  font-family: var(--f-display); font-size: 1.45rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; display: inline-block; padding: .3rem .6rem;
}
.menu a:hover { color: var(--gold); }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--ivory); font-size: .85rem; letter-spacing: .03em;
  padding: .8rem 1.2rem; max-width: calc(100% - 32px); text-align: center;
  transition: opacity .4s, transform .4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- arches ---------- */
.arch {
  margin: 0; position: relative; aspect-ratio: 3 / 4; max-width: 100%;
  border-radius: 999px 999px 0 0; overflow: visible;
}
.arch::after {
  content: ""; position: absolute; inset: -10px; border: 1px solid var(--gold-soft);
  border-radius: 999px 999px 0 0; pointer-events: none;
}
.arch img, .arch .ph { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ---------- 1 welcome ---------- */
.welcome { padding-top: clamp(6rem, 16vw, 9rem); }
.welcome__grid { display: grid; gap: 3.2rem; align-items: center; }
.arch--hero { width: min(78%, 340px); margin: 0 auto; }
.welcome__text { display: grid; gap: 1rem; text-align: center; }
.welcome__text .heading--left { text-align: center; }
.welcome__text .lede { margin: 0 auto; }
@media (min-width: 820px) {
  .welcome__grid { grid-template-columns: 5fr 6fr; gap: 5rem; }
  .arch--hero { width: 100%; max-width: 400px; }
  .welcome__text { text-align: left; }
  .welcome__text .heading--left { text-align: left; }
  .welcome__text .lede { margin: 0; }
}

/* ---------- placeholders ---------- */
.ph {
  display: grid; place-items: center; align-content: center; gap: .6rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(197,164,109,.08) 14px 15px),
    var(--cream);
  color: var(--taupe); text-align: center; padding: 1rem;
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
}
.ph svg { width: 34px; height: 34px; color: var(--gold); }

/* ---------- 2 countdown ---------- */
.timer {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  max-width: 560px; margin: 2.4rem auto 0;
  border-top: 1px solid var(--gold-soft); border-bottom: 1px solid var(--gold-soft);
}
.timer__cell { display: grid; gap: .2rem; padding: 1.3rem .2rem; }
.timer__cell + .timer__cell { border-left: 1px solid var(--gold-soft); }
.timer__num {
  font-family: var(--f-display); font-size: clamp(2.1rem, 9vw, 3.4rem); line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.timer__lbl { font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--taupe); }
.timer__done { font-family: var(--f-display); font-style: italic; font-size: 1.5rem; margin: 2rem auto 0; max-width: 30rem; }

/* ---------- 3 story ---------- */
.story__body { display: grid; gap: 1.1rem; }
.story__body p { margin: 0; font-family: var(--f-display); font-size: clamp(1.2rem, 3.8vw, 1.45rem); line-height: 1.6; }

/* ---------- 4 details ---------- */
.cards { display: grid; gap: 1.6rem; margin-top: 2.8rem; align-items: stretch; }
.card {
  background: var(--ivory); padding: 2.6rem 1.5rem 2.4rem;
  border: 1px solid var(--champagne); outline: 1px solid var(--champagne); outline-offset: -8px;
  display: grid; gap: .4rem; justify-items: center;
}
.card__icon { width: 64px; height: 48px; fill: none; stroke: var(--gold); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; margin-bottom: .6rem; }
.card__label { margin: 0; font-family: var(--f-body); font-weight: 400; font-size: .78rem; letter-spacing: .34em; text-transform: uppercase; color: var(--taupe); }
.card__time { margin: 0; font-family: var(--f-display); font-size: 2.3rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.card__place { margin: 0; font-family: var(--f-display); font-style: italic; font-size: 1.3rem; }
.cards__divider { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold); }
.cards__divider span { height: 1px; width: 60px; background: var(--gold-soft); }
.cards__divider svg { width: 20px; height: 20px; }
@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr auto 1fr; gap: 2rem; }
  .cards__divider { flex-direction: column; }
  .cards__divider span { width: 1px; height: 60px; }
}

/* ---------- 5 gallery ---------- */
.grid {
  display: grid; gap: 12px; margin-top: 2.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tile { margin: 0; position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--cream); }
.tile--feature { grid-column: 1 / -1; aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.tile button:focus-visible { outline: 1.5px solid var(--gold); outline-offset: -4px; }
.tile:hover img { transform: scale(1.03); }
.tile .ph { width: 100%; height: 100%; }
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .tile--feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}

/* ---------- 6 dress code ---------- */
.swatches { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; max-width: 460px; margin-inline: auto; }
.swatches li { display: grid; justify-items: center; gap: .5rem; font-size: .6rem; letter-spacing: .12em; min-width: 0; text-transform: uppercase; color: var(--ink-soft); }
.sw {
  width: min(54px, 100%); aspect-ratio: 1; border-radius: 50%; background: var(--sw);
  border: 1px solid var(--champagne); box-shadow: 0 0 0 4px var(--ivory), 0 0 0 5px var(--gold-soft);
}

/* ---------- 7 entourage ---------- */
.ent { display: grid; gap: 0; margin-top: 2.4rem; max-width: 820px; margin-inline: auto; }
.ent__group { padding: 1.4rem 0; border-top: 1px solid var(--champagne); display: grid; gap: .45rem; }
.ent__group:last-child { border-bottom: 1px solid var(--champagne); }
.ent__role { margin: 0; font-family: var(--f-body); font-weight: 400; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.ent__names { list-style: none; margin: 0; padding: 0; font-family: var(--f-display); font-size: 1.25rem; line-height: 1.5; }
.ent__tba { margin: 0; font-family: var(--f-display); font-style: italic; color: var(--taupe); font-size: 1.1rem; }
@media (min-width: 760px) {
  .ent { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .ent__group:nth-last-child(2) { border-bottom: 1px solid var(--champagne); }
  .ent__group--wide { grid-column: 1 / -1; }
}

/* ---------- 8 gifts ---------- */
.envelope { width: 108px; height: 76px; fill: none; stroke: var(--gold); stroke-width: 1.1; stroke-linejoin: round; margin: 0 auto 1.2rem; display: block; }
.envelope__heart { fill: var(--champagne); }
.gifts__body { display: grid; gap: 1rem; margin-top: 1.4rem; }
.gifts__body p { margin: 0; font-size: 1.05rem; }

/* ---------- 9 RSVP ---------- */
.rsvp__deadline { font-family: var(--f-display); font-size: 1.6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: .3rem 0 2rem; }
.rsvp__late { color: var(--ink-soft); font-style: italic; margin: -1rem 0 1.6rem; }
.rsvp__panel { margin-top: 2.2rem; text-align: left; }
.form { display: grid; gap: 1.4rem; background: var(--cream); padding: clamp(1.4rem, 5vw, 2.4rem); border: 1px solid var(--champagne); }
.field { display: grid; gap: .45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink); font-weight: 400; padding: 0; margin-bottom: .45rem; }
.field legend { float: left; width: 100%; }
.opt { text-transform: none; letter-spacing: 0; color: var(--taupe); }
.field input[type="text"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--ivory); border: 1px solid var(--champagne); border-radius: 0;
  padding: .8rem .9rem; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,164,109,.18); }
.field [aria-invalid="true"] { border-color: #a5584b; }
.choices { display: grid; gap: .6rem; clear: both; }
.choice { display: flex; align-items: center; gap: .8rem; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-size: 1rem !important; background: var(--ivory); border: 1px solid var(--champagne); padding: .8rem .9rem; margin: 0 !important; }
.choice input { accent-color: var(--gold); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--gold); }
.field__err { margin: 0; color: #9a4b3f; font-size: .88rem; min-height: 0; }
.field__err:empty { display: none; }
.field__help { margin: 0; color: var(--taupe); font-size: .88rem; }
.form__status { margin: 0; font-size: .95rem; color: #9a4b3f; }
.form__status:empty { display: none; }
.notice { background: var(--cream); border: 1px solid var(--champagne); padding: 2rem 1.5rem; text-align: center; display: grid; gap: .8rem; justify-items: center; }
.notice p { margin: 0; }
.notice__title { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.2; }
.notice__mark { width: 34px; height: 34px; color: var(--gold); }
.notice:focus { outline: none; }

/* ---------- 10 directions ---------- */
.venues { display: grid; gap: 1.6rem; margin-top: 2.6rem; }
@media (min-width: 720px) { .venues { grid-template-columns: 1fr 1fr; } }
.venue { background: var(--ivory); border: 1px solid var(--champagne); padding: 2.2rem 1.5rem; display: grid; gap: .55rem; justify-items: center; align-content: start; }
.venue__pin { width: 30px; height: 38px; fill: none; stroke: var(--gold); stroke-width: 1.2; }
.venue__name { margin: 0; font-family: var(--f-display); font-size: 1.7rem; line-height: 1.2; }
.venue__addr { margin: 0; color: var(--ink-soft); font-size: .95rem; overflow-wrap: anywhere; }
.venue__flag { margin: 0; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: #8c6a2f; background: rgba(197,164,109,.16); padding: .35rem .7rem; }
.venue .btn { margin-top: .8rem; }

/* ---------- 11 finale ---------- */
.finale { background: linear-gradient(var(--ivory), var(--cream)); padding-bottom: calc(clamp(5rem, 14vw, 9rem) + env(safe-area-inset-bottom, 0px)); }
.finale__sprig { width: 160px; height: 80px; color: var(--gold); display: block; margin: 0 auto 1rem; }
.finale .eyebrow { margin-top: 2.4rem; }
.finale__names { font-family: var(--f-display); font-size: clamp(2.4rem, 10vw, 3.6rem); letter-spacing: .14em; text-transform: uppercase; margin: .4rem 0 0; line-height: 1.1; }
.finale__date { font-family: var(--f-display); letter-spacing: .4em; color: var(--taupe); margin: 1rem 0 0; font-variant-numeric: lining-nums; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(41, 35, 30, .92);
  display: grid; place-items: center;
  padding: calc(56px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(56px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.lightbox img { max-height: 100%; max-width: min(100%, 900px); object-fit: contain; }
.lightbox__btn {
  position: absolute; background: rgba(255,253,248,.12); color: var(--ivory); border: 1px solid rgba(255,253,248,.35);
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox__close { top: calc(10px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
.lightbox__prev { left: max(10px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: max(10px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }

/* ---------- reveal on scroll (content is visible without JS) ---------- */
.js-reveal .reveal.is-pending { opacity: 0; transform: translateY(18px); }
.js-reveal .reveal { transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.is-open #main { animation: fadeIn 1.2s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js-reveal .reveal.is-pending { opacity: 1; transform: none; }
}

/* ---------- v2: letter details, guest note, invitation-code RSVP ---------- */
.cover__tag { font-family: var(--f-display); font-style: italic; font-size: 1.3rem; color: var(--ink-soft); margin: 0; }
.cover__for { margin: -.4rem 0 .4rem; font-size: .9rem; color: var(--ink-soft); }
.cover__for strong { font-weight: 400; color: var(--ink); }

.letter { display: grid; gap: 1rem; }
.letter p { margin: 0; font-family: var(--f-display); font-size: clamp(1.15rem, 3.6vw, 1.35rem); line-height: 1.6; color: var(--ink); }
.sign-off { font-family: var(--f-display); font-style: italic; color: var(--taupe); font-size: 1.15rem; margin: 1.6rem 0 0; }
.sign-off + .signature { margin-top: .3rem; }
.welcome__text .letter { text-align: center; }
@media (min-width: 820px) { .welcome__text .letter { text-align: left; } }

.day .card { background: var(--cream); }
.day .cards { margin-top: 3.4rem; }
.gallery .tile { background: var(--ivory); }
.gallery .ph { background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(197,164,109,.08) 14px 15px), var(--ivory); }
.entourage .ent__group { border-color: var(--champagne); }

.note__card {
  position: relative; text-align: center;
  background: var(--ivory);
  border: 1px solid var(--champagne); outline: 1px solid var(--champagne); outline-offset: -10px;
  box-shadow: 0 18px 40px -28px rgba(81, 70, 61, .35);
  padding: clamp(2.6rem, 8vw, 3.6rem) clamp(1.4rem, 6vw, 3.2rem);
}
.note__seal {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; padding: 6px; border-radius: 50%;
  background: var(--ivory); border: 1px solid var(--gold-soft); color: var(--gold);
}
.note__card .heading { font-size: clamp(1.7rem, 6vw, 2.4rem); margin-bottom: 1.4rem; }
.note__seats {
  margin: 1.6rem auto 0; display: inline-block;
  font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink);
  border-top: 1px solid var(--gold-soft); border-bottom: 1px solid var(--gold-soft); padding: .6rem 1rem;
}

.invite-for { text-align: center; display: grid; gap: .25rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--champagne); }
.invite-for__name { margin: 0; font-family: var(--f-display); font-size: 1.7rem; line-height: 1.2; overflow-wrap: anywhere; }
.invite-for__seats { margin: .2rem 0 0; color: var(--gold); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; }
.invite-for__prev { margin: .5rem 0 0; font-size: .9rem; color: var(--ink-soft); font-style: italic; }
.linkbtn {
  justify-self: center; margin-top: .4rem; background: none; border: 0; padding: .4rem;
  font: inherit; font-size: .85rem; color: var(--taupe); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
#rsvp-code { text-transform: uppercase; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
#rsvp-code::placeholder { letter-spacing: .08em; color: #b9ad9f; }
.more-seats { margin-top: .4rem; font-size: .9rem; }
.more-seats summary { cursor: pointer; color: var(--taupe); text-decoration: underline; text-underline-offset: 3px; width: max-content; max-width: 100%; }
.more-seats p { margin: .6rem 0 0; padding: .9rem 1rem; background: var(--ivory); border-left: 2px solid var(--gold); color: var(--ink); }
.form + .form, .notice + .form { margin-top: 0; }
.section, .rsvp__panel { scroll-margin-top: calc(64px + env(safe-area-inset-top, 0px)); }

/* =====================================================================
   v3 — OUR MOMENTS: a cinematic photo story
   ===================================================================== */
.cover { display: none; }
.js .cover { display: grid; }
html:not(.js) .topbar { display: none; }

.gallery {
  position: relative; overflow: hidden;
  background: linear-gradient(var(--ivory), var(--cream) 9%, var(--cream) 91%, var(--ivory));
}
/* faint film grain on the paper around the photos (never over them) */
.gallery::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .27 0 0 0 0 .24 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gallery .wrap { position: relative; z-index: 1; }

.reel {
  display: grid; gap: clamp(5rem, 15vw, 9rem);
  max-width: 980px; margin: clamp(3rem, 9vw, 5rem) auto 0; text-align: left;
}
.scene { position: relative; min-width: 0; }

/* photo frames: cream mat, soft shadow, reserved shape (no layout shift) */
.frame { margin: 0; position: relative; min-width: 0; }
.frame__mat {
  background: var(--ivory);
  padding: clamp(6px, 1.4vw, 12px);
  box-shadow: 0 0 0 1px rgba(229, 214, 197, .9), 0 26px 50px -32px rgba(81, 70, 61, .5);
  transition: box-shadow .9s var(--ease);
}
.frame__btn {
  all: unset; box-sizing: border-box; display: block; width: 100%; cursor: zoom-in;
  position: relative; overflow: hidden; aspect-ratio: var(--ar); background: var(--champagne);
}
.frame__btn:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; }
.frame__btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.6s var(--ease); will-change: transform; }
.frame__mat > .ph { aspect-ratio: var(--ar); width: 100%; }
@media (min-width: 760px) {
  .frame__btn, .frame__mat > .ph { aspect-ratio: var(--ar-wide, var(--ar)); }
}
@media (hover: hover) and (pointer: fine) {
  .frame__btn:hover img { transform: scale(1.035); }
  .frame:hover .frame__mat { box-shadow: 0 0 0 1px var(--gold-soft), 0 32px 60px -30px rgba(81, 70, 61, .55); }
}

.g-cap {
  margin: 0; font-family: var(--f-script); font-weight: 400;
  font-size: clamp(1.45rem, 5.2vw, 1.95rem); line-height: 1.3; color: var(--ink-soft);
  text-wrap: balance;
}
.g-cap--center { text-align: center; margin-top: 1.6rem; }

/* --- signature moment --- */
.sig { padding-block: 2rem; }
.sig__line { position: absolute; left: 6%; right: 6%; height: 1px; background: var(--gold-soft); transform-origin: center; }
.sig__line--t { top: 0; }
.sig__line--b { bottom: 0; }
.frame--sig .frame__mat { padding: clamp(8px, 1.8vw, 16px); }
.sig__cap { text-align: center; margin-top: 1.6rem; font-size: clamp(1.6rem, 6vw, 2.3rem); }
.sig.is-in .frame--sig img { animation: kenburns 26s ease-in-out 2.2s infinite alternate both; }
@keyframes kenburns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.07) translate3d(-1.2%, -1%, 0); }
}

/* --- spreads: a main photo with an overlapping accent --- */
.scene--spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.scene--spread .frame--main   { grid-column: 1 / span 10; grid-row: 1; }
.scene--spread .frame--accent { grid-column: 6 / -1; grid-row: 2; margin-top: -26%; z-index: 2; }
.scene--spread .g-cap         { grid-column: 1 / span 5; grid-row: 2; align-self: end; padding-right: .4rem; padding-bottom: .4rem; }
.scene--right .frame--main    { grid-column: 3 / -1; }
.scene--right .frame--accent  { grid-column: 1 / span 7; }
.scene--right .g-cap          { grid-column: 8 / -1; text-align: right; padding: 0 0 .4rem .4rem; }
.frame--accent .frame__mat { box-shadow: 0 0 0 1px rgba(229, 214, 197, .9), 0 30px 60px -28px rgba(81, 70, 61, .6); }
.scene__sprig { position: absolute; top: -46px; right: 2%; width: 110px; height: 55px; color: var(--gold); opacity: .75; pointer-events: none; }
@media (min-width: 760px) {
  .scene--spread .frame--main   { grid-column: 1 / span 7; grid-row: 1 / span 2; }
  .scene--spread .frame--accent { grid-column: 7 / -1; grid-row: 2; margin: 0 0 -9% 0; align-self: end; }
  .scene--spread .g-cap         { grid-column: 8 / -1; grid-row: 1; align-self: center; padding: 0 0 0 1.4rem; }
  .scene--right .frame--main    { grid-column: 6 / -1; }
  .scene--right .frame--accent  { grid-column: 1 / span 6; }
  .scene--right .g-cap          { grid-column: 1 / span 5; text-align: right; padding: 0 1.4rem 0 0; }
}

/* --- wide band --- */
.frame--wide .frame__btn img { transition: transform .2s linear; }
@media (min-width: 900px) { .scene--wide { margin-inline: -2%; } }

/* --- pair --- */
.scene--pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 3vw, 28px); align-items: start; max-width: 780px; margin-inline: auto; width: 100%; }
.scene--pair .frame--pair-1 { margin-top: 22%; }
.scene--pair .g-cap { grid-column: 1 / -1; }

/* --- reveal choreography (only when JS runs and motion is welcome) --- */
.js-reveal .g-reveal { transition: opacity 1.3s ease var(--d, 0ms), transform 1.6s var(--ease) var(--d, 0ms); }
.js-reveal .g-reveal.is-pending[data-motion="rise"]        { opacity: 0; transform: translate3d(0, 30px, 0); }
.js-reveal .g-reveal.is-pending[data-motion="rise-late"]   { opacity: 0; transform: translate3d(0, 48px, 0); }
.js-reveal .g-reveal.is-pending[data-motion="drift-right"] { opacity: 0; transform: translate3d(-16px, 22px, 0); }
.js-reveal .g-reveal.is-pending[data-motion="drift-left"]  { opacity: 0; transform: translate3d(16px, 22px, 0); }
.js-reveal .g-reveal.is-pending[data-motion="settle"]      { opacity: 0; transform: translate3d(0, 16px, 0) scale(.975); }
.js-reveal .g-reveal.is-pending[data-motion="fade"]        { opacity: 0; }

.js-reveal .sig__line { transition: transform 1.8s var(--ease) .2s; }
.js-reveal .frame--sig .frame__mat { transition: background-color 1.4s ease, box-shadow 2s ease .4s; }
.js-reveal .frame--sig .frame__btn { transition: opacity 1.9s ease, transform 2.4s var(--ease); }
.js-reveal .sig__cap { transition: opacity 1.3s ease 1.6s, transform 1.3s var(--ease) 1.6s; }
.js-reveal .sig.is-waiting:not(.is-in) .sig__line { transform: scaleX(0); }
.js-reveal .sig.is-waiting:not(.is-in) .frame--sig .frame__mat { background-color: transparent; box-shadow: 0 0 0 1px transparent, 0 26px 50px -32px transparent; }
.js-reveal .sig.is-waiting:not(.is-in) .frame--sig .frame__btn { opacity: 0; transform: scale(.95); }
.js-reveal .sig.is-waiting:not(.is-in) .sig__cap { opacity: 0; transform: translate3d(0, 10px, 0); }

/* --- lightbox: fade-and-scale, crossfade between photos --- */
.lightbox {
  display: block; padding: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.lightbox__stage {
  position: absolute; display: grid; place-items: center;
  top: calc(60px + env(safe-area-inset-top, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
}
.lightbox__fig {
  margin: 0; display: grid; gap: .7rem; justify-items: center; max-width: min(100%, 920px);
  transform: scale(.955); transition: transform .55s var(--ease);
}
.lightbox.is-open .lightbox__fig { transform: none; }
#lb-img {
  display: block; max-width: 100%; max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px);
  object-fit: contain; border: 6px solid var(--ivory); transition: opacity .26s ease;
}
#lb-img.is-fading { opacity: 0; }
.lightbox__cap { font-family: var(--f-script); color: var(--ivory); font-size: 1.6rem; line-height: 1.2; text-align: center; }
.lightbox__count { margin: 0; color: rgba(255, 253, 248, .6); font-size: .7rem; letter-spacing: .3em; }
.lightbox__btn { z-index: 2; }
@media (max-width: 600px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: none; }
  .lightbox__stage { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .sig.is-in .frame--sig img { animation: none; }
  .is-parallax img { transform: none !important; }
  .frame__btn:hover img { transform: none; }
}

/* =====================================================================
   v4 — TYPOGRAPHY & MOTION SYSTEM
   Three families only: Cormorant Garamond (names, headings, dates),
   Lato (everything you need to read), Allura (a few handwritten touches:
   sign-offs and photo captions). Fallbacks stay classic serif/sans so the
   invitation still looks composed if web fonts don't load.
   ===================================================================== */
:root {
  --f-display: "Cormorant Garamond", "Cormorant", "EB Garamond", Garamond, "Hoefler Text", Baskerville, "Times New Roman", serif;
  --f-body: "Lato", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --f-script: "Allura", "Snell Roundhand", "Apple Chancery", "Cormorant Garamond", Georgia, serif;
  --ease: cubic-bezier(.22, .61, .21, 1);
}
body { font-weight: 400; font-size: 1rem; line-height: 1.8; }

.eyebrow { font-size: .7rem; font-weight: 400; letter-spacing: .24em; }

.heading {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(2.25rem, 8.6vw, 3.5rem); line-height: 1.08;
  letter-spacing: .005em; text-transform: none;
  margin-top: .5rem;
}
.heading em { font-style: italic; font-weight: 300; color: #7a6a58; }
.bigdate { font-weight: 400; letter-spacing: .2em; font-size: clamp(1.25rem, 4.6vw, 1.7rem); }
.subtitle { font-family: var(--f-display); font-style: italic; font-weight: 400; color: var(--gold); font-size: clamp(1.35rem, 5vw, 1.7rem); margin: .4rem 0 0; }

/* reading text in Lato; the first line of a letter set as a serif lead */
.letter { gap: 1.05rem; }
.letter p, .story__body p { font-family: var(--f-body); font-size: 1rem; line-height: 1.85; color: var(--ink); }
.letter p.lead, .story__body p.lead {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 4.8vw, 1.6rem); line-height: 1.45; color: var(--ink);
}
.lede { font-size: 1rem; line-height: 1.85; }

/* handwritten accents only */
.sign-off { font-family: var(--f-script); font-style: normal; font-size: clamp(1.7rem, 6vw, 2.1rem); line-height: 1.2; color: #8f7a5f; margin: 1.8rem 0 0; }
.g-cap, .lightbox__cap { font-family: var(--f-script); }
.g-cap { font-size: clamp(1.75rem, 6.4vw, 2.2rem); color: #7d6b57; }
.sig__cap { font-size: clamp(1.9rem, 7vw, 2.6rem); }

/* the couple's names wherever they appear: serif capitals, an italic ampersand */
.signature { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; letter-spacing: .22em; }
.signature i, .finale__names i, .topbar__mono i, .cover__names .amp {
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  text-transform: none; letter-spacing: 0; color: var(--gold);
}
.signature i { font-size: 1.25em; padding: 0 .2em; }

/* ---------- cover ---------- */
.cover__inner { gap: 1rem; padding: clamp(2.6rem, 8vh, 3.6rem) 1.4rem clamp(2.4rem, 7vh, 3.2rem); animation: none; }
.cover__names {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(3.3rem, 17vw, 5.4rem); line-height: .92; letter-spacing: .14em;
  margin: .5rem 0 .2rem; padding-left: .14em; /* balances the trailing letter-spacing */
}
.cover__names .amp { font-size: .62em; line-height: 1.25; padding-left: 0; }
.cover__tag { font-family: var(--f-body); font-style: normal; color: var(--taupe); }
.cover__date { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; letter-spacing: .24em; margin: 0 0 .7rem; }
@media (max-height: 700px) {
  .cover__names { font-size: clamp(2.9rem, 14vw, 4.4rem); }
  .cover__inner { gap: .75rem; padding-block: 2.2rem 2rem; }
}

/* opening sequence: each line arrives in turn, like ink settling on a card */
.js .cover__inner { animation: coverPaper 1s ease both; }
.js .cover .seq { animation: seqRise 1.15s var(--ease) both; animation-delay: var(--t, 0s); }
.js .cover .seq--fade { animation-name: seqFade; animation-duration: 1.4s; }
.js .cover .cover__sprig.seq { animation-duration: 1.8s; }
@keyframes coverPaper { from { opacity: 0; } to { opacity: 1; } }
@keyframes seqRise { from { opacity: 0; transform: translate3d(0, 14px, 0); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes seqFade { from { opacity: 0; } to { opacity: 1; } }
.cover__sprig--tl.seq, .cover__sprig--br.seq { animation-fill-mode: both; }
.cover__sprig--tl { transform: rotate(-8deg); }
.cover__sprig--br { transform: rotate(172deg); }

/* ---------- details stay legible at all times ---------- */
.card__time { font-weight: 400; }
.card__place { font-family: var(--f-display); font-style: italic; }
.rsvp__deadline { font-weight: 400; letter-spacing: .2em; font-size: clamp(1.25rem, 4.8vw, 1.55rem); }
.venue__name { font-weight: 400; }
.invite-for__name { font-weight: 400; }
.notice__title { font-weight: 400; }
.ent__names { font-family: var(--f-display); font-size: 1.3rem; }

/* ---------- unified text reveal (headings gain a whisper of blur-to-sharp) ---------- */
.js-reveal .reveal { transition: opacity 1.1s ease var(--rd, 0ms), transform 1.2s var(--ease) var(--rd, 0ms), filter 1.1s ease var(--rd, 0ms); }
.js-reveal .reveal.is-pending { opacity: 0; transform: translate3d(0, 16px, 0); }
.js-reveal .heading.reveal.is-pending,
.js-reveal .reveal.is-pending .heading { filter: blur(3px); }
.js-reveal .reveal .heading { transition: filter 1.1s ease var(--rd, 0ms); }

/* ---------- section transitions: cream bands melt into ivory ---------- */
.section--cream:not(.gallery) {
  background: linear-gradient(var(--ivory), var(--cream) 90px, var(--cream) calc(100% - 90px), var(--ivory));
}

/* ---------- the closing frame ---------- */
.finale { background: var(--cream); transition: background-color 2.4s ease; }
.js-reveal .finale { background: var(--ivory); }
.js-reveal .finale.is-lit { background: var(--cream); }
.finale .heading { font-size: clamp(2.3rem, 9vw, 3.6rem); }
.finale .lede { max-width: 30rem; }
.finale__names {
  font-family: var(--f-display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(2.8rem, 13vw, 4.4rem); letter-spacing: .14em; line-height: .95;
  display: grid; justify-items: center; gap: .1em; margin: .8rem 0 0; padding-left: .14em;
}
.finale__names i { font-size: .62em; line-height: 1.2; padding: 0; }
.finale .rule { margin: 1.6rem auto 0; }
.finale__date { font-family: var(--f-display); letter-spacing: .3em; font-size: 1.05rem; text-transform: uppercase; color: var(--taupe); margin-top: .9rem; }
.js-reveal .fseq { transition: opacity 1.5s ease var(--t, 0s), transform 1.7s var(--ease) var(--t, 0s), filter 1.5s ease var(--t, 0s); }
.js-reveal .finale.is-waiting:not(.is-lit) .fseq { opacity: 0; transform: translate3d(0, 14px, 0); filter: blur(2px); }

@media (prefers-reduced-motion: reduce) {
  .js .cover .seq, .js .cover__inner { animation: none !important; opacity: 1; }
}
.venues--single { grid-template-columns: minmax(0, 1fr) !important; max-width: 520px; margin-inline: auto; }
.venue__note { margin: .2rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.venues--single .venue .btn { order: 9; }
.venues--single .eyebrow { white-space: pre-line; line-height: 2; }

/* entourage: one closing rule for the whole list; long lists flow in two columns */
.ent { border-bottom: 1px solid var(--champagne); }
.ent__group:last-child, .ent__group:nth-last-child(2) { border-bottom: 0 !important; }
.ent__names li { text-wrap: balance; }
.ent__group--list .ent__names { display: grid; gap: .15rem; }
@media (min-width: 760px) {
  .ent__group--list .ent__names { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
}
@media (min-width: 760px) {
  .ent__group--list .ent__names { display: block; columns: 2; column-gap: 2.5rem; }
  .ent__group--list .ent__names li { break-inside: avoid; padding-block: .08rem; }
}
.nowrap { white-space: nowrap; }
.rsvp__for { margin: -1rem 0 1.6rem; font-family: var(--f-display); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); }
a.btn { text-decoration: none; }
