/* ==========================================================================
   Blackwood Manor · Victorian horror invitation
   ========================================================================== */
:root {
  --ink: #0b0709;
  --ink-2: #140d12;
  --ink-3: #1f151b;
  --blood: #6d0f1a;
  --blood-bright: #a8141f;
  --parchment: #d9c7a3;
  --parchment-deep: #b89b6a;
  --parchment-dark: #6b5636;
  --brass: #c8a24a;
  --brass-light: #e8cf7a;
  --brass-deep: #7d5f21;
  --candle: #ffb347;
  --candle-hot: #fff0c2;
  --fog: #8a94a6;
  --moss: #6f9a72;
  --bone: #efe6d1;

  --font-display: 'Cinzel Decorative', 'Times New Roman', serif;
  --font-gothic: 'Grenze Gotisch', 'Cinzel Decorative', 'Times New Roman', serif;
  --flash: 0;
  --font-body: 'IM Fell English', Georgia, 'Times New Roman', serif;
  --font-sc: 'IM Fell English SC', Georgia, serif;
  --font-script: 'Pinyon Script', 'Brush Script MT', cursive;

  --vh: 100svh;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--ink); color: var(--parchment); }
body {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.6vw + 12px, 22px);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--blood); color: var(--bone); }
.noscript { padding: 2rem; text-align: center; }

/* ---------- Global atmosphere ------------------------------------------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; opacity: 0.9; }
#glow {
  position: fixed; left: 0; top: 0; width: 70vmin; height: 70vmin; pointer-events: none; z-index: 6;
  border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 179, 71, 0.22) 0%, rgba(255, 140, 40, 0.08) 35%, transparent 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity 1.2s;
}
#lamp {
  position: fixed; left: 0; top: 0; width: 60px; height: 110px; pointer-events: none; z-index: 30; opacity: 0;
  transform-origin: 30px 36px; filter: drop-shadow(0 0 10px rgba(255, 180, 70, 0.55)); transition: opacity 0.5s;
  will-change: transform;
}
#lamp svg { width: 100%; height: 100%; overflow: visible; }
.lamp__flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 0.75s ease-in-out infinite alternate; transition: transform 0.3s; }
#lamp.is-hot .lamp__flame { animation-name: flicker-hot; }
@keyframes flicker-hot {
  0% { transform: scale(1.5, 1.7) rotate(-3deg); } 50% { transform: scale(1.4, 1.9) rotate(3deg); } 100% { transform: scale(1.6, 1.6) rotate(-2deg); }
}
#lamp.is-hidden { opacity: 0 !important; }
@media (hover: hover) and (pointer: fine) {
  body.has-pointer #glow { opacity: 1; }
  body.has-pointer #lamp { opacity: 1; }
  body.has-pointer, body.has-pointer * { cursor: none !important; }
  body.has-pointer input, body.has-pointer textarea { cursor: text !important; }
}
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%; pointer-events: none; z-index: 7;
  opacity: 0.045; background-repeat: repeat; background-size: 220px 220px;
  animation: grain 0.6s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(4%, -8%); }
  60% { transform: translate(-8%, -2%); } 80% { transform: translate(6%, 6%); } 100% { transform: translate(0, 0); }
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 8;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(3, 1, 4, 0.55) 80%, rgba(3, 1, 4, 0.95) 100%);
}
#flash { position: fixed; inset: 0; background: #e9ecff; opacity: 0; pointer-events: none; z-index: 9; mix-blend-mode: screen; }
#blackout { position: fixed; inset: 0; background: #020103; opacity: 0; pointer-events: none; z-index: 4; }
/* Each scene owns the black it fades to or from, so scrolling back up always reverses cleanly. */
.scene__black { position: absolute; inset: 0; background: #020103; pointer-events: none; z-index: 9; }
.scene__black--out { opacity: 0; }
.scene__black--in { opacity: 1; }

.sound {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 20;
  display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.8rem;
  background: rgba(11, 7, 9, 0.6); border: 1px solid rgba(200, 162, 74, 0.35); border-radius: 999px;
  color: var(--brass); font-family: var(--font-sc); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: lowercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.3s, color 0.3s;
}
.sound:hover, .sound[aria-pressed="true"] { border-color: var(--brass); color: var(--brass-light); }
.sound__icon { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; position: relative; }
.sound__icon::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: currentColor; opacity: 0; transition: opacity 0.3s; }
.sound[aria-pressed="true"] .sound__icon::after { opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.6); opacity: 0.5; } }

.skip {
  position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right)); z-index: 20;
  font-family: var(--font-sc); font-size: 0.65rem; letter-spacing: 0.12em; color: rgba(217, 199, 163, 0.55);
  text-decoration: none; padding: 0.4rem 0.6rem; opacity: 0; transition: opacity 0.6s, color 0.3s;
}
.skip.is-visible { opacity: 1; }
.skip:hover { color: var(--brass-light); }

