/* ═══════════════════════════════════════════════════════════════
   Velvet Opera — theatrical wine-and-gold wedding invitation.
   Palette, fonts, and sizing are variables that app.js overwrites
   from the InviBloom builder config, so the document restyles itself.
   Layout DNA is shared across the InviBloom static templates; the
   identity lives in the palette, fonts, ornaments, and opening motion.
═══════════════════════════════════════════════════════════════ */

:root {
  --surface: #f4e9d6;
  --ink: #3a1220;
  --accent: #c8a24a;
  --story-surface: #ead9c0;
  --rsvp-surface: #4a0e1e;
  --hero-overlay: rgba(40, 8, 18, 0.52);

  --font-display: Cinzel, Georgia, serif;
  --font-body: "Cormorant Garamond", Georgia, serif;
  --font-ui: Jost, system-ui, -apple-system, sans-serif;

  --base-size: 16px;
  --name-size: 56px;

  --ink-soft: color-mix(in srgb, var(--ink) 72%, transparent);
  --ink-faint: color-mix(in srgb, var(--ink) 44%, transparent);
  --rule: color-mix(in srgb, var(--accent) 40%, transparent);
  --paper: color-mix(in srgb, var(--surface) 94%, #fff);
  --shadow: 0 24px 60px -32px color-mix(in srgb, var(--ink) 58%, transparent);

  --gutter: 22px;
  --section-y: clamp(64px, 11vw, 116px);
  --section-romance-image: url("../img/section-romance.jpg");
  --rsvp-backdrop-image: url("../img/rsvp-backdrop.jpg");
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: var(--base-size); line-height: 1.65; overflow-x: hidden;
  background-image:
    radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 44%),
    radial-gradient(circle at 84% 82%, color-mix(in srgb, var(--accent) 6%, transparent) 0%, transparent 48%);
}
body.intro-active { overflow: hidden; height: 100dvh; }
img, video { max-width: 100%; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ── Ornaments ── */
.ornament-divider { display: block; width: min(230px, 62%); height: 24px; margin: 16px auto; }
.corner-sprig { position: absolute; width: clamp(72px, 16vw, 128px); height: clamp(72px, 16vw, 128px); opacity: 0.42; pointer-events: none; z-index: 2; }
.corner-sprig--tl { top: 10px; left: 6px; }
.corner-sprig--tr { top: 10px; right: 6px; transform: scaleX(-1); }
.corner-sprig--bl { bottom: 10px; left: 6px; transform: scaleY(-1); }
.corner-sprig--br { bottom: 10px; right: 6px; transform: scale(-1); }

.section { position: relative; padding: var(--section-y) var(--gutter); }
.section-head { text-align: center; margin: 0 auto clamp(28px, 6vw, 46px); max-width: 640px; }
.section-eyebrow { margin: 0; font-family: var(--font-ui); font-size: 0.68rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); }
.section-title { margin: 10px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 6.4vw, 2.9rem); letter-spacing: 0.04em; line-height: 1.15; }
.section-title--sm { font-size: clamp(1.5rem, 4.6vw, 2rem); }

