/* ==========================================================================
   Pamela & Wency — A Love That Feels Like Home
   Design tokens first; change colours/type here to restyle everything.
   ========================================================================== */
:root {
  --ivory: #F8F5F0;
  --cream: #EFE9E1;
  --burgundy: #681F32;
  --burgundy-deep: #4F1525;
  --charcoal: #242021;
  --taupe: #A89B91;
  --taupe-ink: #7A6E66;      /* taupe dark enough for small text on ivory (AA) */
  --gold: #B69A70;
  --amber: #E9B872;          /* window light */
  --line: rgba(36, 32, 33, .14);
  --line-strong: rgba(36, 32, 33, .28);

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --gutter: clamp(20px, 5vw, 48px);
  --measure: 34rem;
  --wide: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-sealed { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(104, 31, 50, .16); }

/* paper grain — very faint, purely decorative */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .36  0 0 0 0 .3  0 0 0 0 .26  0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--charcoal); color: var(--ivory); padding: 10px 16px; border-radius: 2px;
  text-decoration: none; font-size: .875rem;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 1.5px solid var(--burgundy); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { text-align: center; padding: 30vh 24px; font-family: var(--serif); font-size: 1.4rem; }

/* ---------- Type ---------- */
.eyebrow {
  font: 500 .72rem/1.4 var(--sans);
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--taupe-ink); margin: 0 0 1rem;
}
.display {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.5rem, 9vw, 4.75rem); line-height: 1.02;
  letter-spacing: -.005em; margin: 0;
}
.h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 7.5vw, 3.6rem); line-height: 1.06; margin: 0 0 1.25rem;
}
.h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1.15; margin: 0 0 .5rem; }
.lede { font-family: var(--serif); font-size: clamp(1.3rem, 4.4vw, 1.6rem); line-height: 1.4; font-weight: 400; margin: 0; }
.muted { color: var(--taupe-ink); }
.small { font-size: .875rem; }
em, .it { font-family: var(--serif); font-style: italic; }
.amp { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--burgundy); }

.rule { width: 48px; height: 1px; background: var(--burgundy); border: 0; margin: 1.75rem auto; opacity: .7; }
.rule.left { margin-left: 0; }

.draft-tag {
  display: inline-block; vertical-align: middle; margin-left: .5em;
  font: 500 .6rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--burgundy); border: 1px dashed currentColor; padding: 4px 6px 3px; border-radius: 2px;
  opacity: .75;
}

/* ---------- Layout ---------- */
.section { padding: clamp(88px, 16vw, 160px) var(--gutter); position: relative; }
.section.cream { background: var(--cream); }
.wrap { max-width: var(--wide); margin: 0 auto; }
.narrow { max-width: var(--measure); margin: 0 auto; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 28px; border-radius: 999px; cursor: pointer;
  font: 500 .8rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--burgundy); background: var(--burgundy); color: var(--ivory);
  text-decoration: none;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover { background: var(--burgundy-deep); box-shadow: 0 10px 24px -14px rgba(104, 31, 50, .7); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--charcoal); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--charcoal); background: transparent; box-shadow: none; }
.btn .icon { width: 16px; height: 16px; }
.link-btn {
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  font: 500 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--taupe-ink);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line-strong);
}
.link-btn:hover { color: var(--charcoal); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   Opening — the envelope
   ========================================================================== */
.opening {
  position: fixed; inset: 0; z-index: 100; background: var(--ivory);
  display: grid; place-items: center; padding: 24px;
  transition: opacity .9s var(--ease), visibility 0s linear .9s;
}
.opening.is-gone { opacity: 0; visibility: hidden; }
.opening-inner { display: grid; justify-items: center; gap: clamp(28px, 6vh, 48px); width: 100%; }
.opening-line {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 4.6vw, 1.45rem);
  text-align: center; max-width: 22rem; line-height: 1.45; margin: 0; color: var(--charcoal);
  opacity: 0; animation: rise 1.2s var(--ease) .5s forwards;
}
.opening .for {
  font: 500 .7rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--taupe-ink);
  opacity: 0; animation: rise 1s var(--ease) .2s forwards; margin: 0;
}

