:root {
  --nav-h: 56px;
  --nav-bg: #22251e;
  --dark: #1f201d;
  --cream: #faf4e9;
  --ink: #514132;
  --olive: #5f6641;
  --panel: #efe4d4;
  --faq-ink: #4d4136;
  --muted: #8a7a62;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, .05, .25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--dark);
  color: var(--ink);
  font-family: 'Gelasio', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
h2, h3, p, figure, blockquote { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------------- NAV ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  display: flex; align-items: center; gap: 16px;
  padding: 0 12px 0 16px;
}
.nav-links {
  position: relative; flex: 1; min-width: 0; height: 100%;
  display: flex; align-items: center; gap: 24px;
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  position: relative;
  font-family: 'Oranienbaum', 'Bodoni Moda', serif;
  font-size: 25px; line-height: 1;
  text-transform: uppercase; letter-spacing: -0.01em;
  color: #a9a699; text-decoration: none; white-space: nowrap;
  padding: 6px 0 2px;
  transition: color .3s, transform .3s var(--ease-out);
}
.nav-links a:hover { color: #f8f1e0; transform: translateY(-1px); }
.nav-links a.active { color: #f8f1e0; }
.nav-rsvp {
  position: relative; flex: 0 0 auto; width: 96px; height: 40px;
  display: grid; place-items: center; text-decoration: none;
  transition: transform .45s cubic-bezier(.3,.7,.4,1.5), filter .3s;
  overflow: hidden;
}
.nav-rsvp svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nav-rsvp span {
  position: relative; font-family: 'Oranienbaum', serif; font-size: 19px; letter-spacing: .18em;
  color: #f6f1e6; padding-left: .18em;
}
.nav-rsvp::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  animation: shine 5s ease-in-out infinite 2s;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.nav-rsvp:hover, .nav-rsvp:focus-visible { transform: translateY(-2px) rotate(-3deg) scale(1.05); outline: none; filter: brightness(1.08); }
.nav-rsvp:active { transform: scale(.95); }
.nav-ind {
  position: absolute; left: 0; bottom: 11px; height: 1px; width: 0;
  background: #f8f1e0; opacity: .8;
  transition: transform .5s var(--ease-io), width .5s var(--ease-io);
  pointer-events: none;
}
.progress {
  position: fixed; top: var(--nav-h); left: 0; right: 0; height: 2px; z-index: 49;
  background: linear-gradient(90deg, #8d935f, #d8c79c);
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}
main { padding-top: var(--nav-h); }

/* ---------------- FULL-SCREEN STAGES (home, invitation) ---------------- */
.screen {
  position: relative; overflow: hidden;
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  min-height: 320px;
  background: var(--dark);
}
.screen-bg {
  position: absolute; inset: 0;
  background: url(assets/leaves-portrait.webp) center / cover;
  filter: brightness(1.3) saturate(1.1);
}
.screen-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(10, 11, 9, .55) 100%);
}
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.stage-l { width: 1366px; height: 768px; }
.stage-p { width: 700px; height: 1150px; display: none; }
.screen.portrait .stage-l { display: none; }
.screen.portrait .stage-p { display: block; }
.stage-bg { position: absolute; inset: 0; width: 1366px; height: 768px; max-width: none; user-select: none; -webkit-user-drag: none; }
.banded .stage-bg {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}

/* ambient floating light specks */
.ambient { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 8; }
.speck {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 232, .95), rgba(255, 250, 232, 0) 70%);
  opacity: 0;
  animation: drift var(--t) linear var(--dl) infinite;
}
@keyframes drift {
  0% { transform: translate(0, 0); opacity: 0; }
  15%, 80% { opacity: var(--o); }
  100% { transform: translate(var(--dx), -160px); opacity: 0; }
}