/* ---------- Photographic scenes (uploaded in /admin) ---------------------- */
/* Graded like a cold silver-gelatin print: crushed blacks, steel shadows, lightning lifts the whole frame. */
.photo-scene {
  position: absolute; inset: -6%; display: none; background-size: cover; background-position: center; z-index: 0;
  filter: grayscale(1) contrast(1.3) brightness(calc(0.55 + var(--flash) * 1.4));
  will-change: transform, filter;
}
.photo-scene.is-colour { filter: saturate(0.4) contrast(1.2) brightness(calc(0.6 + var(--flash) * 1.3)); }
.has-photo .photo-scene { display: block; }
.photo-scene__tint { position: absolute; inset: 0; background: #22344f; mix-blend-mode: color; opacity: 0.55; }
.photo-scene::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(4, 6, 12, 0.55) 0%, rgba(4, 6, 12, 0.05) 35%, rgba(4, 6, 12, 0.1) 60%, rgba(3, 3, 6, 0.92) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(2, 3, 8, 0.7) 100%);
}
.scene--hero.has-photo .hero__moon, .scene--hero.has-photo .hero__clouds, .scene--hero.has-photo .hero__manor,
.scene--hero.has-photo .hero__trees, .scene--hero.has-photo .hero__mist, .scene--hero.has-photo .hero__stars { display: none; }
.scene--hero.has-photo { background: #06070c; }
.scene--road.has-photo .road__sky, .scene--road.has-photo .road__ground, .scene--road.has-photo .road__path,
.scene--road.has-photo .road__trees, .scene--road.has-photo .gate { display: none; }
.door__leaf.has-photo .door__planks, .door__leaf.has-photo .door__studs, .door__leaf.has-photo .door__hinge, .door__leaf.has-photo .door__window { display: none; }
.door__leaf.has-photo::before {
  content: ''; position: absolute; inset: 0; background: var(--door-photo) center / cover no-repeat;
  filter: saturate(0.5) contrast(1.15) brightness(0.8);
}
.door__leaf.has-photo.is-mono::before { filter: grayscale(1) contrast(1.3) brightness(0.75); }
.door__leaf.has-photo::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.8) 100%); }
.door__leaf.has-photo .plate { z-index: 1; }

/* ---------- Scenes ------------------------------------------------------- */
#story { position: relative; z-index: 1; }
.scene { position: relative; width: 100%; overflow: hidden; }
.scene--hero, .scene--letter, .scene--road, .scene--gallery, .scene--clock, .scene--dark { height: var(--vh); }

/* ---------- Typography helpers ------------------------------------------ */
.eyebrow, .hero__eyebrow, .parlour__eyebrow, .guestbook__eyebrow, .plate__label {
  font-family: var(--font-sc); letter-spacing: 0.32em; text-transform: uppercase; font-size: 0.7rem; color: var(--brass);
}

/* ==========================================================================
   SCENE 1 · HERO
   ========================================================================== */