.envelope {
  --w: min(84vw, 400px);
  position: relative; width: var(--w); aspect-ratio: 1.42; perspective: 1400px;
  opacity: 0; animation: rise 1.2s var(--ease) .1s forwards, breathe 6s ease-in-out 1.5s infinite;
}
.env-back, .env-front, .env-flap, .env-card { position: absolute; inset: 0; }
.env-back { background: #E8E0D5; border-radius: 3px; box-shadow: 0 30px 60px -30px rgba(36, 32, 33, .45), 0 2px 6px rgba(36, 32, 33, .06); }
.env-card {
  inset: 6% 6% 6% 6%; background: var(--ivory); border-radius: 2px;
  box-shadow: 0 1px 3px rgba(36, 32, 33, .08);
  display: grid; place-items: center; text-align: center;
  transition: transform 1.1s var(--ease) .45s;
}
.env-card .monogram { width: 34%; }
.env-front {
  background: linear-gradient(180deg, #EFE8DE, #E9E1D6);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  border-radius: 3px; z-index: 2;
}
.env-front::after { /* fine fold lines */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), rgba(36,32,33,.08) 50%, transparent calc(50% + .5px)) left bottom / 50% 100% no-repeat,
    linear-gradient(to top left, transparent calc(50% - .5px), rgba(36,32,33,.08) 50%, transparent calc(50% + .5px)) right bottom / 50% 100% no-repeat;
}
.env-flap {
  height: 60%; z-index: 3; transform-origin: 50% 0;
  background: linear-gradient(180deg, #F1EBE2, #E6DDD1);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 2px rgba(36,32,33,.08));
  transition: transform .9s var(--ease-in-out), z-index 0s linear .45s;
}
.seal {
  position: absolute; z-index: 4; left: 50%; top: 60%; width: 76px; height: 76px;
  transform: translate(-50%, -50%); border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
  filter: drop-shadow(0 6px 10px rgba(79, 21, 37, .3));
}
.seal:hover { transform: translate(-50%, -50%) scale(1.05); }
.seal-svg { width: 100%; height: 100%; }
.seal-text { font: 400 30px var(--serif); fill: #F3E6DA; letter-spacing: -.02em; }
.seal-amp { font-style: italic; font-size: 20px; fill: #D9BFA0; }

.envelope.is-open { animation: none; opacity: 1; }
.envelope.is-open .seal { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
.envelope.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.is-open .env-card { transform: translateY(-46%); z-index: 1; }

.opening-actions { display: grid; justify-items: center; gap: 14px; opacity: 0; animation: rise 1s var(--ease) .9s forwards; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--gutter); padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(248, 245, 240, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transform: translateY(-100%); transition: transform .6s var(--ease), border-color .4s;
}
.topbar.is-visible { transform: none; border-bottom-color: var(--line); }
.topbar .monogram { width: 44px; }
.topbar nav { display: none; gap: 28px; }
.topbar nav a { font: 500 .7rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--taupe-ink); }
.topbar nav a:hover { color: var(--charcoal); }
.topbar .btn { min-height: 40px; padding: 0 20px; font-size: .7rem; }
@media (min-width: 900px) { .topbar nav { display: flex; } }

/* ==========================================================================
   Monogram
   ========================================================================== */
.monogram { overflow: visible; }
.mono-w { font: 400 132px var(--serif); fill: var(--burgundy); }
.mono-p { font: italic 400 140px var(--serif); fill: var(--burgundy); }
.mono-swash { fill: none; stroke: var(--burgundy); stroke-width: 1.6; stroke-linecap: round; }
.monogram.light .mono-w, .monogram.light .mono-p { fill: var(--ivory); }
.monogram.light .mono-swash { stroke: var(--ivory); }

/* ==========================================================================
   Hero / Invitation
   ========================================================================== */
.hero { min-height: min(100svh, 980px); display: grid; place-items: center; text-align: center; padding: 120px var(--gutter) 80px; }
.hero .monogram { width: 116px; margin: 0 auto 2.25rem; }
.hero .names { font-family: var(--serif); font-weight: 300; text-transform: uppercase; letter-spacing: .14em;
  font-size: clamp(2.6rem, 12vw, 6rem); line-height: .98; margin: 0; }
.hero .names span { display: block; }
.hero .names .amp { text-transform: none; letter-spacing: 0; font-size: .7em; line-height: 1.2; }
.hero .theme { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 4.6vw, 1.6rem); margin: 1.5rem 0 0; }
.hero .when { margin-top: 2.2rem; display: grid; gap: .4rem; }
.hero .when .date { font: 500 .78rem/1.5 var(--sans); letter-spacing: .26em; text-transform: uppercase; }
.hero .scroll-cue { margin-top: 3.5rem; display: inline-grid; justify-items: center; gap: 10px; text-decoration: none;
  font: 500 .65rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--taupe-ink); }
.hero .scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--taupe), transparent); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.letter {
  max-width: 34rem; margin: 0 auto; padding: clamp(36px, 8vw, 64px) clamp(26px, 7vw, 60px);
  background: var(--ivory); position: relative; text-align: center;
  box-shadow: 0 1px 0 rgba(36,32,33,.04), 0 30px 60px -40px rgba(36,32,33,.35);
}
.letter::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.letter .dear { font-family: var(--serif); font-size: clamp(1.7rem, 6vw, 2.2rem); margin: 0 0 1.4rem; }
.letter p { margin: 0 0 1rem; }
.letter .seats { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--burgundy); margin: 1.6rem 0 0; }
.letter .sign { margin-top: 2rem; }
.letter .sign .names-sm { font-family: var(--serif); font-size: 1.5rem; }