/* ---------------- ENVELOPE ---------------- */
.env {
  position: absolute; left: 396px; top: 181.5px; width: 604px; height: 442.5px;
  perspective: 1400px; perspective-origin: 50% 0%;
}
.env > * { position: absolute; left: 0; top: 0; }
.env-interior {
  width: 604px; height: 360px;
  background: url(assets/env-tile.jpg) 0 0 / 100px 100px;
  filter: brightness(.55) contrast(1.1);
  clip-path: polygon(0% 0%, 100% 0%, 100% 10.14%, 58.2% 77.8%, 49.5% 84.7%, 40.8% 77.8%, 0% 10.14%);
}
.env-card {
  left: 71px; top: 26px; width: 462px; height: 354px;
  transition: transform 1.1s cubic-bezier(.22,.8,.26,1);
  z-index: 1;
}
.stamp { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.env-card-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Pinyon Script', cursive; color: #f8f3e8; text-align: center; line-height: .95;
  padding-top: 8px;
}
.env-card-text .l1, .env-card-text .l2 { font-size: 78px; }
.env-card-text .l2 { margin-top: -2px; }
.env-card-text .l3 { font-size: 46px; margin-top: 8px; }
.env-front { width: 604px; height: 442.5px; max-width: none; pointer-events: none; z-index: 2; }
.env-flap {
  width: 604px; height: 360px;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.55,.06,.3,1);
  z-index: 3;
}
.env-flap > * { position: absolute; left: 0; top: 0; width: 604px; height: 360px; max-width: none; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flap-back {
  transform: rotateX(180deg);
  background: url(assets/env-tile-light.jpg) 0 0 / 100px 100px;
  filter: brightness(.82);
  clip-path: polygon(0% 100%, 100% 100%, 100% 89.86%, 58.2% 22.2%, 49.5% 15.3%, 40.8% 22.2%, 0% 89.86%);
}
.seal-pulse {
  left: 252px; top: 266px; width: 94px; height: 94px; border-radius: 50%;
  animation: pulse 2.4s ease-out infinite;
  pointer-events: none; z-index: 4;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 250, 230, .5); }
  70% { box-shadow: 0 0 0 26px rgba(255, 250, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 250, 230, 0); }
}
.env-orchid { position: absolute; left: 840px; top: 44px; width: 310px; height: 525px; max-width: none; pointer-events: none; z-index: 5; }
.env-hit {
  position: absolute; left: 396px; top: 181.5px; width: 604px; height: 442.5px;
  background: none; border: 0; padding: 0; cursor: pointer; z-index: 6;
  -webkit-tap-highlight-color: transparent;
}
.env-hit:focus-visible { outline: 3px solid #f8f1e0; outline-offset: 6px; border-radius: 6px; }

/* hover: the flap lifts a little and the card peeks */
@media (hover: hover) {
  #home:not(.opening) .stage:has(.env-hit:hover) .env-flap { transform: rotateX(24deg); transition-duration: .6s; }
  #home:not(.opening) .stage:has(.env-hit:hover) .env-card { transform: translateY(-14px); }
  #home:not(.opening) .stage:has(.env-hit:hover) .seal-pulse { opacity: 0; }
}

/* opening sequence */
#home.opening .seal-pulse { animation: none; opacity: 0; }
#home.opening .env-flap { transform: rotateX(180deg); }
#home.flap-up .env-flap { z-index: 0; }
#home.card-out .env-card { transform: translateY(-205px); }
#home.card-out.zoom .env-card { transform: translateY(-205px) scale(1.06); }
#home .env-hit[disabled] { cursor: default; }

.petal {
  position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none;
  width: 12px; height: 18px; border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #fffdf7, #e4d9c6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

/* portrait home */
.stage-p .env, .stage-p .env-hit { left: 48px; top: 360px; }
.stage-p .env-orchid { left: 492px; top: 222.5px; }
.arc-text { position: absolute; left: -10px; top: 80px; width: 640px; height: 260px; overflow: visible; }
.arc-text text {
  font-family: "Pinyon Script", cursive; font-size: 70px; fill: #f6f1e6;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}
.p-orchid { position: absolute; max-width: none; pointer-events: none; }
.p-orchid-l { left: -40px; top: 640px; width: 290px; transform: scaleX(-1) rotate(-14deg); z-index: 5; }
.arc-text textPath { animation: shimmer 4s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }

/* ---------------- INVITATION ---------------- */
#invitation .stage-l { opacity: 0; transition: opacity 1.2s ease; }
#invitation.in .stage-l { opacity: 1; }

/* portrait invitation: the open envelope with its contents spilling out */
.stage-p .env.is-open { left: 48px; top: 600px; }
.env.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.p-card { position: absolute; left: 70px; top: 300px; width: 462px; height: 354px; rotate: -4deg; z-index: 2; }
.pol-hand { left: 340px; top: 80px; width: 330px; rotate: 6deg; z-index: 3; }
.pol-couple { left: 26px; top: 585px; width: 290px; rotate: -6deg; z-index: 4; }
.p-oval { position: absolute; left: 320px; top: 870px; width: 370px; rotate: -3deg; z-index: 5; display: block; }
.p-oval img { width: 100%; height: auto; filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)); }
.p-orchid-tr { left: 560px; top: -200px; width: 230px; rotate: 14deg; z-index: 6; }
.p-orchid-bl { left: -70px; top: 900px; width: 270px; transform: scaleX(-1); z-index: 6; }
.piece { opacity: 0; translate: 0 50px; transition: opacity .9s ease var(--d), translate 1.1s var(--ease-out) var(--d), rotate .6s var(--ease-out), scale .6s var(--ease-out); }
.p-card.piece { translate: 0 220px; }
#invitation.in .piece { opacity: 1; translate: 0 0; }
.p-oval { animation: bob 4.5s ease-in-out infinite 2s; }
.p-oval:hover { scale: 1.05; rotate: 0deg; }
.p-oval:hover img, .oval-l:hover img { filter: drop-shadow(0 0 18px rgba(250,244,233,.45)) drop-shadow(0 10px 22px rgba(0,0,0,.4)); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------------- ARTBOARDS (exact desktop layouts, scaled to width) ---------------- */
.ab {
  position: relative; width: 100%;
  aspect-ratio: 1366 / var(--h);
  container-type: inline-size;
  overflow: hidden;
}
.cream { background: var(--cream); }
.dark-ab { background: var(--nav-bg); }
.abs {
  --u: calc(100cqw / 1366);
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
}
.abs > img { width: 100%; height: auto; }
img.abs { height: auto; }
br.d { display: inline; }
.img-h img { width: 100%; }
.dt-block .img-h img, .venue-block .img-h img { width: calc(var(--w) * 100cqw / 1366); }
.dt-block, .venue-block { --u: calc(100cqw / 1366); }
.info {
  font-size: calc(30 * 100cqw / 1366); line-height: 1.05;
  margin: calc(12 * 100cqw / 1366) 0 0 calc(37 * 100cqw / 1366);
  color: var(--ink);
}
.info a { text-decoration: none; }
.info a:hover { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.caption { font-size: calc(21 * 100cqw / 1366); text-align: center; line-height: 1; color: var(--ink); }

.para { font-size: calc(25 * 100cqw / 1366); line-height: calc(37 * 100cqw / 1366); text-align: center; color: var(--ink); }
.label { font-size: calc(40 * 100cqw / 1366); line-height: 1.02; text-align: center; color: var(--ink); }

/* FAQ doilies: 9-slice border image so the lace frame stays crisp at any size */
.doily {
  height: calc(var(--hh) * var(--u));
  border-style: solid;
  border-width: calc(80 * var(--u)) calc(70 * var(--u)) calc(74 * var(--u)) calc(81 * var(--u));
  border-image: url(assets/doily.webp) 160 140 148 162 stretch;
  background: var(--panel);
  background-clip: padding-box;
  filter: drop-shadow(0 calc(6 * var(--u)) calc(14 * var(--u)) rgba(0,0,0,.35));
}
.doily-inner {
  height: 100%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; color: var(--faq-ink);
  padding: calc(27 * var(--u)) calc(10 * var(--u)) 0;
  font-size: calc(10.4 * var(--u)); line-height: calc(15 * var(--u));
}
.doily-r .doily-inner { padding-top: calc(81 * var(--u)); }
.doily-inner h3 {
  font-family: 'Pinyon Script', cursive; font-weight: 400;
  font-size: calc(33 * var(--u)); line-height: 1.05; color: #3f362f;
  margin: 0 0 calc(4 * var(--u));
}
.doily-inner p { margin: 0 0 calc(16 * var(--u)); max-width: calc(268 * var(--u)); }
.doily-r .doily-inner p { margin-bottom: calc(26 * var(--u)); }
.doily-inner b { font-weight: 600; }


/* ---------------- MICRO-INTERACTIONS ---------------- */
/* script headings write themselves in, left to right */
.wipe img { clip-path: inset(0 100% 0 0); transition: clip-path 1.7s var(--ease-io) var(--d, 0s); }
.wipe.in img { clip-path: inset(0 0 0 0); }

/* soft rise for text and images */
.reveal { opacity: 0; translate: 0 22px; transition: opacity 1s ease var(--d, 0s), translate 1.1s var(--ease-out) var(--d, 0s), scale .6s var(--ease-out), rotate .7s var(--ease-out); }
.reveal.in { opacity: 1; translate: 0 0; }

.qr { display: block; transition: scale .5s var(--ease-out), rotate .5s var(--ease-out), opacity 1s ease, translate 1.1s var(--ease-out); }
.qr:hover { scale: 1.03; rotate: -1.5deg; }
.dc-group img.abs, .ent img.abs { transition: opacity 1s ease var(--d, 0s), translate 1.1s var(--ease-out) var(--d, 0s), scale .7s var(--ease-out); }
.dc-group img.abs:hover, .ent img.abs:hover { scale: 1.035; }

/* FAQ doilies settle like paper set down on a table */
.doily.reveal { translate: 0 60px; rotate: -3deg; }
.doily-r.reveal { rotate: 3deg; }
.doily.reveal.in { translate: 0 0; rotate: 0deg; }
.doily.reveal.in:hover { translate: 0 -6px; rotate: -.6deg; }
.doily-r.reveal.in:hover { rotate: .6deg; }

/* ---------------- GALLERY: the film reel ---------------- */
.reel { position: relative; background: var(--cream); height: 500vh; }
.reel-sticky {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  overflow: hidden;
  --sh: calc(100svh - var(--nav-h));
}
.reel-track {
  position: absolute; left: 0; top: 0; height: 100%;
  display: flex; align-items: center;
  gap: clamp(28px, 4.5vw, 72px);
  padding: 7vh 10vw 12vh 7vw;
  will-change: transform;
}
.frame { margin: 0; flex: 0 0 auto; align-self: var(--al, center); }
.frame button {
  display: block; padding: 0; border: 0; background: #e8e0cf;
  height: min(calc(var(--sh) * var(--h)), calc(82vw / var(--ar))); aspect-ratio: var(--ar);
  overflow: hidden; cursor: zoom-in;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease-io);
  box-shadow: 0 18px 40px -24px rgba(60, 45, 30, .5);
}
.frame.in button { clip-path: inset(0 0 0 0); }
.frame img {
  width: 118%; height: 100%; max-width: none; object-fit: cover;
  translate: var(--px, -9%) 0;
  scale: 1.18;
  transition: scale 1.9s var(--ease-out), filter .6s ease;
}
.frame.in img { scale: 1; }
.frame button:hover img { scale: 1.05; filter: brightness(1.05) saturate(1.05); }
.frame button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.frame figcaption {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
  font-family: 'Oranienbaum', serif; font-size: 15px; letter-spacing: .22em; color: var(--muted);
  opacity: 0; transition: opacity 1s ease .5s;
}
.frame figcaption::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .6; }
.frame.in figcaption { opacity: 1; }
.frame-col { flex: 0 0 auto; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 4vh; }
.frame-col .frame { align-self: auto; }

.reel-intro { flex: 0 0 auto; width: min(34vw, 460px); align-self: center; }
.eyebrow {
  font-family: 'Oranienbaum', serif; text-transform: uppercase;
  letter-spacing: .3em; font-size: 14px; color: var(--muted);
}
.reel-title {
  font-family: 'Pinyon Script', cursive; font-weight: 400;
  font-size: clamp(58px, 7vw, 116px); line-height: .98; color: #3f352c;
  margin: 14px 0 18px;
}
.reel-year {
  display: flex; align-items: center; gap: 16px;
  font-family: 'Oranienbaum', serif; letter-spacing: .34em; font-size: 18px; color: var(--ink);
}
.reel-year span { flex: 0 0 52px; height: 1px; background: currentColor; opacity: .45; }
.reel-hint {
  margin-top: 44px; display: flex; align-items: center; gap: 14px;
  font-style: italic; font-size: 15px; color: var(--muted);
}
.reel-hint i { position: relative; width: 64px; height: 1px; background: currentColor; animation: nudge 1.8s var(--ease-io) infinite; }
.reel-hint i::after {
  content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg);
}
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }

