/* Fujie & Moriah — invitation experience
   paper + fabric + ink + gold + photography */

:root {
  --burgundy: #5A1018;
  --wine: #761C29;
  --ivory: #F8F3EA;
  --paper: #F7F3ED;
  --gold: #B99A63;
  --gold-deep: #9C7C45;
  --rose: #B58A8C;
  --ink: #5A1018;
  --sepia: #7A5B45;
  --muted: #8C7466;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --caps: "Cormorant SC", "Cormorant Garamond", Garamond, serif;
  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --slow: 1.1s;
  --page: min(100%, 520px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  background: var(--paper) url("/assets/paper.jpg") repeat;
  background-size: 400px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-sealed { overflow: hidden; height: 100svh; }
body.is-sealed .experience { visibility: hidden; }

p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

/* ---------- Type ---------- */
.caps { font-family: var(--caps); font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.caps--names { font-size: clamp(1.25rem, 5.4vw, 1.6rem); letter-spacing: .26em; color: var(--burgundy); }
.caps--name { display: block; font-size: clamp(1.7rem, 8.2vw, 2.55rem); line-height: 1.12; letter-spacing: .07em; color: var(--burgundy); text-transform: none; font-variant: small-caps; }
.caps--small { font-size: clamp(.78rem, 3.3vw, .92rem); letter-spacing: .28em; color: var(--sepia); line-height: 1.9; }
.caps--mid { font-size: clamp(.95rem, 4vw, 1.12rem); letter-spacing: .16em; color: var(--burgundy); }
.caps--date { font-size: clamp(1.15rem, 5vw, 1.45rem); letter-spacing: .2em; color: var(--burgundy); margin-top: .2rem; }
.caps--heading { font-size: clamp(1.25rem, 5.8vw, 1.7rem); letter-spacing: .24em; line-height: 1.45; color: var(--burgundy); font-weight: 500; margin: 0; }
.caps--found { font-size: clamp(1.35rem, 6.4vw, 1.9rem); letter-spacing: .3em; color: var(--burgundy); }
.script { font-family: var(--script); font-size: 1.6rem; line-height: 1.2; color: var(--gold-deep); letter-spacing: 0; }
.script--md { font-size: 1.7rem; }
.script--lg { font-size: clamp(1.9rem, 8vw, 2.3rem); }
.script--xl { font-size: clamp(2.4rem, 11vw, 3.2rem); color: var(--wine); }
.italic { font-style: italic; color: var(--sepia); font-size: 1.1rem; }
.muted { color: var(--muted); font-size: .98rem; }
.small { font-size: .9rem; }
.gold { color: var(--gold-deep); }
.eyebrow { font-family: var(--caps); font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .5rem; }
.lede { font-style: italic; font-size: clamp(1.15rem, 5vw, 1.35rem); color: var(--sepia); max-width: 18em; text-align: center; }

.rule { display: block; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rule--short { width: 90px; margin: 1rem auto; }
.rule--sprig { width: 100%; max-width: 280px; margin: 1.1rem auto 1.6rem; position: relative; overflow: visible; }
.rule--sprig::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 12px; transform: translate(-50%, -50%);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 12'%3E%3Cg fill='none' stroke='%239C7C45' stroke-width='.9'%3E%3Cpath d='M2 6h22'/%3E%3Cpath d='M13 6c-1-3 1-5 4-5-1 3-2 4-4 5zM13 6c-3 0-5 2-6 4 3 0 5-1 6-4zM17 6c2-1 4-1 6 1-2 1-4 1-6-1z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .8rem 2rem; font-family: var(--caps); font-size: .92rem; letter-spacing: .28em; text-transform: uppercase;
  transition: background .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease), transform .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn--primary {
  color: var(--ivory); background: linear-gradient(180deg, var(--wine), var(--burgundy));
  box-shadow: inset 0 0 0 1px rgba(185,154,99,.55), inset 0 0 0 4px var(--burgundy), inset 0 0 0 5px rgba(185,154,99,.35), 0 10px 24px -14px rgba(90,16,24,.8);
}
.btn--primary:hover { box-shadow: inset 0 0 0 1px var(--gold), inset 0 0 0 4px var(--burgundy), inset 0 0 0 5px rgba(185,154,99,.6), 0 14px 28px -14px rgba(90,16,24,.9); }
.btn--ghost { color: var(--burgundy); background: transparent; box-shadow: inset 0 0 0 1px var(--gold); }
.btn--ghost:hover { background: rgba(185,154,99,.1); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--block { width: 100%; }
.btn:focus-visible, .link-btn:focus-visible, .wax:focus-visible, .stepper__btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.link-btn { appearance: none; background: none; border: 0; cursor: pointer; padding: .7rem 1rem; min-height: 44px;
  font-family: var(--caps); font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--sepia);
  text-decoration: underline; text-decoration-color: rgba(185,154,99,.6); text-underline-offset: 6px; }
.link-btn--quiet { font-size: .68rem; opacity: .0; transition: opacity 1s; }
.link-btn--quiet.is-visible, .link-btn--quiet:focus { opacity: .75; }

/* ---------- Scene 01 · Envelope ---------- */
.envelope-scene {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1.4rem, 5vh, 2.4rem); padding: 2rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
  background: var(--ivory); text-align: center;
  transition: opacity 1.4s var(--ease), visibility 1.4s;
}
.envelope-scene::before { /* stationery texture breathes in as the envelope opens */
  content: ""; position: absolute; inset: 0; background: url("/assets/paper.jpg") repeat; background-size: 400px; opacity: 0; transition: opacity 1.8s var(--ease);
}
.envelope-scene > * { position: relative; }
.envelope-intro { display: grid; gap: .2rem; }

.envelope { position: relative; width: min(82vw, 340px); aspect-ratio: 1.42; perspective: 1200px; }
/* Static soft shadow: a filter on the envelope would repaint every frame of the flap animation. */
.envelope::before {
  content: ""; position: absolute; z-index: 0; left: 4%; right: 4%; bottom: -9%; height: 26%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60,10,16,.34), rgba(60,10,16,0)); pointer-events: none;
}
.envelope__flap, .envelope__card { will-change: transform; }
.envelope__card { backface-visibility: hidden; } /* not the flap: its back must stay visible once it folds open */
.envelope__back, .envelope__pocket, .envelope__flap { position: absolute; inset: 0; background: var(--wine) url("/assets/wash.jpg") center/cover; }
.envelope__back { border-radius: 4px; filter: brightness(.72); }
.envelope__card {
  position: absolute; left: 6%; right: 6%; top: 6%; height: 88%; z-index: 2; border-radius: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 11%; gap: 0;
  background: var(--ivory) url("/assets/paper.jpg") center/300px; box-shadow: 0 -2px 10px rgba(0,0,0,.15);
  transition: transform 1.6s var(--ease);
}
.envelope__card .caps { font-size: .8rem; letter-spacing: .3em; color: var(--burgundy); }
.envelope__card .script { font-size: 1.2rem; line-height: 1; }
.envelope__pocket {
  z-index: 3; clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
  background-position: center bottom; border-radius: 0 0 4px 4px;
}
.envelope__pocket::after { /* fine gold foil edge */
  content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom right, transparent 49.6%, rgba(214,184,122,.7) 50%, transparent 50.4%) left/50% 100% no-repeat,
    linear-gradient(to bottom left, transparent 49.6%, rgba(214,184,122,.7) 50%, transparent 50.4%) right/50% 100% no-repeat;
  clip-path: inherit; opacity: .8; top: 28%; height: 36%; bottom: auto;
}
.envelope__flap {
  z-index: 4; height: 66%; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top center; background-position: center top;
  transition: transform 1.1s var(--ease), z-index 0s .55s; filter: brightness(1.12) saturate(1.05);
  background-size: 180% auto; background-position: 30% 20%;
}
.envelope__flap::after { /* gold foil along the flap's fold edges */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(226,196,136,.9) 50%, transparent calc(50% + 1px)) left/50% 100% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 1px), rgba(226,196,136,.9) 50%, transparent calc(50% + 1px)) right/50% 100% no-repeat;
}
.envelope__pocket { filter: brightness(.86); }
.envelope__pocket::after { display: none; }
.envelope__seal {
  position: absolute; z-index: 5; left: 50%; top: 66%; width: 56px; height: 56px; transform: translate(-50%, -55%); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; white-space: nowrap; font-family: var(--caps); font-size: .85rem; letter-spacing: .02em; color: #F4E3BF;
  background: radial-gradient(circle at 35% 30%, #d7b67a, #b08a4d 45%, #7d5e2c 100%);
  box-shadow: inset 0 0 0 3px rgba(255,240,210,.25), inset 0 0 0 5px rgba(90,60,20,.35), 0 3px 6px rgba(0,0,0,.3);
  transition: opacity .5s var(--ease);
}
.envelope__seal i { font-family: var(--script); font-style: normal; font-size: .9rem; margin: 0 1px; }

.is-opening .envelope__seal { opacity: 0; }
.is-opening .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.is-opening .envelope__card { transform: translateY(-58%); transition-delay: .9s; }
.is-opening .envelope-outro, .is-opening .envelope-intro { opacity: 0; transform: translateY(8px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.is-opening.envelope-scene::before { opacity: 1; }
.is-rising .envelope { transform: translateY(-12vh) scale(1.08); opacity: 0; transition: transform 1.6s var(--ease), opacity 1.4s var(--ease) .2s; }
.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

.envelope-outro { display: grid; justify-items: center; gap: 1.2rem; }

.fade-up { opacity: 0; transform: translateY(12px); animation: fadeUp 1.2s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---------- Scene 02 · Invitation ---------- */
.experience { position: relative; }
.invitation { position: relative; width: var(--page); margin: 0 auto; text-align: center; overflow: hidden; }
.stationery { position: absolute; inset: 0; pointer-events: none; }
.stationery::before, .stationery::after {
  content: ""; position: absolute; left: 0; right: 0; aspect-ratio: 1060 / 700; background: url("/assets/stationery.webp") no-repeat; background-size: 100% auto;
  opacity: 0; transition: opacity 2.2s var(--ease);
}
.stationery::before { top: 0; background-position: top; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.stationery::after { bottom: 0; background-position: bottom; -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); }
.is-inked .stationery::before, .is-inked .stationery::after { opacity: 1; }

.invitation__inner { position: relative; padding: clamp(10.5rem, 50vw, 15rem) 1.5rem clamp(9rem, 40vw, 12rem); display: grid; gap: 1.4rem; justify-items: center; }
.names { margin: 0; display: grid; gap: .3rem; font-weight: 400; }
.and { display: flex; align-items: center; justify-content: center; gap: .9rem; }
.and .rule { width: clamp(50px, 20vw, 110px); }
.and .script { font-size: 2.2rem; transform: translateY(-4px); }

/* Opacity + transform only: both run on the compositor, so the ink-in stays smooth on phones. */
.ink { opacity: 0; transform: translate3d(0, 12px, 0); }
.is-inked .ink { opacity: 1; transform: none; transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); transition-delay: calc(.35s + var(--i) * .38s); }

/* ---------- Scene 03 · Scratch ---------- */
.secret { --p: 0; width: 100%; display: grid; justify-items: center; gap: 1rem; margin: .6rem 0 .4rem; }
.arch { position: relative; width: min(74vw, 300px); aspect-ratio: 3 / 4; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.arch:active { cursor: grabbing; }
.is-revealed .arch { touch-action: auto; cursor: default; }
.arch__photo, .scratch {
  position: absolute; inset: 3.4% 3.4% 1%; border-radius: 50% 50% 2px 2px / 37.5% 37.5% 2px 2px; overflow: hidden;
}
.arch__photo { background: #e9dccb; box-shadow: inset 0 0 30px rgba(90,16,24,.25); }
.arch__photo img {
  width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none;
  filter: sepia(calc(.75 - .75 * var(--p))) saturate(calc(.45 + .55 * var(--p))) contrast(calc(.88 + .12 * var(--p))) brightness(calc(1.08 - .08 * var(--p)));
  transform: scale(calc(1.06 - .06 * var(--p)));
  transition: filter .8s var(--ease), transform .8s var(--ease);
}
.photo-fallback { display: none; position: absolute; inset: 0; place-items: center;
  background: radial-gradient(120% 90% at 50% 20%, #f3e2cf, #c99a93 55%, var(--wine)); }
.photo-fallback .script { font-size: 3.4rem; color: var(--ivory); text-shadow: 0 2px 12px rgba(90,16,24,.4); }
.no-photo .photo-fallback { display: grid; }
.no-photo .arch__photo img { display: none; }
.grain { position: absolute; inset: 0; opacity: .16; mix-blend-mode: overlay; pointer-events: none;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Canvas is a replaced element: size it explicitly or it grows with its own bitmap. */
.scratch { width: 93.2%; height: 95.6%; touch-action: none; cursor: grab; z-index: 2; transition: opacity 1.4s var(--ease); -webkit-user-select: none; user-select: none; }
.scratch:active { cursor: grabbing; }
.scratch.is-cleared { opacity: 0; pointer-events: none; }
.sparkles { position: absolute; inset: -12%; width: 124%; height: 124%; pointer-events: none; z-index: 3; }

.arch__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 4; pointer-events: none; }
.frame-line { fill: none; stroke: var(--gold); stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p) * .55); transition: stroke-dashoffset 1s var(--ease); }
.frame-line--inner { stroke-width: .7; opacity: .7; stroke-dashoffset: calc(1 - var(--p) * .35); }
.is-revealed .frame-line { stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s var(--ease); }

.botanical { position: absolute; bottom: -4%; width: 34%; z-index: 4; pointer-events: none; overflow: visible; }
.botanical--left { left: -19%; }
.botanical--right { right: -19%; transform: scaleX(-1); }
.vine { fill: none; stroke: var(--gold); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); transition: stroke-dashoffset 1.2s var(--ease); }
.bud { fill: var(--gold); opacity: calc(var(--p) * 1.2 - .2); }
.is-revealed .vine { stroke-dashoffset: 0; transition-duration: 2.4s; }
.is-revealed .bud { opacity: 1; }

.secret__caption { display: grid; justify-items: center; gap: .15rem; min-height: 6.4rem; transition: opacity .8s var(--ease); }
#scratchHint { transition: opacity .6s var(--ease); }
.found { display: grid; justify-items: center; gap: .2rem; animation: found 2s var(--ease) both; }
.found .caps--found { animation: inkIn 1.8s var(--ease) both; }
.found .script { animation: inkIn 2s var(--ease) .7s both; }
@keyframes inkIn { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes found { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Panels ---------- */
.after-reveal { animation: found 1.8s var(--ease) both; }
.panel { position: relative; width: var(--page); margin: 0 auto; padding: 5rem 1.5rem; text-align: center; overflow: hidden; }
.panel > :not(.corner):not(canvas) { position: relative; z-index: 1; }
.corner { position: absolute; pointer-events: none; z-index: 0; opacity: .95; }
.corner--tl { top: -2%; left: -14%; width: 58%; -webkit-mask-image: radial-gradient(circle at 0 0, #000 55%, transparent 80%); mask-image: radial-gradient(circle at 0 0, #000 55%, transparent 80%); }
.corner--br { bottom: -3%; right: -12%; width: 48%; -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 55%, transparent 82%); mask-image: radial-gradient(circle at 100% 100%, #000 55%, transparent 82%); }

.reveal-on-scroll > * { opacity: 0; transform: translateY(18px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.reveal-on-scroll.in > * { opacity: 1; transform: none; }
.reveal-on-scroll.in > :nth-child(2) { transition-delay: .15s; }
.reveal-on-scroll.in > :nth-child(3) { transition-delay: .3s; }
.reveal-on-scroll.in > :nth-child(4) { transition-delay: .45s; }
.reveal-on-scroll.in > :nth-child(n+5) { transition-delay: .6s; }
.reveal-on-scroll > .corner { transform: none; transition-duration: 2.4s; }

/* Details */
.details { padding-top: 7rem; }
.anchors { display: grid; grid-template-columns: repeat(3, 1fr); margin: .5rem 0 2.2rem; }
.anchor { display: grid; align-content: start; justify-items: center; padding: 0 .35rem; gap: .1rem; }
.anchor + .anchor { border-left: 1px solid rgba(185,154,99,.55); }
.icon { width: 30px; height: 30px; fill: none; stroke: var(--burgundy); stroke-width: 1.1; stroke-linecap: round; margin-bottom: .6rem; }
.big-num { font-family: var(--serif); font-weight: 500; font-size: clamp(2.8rem, 13vw, 3.6rem); line-height: .95; color: var(--burgundy); }
.anchor .caps--mid { font-size: clamp(.8rem, 3.6vw, 1.05rem); letter-spacing: .1em; }
.anchor .caps--small { letter-spacing: .2em; font-size: clamp(.66rem, 2.9vw, .85rem); }
.anchor .muted { font-size: clamp(.8rem, 3.4vw, .95rem); line-height: 1.3; }
.anchor .script { font-size: 1.35rem; line-height: 1.1; }
.anchor .script--md { font-size: clamp(1.15rem, 4.6vw, 1.6rem); margin-top: .1rem; white-space: nowrap; }

/* Dress code */
.wardrobe { display: grid; gap: 2rem; margin: .4rem 0 2.4rem; }
.rack__items { display: flex; justify-content: center; align-items: flex-end; gap: clamp(.6rem, 4vw, 1.4rem); }
.look { display: grid; justify-items: center; gap: .5rem; width: 30%; max-width: 110px; }
.look img { height: clamp(110px, 34vw, 150px); width: auto; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(90,16,24,.12)); transition: transform .8s var(--ease); }
.look:hover img { transform: translateY(-4px); }
.look span { font-size: .82rem; font-style: italic; color: var(--sepia); line-height: 1.2; }
.suit--dark { filter: grayscale(1) brightness(.42) contrast(1.35) drop-shadow(0 8px 8px rgba(0,0,0,.15)) !important; }
.swatches { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; justify-content: center; gap: clamp(.5rem, 3vw, 1rem); flex-wrap: wrap; }
.swatches li { display: grid; justify-items: center; gap: .45rem; width: 56px; }
.swatches li::before { content: ""; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), transparent 55%), var(--c);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px rgba(185,154,99,.6), 0 6px 10px -4px rgba(90,16,24,.35); }
.swatches span { font-size: .72rem; letter-spacing: .08em; color: var(--sepia); line-height: 1.1; }

/* CTA */
.cta { padding-bottom: 6rem; }
.cta .italic { margin-top: .6rem; }
.wax {
  position: relative; appearance: none; border: 0; cursor: pointer; margin: 2.2rem auto 1.6rem; display: grid; place-items: center;
  width: 132px; height: 132px; border-radius: 50%; overflow: hidden; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle at 34% 28%, #9b3240 0%, var(--wine) 38%, var(--burgundy) 78%, #3f0a10 100%);
  box-shadow: inset 0 0 0 5px rgba(63,10,16,.5), inset 0 0 0 7px rgba(185,154,99,.55), inset 0 0 0 12px rgba(63,10,16,.35), 0 18px 30px -14px rgba(90,16,24,.9);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.wax span { font-family: var(--caps); font-size: 1.35rem; letter-spacing: .3em; padding-left: .3em; color: #EAD3A2; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.wax::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,232,180,.28) 50%, transparent 60%); transform: translateX(-60%); animation: foil 5s var(--ease) 1.5s infinite; }
.wax:hover { transform: translateY(-2px) rotate(-2deg); }
.wax:active { transform: scale(.96); }
@keyframes foil { 0%, 70% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }

.notice { margin-top: 1rem; font-style: italic; color: var(--sepia); }
.notice--error { color: var(--wine); }

/* ---------- RSVP flow ---------- */
.rsvp { padding-top: 2rem; }
.sheet {
  position: relative; background: rgba(250,246,239,.92) url("/assets/paper.jpg") center/400px; padding: 2.6rem 1.4rem 2.2rem;
  box-shadow: 0 30px 50px -30px rgba(90,16,24,.45), inset 0 0 0 1px rgba(185,154,99,.7), inset 0 0 0 7px rgba(250,246,239,.9), inset 0 0 0 8px rgba(185,154,99,.35);
}
.dots { list-style: none; display: flex; justify-content: center; gap: .5rem; padding: 0; margin: 0 0 1.8rem; }
.dots li { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--gold); transition: background .5s var(--ease); }
.dots li.on { background: var(--gold); }
.step { display: grid; gap: .9rem; justify-items: center; animation: stepIn .9s var(--ease) both; }
.step.back { animation-name: stepBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.choices { display: grid; gap: .8rem; width: 100%; margin-top: 1rem; }
.guest-name { font-family: var(--script); font-size: clamp(2rem, 9vw, 2.5rem); color: var(--wine); line-height: 1.2; }
.stepper { display: flex; align-items: center; gap: 1.6rem; margin-top: .6rem; }
.stepper__btn { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; font-size: 1.6rem; color: var(--burgundy); cursor: pointer; line-height: 1; }
.stepper__btn:disabled { opacity: .3; cursor: default; }
.stepper__value { font-family: var(--serif); font-size: 3.4rem; font-weight: 500; min-width: 2ch; color: var(--burgundy); line-height: 1; }
.seat-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; max-width: 260px; }
.seat-icons i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--gold); transition: background .4s var(--ease), transform .4s var(--ease); }
.seat-icons i.on { background: var(--wine); border-color: var(--wine); transform: scale(1.1); }
.nav { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 1.2rem; gap: .5rem; }
textarea, .field {
  width: 100%; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--burgundy); background: transparent; border: 0; resize: vertical; border-radius: 0;
  padding: .3rem .2rem; line-height: 2.2rem; outline: none;
  background-image: repeating-linear-gradient(transparent 0 calc(2.2rem - 1px), rgba(185,154,99,.5) calc(2.2rem - 1px) 2.2rem);
}
.field { min-height: 2.6rem; }
textarea::placeholder, .field::placeholder { color: rgba(122,91,69,.55); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: .4rem 0; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 1.3rem; border: 1px solid var(--gold); font-family: var(--caps); letter-spacing: .18em; font-size: .85rem; text-transform: uppercase; cursor: pointer; transition: background .4s, color .4s; }
.pill input:checked + span { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }
.pill input:focus-visible + span { outline: 1px solid var(--gold); outline-offset: 3px; }

/* ---------- Confirmation + pass ---------- */
.confirm { padding-top: 4rem; }
.confirm > div { display: grid; gap: 1rem; justify-items: center; }
.confetti { position: fixed !important; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60 !important; }
.sprig-draw { width: 150px; fill: none; stroke: var(--gold); stroke-width: 1.1; }
.sprig-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) forwards; }
.sprig-draw path:nth-child(n+2) { animation-delay: .8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.actions { display: grid; justify-items: center; gap: .8rem; margin: 2.2rem auto 0; width: min(100%, 300px); }
.actions .btn, .cal { width: 100%; }
.cal { position: relative; }
.cal__menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; background: var(--ivory); box-shadow: 0 16px 30px -16px rgba(90,16,24,.5), inset 0 0 0 1px var(--gold); }
.cal__menu a { padding: .9rem; font-family: var(--caps); letter-spacing: .18em; font-size: .85rem; text-transform: uppercase; color: var(--burgundy); text-decoration: none; }
.cal__menu a + a { border-top: 1px solid rgba(185,154,99,.4); }

.pass-wrap { margin-top: 3.6rem; display: grid; justify-items: center; gap: 1rem; }
.pass {
  position: relative; width: min(100%, 310px); padding: 2.2rem 1.4rem 1.8rem; display: grid; justify-items: center; gap: .35rem;
  background: var(--ivory) url("/assets/paper.jpg") center/300px; animation: passIn 1.6s var(--ease) both;
  box-shadow: 0 30px 40px -26px rgba(90,16,24,.55), inset 0 0 0 1px var(--burgundy), inset 0 0 0 6px var(--ivory), inset 0 0 0 7px rgba(185,154,99,.8);
}
@keyframes passIn { from { opacity: 0; transform: translateY(30px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
.pass__edge { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--burgundy), var(--wine), var(--burgundy)); }
.pass .rule--short { margin: .4rem auto .7rem; }
.pass__label { font-family: var(--script); font-size: 1.4rem; color: var(--gold-deep); line-height: 1; }
.pass__name { font-size: 1.15rem; line-height: 1.35; }
.pass .caps--date { font-size: 1rem; margin-top: .8rem; }
.pass__qr { width: 150px; height: 150px; margin-top: 1.1rem; padding: 10px; border-top: 1px dashed rgba(185,154,99,.8); padding-top: 1.2rem; box-sizing: content-box; }
.pass__qr svg { width: 100%; height: 100%; display: block; }
.pass__code { font-family: var(--caps); letter-spacing: .4em; font-size: .78rem; color: var(--muted); padding-left: .4em; }
.pass__notch { position: absolute; top: 62%; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--burgundy); }
.pass__notch--l { left: -11px; clip-path: inset(0 0 0 50%); }
.pass__notch--r { right: -11px; clip-path: inset(0 50% 0 0); }

.footer { text-align: center; padding: 3rem 1.5rem calc(4rem + env(safe-area-inset-bottom)); display: grid; gap: .3rem; }

/* ---------- Larger screens: the invitation sits on a table ---------- */
@media (min-width: 620px) {
  body { font-size: 19px; }
  .invitation { margin-top: 3rem; box-shadow: 0 40px 60px -40px rgba(90,16,24,.35); background: var(--paper) url("/assets/paper.jpg"); }
  .wardrobe { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .look span { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}

/* Companion details for extra seats */
.companions { display: grid; gap: 1.4rem; width: 100%; margin-top: .4rem; }
.companion { display: grid; gap: .4rem; width: 100%; animation: stepIn .7s var(--ease) both; }
.companion .eyebrow { margin: 0; }
.pass__with { font-family: var(--script); font-size: 1.35rem; color: var(--wine); line-height: 1.2; margin-top: -.1rem; }