/* ==========================================================================
   Story
   ========================================================================== */
.story-list { display: grid; gap: clamp(72px, 14vw, 140px); margin-top: clamp(56px, 10vw, 96px); }
.chapter { display: grid; gap: 28px; align-items: center; }
.chapter .text { max-width: 26rem; }
.chapter .text p { margin: 0; }
@media (max-width: 819px) {
  .chapter .media { width: 88%; }
  .chapter:nth-child(even) .media { margin-left: auto; }
  .chapter:nth-child(even) .text { margin-left: auto; text-align: right; }
}
@media (min-width: 820px) {
  .chapter { grid-template-columns: 1fr 1fr; gap: 72px; }
  .chapter:nth-child(even) .media { order: 2; }
}
.photo { position: relative; overflow: hidden; background: var(--cream); }
.section.cream .photo { background: #E6DED3; }
.photo.r45 { aspect-ratio: 4 / 5; }
.photo.r32 { aspect-ratio: 3 / 2; }
.photo img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.photo .ph {
  position: absolute; inset: 12px; border: 1px dashed var(--line-strong);
  display: grid; place-items: center; text-align: center; padding: 20px;
  font: 500 .66rem/1.6 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--taupe-ink);
}
.photo .ph .icon { margin: 0 auto 10px; width: 26px; height: 26px; opacity: .6; }

/* ==========================================================================
   Wedding day
   ========================================================================== */
.venues { display: grid; gap: 22px; margin-top: 56px; }
@media (min-width: 820px) { .venues { grid-template-columns: 1fr 1fr; gap: 28px; } }
.venue { background: var(--ivory); padding: 36px 28px 32px; text-align: center; position: relative; }
.section:not(.cream) .venue { background: var(--cream); }
.venue .lineart { width: 64%; max-width: 220px; margin: 0 auto 26px; }
.venue .time { font-family: var(--serif); font-size: 1.35rem; margin: .25rem 0 .2rem; }
.venue .addr { color: var(--taupe-ink); margin: 0 0 1.5rem; font-size: .95rem; }
.venue .map { display: inline-flex; gap: 8px; align-items: center; text-decoration: none;
  font: 500 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--burgundy);
  border-bottom: 1px solid rgba(104,31,50,.3); padding: 8px 0; }