.reel-quote {
  flex: 0 0 auto; align-self: center; width: min(28vw, 360px); text-align: center;
  font-family: "Pinyon Script", cursive; font-size: clamp(40px, 3.6vw, 60px); line-height: 1.1; color: #4a3d31;
}
.reel-quote cite { display: block; margin-top: 14px; font-family: 'Gelasio', serif; font-style: italic; font-size: 14px; color: var(--muted); }

.reel-end {
  flex: 0 0 auto; align-self: center; width: min(40vw, 480px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.reel-title.small { font-size: clamp(46px, 5vw, 84px); margin-bottom: 8px; }
.rsvp { display: block; width: 250px; margin: 22px 0 16px; transition: scale .45s cubic-bezier(.3,.7,.4,1.5); }
.rsvp img { width: 100%; height: auto; transform-origin: 50% 8%; animation: sway 5s ease-in-out infinite; filter: drop-shadow(0 10px 18px rgba(60,45,30,.25)); }
.rsvp:hover, .rsvp:focus-visible { scale: 1.07; outline: none; }
.rsvp:active { scale: .97; }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.reel-note { font-style: italic; color: var(--muted); font-size: 15px; }

.reel-foot {
  position: absolute; left: 7vw; right: 7vw; bottom: 3.6vh;
  display: flex; align-items: center; gap: 24px;
  font-size: 15px; color: #6c5d4c;
}
.reel-caption { white-space: nowrap; }
.reel-progress { flex: 1; height: 1px; background: rgba(81, 65, 50, .18); position: relative; }
.reel-progress i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.reel-count { font-family: 'Oranienbaum', serif; letter-spacing: .16em; white-space: nowrap; }
.reel-count b { font-weight: 400; color: var(--ink); }

/* reduced motion: a plain horizontal scroller */
.reel.static { height: auto; }
.reel.static .reel-sticky { position: relative; top: 0; }
.reel.static .reel-track { position: relative; overflow-x: auto; scroll-snap-type: x mandatory; }
.reel.static .frame { scroll-snap-align: center; }

/* ---------------- LIGHTBOX ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: rgba(19, 20, 16, .96);
  opacity: 0; transition: opacity .45s ease;
}
.lightbox.open { opacity: 1; }
.lb-stage { margin: 0; }
.lb-stage img {
  max-width: min(90vw, 1400px); max-height: 82vh; width: auto; height: auto; object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  transition: opacity .35s ease, scale .6s var(--ease-out);
}
.lightbox.swap .lb-stage img { opacity: 0; scale: .97; }
.lightbox button {
  position: absolute; background: none; border: 0; cursor: pointer;
  font-family: 'Oranienbaum', serif; color: #efe7d6; line-height: 1;
  opacity: .75; transition: opacity .25s, transform .3s var(--ease-out);
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; outline: none; }
.lb-close { top: 14px; right: 22px; font-size: 46px; }
.lb-close:hover { transform: rotate(90deg); }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; font-size: 72px; padding: 20px; }
.lb-prev { left: 1.5vw; } .lb-next { right: 1.5vw; }
.lb-prev:hover { transform: translateX(-4px); } .lb-next:hover { transform: translateX(4px); }
.lb-count {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  font-family: 'Oranienbaum', serif; letter-spacing: .3em; color: #b9b19f; font-size: 15px;
}

/* ---------------- FOOTER ---------------- */
.site-foot { background: var(--nav-bg); color: #efe7d6; text-align: center; padding: 72px 16px 80px; }
.foot-names { font-family: 'Pinyon Script', cursive; font-size: 58px; line-height: 1; }
.foot-date { margin-top: 14px; font-family: 'Oranienbaum', serif; letter-spacing: .45em; font-size: 16px; opacity: .65; }

/* ---------------- MOBILE: stacked layouts ---------------- */
@media (max-width: 760px) {
  .nav { gap: 10px; padding: 0 10px 0 16px; }
  .nav-links { gap: 18px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .nav-links a { font-size: 21px; }
  .nav-rsvp { width: 80px; height: 34px; }
  .nav-rsvp span { font-size: 16px; }
  .nav-ind { bottom: 13px; }

  .ab { aspect-ratio: auto; padding: 40px 16px 56px; }
  .ab .abs { position: static; width: auto; }

  /* details */
  #details { display: flex; flex-direction: column; align-items: center; text-align: center; }
  #details > h2 { width: min(92%, 420px); margin-bottom: 28px; }
  #details .qr { width: min(62%, 260px); }
  #details .caption { font-size: 16px; margin: 10px 0 34px; }
  #details .dt-block, #details .venue-block { margin-bottom: 28px; }
  #details .img-h img { width: auto !important; height: 46px; margin: 0 auto; }
  #details .venue-block .img-h img { height: 44px; }
  #details .info { font-size: 21px; line-height: 1.3; margin: 8px 0 0; }

  /* dress code */
  #dress-code { display: flex; flex-direction: column; align-items: center; text-align: center; }
  #dress-code > h2 { width: min(94%, 440px); margin: 0 auto 24px; }
  #dress-code > h2 + .dc-group { margin-top: 0; }
  .dc-group { display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; }
  .dc-group h3 img { height: 40px; width: auto; }
  .dc-group .para { font-size: 17px; line-height: 1.5; margin: 12px 0 16px; max-width: 34ch; }
  .dc-group img.abs { width: min(100%, 420px); }
  #dress-code h2:nth-of-type(2) { margin-top: 16px; }
  .ent { display: flex; flex-direction: column; align-items: center; margin-bottom: 36px; }
  .ent img.abs { width: min(62%, 240px); }
  .ent .label { font-size: 24px; margin-top: 10px; }
  .ent .label br, br.d { display: none; }

  /* faqs */
  #faqs { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 32px; }
  #faqs .faq-title { width: min(78%, 300px); }
  .doily {
    --m: .4;
    width: min(100%, 420px) !important; height: auto !important;
    border-width: 64px 56px 60px 65px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
  }
  .doily-inner, .doily-r .doily-inner { padding: 14px 4px 6px; font-size: 14px; line-height: 1.5; height: auto; }
  .doily-inner h3 { font-size: 34px; margin-bottom: 4px; }
  .doily-inner p, .doily-r .doily-inner p { max-width: none; margin-bottom: 18px; }


  .reel-track { gap: 28px; padding: 5vh 9vw 13vh 8vw; }
  .reel-intro { width: 78vw; }
  .reel-quote { width: 66vw; font-size: 42px; }
  .reel-end { width: 82vw; }
  .eyebrow { letter-spacing: .18em; font-size: 12px; }
  .rsvp { width: 200px; }
  .reel-foot { left: 16px; right: 16px; font-size: 13px; gap: 14px; }
  .reel-caption { display: none; }
  .lb-prev, .lb-next { font-size: 54px; padding: 10px; }
  .foot-names { font-size: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .piece, .wipe img, .frame button, .frame img { opacity: 1 !important; translate: none !important; clip-path: none !important; scale: none !important; transition: none !important; }
  .seal-pulse, .speck, .rsvp img, .p-oval, .reel-hint i, .arc-text textPath { animation: none !important; }
}

@media (max-width: 340px) {
  .doily { border-width: 46px 40px 43px 47px; }
  .doily-inner, .doily-r .doily-inner { font-size: 13px; }
}


/* ---------------- DIRECTIONS BUTTONS ---------------- */
.directions {
  --u: calc(100cqw / 1366);
  display: flex; flex-wrap: wrap; gap: calc(12 * var(--u));
  margin: calc(22 * var(--u)) 0 0 calc(37 * var(--u));
}
.dir-btn {
  display: inline-flex; align-items: center; gap: calc(9 * var(--u));
  padding: calc(11 * var(--u)) calc(20 * var(--u)) calc(11 * var(--u)) calc(16 * var(--u));
  border: 1px solid rgba(81, 65, 50, .55); border-radius: 999px;
  font-family: 'Gelasio', serif; font-size: calc(17 * var(--u)); line-height: 1;
  color: var(--ink); text-decoration: none; background: transparent;
  transition: transform .35s var(--ease-out), box-shadow .35s ease, background-color .3s, color .3s;
}
.dir-btn svg { width: calc(19 * var(--u)); height: calc(19 * var(--u)); fill: currentColor; flex: 0 0 auto; }
.dir-primary { background: var(--olive); border-color: var(--olive); color: #f6f1e6; }
.dir-btn:hover, .dir-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(60, 45, 30, .55); outline: none; }
.dir-btn:not(.dir-primary):hover { background: rgba(95, 102, 65, .08); }
.dir-primary:hover svg { animation: pin-hop .6s var(--ease-out); }
.dir-btn:active { transform: translateY(0) scale(.97); }
@keyframes pin-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px); } }

@media (max-width: 760px) {
  .directions { justify-content: center; gap: 10px; margin: 16px 0 0; }
  .dir-btn { font-size: 16px; gap: 8px; padding: 12px 18px 12px 14px; }
  .dir-btn svg { width: 18px; height: 18px; }
}

/* ---------------- INSTAX POLAROIDS ---------------- */
.polaroid {
  position: absolute; margin: 0; background: #fbfaf6; cursor: pointer;
  --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease-out), scale .5s var(--ease-out), rotate .6s var(--ease-out),
              box-shadow .5s ease, opacity .9s ease var(--d, 0s), translate 1.1s var(--ease-out) var(--d, 0s);
  -webkit-tap-highlight-color: transparent;
}
.polaroid:hover { scale: 1.06; box-shadow: 0 22px 44px rgba(0, 0, 0, .5); z-index: 7; }
.polaroid:focus-visible { outline: 2px solid #f8f1e0; outline-offset: 4px; }
.pol-photo { position: relative; overflow: hidden; background: #1d1d1b; }
.pol-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter 3.4s cubic-bezier(.4,.1,.3,1); }
.polaroid.undeveloped .pol-photo img { filter: brightness(2.1) contrast(.3) saturate(0) sepia(.4) blur(2px); transition: none; }
.pol-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.polaroid.flash .pol-flash { animation: flash .8s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.polaroid::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.45), transparent 55%);
  mix-blend-mode: soft-light; opacity: 0; transition: opacity .35s;
}
.polaroid:hover::after { opacity: 1; }
.pol-cap {
  position: absolute; left: 0; right: 0; text-align: center;
  font-family: 'Caveat', cursive; font-weight: 500; color: #2f3346; line-height: 1;
  rotate: -2deg;
  clip-path: inset(0 100% 0 0); transition: clip-path 1.5s var(--ease-io);
}
.polaroid.captioned .pol-cap { clip-path: inset(-10% -5% -10% 0); }
.polaroid.shake { animation: shake .75s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  0%, 100% { translate: 0 0; } 15% { translate: -7px 2px; } 30% { translate: 7px -2px; }
  45% { translate: -5px 1px; } 60% { translate: 4px -1px; } 75% { translate: -2px 0; }
}