.reveal-date, .countdown, .events, .couple, .gallery, .venue, .things, .calendar, .site-footer {
  --ink: #f7ead2;
  --ink-soft: #ead6bb;
  --ink-faint: #d8bb91;
  --paper: color-mix(in srgb, var(--rsvp-surface) 88%, #7b2440);
  --surface: color-mix(in srgb, var(--rsvp-surface) 88%, #1c030a);
  --shadow: 0 24px 60px -30px #120106;
  background-color: var(--rsvp-surface);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.reveal-date > *, .countdown > *, .events > *, .couple > *, .gallery > *, .venue > *, .things > *, .calendar > *, .site-footer > * {
  position: relative;
  z-index: 1;
}
.reveal-date::before, .countdown::before, .events::before, .couple::before, .gallery::before, .venue::before, .things::before, .calendar::before, .site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--section-romance-image);
  background-attachment: fixed;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* ── Scroll reveals ── */
body.reveal-armed .reveal-item { opacity: 0; transform: translateY(26px); }
body.reveal-armed .reveal-item.is-visible { opacity: 1; transform: none; transition: opacity 0.9s cubic-bezier(0.22,0.61,0.36,1), transform 0.9s cubic-bezier(0.22,0.61,0.36,1); }

/* ═══ Intro gate ═══ */
.intro {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(ellipse at 50% 42%, color-mix(in srgb, var(--surface) 100%, #fff 6%) 0%, var(--surface) 58%, color-mix(in srgb, var(--surface) 74%, var(--ink)) 100%);
  transition: opacity 0.9s ease, visibility 0.9s;
}
body.intro-open .intro { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.intro.has-film .intro-film { display: block; }
.intro.has-film .intro-fallback { display: none; }
.intro-fallback { position: absolute; inset: 0; }

/* One drawn opening shows at a time; app.js sets the family. */
.op { display: none; position: absolute; inset: 0; }
.intro.open-envelope .op-envelope { display: grid; place-items: center; padding: 0 var(--gutter); }
.intro.open-curtain .op-curtain { display: block; }
.intro.open-gates .op-gates { display: block; }
.intro.open-lotus .op-lotus { display: grid; place-items: center; }
.intro.open-birds .op-birds { display: block; }

.op-kicker { margin: 0; font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.op-names { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(1.2rem, 5vw, 1.6rem); letter-spacing: 0.05em; }
.op-date { margin: 0; font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ink-soft); }
.op-crest-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--paper); border: 1px solid var(--accent); box-shadow: 0 0 44px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.op-crest-badge svg { width: 60px; height: 60px; }

/* envelope */
.env { position: relative; width: min(320px, 82vw); aspect-ratio: 1 / 0.66; transform-style: preserve-3d; filter: drop-shadow(0 26px 40px color-mix(in srgb, var(--ink) 32%, transparent)); }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 90%, #fff) 0%, color-mix(in srgb, var(--surface) 74%, var(--accent) 12%) 100%); border: 1px solid var(--rule); border-radius: 6px; }
.env-back { z-index: 1; }
.env-front { z-index: 3; clip-path: polygon(0 22%, 50% 60%, 100% 22%, 100% 100%, 0 100%); }
.env-flap { z-index: 4; clip-path: polygon(0 0, 100% 0, 50% 62%); transform-origin: top center; animation: envFlap 3.6s ease-in-out infinite; }
@keyframes envFlap { 0%,55% { transform: rotateX(0); } 75%,100% { transform: rotateX(-24deg); } }
.env-letter { position: absolute; left: 7%; right: 7%; top: -12%; z-index: 2; padding: 20px 16px 26px; text-align: center; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; animation: envLetter 3.6s ease-in-out infinite; }
@keyframes envLetter { 0%,55% { transform: translateY(14%); } 80%,100% { transform: translateY(-14%); } }
.env-crest { display: block; width: 44px; height: 44px; margin: 0 auto 8px; }
.env-letter .ornament-divider { width: 70%; height: 16px; margin: 6px auto; }
.env-seal { position: absolute; left: 50%; top: 56%; z-index: 5; width: 58px; height: 58px; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--accent) 70%, #fff) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 62%, #000) 100%); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--ink) 60%, transparent); }
.env-seal svg { width: 40px; height: 40px; opacity: 0.85; }

/* curtain */
.op-curtain .drape-panel { position: absolute; top: 0; bottom: 0; width: 50.5%;
  background-image: repeating-linear-gradient(to right, rgba(0,0,0,.24) 0px, rgba(255,255,255,.07) 14px, rgba(0,0,0,.24) 34px), linear-gradient(100deg, color-mix(in srgb, var(--rsvp-surface) 96%, #000 8%) 0%, color-mix(in srgb, var(--rsvp-surface) 72%, var(--accent) 18%) 48%, color-mix(in srgb, var(--rsvp-surface) 96%, #000 10%) 100%);
  background-size: 34px 100%, 100% 100%; animation: drapeBreathe 5s ease-in-out infinite; transition: transform 1s cubic-bezier(0.65,0,0.35,1); }
.drape-panel--l { left: 0; border-right: 2px solid var(--accent); }
.drape-panel--r { right: 0; border-left: 2px solid var(--accent); --drape-shift: 6px; animation-delay: -2.5s; }
@keyframes drapeBreathe { 0%,100% { transform: translateX(0); } 50% { transform: translateX(var(--drape-shift, -6px)); } }
.drape-valance { position: absolute; top: 0; left: 0; right: 0; height: 68px; z-index: 2; background: linear-gradient(180deg, color-mix(in srgb, var(--rsvp-surface) 92%, #000) 0%, color-mix(in srgb, var(--rsvp-surface) 70%, var(--accent) 20%) 100%); border-bottom: 2px solid var(--accent); clip-path: polygon(0 0,100% 0,100% 60%,92% 100%,84% 60%,76% 100%,68% 60%,60% 100%,52% 60%,44% 100%,36% 60%,28% 100%,20% 60%,12% 100%,4% 60%,0 100%); transition: transform 1s cubic-bezier(0.65,0,0.35,1), opacity 0.8s ease; transform-origin: top center; }
body.intro-open .op-curtain .drape-panel--l { animation: none; transform: translateX(-100%); }
body.intro-open .op-curtain .drape-panel--r { animation: none; transform: translateX(100%); }
body.intro-open .op-curtain .drape-valance { transform: translateY(-105%) scaleX(0.92); opacity: 0; }
body.intro-open .op-crest-badge { opacity: 0; transition: opacity 0.5s ease; }

/* gates */
.op-gates .gate-door { position: absolute; top: 0; bottom: 0; width: 50.5%;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 80px, color-mix(in srgb, var(--accent) 40%, transparent) 81px, transparent 84px), linear-gradient(160deg, color-mix(in srgb, var(--rsvp-surface) 92%, #000 10%) 0%, color-mix(in srgb, var(--rsvp-surface) 70%, var(--accent) 20%) 50%, color-mix(in srgb, var(--rsvp-surface) 92%, #000 12%) 100%);
  transition: transform 1s cubic-bezier(0.65,0,0.35,1); }
.gate-door--l { left: 0; border-right: 2px solid var(--accent); border-radius: 0 40% 0 0; }
.gate-door--r { right: 0; border-left: 2px solid var(--accent); border-radius: 40% 0 0 0; }
body.intro-open .op-gates .gate-door--l { transform: perspective(1200px) rotateY(105deg); transform-origin: left center; }
body.intro-open .op-gates .gate-door--r { transform: perspective(1200px) rotateY(-105deg); transform-origin: right center; }

/* lotus */
.op-lotus .lotus { position: relative; width: min(260px, 66vw); aspect-ratio: 1; animation: lotusBreathe 4s ease-in-out infinite; }
.op-lotus .petal { position: absolute; left: 50%; top: 50%; width: 34%; height: 52%; margin: -26% 0 0 -17%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 60%, #fff 30%) 0%, var(--accent) 100%);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; transform-origin: 50% 100%; box-shadow: inset 0 -6px 14px -6px color-mix(in srgb, var(--ink) 40%, transparent);
  transition: transform 1.1s cubic-bezier(0.34,1.2,0.64,1), opacity 0.9s ease; }
.op-lotus .p1 { transform: rotate(0deg); }
.op-lotus .p2 { transform: rotate(51deg); }
.op-lotus .p3 { transform: rotate(102deg); }
.op-lotus .p4 { transform: rotate(153deg); }
.op-lotus .p5 { transform: rotate(206deg); }
.op-lotus .p6 { transform: rotate(257deg); }
.op-lotus .p7 { transform: rotate(308deg); }
.op-lotus .lotus-core { position: absolute; left: 50%; top: 50%; width: 26%; height: 26%; margin: -13% 0 0 -13%; border-radius: 50%; background: radial-gradient(circle at 40% 36%, color-mix(in srgb, var(--accent) 40%, #fff) 0%, var(--accent) 70%); box-shadow: 0 0 30px -4px color-mix(in srgb, var(--accent) 80%, transparent); }
@keyframes lotusBreathe { 0%,100% { transform: scale(0.97); } 50% { transform: scale(1.03); } }
body.intro-open .op-lotus .petal { opacity: 0; }
body.intro-open .op-lotus .p1 { transform: rotate(0) translateY(-40%) scale(1.3); }
body.intro-open .op-lotus .p2 { transform: rotate(51deg) translateY(-40%) scale(1.3); }
body.intro-open .op-lotus .p3 { transform: rotate(102deg) translateY(-40%) scale(1.3); }
body.intro-open .op-lotus .p4 { transform: rotate(153deg) translateY(-40%) scale(1.3); }
body.intro-open .op-lotus .p5 { transform: rotate(206deg) translateY(-40%) scale(1.3); }
body.intro-open .op-lotus .p6 { transform: rotate(257deg) translateY(-40%) scale(1.3); }
body.intro-open .op-lotus .p7 { transform: rotate(308deg) translateY(-40%) scale(1.3); }

/* birds */
.op-birds .sky { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, var(--accent) 8%) 0%, color-mix(in srgb, var(--surface) 96%, #fff) 60%, var(--surface) 100%); }
.op-birds .bird { position: absolute; width: 34px; height: 34px; color: var(--ink); opacity: 0.72;
  background: none; transition: transform 1s ease, opacity 0.8s ease; animation: birdFly linear infinite; }
.op-birds .bird::before, .op-birds .bird::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 3px; border-radius: 3px; background: currentColor; transform-origin: left center; }
.op-birds .bird::before { transform: translate(-100%, 0) rotate(-24deg); animation: wingL 0.5s ease-in-out infinite; }
.op-birds .bird::after { transform: rotate(24deg); animation: wingR 0.5s ease-in-out infinite; }
@keyframes wingL { 0%,100% { transform: translate(-100%,0) rotate(-24deg); } 50% { transform: translate(-100%,0) rotate(-6deg); } }
@keyframes wingR { 0%,100% { transform: rotate(24deg); } 50% { transform: rotate(6deg); } }
@keyframes birdFly { 0% { transform: translate(-12vw, 0); } 100% { transform: translate(112vw, -12vh); } }
.op-birds .b1 { top: 32%; animation-duration: 9s; animation-delay: 0s; }
.op-birds .b2 { top: 44%; animation-duration: 11s; animation-delay: -3s; transform: scale(0.8); }
.op-birds .b3 { top: 54%; animation-duration: 8s; animation-delay: -5s; transform: scale(1.1); }
.op-birds .b4 { top: 38%; animation-duration: 12s; animation-delay: -7s; transform: scale(0.7); }
.op-birds .b5 { top: 60%; animation-duration: 10s; animation-delay: -2s; transform: scale(0.9); }
body.intro-open .op-birds .bird { opacity: 0; transform: translateY(-40vh) scale(0.5); animation: none; }

.intro-hint { position: absolute; left: 0; right: 0; bottom: clamp(38px, 9vh, 76px); z-index: 6; text-align: center; }
.intro-hint-label { margin: 0; font-family: var(--font-display); font-size: clamp(1.15rem, 4.6vw, 1.55rem); letter-spacing: 0.12em; }
.intro-hint-sub { margin: 6px 0 0; font-family: var(--font-ui); font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); animation: hintPulse 2.4s ease-in-out infinite; }
@keyframes hintPulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ═══ Page ═══ */
.page { position: relative; opacity: 0; transition: opacity 1s ease 0.15s; }
body.intro-open .page { opacity: 1; }

.fx-layer { position: fixed; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.fx-bit { position: absolute; top: -8%; will-change: transform; animation-name: fxFall; animation-timing-function: linear; animation-iteration-count: infinite; }
.fx-petal { aspect-ratio: 0.96; filter: drop-shadow(0 3px 3px rgba(35, 2, 12, 0.18)); }
.fx-petal img { display: block; width: 100%; height: 100%; object-fit: contain; transform: rotate(var(--fx-tilt, 0deg)); }
@keyframes fxFall {
  0% { transform: translate3d(0,-10vh,0) rotate(0deg) rotateY(0deg); opacity: 0; }
  8% { opacity: 0.9; }
  48% { transform: translate3d(var(--fx-sway, -24px),50vh,0) rotate(var(--fx-mid-spin, 248deg)) rotateY(150deg); }
  92% { opacity: 0.9; }
  100% { transform: translate3d(var(--fx-drift,30px),112vh,0) rotate(var(--fx-spin, 540deg)) rotateY(360deg); opacity: 0; }
}

/* ═══ Hero ═══ */
.hero { position: relative; min-height: 100dvh; display: grid; place-items: center; padding-block: clamp(86px,12vh,128px) clamp(116px,16vh,164px); text-align: center; overflow: hidden; color: #fff; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-photo, .hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-film { opacity: 0; transition: opacity 0.8s ease; }
.hero.has-film .hero-film { opacity: 1; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--hero-overlay) 80%, transparent) 0%, var(--hero-overlay) 42%, color-mix(in srgb, var(--hero-overlay) 92%, #000 12%) 100%); }
.hero-inner { position: relative; z-index: 3; width: min(680px, 100%); padding: 0 6px; }
.hero-overline { margin: 0 0 10px; font-family: var(--font-ui); font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 82%, #fff); }
.hero-kicker { margin: 0 0 16px; font-family: var(--font-ui); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: color-mix(in srgb, #fff 84%, transparent); }
.hero-names { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.06; display: grid; gap: 4px; text-shadow: 0 8px 30px rgba(0,0,0,0.35); }
.hero-person { display: grid; justify-items: center; gap: 7px; }
.hero-name { font-size: min(var(--name-size), 15vw); letter-spacing: 0.03em; }
.hero-relation { max-width: 48ch; font-family: var(--font-ui); font-size: 0.62rem; line-height: 1.5; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, #fff 72%, transparent); text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.hero-amp { font-family: var(--font-body); font-style: italic; font-size: calc(min(var(--name-size),15vw) * 0.46); color: color-mix(in srgb, var(--accent) 78%, #fff); }
.hero-request { max-width: 36ch; margin: 16px auto 0; font-style: italic; font-size: 1rem; color: color-mix(in srgb, #fff 86%, transparent); }
.hero .ornament-divider { margin: 20px auto; }
.hero-date { margin: 0; font-family: var(--font-display); font-size: clamp(1rem,3.6vw,1.3rem); letter-spacing: 0.16em; }
.hero-venue { margin: 8px 0 0; font-family: var(--font-ui); font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; color: color-mix(in srgb, #fff 78%, transparent); }
.hero-scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3; display: grid; justify-items: center; gap: 8px; text-decoration: none; color: #fff; }
.hero-scroll-label { font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.75; }
.hero-scroll-dot { width: 1px; height: 42px; background: linear-gradient(to bottom, currentColor, transparent); animation: scrollDrop 2.2s ease-in-out infinite; }
@keyframes scrollDrop { 0%,100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; } 50% { transform: scaleY(1); transform-origin: top; opacity: 1; } }

/* ═══ Scratch ═══ */
.scratch { position: relative; max-width: 430px; margin: 0 auto; aspect-ratio: 1 / 0.62; border-radius: 14px; border: 2px solid var(--accent); background: linear-gradient(145deg, color-mix(in srgb, var(--rsvp-surface) 82%, #9c3154), color-mix(in srgb, var(--rsvp-surface) 92%, #21030b)); color: #f9ecd5; overflow: hidden; box-shadow: 0 26px 60px -24px #120106, 0 0 0 1px color-mix(in srgb, var(--accent) 60%, #fff); touch-action: none; }
.scratch-under { position: absolute; inset: 0; z-index: 1; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 18px; text-align: center; }
.scratch-eyebrow { margin: 0; font-family: var(--font-ui); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.scratch-date { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(1.35rem,6vw,1.95rem); letter-spacing: 0.05em; }
.scratch-day, .scratch-time { margin: 0; font-family: var(--font-ui); font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; color: #e6ccaa; }
.scratch-canvas { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; cursor: grab; transition: opacity 0.6s ease; }
.scratch.is-cleared .scratch-canvas { opacity: 0; pointer-events: none; }
.scratch-hint { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 5; margin: 0; text-align: center; font-family: var(--font-ui); font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 84%, #fff); text-shadow: 0 2px 8px #24040d; pointer-events: none; transition: opacity 0.4s ease; }
.scratch.is-cleared .scratch-hint { opacity: 0; }
.scratch.style-gift-date .scratch-canvas { display: none; }
.scratch.style-gift-date { cursor: pointer; }
.scratch.style-royal-date .scratch-canvas { cursor: crosshair; }
.scratch.style-gift-date::before, .scratch.style-royal-date::before { content: ""; position: absolute; inset: 0; z-index: 2; transition: transform 0.8s cubic-bezier(0.65,0,0.35,1), opacity 0.6s ease; }
.scratch.style-gift-date::before { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 88%, #000 6%) 0%, color-mix(in srgb, var(--accent) 62%, #fff 22%) 52%, color-mix(in srgb, var(--accent) 88%, #000 6%) 100%); }
.scratch.style-royal-date::before {
  display: none;
  transform-origin: top center;
  background:
    radial-gradient(ellipse at 28% 12%, color-mix(in srgb, #fff 16%, #8a2948) 0%, #7a203f 18%, #5b1029 46%, #3b0719 100%),
    repeating-linear-gradient(100deg, #3b0719 0 8%, #6f1938 18%, #451024 30%);
  box-shadow: inset 0 0 38px #21030d, inset 0 -18px 30px #280411;
}
.scratch.style-royal-date::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: url("../img/date-frame-v1.png") center / 100% 100% no-repeat;
  pointer-events: none;
}
.scratch.style-gift-date.is-cleared::before { transform: translateY(-101%); }

/* ═══ Countdown ═══ */
.countdown { background-color: var(--rsvp-surface); }
.cd-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px,2.4vw,18px); max-width: 560px; margin: 0 auto; }
.cd-cell { display: grid; gap: 6px; justify-items: center; padding: clamp(14px,3.4vw,22px) 6px; border: 1px solid color-mix(in srgb, var(--accent) 70%, #7b2440); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); }
.cd-num { font-family: var(--font-display); font-size: clamp(1.3rem,6.4vw,2.1rem); line-height: 1; color: var(--accent); }
.cd-label { font-family: var(--font-ui); font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }

/* ═══ Events ═══ */
.events-list { max-width: 620px; margin: 0 auto; }
.events-list.mode-timeline { position: relative; display: grid; gap: clamp(22px,5vw,34px); padding-left: 42px; }
.events-list.mode-timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(to bottom, transparent, var(--rule) 12%, var(--rule) 88%, transparent); }
.evt { position: relative; }
.events-list.mode-timeline .evt::before { content: ""; position: absolute; left: -34px; top: 22px; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--surface); }
.evt-card { position: relative; padding: clamp(18px,4.4vw,26px); border: 1px solid color-mix(in srgb, var(--accent) 70%, #7b2440); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.evt-photo { display: block; width: 100%; height: clamp(130px,30vw,190px); object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.evt-name { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.2rem,4.6vw,1.5rem); letter-spacing: 0.05em; }
.evt-meta { margin: 6px 0 0; font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent); }
.evt-meta + .evt-meta { color: var(--ink-faint); text-transform: none; letter-spacing: 0.06em; }
.evt-desc { margin: 12px 0 0; font-size: 1.02rem; color: var(--ink-soft); }
.evt-map { display: inline-block; margin-top: 14px; font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.events-list.mode-scroll { display: grid; gap: clamp(18px,4vw,28px); }
.events-list.mode-swipe { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; max-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
.events-list.mode-swipe::-webkit-scrollbar { display: none; }
.events-list.mode-swipe .evt { flex: 0 0 min(78vw,340px); scroll-snap-align: center; }
.events-list.mode-swipe .evt-card { height: 100%; }
.events-list.mode-image-overlay { display: grid; gap: clamp(16px,4vw,24px); }
.events-list.mode-image-overlay .evt-card { padding: 0; min-height: 230px; display: grid; }
.events-list.mode-image-overlay .evt-photo { grid-area: 1/1; height: 100%; min-height: 230px; margin: 0; border-radius: 12px; }
.events-list.mode-image-overlay .evt-body { grid-area: 1/1; align-self: end; padding: clamp(18px,4.4vw,26px); color: #fff; background: linear-gradient(to top, color-mix(in srgb, var(--rsvp-surface) 90%, #000) 0%, color-mix(in srgb, var(--rsvp-surface) 60%, transparent) 55%, transparent 100%); border-radius: 0 0 12px 12px; }
.events-list.mode-image-overlay .evt-desc, .events-list.mode-image-overlay .evt-meta + .evt-meta { color: rgba(255,255,255,0.82); }
body.reveal-armed .events-list .evt { opacity: 0; }
body.reveal-armed .events-list .evt.is-visible { opacity: 1; animation-duration: 0.85s; animation-timing-function: cubic-bezier(0.22,0.61,0.36,1); animation-fill-mode: both; }
.motion-slide-left .evt.is-visible { animation-name: evtSlideLeft; }
.motion-slide-right .evt.is-visible { animation-name: evtSlideRight; }
.motion-push-up .evt.is-visible, .motion-stagger .evt.is-visible { animation-name: evtPushUp; }
.motion-scale .evt.is-visible { animation-name: evtScale; }
.motion-unroll .evt.is-visible { animation-name: evtUnroll; }
@keyframes evtSlideLeft { from { opacity: 0; transform: translateX(46px); } }
@keyframes evtSlideRight { from { opacity: 0; transform: translateX(-46px); } }
@keyframes evtPushUp { from { opacity: 0; transform: translateY(38px); } }
@keyframes evtScale { from { opacity: 0; transform: scale(0.88); } }
@keyframes evtUnroll { from { opacity: 0; transform: perspective(700px) rotateX(-72deg); transform-origin: top center; } }

/* ═══ Couple ═══ */
.couple { background-color: var(--rsvp-surface); text-align: center; }
.couple-frames { width: min(680px,100%); margin: 0 auto clamp(26px,5vw,38px); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(12px,3vw,24px); }
.couple-frame { position: relative; aspect-ratio: 4 / 5; margin: 0; padding: 9.5% 8.5%; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.couple-frame::after { content: ""; position: absolute; inset: 0; z-index: 2; background: url("../img/couple-frame-v1.png") center / 100% 100% no-repeat; pointer-events: none; }
.couple-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.couple-frame:nth-child(4) .couple-photo { object-position: 58% center; }
.couple-story { max-width: 46ch; margin: 0 auto; font-size: 1.1rem; font-style: italic; color: var(--ink-soft); }
.couple-hashtag { margin: 22px 0 0; font-family: var(--font-ui); font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }

/* ═══ Gallery ═══ */
.gallery-grid { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.gallery-item { padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: none; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.22,0.61,0.36,1); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-grid.layout-grid-2 { grid-template-columns: repeat(2,1fr); }
.gallery-grid.layout-grid-3 { grid-template-columns: repeat(3,1fr); }
.gallery-grid.layout-stacked { grid-template-columns: 1fr; }
.gallery-grid.layout-stacked .gallery-item { aspect-ratio: 4/3; }
.gallery-grid.layout-mosaic { grid-template-columns: repeat(4,1fr); grid-auto-rows: minmax(78px,auto); }
.gallery-grid.layout-mosaic .gallery-item { aspect-ratio: auto; grid-column: span 2; grid-row: span 2; }
.gallery-grid.layout-mosaic .gallery-item:nth-child(4n+1) { grid-column: span 4; grid-row: span 3; }
.gallery-grid.layout-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; max-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
.gallery-grid.layout-carousel::-webkit-scrollbar { display: none; }
.gallery-grid.layout-carousel .gallery-item { flex: 0 0 min(70vw,300px); scroll-snap-align: center; }

/* ═══ Venue ═══ */
.venue-card { position: relative; max-width: 480px; margin: 0 auto; padding: clamp(28px,6vw,44px) clamp(20px,5vw,34px); text-align: center; border: 1px solid color-mix(in srgb, var(--accent) 70%, #7b2440); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.venue-sprig { position: absolute; right: -14px; bottom: -14px; width: 116px; height: 116px; opacity: 0.2; pointer-events: none; }
.venue-name { margin: 0; position: relative; font-family: var(--font-display); font-size: clamp(1.3rem,5.2vw,1.75rem); letter-spacing: 0.05em; }
.venue-address { margin: 10px 0 0; position: relative; font-size: 1.02rem; color: var(--ink-soft); }
.venue-map { position: relative; display: inline-block; margin-top: 20px; padding: 12px 26px; border-radius: 999px; border: 1px solid var(--accent); font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--accent); transition: background 0.3s ease, color 0.3s ease; }
.venue-map:hover { background: var(--accent); color: var(--paper); }

/* ═══ Things ═══ */
.things { background-color: var(--rsvp-surface); }
.things-grid { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; display: grid; gap: clamp(12px,3vw,18px); grid-template-columns: repeat(2,minmax(0,1fr)); }
.ttk-card { padding: clamp(20px,4.6vw,28px); text-align: center; border: 1px solid color-mix(in srgb, var(--accent) 70%, #7b2440); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.ttk-card svg { width: 42px; height: 42px; margin: 0 auto 12px; display: block; color: var(--accent); opacity: 0.9; }
.ttk-label { margin: 0; font-family: var(--font-ui); font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.ttk-value { margin: 10px 0 0; font-size: 1rem; color: var(--ink-soft); }

/* ═══ RSVP ═══ */
.rsvp { background: var(--rsvp-surface); color: color-mix(in srgb, var(--surface) 92%, #fff); text-align: center; overflow: hidden; isolation: isolate; }
.rsvp::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--rsvp-backdrop-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.rsvp .section-title { color: inherit; }
.rsvp .section-eyebrow { color: color-mix(in srgb, var(--accent) 82%, #fff); }
.rsvp-inner { max-width: 620px; margin: 0 auto; position: relative; z-index: 1; }
.rsvp-body { margin: 16px auto 30px; max-width: 46ch; font-size: 1.08rem; font-style: italic; opacity: 0.86; }
.rsvp-btn { display: inline-block; padding: 0; border-radius: 999px; text-decoration: none; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 66%, #fff 26%), var(--accent)); box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--accent) 90%, transparent); }
.rsvp-btn-inner { display: block; padding: 15px 34px; font-family: var(--font-ui); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 32%, #000); }
.rsvp-helper { margin: 14px 0 0; font-size: 0.84rem; opacity: 0.62; }

/* ═══ Calendar ═══ */
.calendar-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.calendar-btns { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cal-btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border: 1px solid color-mix(in srgb, var(--accent) 70%, #7b2440); border-radius: 999px; background: var(--paper); font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--ink); transition: border-color 0.3s ease, transform 0.3s ease; box-shadow: var(--shadow); }
.cal-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.cal-icon { width: 17px; height: 17px; color: var(--accent); }

/* ═══ Footer ═══ */
.site-footer { position: relative; padding: clamp(48px,9vw,74px) var(--gutter) calc(clamp(48px,9vw,74px) + 60px); text-align: center; background-color: var(--rsvp-surface); border-top: 1px solid var(--rule); }
.ft-names { margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem,5.4vw,1.8rem); letter-spacing: 0.06em; }
.ft-amp { color: var(--accent); font-family: var(--font-body); font-style: italic; margin: 0 8px; }
.ft-date { margin: 8px 0 0; font-family: var(--font-ui); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.ft-tagline { margin: 18px 0 0; font-style: italic; color: var(--ink-soft); }
.ft-credit { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-family: var(--font-ui); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--ink-faint); }
.ft-credit img { width: 20px; height: 20px; object-fit: contain; }

/* ═══ Controls ═══ */
.fab-cluster { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; justify-items: end; gap: 10px; }
body.intro-active .fab-cluster, body.intro-active .rsvp-pill { display: none; }
.fab { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); color: var(--accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--ink) 70%, transparent); }
.fab-music-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.fab-music-bars i { width: 2px; height: 5px; background: currentColor; border-radius: 1px; }
.fab-music[aria-pressed="true"] .fab-music-bars i { animation: musicBar 0.9s ease-in-out infinite; }
.fab-music[aria-pressed="true"] .fab-music-bars i:nth-child(2) { animation-delay: 0.15s; }
.fab-music[aria-pressed="true"] .fab-music-bars i:nth-child(3) { animation-delay: 0.3s; }
.fab-music[aria-pressed="true"] .fab-music-bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes musicBar { 0%,100% { height: 5px; } 50% { height: 15px; } }
.fab-nav-lines { display: grid; gap: 4px; }
.fab-nav-lines i { display: block; width: 17px; height: 1.4px; background: currentColor; }
.nav-panel { display: none; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); text-align: right; min-width: 176px; }
.nav-panel.is-open { display: grid; gap: 9px; }
.nav-panel-eyebrow { font-family: var(--font-ui); font-size: 0.56rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.nav-link { font-family: var(--font-ui); font-size: 0.76rem; letter-spacing: 0.08em; text-decoration: none; color: var(--ink-soft); }
.nav-link:hover { color: var(--accent); }
.rsvp-pill { position: fixed; left: 50%; bottom: 18px; z-index: 55; transform: translateX(-50%); padding: 11px 22px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; color: var(--accent); box-shadow: 0 10px 26px -14px color-mix(in srgb, var(--ink) 70%, transparent); }

/* ═══ Lightbox ═══ */
.lightbox { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 24px; background: rgba(18,14,12,0.93); }
.lightbox[hidden] { display: none; }
.lb-img { max-width: 100%; max-height: 84vh; border-radius: 8px; }
.lb-close, .lb-nav { position: absolute; border: 1px solid rgba(255,255,255,0.28); background: rgba(0,0,0,0.4); color: #fff; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ═══ Motion preferences ═══ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ═══ Wider viewports ═══ */
@media (min-width: 768px) {
  :root { --gutter: 40px; }
  .events-list.mode-timeline { padding-left: 56px; }
  .events-list.mode-timeline::before { left: 21px; }
  .events-list.mode-timeline .evt::before { left: -41px; }
}