.venue .map .icon { width: 16px; height: 16px; }
.lineart { fill: none; stroke: var(--charcoal); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.art-note { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe-ink); margin-top: 18px; }

.timeline { list-style: none; margin: 64px auto 0; padding: 0; max-width: 30rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 92px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline li { display: grid; grid-template-columns: 76px 1fr; gap: 32px; padding: 14px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 88px; top: 24px; width: 9px; height: 9px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--burgundy); }
.timeline .t { font: 500 .72rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy); padding-top: 8px; text-align: right; }
.timeline .what { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; }
.timeline .note { color: var(--taupe-ink); font-size: .9rem; }

/* ==========================================================================
   Dress code
   ========================================================================== */
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 48px auto 0; max-width: 34rem; }
.swatch { display: grid; gap: 12px; justify-items: center; }
.swatch .chip { width: 100%; aspect-ratio: 3 / 4; border-radius: 999px 999px 4px 4px; box-shadow: inset 0 0 0 1px rgba(36,32,33,.06); }
.swatch span { font: 500 .66rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--taupe-ink); }
.rail { margin: 64px auto 0; max-width: 40rem; position: relative; }
.rail::before { content: ""; position: absolute; left: 4%; right: 4%; top: 13px; height: 1.5px; background: var(--charcoal); opacity: .5; border-radius: 2px; }
.rail-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.hanger { width: 100%; overflow: visible; }
.hanger .hook { fill: none; stroke: var(--charcoal); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hanger .seam { fill: none; stroke: rgba(36,32,33,.35); stroke-width: 1; }
.hanger .seam.light { stroke: rgba(248,245,240,.45); }
.dress-notes { display: grid; gap: 14px; margin-top: 48px; }
.dress-notes p { margin: 0; }

/* ==========================================================================
   Gifts
   ========================================================================== */
.gift-card { max-width: 32rem; margin: 0 auto; text-align: center; }
.gift-card .icon { width: 30px; height: 30px; margin: 0 auto 22px; color: var(--burgundy); }
.section#gifts, .section#fun { overflow: hidden; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 40rem; margin: 48px auto 0; border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; text-align: left;
  background: none; border: 0; cursor: pointer; padding: 22px 0;
  font-family: var(--serif); font-weight: 500; font-size: 1.32rem; line-height: 1.3; color: var(--charcoal);
}
.faq-q .pm { position: relative; flex: 0 0 14px; height: 14px; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--burgundy); transition: transform .45s var(--ease); }
.faq-q .pm::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .pm::after { transform: rotate(0); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 2.5rem 24px 0; color: #4a4244; }
.faq-q[aria-expanded="true"] + .faq-a { grid-template-rows: 1fr; }

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp-card {
  max-width: 36rem; margin: 48px auto 0; background: var(--ivory); position: relative;
  padding: clamp(32px, 7vw, 56px) clamp(22px, 6vw, 52px) clamp(28px, 6vw, 44px);
  box-shadow: 0 30px 70px -45px rgba(36,32,33,.45);
  min-height: 420px; display: flex; flex-direction: column;
}
.rsvp-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.progress { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 0 32px; }
.progress i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--taupe); background: transparent; transition: all .4s var(--ease); flex: none; }
.progress i.on { background: var(--burgundy); border-color: var(--burgundy); }
.progress i.now { transform: scale(1.35); }
.progress b { width: 22px; height: 1px; background: var(--line-strong); }
.progress b.on { background: var(--burgundy); }

.step { flex: 1; display: flex; flex-direction: column; }
.step.enter { animation: stepIn .6s var(--ease) both; }
.step.enter.back { animation-name: stepInBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 6vw, 2.15rem); line-height: 1.15; margin: 0 0 .7rem; text-align: center; }
.step .sub { text-align: center; color: var(--taupe-ink); margin: 0 auto 28px; max-width: 26rem; }
.step-actions { margin-top: auto; padding-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.step-actions .btn { flex: 0 1 auto; }
.step-actions.single { justify-content: center; }

.choice-grid { display: grid; gap: 12px; }
.choice {
  display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  padding: 18px 20px; background: transparent; border: 1px solid var(--line-strong); border-radius: 4px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.choice:hover { border-color: var(--charcoal); }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--burgundy); background: rgba(104, 31, 50, .045); }