/* desktop: layers sit exactly on top of the Canva artwork */
.pol-l { box-shadow: none; }
.pol-l-hand { left: 683px; top: 112px; width: 336.5px; height: 264px; padding: 22px 14.5px 0; background: #edf0f1; z-index: 2; }
.pol-l-hand .pol-photo { width: 307.5px; height: 193.5px; }
.pol-l-hand .pol-cap { bottom: 14px; left: 62px; right: auto; font-size: 24px; text-align: left; }
.pol-l-couple { left: 479.5px; top: 359px; width: 261.5px; height: 304px; padding: 14px 0 0 10.5px; background: #fff; box-shadow: 0 0 0 .6px rgba(0,0,0,.45); z-index: 4; }
.pol-l-couple:hover { box-shadow: 0 0 0 .6px rgba(0,0,0,.45), 0 22px 44px rgba(0,0,0,.5); }
.pol-l-couple .pol-photo { width: 235px; height: 225px; box-shadow: 0 0 0 .6px rgba(0,0,0,.5); }
.pol-l-couple .pol-cap { bottom: 18px; font-size: 40px; }
.inv-orchid { position: absolute; left: 952.75px; top: 89.4px; width: 310px; height: 525px; max-width: none; z-index: 3; pointer-events: none; }
.oval-l { position: absolute; left: 741.5px; top: 352.5px; width: 455px; height: 310px; z-index: 3; display: block; transition: scale .5s var(--ease-out); }
.oval-l img { width: 100%; height: 100%; transition: filter .4s; }
.oval-l:hover { scale: 1.04; }
.oval-ring {
  position: absolute; inset: 4%; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(250, 244, 233, .75);
  opacity: 0; animation: ring 3.2s ease-out infinite 2.5s;
}
@keyframes ring { 0% { transform: scale(.96); opacity: 0; } 20% { opacity: .85; } 100% { transform: scale(1.16); opacity: 0; } }

/* portrait polaroids */
.stage-p .polaroid { padding: 14px 14px 58px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.stage-p .pol-photo img { height: auto; }
.stage-p .pol-cap { bottom: 12px; font-size: 34px; }
.stage-p .polaroid:hover { rotate: 0deg; }

@media (prefers-reduced-motion: reduce) {
  .polaroid.undeveloped .pol-photo img { filter: none; }
  .nav-rsvp::after, .oval-ring { animation: none; }
  .polaroid.shake { animation: none; }
}