.scene--hero { background: radial-gradient(ellipse at 50% 30%, #1b1426 0%, #0d0812 45%, var(--ink) 100%); }
.hero__sky { position: absolute; inset: 0; }
.hero__stars {
  position: absolute; inset: 0; opacity: 0.7;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 60%, transparent), radial-gradient(1px 1px at 28% 8%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 45% 22%, #fff 60%, transparent), radial-gradient(1px 1px at 63% 12%, #fff 60%, transparent),
    radial-gradient(1px 1px at 78% 26%, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 88% 9%, #fff 60%, transparent),
    radial-gradient(1px 1px at 8% 40%, #fff 60%, transparent), radial-gradient(1px 1px at 92% 38%, #fff 60%, transparent),
    radial-gradient(1px 1px at 35% 34%, #fff 60%, transparent), radial-gradient(1px 1px at 70% 40%, #fff 60%, transparent),
    radial-gradient(1px 1px at 52% 5%, #fff 60%, transparent), radial-gradient(1px 1px at 20% 30%, #fff 60%, transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: 0.35; } }
.hero__moon {
  position: absolute; width: clamp(220px, 34vw, 460px); left: 50%; top: 6%;
  filter: drop-shadow(0 0 40px rgba(246, 231, 184, 0.35));
}
.hero__clouds { position: absolute; inset: 0; overflow: hidden; }
.cloud {
  position: absolute; width: 60vw; height: 22vh; border-radius: 50%; filter: blur(30px); opacity: 0.55;
  background: radial-gradient(ellipse, rgba(60, 50, 80, 0.9), rgba(20, 15, 30, 0) 70%);
}
.cloud--a { top: 8%; left: -20%; animation: drift 70s linear infinite; }
.cloud--b { top: 22%; left: 40%; width: 80vw; animation: drift 95s linear infinite reverse; }
.cloud--c { top: 2%; left: 60%; animation: drift 120s linear infinite; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(120vw); } }
.bats { position: absolute; left: 0; top: 0; width: 100%; height: 40%; fill: #050308; }
.bat { transform-box: fill-box; transform-origin: center; animation: flap 0.28s ease-in-out infinite alternate; }
.bat--1 { animation-name: fly1; animation-duration: 18s; animation-timing-function: linear; animation-iteration-count: infinite; animation-direction: normal; }
.bat--2 { animation-name: fly2; animation-duration: 26s; animation-timing-function: linear; animation-iteration-count: infinite; animation-direction: normal; animation-delay: -9s; }
.bat--3 { animation-name: fly3; animation-duration: 22s; animation-timing-function: linear; animation-iteration-count: infinite; animation-direction: normal; animation-delay: -4s; }
.bat path { transform-box: fill-box; transform-origin: center; animation: flap 0.22s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleY(0.5); } to { transform: scaleY(1.3); } }
@keyframes fly1 { from { transform: translate(-10px, 22px) scale(0.5); } to { transform: translate(110px, 6px) scale(0.7); } }
@keyframes fly2 { from { transform: translate(110px, 10px) scale(0.35); } to { transform: translate(-15px, 30px) scale(0.45); } }
@keyframes fly3 { from { transform: translate(-10px, 30px) scale(0.6); } to { transform: translate(110px, 18px) scale(0.5); } }

.hero__mist { position: absolute; left: 0; right: 0; bottom: 18%; height: 45%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(120, 110, 150, 0.55) 0%, rgba(90, 80, 120, 0.3) 35%, rgba(40, 30, 60, 0) 70%); }
.hero__manor { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; filter: drop-shadow(0 -2px 6px rgba(0, 0, 0, 0.8)); }
.win { opacity: 0.12; }
.win--lit { opacity: 0.85; animation: winflicker 4s ease-in-out infinite; }
.win--lit:nth-child(2n) { animation-delay: -1.3s; }
.win--door { opacity: 0.4; fill: #ffcf6e; }
@keyframes winflicker { 0%, 100% { opacity: 0.85; } 40% { opacity: 0.55; } 55% { opacity: 0.95; } 70% { opacity: 0.4; } }
.hero__trees { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60%; }
.hero__trees--far { opacity: 0.85; height: 50%; }
.hero__trees--near { height: 70%; }
.hero__trees path { fill: none; stroke: #050308; stroke-linecap: round; }
.hero__trees--far path { stroke: #0c0810; }

.hero__content {
  position: absolute; left: 50%; top: 50%;
  width: min(92vw, 900px); text-align: center; z-index: 3; padding-bottom: 4vh;
}
.hero__eyebrow { margin: 0 0 1.2rem; opacity: 0; }
.hero__title {
  font-family: var(--font-gothic); font-weight: 500; margin: 0; line-height: 0.9;
  font-size: clamp(3.4rem, 14vw, 10rem); letter-spacing: 0.02em; color: var(--bone);
  text-shadow: 0 0 30px rgba(200, 162, 74, 0.25), 0 4px 30px rgba(0, 0, 0, 0.9);
}
.hero__title span { display: block; opacity: 0; }
.hero__date { margin: 1.6rem 0 0; display: grid; gap: 0.35rem; opacity: 0; }
.hero__date-line { font-style: italic; color: var(--parchment); font-size: clamp(1rem, 2.2vw, 1.4rem); }
.hero__date-num { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.35em; color: var(--brass); font-size: clamp(1rem, 2.4vw, 1.5rem); }

.hero__cue {
  position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 3; display: grid; justify-items: center; gap: 0.6rem; opacity: 0;
}
.hero__cue p { margin: 0; font-family: var(--font-sc); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(217, 199, 163, 0.7); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Candle component -------------------------------------------- */
.candle { position: relative; width: 22px; display: grid; justify-items: center; }
.candle__wax {
  width: 100%; height: 46px; border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #cbbfa5, #f3ead6 45%, #b9ad92);
  box-shadow: inset 0 -10px 12px -8px rgba(0, 0, 0, 0.5);
}
.candle__wax::after { content: ''; position: absolute; left: 3px; top: 4px; width: 6px; height: 16px; background: #f7f0e0; border-radius: 3px; opacity: 0.8; }
.candle__flame {
  width: 12px; height: 26px; margin-bottom: -2px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, #fff5d6 0%, #ffc95c 35%, #ff7a1a 70%, rgba(255, 60, 0, 0) 100%);
  box-shadow: 0 0 18px 6px rgba(255, 170, 60, 0.45), 0 0 60px 20px rgba(255, 140, 40, 0.15);
  transform-origin: 50% 100%; animation: flicker 0.9s ease-in-out infinite alternate;
}
@keyframes flicker {
  0% { transform: scale(1, 1) rotate(-2deg); } 30% { transform: scale(0.95, 1.08) rotate(2deg); }
  60% { transform: scale(1.05, 0.95) rotate(-1deg); } 100% { transform: scale(0.9, 1.1) rotate(3deg); }
}
.candle__smoke {
  position: absolute; left: 50%; bottom: 46px; width: 6px; height: 40px; opacity: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(180, 180, 190, 0.5), transparent); border-radius: 50%; filter: blur(3px);
}
.candle.is-out .candle__flame { animation: none; transform: scale(0); transition: transform 0.4s; }
.candle.is-out .candle__smoke { animation: smoke 2.4s ease-out forwards; }
@keyframes smoke { 0% { opacity: 0.8; transform: translate(-50%, 0) scaleX(1); } 100% { opacity: 0; transform: translate(-30%, -90px) scaleX(3); } }
.candle--tall .candle__wax { height: 110px; }
.candle--mid .candle__wax { height: 80px; }
.candle--short .candle__wax { height: 56px; }
.candle--tall .candle__smoke { bottom: 110px; } .candle--mid .candle__smoke { bottom: 80px; } .candle--short .candle__smoke { bottom: 56px; }

/* ==========================================================================
   SCENE 2 · THE LETTER
   ========================================================================== */
.scene--letter { background: radial-gradient(ellipse at 50% 60%, #1a1014 0%, var(--ink) 70%); }
.letter__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 4vh 4vw; }
.letter {
  position: relative; width: min(92vw, 640px); padding: clamp(1.6rem, 5vw, 3.2rem) clamp(1.4rem, 5vw, 3rem) clamp(3rem, 6vw, 4rem);
  color: #2a1d12; background: linear-gradient(160deg, #e9dcbd 0%, #d6c39a 50%, #c4ad80 100%);
  border-radius: 3px; transform: rotate(-1.2deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(120, 90, 40, 0.35), inset 0 0 6px rgba(0, 0, 0, 0.3);
  font-size: clamp(1rem, 1.3vw + 10px, 1.35rem); line-height: 1.55;
}
.letter::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0.35;
  background: radial-gradient(ellipse at 20% 10%, rgba(90, 60, 20, 0.35), transparent 40%), radial-gradient(ellipse at 90% 80%, rgba(90, 60, 20, 0.4), transparent 45%); }
.letter__burn { position: absolute; width: 120px; height: 120px; pointer-events: none;
  background: radial-gradient(circle at var(--bx, 0%) var(--by, 0%), var(--ink) 12%, #2a1208 22%, rgba(120, 70, 20, 0.55) 34%, rgba(150, 100, 40, 0.2) 48%, transparent 62%); }
.letter__burn--tl { left: -30px; top: -30px; --bx: 30%; --by: 30%; }
.letter__burn--br { right: -30px; bottom: -30px; --bx: 70%; --by: 70%; width: 170px; height: 170px; }
.letter__line { margin: 0 0 1em; opacity: 0; filter: blur(4px); transform: translateY(8px); }
.letter__salutation { font-family: var(--font-script); font-size: 2em; margin-bottom: 0.4em; }
.letter__closing { margin-top: 1.5em; margin-bottom: 0.2em; font-style: italic; }
.letter__signature { font-family: var(--font-script); font-size: 2.2em; line-height: 1; color: #3b1b1b; margin: 0; }
.seal {
  position: absolute; right: clamp(10px, 4vw, 40px); bottom: clamp(-18px, -2vw, -10px); width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; color: #f3c3b0; font-family: var(--font-display); font-weight: 900; font-size: 2rem;
  background: radial-gradient(circle at 35% 30%, #b8202e, #6d0f1a 60%, #3d0810 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55), inset 0 0 0 4px rgba(255, 120, 120, 0.15), inset 0 0 18px rgba(0, 0, 0, 0.6);
  transform: scale(0) rotate(-20deg); opacity: 0;
}
.seal::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 2px solid rgba(255, 170, 160, 0.25); }
.seal::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 6px dotted rgba(109, 15, 26, 0.7); }

/* ==========================================================================
   SCENE 3 · THE ROAD
   ========================================================================== */
.scene--road { background: var(--ink); }
.road__stage { position: absolute; inset: 0; overflow: hidden; perspective: 900px; }
.road__sky { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 62%, #5a4f6e 0%, #3a3048 22%, #1b1424 48%, #07050b 85%); }
.road__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; background: linear-gradient(to top, #0a0709, #1a1219 50%, rgba(42, 32, 48, 0) 100%); }
.road__path {
  position: absolute; left: 50%; bottom: 0; width: 140vw; height: 42%; transform: translateX(-50%);
  background: linear-gradient(to top, rgba(70, 58, 62, 0.9), rgba(40, 32, 38, 0.5) 60%, transparent);
  clip-path: polygon(0 100%, 100% 100%, 52% 0, 48% 0);
}
.road__trees { position: absolute; bottom: 0; height: 100%; width: 42vw; max-width: 520px; }
.road__trees path { fill: none; stroke: #050308; stroke-linecap: round; }
.road__trees--l1, .road__trees--l2, .road__trees--l3 { left: 0; transform-origin: 100% 100%; }
.road__trees--r1, .road__trees--r2, .road__trees--r3 { right: 0; transform-origin: 0% 100%; }
.road__trees--l2, .road__trees--r2 { opacity: 0.85; } .road__trees--l2 path, .road__trees--r2 path { stroke: #0a070d; }
.road__trees--l3, .road__trees--r3 { opacity: 0.7; } .road__trees--l3 path, .road__trees--r3 path { stroke: #100b14; }

.gate {
  position: absolute; left: 50%; bottom: 36%; width: min(78vw, 470px); aspect-ratio: 420 / 480; z-index: 3;
  transform-origin: 50% 100%; perspective: 800px;
}
.gate__pillar { position: absolute; bottom: 0; width: 15%; height: 88%; }
.gate__pillar svg { width: 100%; height: 100%; overflow: visible; }
.gate__pillar--l { left: -2%; } .gate__pillar--r { right: -2%; }
/* A second gate further down the avenue, half lost in the fog. */
.gate__far { position: absolute; left: 50%; bottom: 46%; width: 26%; height: 20%; transform: translateX(-50%); display: flex; align-items: flex-end; opacity: 0.5; filter: blur(1.4px); }
.gate__far-pillar { width: 14%; height: 100%; background: linear-gradient(90deg, #2a2430, #16121a); }
.gate__far-bars { flex: 1; height: 82%; background: repeating-linear-gradient(90deg, #1a1620 0 2px, transparent 2px 9px); border-top: 3px solid #1a1620; }
.fogbank { position: absolute; left: -10%; right: -10%; pointer-events: none; }
.fogbank--far { bottom: 38%; height: 22%; z-index: 0; background: linear-gradient(to top, rgba(150, 150, 168, 0.34), rgba(150, 150, 168, 0.1) 55%, transparent); filter: blur(16px); }
.fogbank--near { bottom: 0; height: 26%; z-index: 0; background: linear-gradient(to top, rgba(140, 142, 160, 0.28), rgba(140, 142, 160, 0.06) 65%, transparent); filter: blur(24px); }
.lantern { position: absolute; left: 50%; top: 4%; width: 22px; height: 30px; transform: translateX(-50%); background: rgba(20, 16, 20, 0.9); border: 2px solid #3a2f2a; border-radius: 3px 3px 5px 5px; }
.lantern::before { content: ''; position: absolute; left: 50%; top: -8px; width: 8px; height: 8px; transform: translateX(-50%); border: 2px solid #3a2f2a; border-radius: 50%; }
.lantern__flame { position: absolute; inset: 6px 5px; border-radius: 50%; background: radial-gradient(circle, #fff1c8, #ffb347 50%, rgba(255, 120, 30, 0) 80%);
  box-shadow: 0 0 20px 8px rgba(255, 170, 60, 0.4); animation: flicker 0.7s ease-in-out infinite alternate; }
.gate__arch { position: absolute; left: 10%; right: 10%; top: 4%; width: 80%; }
.gate__sign {
  position: absolute; left: 50%; top: 5.9%; width: 40%; transform: translateX(-50%);
  display: grid; place-items: center; pointer-events: none;
}
.gate__sign span {
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em;
  font-size: clamp(9px, 2.4cqw, 22px); color: #d9b356; text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}
.gate { container-type: inline-size; }
.gate__leaf { position: absolute; bottom: 2%; top: 22%; width: 36%; transform-style: preserve-3d; }
.gate__leaf--l { left: 14%; transform-origin: 0% 50%; }
.gate__leaf--r { right: 14%; transform-origin: 100% 50%; }
.gate__leaf svg { width: 100%; height: 100%; }
.gate__solid { fill: #030205; }
.gate__solid .spike { fill: #050308; }
.gate__iron { fill: none; stroke: #030205; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.gate__leaf svg { overflow: visible; }
.raven { position: absolute; left: 50%; top: 1.4%; width: 13%; transform: translateX(-190%); }
.raven__eye { animation: blink 4s steps(1) infinite; }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 94%, 98% { opacity: 0; } }

.road__text { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); width: min(90vw, 700px); text-align: center; z-index: 3; }
.road__line, .clock__line, .dark__whisper {
  position: absolute; left: 0; right: 0; margin: 0; opacity: 0; filter: blur(6px);
  font-size: clamp(1.3rem, 3.4vw, 2.2rem); font-style: italic; color: var(--parchment);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
}
.road__line--em, .clock__line--em, .dark__whisper--em { font-family: var(--font-display); font-style: normal; font-weight: 700; color: var(--brass-light); letter-spacing: 0.1em; }

/* ==========================================================================
   SCENE 4 · THE GALLERY
   ========================================================================== */
.scene--gallery { background: linear-gradient(to bottom, #120b0e, #1f1215 45%, #120b0e); }
.scene--gallery::before, .scene--gallery::after {
  content: ''; position: absolute; left: 0; right: 0; height: 10%; z-index: 2; pointer-events: none;
}
.scene--gallery::before { top: 0; background: linear-gradient(to bottom, #060305, transparent); }
.scene--gallery::after { bottom: 0; background: linear-gradient(to top, #060305, transparent); }
.gallery__stage {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 46px),
    radial-gradient(ellipse at 50% 100%, rgba(80, 30, 40, 0.35), transparent 60%),
    linear-gradient(to bottom, #1a0f13, #2a171c 60%, #16090d);
}
.gallery__stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18%;
  background: linear-gradient(to top, #050305, #1a1116 60%, #241a1f); border-top: 3px solid #3a2a2a; }
.gallery__wall { position: absolute; left: 0; top: 0; height: 100%; display: flex; align-items: center; gap: clamp(2rem, 8vw, 7rem); padding: 0 8vw; will-change: transform; }
.gallery__intro { flex: 0 0 auto; width: min(80vw, 420px); }
.gallery__intro h2 { font-family: var(--font-gothic); font-weight: 500; font-size: clamp(2.6rem, 7vw, 5rem); margin: 0 0 0.6rem; color: var(--bone); }
.gallery__intro p { margin: 0; font-style: italic; color: var(--parchment); }
.portrait { flex: 0 0 auto; position: relative; margin: 0; width: clamp(220px, 44vw, 300px); display: grid; justify-items: center; }
.sconce { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 14px; height: 24px; background: linear-gradient(#7d5f21, #3a2a10); border-radius: 0 0 8px 8px; z-index: 2; }
.sconce__flame { position: absolute; left: 50%; top: -20px; width: 12px; height: 22px; transform: translateX(-50%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, #fff5d6 0%, #ffc95c 35%, #ff7a1a 70%, rgba(255, 60, 0, 0) 100%);
  box-shadow: 0 0 20px 8px rgba(255, 170, 60, 0.35), 0 0 90px 40px rgba(255, 140, 40, 0.12); transform-origin: 50% 100%; animation: flicker 0.8s ease-in-out infinite alternate; }
.frame {
  width: 100%; aspect-ratio: 200 / 260; padding: 14px; position: relative;
  background: linear-gradient(135deg, #b48a2e, #5d4212 30%, #e0bd5c 50%, #5d4212 70%, #b48a2e);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.7), inset 0 0 0 3px #2a1c08, inset 0 0 0 6px #8b6a25;
  border-radius: 4px;
}
.frame::before { content: ''; position: absolute; inset: 6px; border: 2px dotted rgba(255, 220, 140, 0.35); pointer-events: none; }
.frame svg, .frame__void { width: 100%; height: 100%; background: radial-gradient(ellipse at 50% 35%, #3a2a2e, #14090c 75%); box-shadow: inset 0 0 40px #000; }
.frame__void { display: grid; place-items: center; font-family: var(--font-display); font-size: 4rem; color: rgba(217, 199, 163, 0.18); }
.portrait--empty .frame::after { content: ''; position: absolute; inset: 14px; background: linear-gradient(135deg, transparent 40%, rgba(200, 162, 74, 0.08) 50%, transparent 60%); animation: shimmer 3s linear infinite; }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.portrait figcaption { margin-top: 1rem; text-align: center; display: grid; gap: 0.15rem; }
.portrait figcaption strong { font-family: var(--font-sc); font-weight: 400; letter-spacing: 0.08em; color: var(--brass-light); font-size: 0.95em; }
.portrait figcaption span { font-style: italic; font-size: 0.8em; color: rgba(217, 199, 163, 0.75); }
.portrait .eye { fill: #f5e9c8; }
.portrait .pupil { fill: #0b0709; }
.portrait .iris { fill: #6b1a1a; }
.portrait .glint { fill: #fff; opacity: 0.8; }

/* Real guests hung among the family */
.gallery__guests { display: contents; }
.frame .photo {
  width: 100%; height: 100%; position: relative; background-size: cover; background-position: center top;
  filter: sepia(0.7) contrast(1.05) brightness(0.72) saturate(0.85);
}
.frame .photo::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(20, 8, 6, 0.75) 100%); }
.frame .photo::after {
  content: ''; position: absolute; inset: 0; mix-blend-mode: overlay; opacity: 0.35;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 7px), repeating-linear-gradient(25deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 5px);
}
.portrait--guest .frame { animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.012); } }
.blank { display: inline-block; width: 3em; height: 0.75em; border-bottom: 1px solid currentColor; opacity: 0.6; vertical-align: baseline; }

/* ==========================================================================
   SCENE 5 · THE CLOCK
   ========================================================================== */
.scene--clock { background: radial-gradient(ellipse at 50% 70%, #1c1216 0%, var(--ink) 65%); }
.clock__stage { position: absolute; inset: 0; display: grid; place-items: center; }
.clock__face { width: min(70vw, 52vh, 460px); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.8)); transform: translateY(6%); }
.clock__hand { transform-origin: 200px 200px; }
.clock__ticks line { stroke-width: 2; }
.clock__candles { position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: clamp(28px, 10vw, 70px); z-index: 2; }
.clock__candles .candle { width: 16px; }
.clock__text { position: absolute; left: 50%; top: 10%; transform: translateX(-50%); width: min(90vw, 700px); text-align: center; z-index: 3; }

/* ==========================================================================
   INTERLUDE · DARKNESS
   ========================================================================== */
.scene--dark { background: #020103; display: grid; place-items: center; }
.dark__whisper { text-align: center; padding: 0 6vw; color: rgba(217, 199, 163, 0.85); font-size: clamp(1.2rem, 3vw, 1.9rem); }
.dark__whisper--em { color: var(--brass-light); font-size: clamp(1.1rem, 2.6vw, 1.7rem); }

/* ==========================================================================
   SCENE 6 · THE DOOR
   ========================================================================== */
.scene--door { min-height: var(--vh); background: radial-gradient(ellipse at 50% 100%, #1a1114 0%, #070406 60%); padding: 8vh 0 10vh; }
.door__stage { position: relative; display: grid; place-items: center; min-height: calc(var(--vh) - 18vh); perspective: 1400px; }
.door__light { position: absolute; left: 50%; top: 50%; width: min(88vw, 520px); height: min(80vh, 680px); transform: translate(-50%, -52%);
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 190, 90, 0.9) 0%, rgba(255, 140, 40, 0.5) 30%, rgba(120, 50, 10, 0.2) 60%, transparent 75%);
  opacity: 0; filter: blur(10px); pointer-events: none; z-index: 1; }
.butler { position: absolute; left: 50%; bottom: 8%; width: min(36vw, 200px); margin-left: calc(min(36vw, 200px) / -2); transform: translateY(20px); opacity: 0; pointer-events: none; z-index: 1; }
.butler__eye { animation: blink 5s steps(1) infinite; }
.cflame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 0.7s ease-in-out infinite alternate; }

.door { position: relative; width: min(86vw, 440px); aspect-ratio: 440 / 660; transform-style: preserve-3d; }
.door::before { content: ''; position: absolute; inset: -18px -22px -8px; border-radius: 240px 240px 0 0;
  background: linear-gradient(#3a3036, #1e181c); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8), inset 0 0 0 4px #15101a, inset 0 0 40px #000; z-index: 0; }
.door::after { content: ''; position: absolute; inset: 0; border-radius: 220px 220px 0 0; background: #020103; z-index: 0; }
.door__leaf {
  position: absolute; inset: 0; border-radius: 220px 220px 0 0; overflow: hidden; z-index: 2; transform-origin: 0% 50%;
  background: linear-gradient(90deg, #3b2213, #4e2e1a 20%, #3a2112 40%, #54321c 60%, #3b2213 80%, #4a2b18);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), inset 0 0 0 6px #22130a, 0 20px 50px rgba(0, 0, 0, 0.7);
  transform-style: preserve-3d; transition: transform 2.6s cubic-bezier(0.5, 0, 0.2, 1);
  will-change: transform;
}
.door.is-open .door__leaf { transform: rotateY(-108deg); }
.door.is-shaking { animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake { 10%, 90% { transform: translate3d(-2px, 0, 0); } 20%, 80% { transform: translate3d(4px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-7px, 0, 0); } 40%, 60% { transform: translate3d(7px, 0, 0); } }
.door__planks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 5 - 3px), rgba(0, 0, 0, 0.55) calc(100% / 5 - 3px) calc(100% / 5)),
  repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0 3px, transparent 3px 9px); opacity: 0.9; }
.door__hinge { position: absolute; left: 0; width: 34%; height: 22px; background: linear-gradient(#3a3438, #141014); clip-path: polygon(0 0, 100% 40%, 100% 60%, 0 100%); }
.door__hinge--top { top: 34%; } .door__hinge--bottom { top: 84%; }
.door__studs { position: absolute; inset: 24px; border-radius: 200px 200px 0 0; border: 4px dotted rgba(60, 50, 55, 0.9); pointer-events: none; }
.door__window { position: absolute; left: 50%; top: 11%; width: 30%; aspect-ratio: 1 / 1.3; transform: translateX(-50%); border-radius: 50% 50% 4px 4px;
  background: #060306; box-shadow: inset 0 0 20px #000, 0 0 0 5px #201410; }
.door__window::before, .door__window::after { content: ''; position: absolute; background: #2a2226; }
.door__window::before { left: 50%; top: 0; bottom: 0; width: 4px; transform: translateX(-50%); }
.door__window::after { left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%); }
.door__eyes { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); display: flex; gap: 14px; opacity: 0; transition: opacity 1s; }
.door.is-watching .door__eyes { opacity: 1; }
.door__eyes i { width: 6px; height: 6px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 8px 2px rgba(255, 179, 71, 0.7); animation: blink 6s steps(1) infinite; }

.plate {
  position: absolute; left: 50%; top: 40%; width: 80%; transform: translateX(-50%); display: grid; justify-items: center; gap: 0.7rem;
  padding: 1.1rem 0.8rem 1rem; border-radius: 6px;
  background: linear-gradient(160deg, #d9b356, #8a6a25 40%, #c9a24a 65%, #6f5320);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), inset 0 0 0 2px #4a370f, inset 0 0 0 4px rgba(255, 230, 160, 0.35), inset 0 0 20px rgba(0, 0, 0, 0.3);
}
.plate::before, .plate::after { content: ''; position: absolute; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2c2, #6f5320); box-shadow: 0 1px 2px #000; }
.plate::before { left: 8px; } .plate::after { right: 8px; }
.plate__label { color: #2a1d08; margin: 0; font-size: 0.62rem; letter-spacing: 0.28em; }
.plate__slots { display: flex; gap: clamp(4px, 1.4vw, 8px); }
.slot {
  width: clamp(30px, 9vw, 44px); height: clamp(40px, 12vw, 56px); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 4.5vw, 1.7rem); color: #2a1d08;
  background: linear-gradient(#5b4415, #2b1f08); border-radius: 3px;
  box-shadow: inset 0 2px 6px #000, 0 1px 0 rgba(255, 230, 160, 0.4); color: var(--brass-light); text-shadow: 0 0 8px rgba(255, 210, 120, 0.5);
  position: relative; user-select: none;
}
.slot::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: 6px; height: 2px; background: rgba(232, 207, 122, 0.4); opacity: 0; }
.plate.is-focused .slot.is-active::after { opacity: 1; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.slot.is-filled { animation: stamp 0.35s var(--ease-out); }
@keyframes stamp { 0% { transform: scale(1.5); text-shadow: 0 0 30px #ffd27a; } 100% { transform: scale(1); } }
.plate.is-wrong .slot { color: #ff6b6b; text-shadow: 0 0 10px rgba(255, 60, 60, 0.7); }
.plate.is-right .slot { color: #b7ffb0; text-shadow: 0 0 12px rgba(120, 255, 120, 0.7); }
.plate__input { position: absolute; opacity: 0; width: 1px; height: 1px; left: 50%; top: 50%; pointer-events: none; }
.keyhole { width: 22px; height: 30px; position: relative; margin-top: 0.2rem; }
.keyhole__hole { position: absolute; left: 50%; top: 0; width: 14px; height: 14px; transform: translateX(-50%); border-radius: 50%; background: #0b0709; box-shadow: inset 0 0 6px #000; }
.keyhole__hole::after { content: ''; position: absolute; left: 50%; top: 8px; width: 6px; height: 18px; transform: translateX(-50%); background: #0b0709; clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.plate.is-right .keyhole { animation: keyturn 1.1s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
@keyframes keyturn {
  0% { transform: rotate(0); } 18% { transform: rotate(-6deg); } 30% { transform: rotate(20deg); }
  46% { transform: rotate(16deg); } 70% { transform: rotate(86deg); } 100% { transform: rotate(90deg); }
}
.plate__hint { margin: 0; font-size: 0.72rem; color: #2a1d08; text-align: center; font-style: italic; min-height: 1.2em; line-height: 1.25; }
.plate.is-wrong .plate__hint { color: #5a0d0d; }

.knocker { position: relative; width: 74px; height: 74px; border: 0; background: none; padding: 0; margin: 0.4rem 0 1.3rem; display: grid; justify-items: center; }
.knocker__ring {
  width: 54px; height: 54px; border-radius: 50%; border: 9px solid #a8862f; transform-origin: 50% 0;
  background: transparent; box-shadow: 0 6px 10px rgba(0, 0, 0, 0.6), inset 0 0 0 2px #4a370f; transition: transform 0.2s;
  border-image: none; background-clip: padding-box;
}
.knocker::before { content: ''; position: absolute; left: 50%; top: -10px; width: 26px; height: 22px; transform: translateX(-50%); border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 40% 30%, #e3c063, #6f5320); box-shadow: 0 2px 4px #000; }
.knocker__label { position: absolute; bottom: -1.3rem; font-family: var(--font-sc); font-size: 0.62rem; letter-spacing: 0.3em; color: #2a1d08; }
.knocker:hover .knocker__ring { transform: rotate(-12deg); }
.knocker.is-knocking .knocker__ring { animation: knock 0.5s ease-in-out; }
@keyframes knock { 0% { transform: rotate(-35deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
.knocker:disabled { opacity: 0.6; cursor: wait; }

/* ==========================================================================
   SCENE 7 · THE PARLOUR (RSVP)
   ========================================================================== */
.scene--parlour { background: radial-gradient(ellipse at 50% 0%, #2a1a12 0%, #140c0d 45%, var(--ink) 100%); padding: 10vh 0 14vh; }
.scene--parlour[hidden] { display: none; }
.parlour__stage { width: min(92vw, 720px); margin: 0 auto; }
.parlour__head { text-align: center; margin-bottom: 3rem; }
.parlour__eyebrow { margin: 0 0 1rem; }
.parlour__title { font-family: var(--font-display); font-size: clamp(1.7rem, 5.5vw, 3rem); margin: 0 0 1rem; color: var(--bone); line-height: 1.15; }
.parlour__lede { margin: 0 auto; max-width: 56ch; color: var(--parchment); font-style: italic; }
.parlour__lede strong { color: var(--brass-light); font-style: normal; font-family: var(--font-sc); font-weight: 400; letter-spacing: 0.05em; }

.rsvp { display: grid; gap: 1.6rem; }
.rsvp__guests { display: grid; gap: 1rem; }
.guest {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem; padding: 1rem 1.2rem;
  background: linear-gradient(160deg, rgba(217, 199, 163, 0.07), rgba(217, 199, 163, 0.02)); border: 1px solid rgba(200, 162, 74, 0.25); border-radius: 6px;
  transition: border-color 0.4s, background 0.4s, transform 0.2s;
  cursor: pointer; user-select: none;
}
.guest:hover { border-color: rgba(232, 207, 122, 0.5); }
.guest:active { transform: scale(0.99); }
.guest:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.guest__hint { grid-column: 1 / -1; margin: 0; font-size: 0.72rem; font-style: italic; color: rgba(217, 199, 163, 0.4); }
.guest.is-attending { border-color: rgba(232, 207, 122, 0.6); background: linear-gradient(160deg, rgba(255, 179, 71, 0.12), rgba(217, 199, 163, 0.03)); }
.guest__candle { width: 48px; height: 96px; display: grid; align-items: end; justify-items: center; background: none; border: 0; padding: 0 0 4px; position: relative; }
.guest__candle .candle { width: 18px; }
.guest__candle .candle__wax { height: 60px; }
.guest__candle .candle__smoke { bottom: 60px; }
.guest__name { display: grid; gap: 0.15rem; }
.guest__name strong { font-family: var(--font-sc); font-weight: 400; font-size: 1.15em; letter-spacing: 0.05em; color: var(--bone); }
.guest__name span { font-style: italic; font-size: 0.85em; color: rgba(217, 199, 163, 0.7); }
.guest__toggle { display: grid; gap: 0.35rem; }
.guest__toggle label { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-sc); font-size: 0.75rem; letter-spacing: 0.1em; cursor: pointer; color: rgba(217, 199, 163, 0.7); }
.guest__toggle input { appearance: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--brass); margin: 0; position: relative; }
.guest__toggle input:checked { background: var(--brass); box-shadow: 0 0 10px rgba(232, 207, 122, 0.6); }
.guest__toggle input:checked + span { color: var(--brass-light); }
@media (max-width: 480px) {
  .guest { grid-template-columns: auto 1fr; }
  .guest__toggle { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}

.rsvp__tip { margin: -0.8rem 0 0; text-align: center; font-size: 0.78rem; font-style: italic; color: rgba(217, 199, 163, 0.45); }
.rsvp__field { display: grid; gap: 0.5rem; }
.rsvp__field label { font-family: var(--font-sc); font-size: 0.75rem; letter-spacing: 0.18em; color: var(--brass); }
.rsvp__field textarea {
  width: 100%; resize: vertical; padding: 0.8rem 1rem; border-radius: 4px; background: rgba(233, 220, 189, 0.06);
  border: 1px solid rgba(200, 162, 74, 0.3); color: var(--bone); font-style: italic; outline: none; transition: border-color 0.3s, box-shadow 0.3s;
}
.rsvp__field textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.15); }
.rsvp__field textarea::placeholder { color: rgba(217, 199, 163, 0.35); }
.rsvp__status { margin: 0; min-height: 1.5em; text-align: center; font-style: italic; color: var(--brass-light); }
.rsvp__status.is-error { color: #ff8a8a; }

.quill-btn {
  justify-self: center; position: relative; padding: 1rem 2.6rem; border: 1px solid var(--brass); border-radius: 2px; background: transparent;
  font-family: var(--font-sc); letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.8rem; color: var(--brass-light);
  transition: background 0.4s, color 0.4s, box-shadow 0.4s; overflow: hidden;
}
.quill-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(232, 207, 122, 0.25), transparent); transform: translateX(-100%); transition: transform 0.8s; }
.quill-btn:hover::before { transform: translateX(100%); }
.quill-btn:hover { box-shadow: 0 0 30px rgba(200, 162, 74, 0.25); }
.quill-btn:disabled { opacity: 0.6; cursor: wait; }

.guestbook { display: grid; place-items: center; }
.guestbook[hidden] { display: none; }
.guestbook__page {
  width: min(92vw, 560px); padding: clamp(1.6rem, 5vw, 3rem); text-align: center; color: #2a1d12; transform: rotate(0.8deg);
  background: linear-gradient(160deg, #e9dcbd 0%, #d6c39a 50%, #c4ad80 100%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(120, 90, 40, 0.35);
}
.guestbook__eyebrow { color: #6b4a1a; margin: 0 0 1rem; }
.guestbook__names { font-family: var(--font-script); font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.2; margin: 0 0 0.8rem; color: #3b1b1b; }
.guestbook__note { margin: 0 0 1.2rem; font-style: italic; }
.guestbook__date { margin: 0 0 1rem; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.3em; color: #6d0f1a; font-size: 0.9rem; }
.guestbook__more { margin: 0 0 1.4rem; font-size: 0.9em; font-style: italic; color: #4a3520; }
.link-btn { background: none; border: 0; padding: 0.3rem 0.6rem; font-family: var(--font-sc); font-size: 0.7rem; letter-spacing: 0.2em; color: #6d0f1a; text-decoration: underline; text-underline-offset: 4px; }

.colophon { text-align: center; padding: 3rem 1rem 4rem; font-family: var(--font-sc); font-size: 0.7rem; letter-spacing: 0.3em; color: rgba(217, 199, 163, 0.35); background: var(--ink); }
.colophon p { margin: 0; }

/* ---------- Reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .cloud, .bat, .bat path, .hero__cue p { animation: none !important; }
  .door__leaf { transition-duration: 0.6s; }
}

/* ---------- Small screens ------------------------------------------------ */
@media (max-width: 640px) {
  .hero__moon { top: 10%; }
  .hero__trees--near { height: 50%; }
  .hero__trees--far { height: 40%; }
  .hero__content { padding-bottom: 8vh; }
  .letter { transform: rotate(-0.6deg); }
  .clock__text { top: 7%; }
  .clock__candles { bottom: 5%; }
  .sound__label { display: none; }
  .sound { padding: 0.5rem; }
  .skip { font-size: 0.6rem; }
}