.choice .dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--taupe); display: grid; place-items: center; transition: all .3s var(--ease); }
.choice[aria-pressed="true"] .dot, .choice[aria-checked="true"] .dot { border-color: var(--burgundy); background: var(--burgundy); }
.choice .dot .icon { width: 12px; height: 12px; stroke: var(--ivory); stroke-width: 2; opacity: 0; }
.choice[aria-pressed="true"] .dot .icon, .choice[aria-checked="true"] .dot .icon { opacity: 1; }
.choice .ct { display: grid; gap: 2px; }
.choice .ct strong { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.2; }
.choice .ct small { color: var(--taupe-ink); font-size: .85rem; }

.guest-row { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.guest-row:first-child { border-top: 1px solid var(--line); }
.guest-row .gname { font-family: var(--serif); font-size: 1.3rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; border-radius: 999px; min-height: 40px; cursor: pointer;
  font: 500 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--taupe-ink); transition: all .3s var(--ease); }
.seg button[aria-checked="true"] { background: var(--charcoal); color: var(--ivory); }
.seg button.yes[aria-checked="true"] { background: var(--burgundy); }

.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, .field .label { font: 500 .7rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--taupe-ink); }
.input, .textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; border-radius: 0;
  padding: 10px 0 12px; font-family: var(--serif); font-size: 1.3rem; line-height: 1.4;
  transition: border-color .3s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #b9aea6; font-style: italic; }
.input:focus, .textarea:focus { outline: none; border-bottom-color: var(--burgundy); }
.textarea { resize: vertical; min-height: 120px; background-image: repeating-linear-gradient(transparent 0 35px, var(--line) 35px 36px); line-height: 36px; padding-top: 0; border-bottom: 0; }
.count { justify-self: end; font-size: .75rem; color: var(--taupe-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip-btn { border: 1px solid var(--line-strong); background: none; border-radius: 999px; padding: 9px 16px; cursor: pointer; font-size: .875rem; transition: all .3s var(--ease); }
.chip-btn[aria-pressed="true"] { background: var(--charcoal); color: var(--ivory); border-color: var(--charcoal); }

.review { display: grid; gap: 0; }
.review-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-row:first-child { border-top: 1px solid var(--line); }
.review-row .k { font: 500 .66rem/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--taupe-ink); grid-column: 1; }
.review-row .v { font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; grid-column: 1; word-break: break-word; }
.review-row .v.none { color: var(--taupe-ink); font-style: italic; }
.review-row .edit { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

.notice { border-left: 2px solid var(--burgundy); padding: 10px 0 10px 16px; margin: 0 0 24px; font-size: .95rem; }
.notice.error { color: var(--burgundy); }
.form-error { color: var(--burgundy); font-size: .9rem; text-align: center; margin: 16px 0 0; min-height: 1.4em; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(248,245,240,.35); border-top-color: var(--ivory); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.done { text-align: center; display: grid; justify-items: center; }
.done .heart { width: 140px; margin: 0 auto 18px; fill: none; stroke: var(--burgundy); stroke-width: 1.4; stroke-linecap: round; }
.done .msg { font-family: var(--serif); font-size: clamp(1.45rem, 5vw, 1.8rem); line-height: 1.35; max-width: 26rem; margin: 0 auto 10px; }

/* the town of lights */
.town-wrap { margin: 36px auto 0; max-width: 30rem; width: 100%; }
.town { width: 100%; overflow: visible; }
.town .ground { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.town .house path { fill: var(--ivory); stroke: var(--taupe); stroke-width: .8; stroke-linejoin: round; }
.town .house .win { fill: rgba(36,32,33,.08); transition: fill .8s var(--ease) var(--d); }
.town .house.lit .win { fill: var(--amber); }
.town .house.lit path { stroke: #9a8a7f; }
.town .house.mine .win { fill: #F4C77F; animation: glow 2.6s ease-in-out infinite; }
.town .house.mine path { stroke: var(--burgundy); stroke-width: 1.1; }
@keyframes glow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 3px rgba(233,184,114,.95)); } }
.town-caption { text-align: center; font-size: .85rem; color: var(--taupe-ink); margin-top: 12px; }

/* ==========================================================================
   Closing
   ========================================================================== */
.closing { background: var(--burgundy); color: var(--ivory); text-align: center; padding: 96px var(--gutter) calc(64px + env(safe-area-inset-bottom)); }
.closing .monogram { width: 96px; margin: 0 auto 28px; }
.closing .line { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 5vw, 2rem); margin: 0 0 2rem; }
.closing .meta { font: 500 .68rem/1.9 var(--sans); letter-spacing: .22em; text-transform: uppercase; opacity: .75; }

/* ==========================================================================
   Error / invalid-link card
   ========================================================================== */
.gentle { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.gentle .monogram { width: 96px; margin: 0 auto 28px; }

/* ==========================================================================
   Motion: scroll reveals, line drawing, image masks
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--delay, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }
.js .photo[data-reveal] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease); }
.js .photo[data-reveal].is-in { clip-path: inset(0 0 0 0); }

.draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-in .draw, .draw.is-in, .is-drawn .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease-in-out); }
.lineart .draw:nth-child(2) { transition-delay: .15s; } .lineart .draw:nth-child(3) { transition-delay: .3s; }
.lineart .draw:nth-child(4) { transition-delay: .45s; } .lineart .draw:nth-child(5) { transition-delay: .6s; }
.lineart .draw:nth-child(6) { transition-delay: .75s; } .lineart .draw:nth-child(7) { transition-delay: .9s; }
.mono-swash.draw { transition-duration: 2.2s; }

/* staggered hero lines after the envelope opens */
.js .hero [data-stagger] { opacity: 0; transform: translateY(16px); }
.hero.is-revealed [data-stagger] { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--i) * 140ms + 150ms); }

/* ---------- Reduced motion: everything is shown, nothing travels ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js .hero [data-stagger] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .draw { stroke-dashoffset: 0 !important; }
  .envelope, .opening-line, .opening-actions, .opening .for { opacity: 1 !important; }
  .step.enter { animation: none; }
  .town .house.mine .win { animation: none; }
}

/* ==========================================================================
   Stickers — die-cut illustrations, used sparingly
   ========================================================================== */
.rel { position: relative; }
.letter, .venue, .rsvp-wrap { position: relative; }
.rsvp-wrap { max-width: 36rem; margin: 0 auto; }
.sticker {
  position: absolute; z-index: 3; width: var(--s, 72px); height: var(--s, 72px);
  transform: rotate(var(--r, 0deg));
  filter: drop-shadow(0 3px 3px rgba(36,32,33,.10)) drop-shadow(0 10px 14px rgba(36,32,33,.10));
  transition: transform .5s var(--ease);
  pointer-events: auto;
}
.sticker svg { width: 100%; height: 100%; overflow: visible; }
.sticker:hover { transform: rotate(calc(var(--r, 0deg) * -0.4)) scale(1.04); }
.sticker.pos-tr { top: calc(var(--s) * -0.38); right: calc(var(--s) * -0.18); }
.sticker.pos-tl { top: calc(var(--s) * -0.38); left: calc(var(--s) * -0.18); }
.sticker.pos-bl { bottom: calc(var(--s) * -0.36); left: calc(var(--s) * -0.2); }
.sticker.pos-head-r { top: -24px; right: 4%; }
.sticker.pos-head-l { top: -24px; left: 4%; }
.sticker.inline-sticker { position: relative; display: block; margin: 0 auto 22px; }
@media (max-width: 520px) {
  .sticker.pos-tr { right: -6px; }
  .sticker.pos-tl { left: -6px; }
  .sticker.pos-bl { left: -6px; }
  .sticker.pos-head-r { right: 0; top: -36px; }
  .sticker.pos-head-l { left: 0; top: -36px; }
}
/* stickers "pressed on": a small settle as they appear */
.js .sticker[data-reveal] { opacity: 0; transform: rotate(calc(var(--r, 0deg) - 10deg)) scale(.86); transition: opacity .7s var(--ease) .25s, transform .9s var(--ease) .25s; }
.js .sticker[data-reveal].is-in { opacity: 1; transform: rotate(var(--r, 0deg)); }

/* ==========================================================================
   While You Wait — countdown, Pamela or Wency?, quiz
   ========================================================================== */
.countdown { display: flex; justify-content: center; align-items: center; gap: clamp(14px, 4vw, 34px); margin: 40px auto 0; }
.countdown div { display: grid; justify-items: center; gap: 6px; min-width: 64px; }
.countdown span { font: 300 clamp(2.8rem, 12vw, 4.4rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.countdown small { font: 500 .62rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--taupe-ink); }
.countdown i { width: 1px; height: 44px; background: var(--line-strong); }

.fun-grid { display: grid; gap: 22px; margin-top: 56px; }
@media (min-width: 900px) { .fun-grid { grid-template-columns: 1.15fr .85fr; align-items: start; gap: 28px; } }
.fun-card { background: var(--cream); padding: clamp(28px, 6vw, 44px) clamp(20px, 5vw, 40px); position: relative; }
.fun-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); pointer-events: none; }
.pw-head { text-align: center; margin-bottom: 22px; }
.pw-head p { margin: 0; }
.pw-list { list-style: none; margin: 0; padding: 0; }
.pw-item { padding: 16px 0; border-top: 1px solid var(--line); }
.pw-q { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; margin: 0 0 12px; display: flex; gap: 12px; }
.pw-n { font: 500 .66rem/2.4 var(--sans); letter-spacing: .14em; color: var(--burgundy); flex: none; }
.pw-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pw-opts button {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--ivory);
  font: 500 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--charcoal);
  transition: all .35s var(--ease);
}
.pw-opts button:hover { border-color: var(--charcoal); }
.pw-initial { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: italic 400 15px/1 var(--serif); letter-spacing: 0; text-transform: none; border: 1px solid currentColor; transition: all .35s var(--ease); }
.pw-opts button[aria-checked="true"] { background: var(--burgundy); border-color: var(--burgundy); color: var(--ivory); }
.pw-opts button[aria-checked="true"] .pw-initial { background: var(--ivory); color: var(--burgundy); border-color: var(--ivory); }
.pw-foot { display: grid; justify-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; text-align: center; }
.pw-foot p { margin: 0; }
.icon.inline { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; color: var(--burgundy); }

.quiz .h3 { margin-bottom: 18px; }
.qz-card { text-align: center; }
.qz-card.enter { animation: stepIn .55s var(--ease) both; }
.qz-q { font-family: var(--serif); font-size: 1.45rem; line-height: 1.3; margin: 0 0 20px; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt {
  min-height: 50px; padding: 12px 18px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--ivory); cursor: pointer;
  font-size: .95rem; text-align: left; transition: all .35s var(--ease);
}
.qz-opt:hover:not([disabled]) { border-color: var(--charcoal); }
.qz-opt[disabled] { cursor: default; }
.qz-opt.right { border-color: var(--burgundy); background: rgba(104,31,50,.06); color: var(--burgundy); font-weight: 500; }
.qz-opt.wrong { text-decoration: line-through; text-decoration-color: var(--taupe); color: var(--taupe-ink); }
.qz-opt.dim { opacity: .5; }
.qz-reveal { min-height: 20px; }
.qz-reveal p { margin: 18px 0; font-family: var(--serif); font-size: 1.15rem; }
.qz-score { font: 300 4.5rem/1 var(--serif); margin: 6px 0 10px; color: var(--burgundy); }
.qz-score span { font-size: .45em; color: var(--taupe-ink); }

@media (prefers-reduced-motion: reduce) {
  .js .sticker[data-reveal] { opacity: 1 !important; transform: rotate(var(--r, 0deg)) !important; }
}
