/* ═══════════════════════════════════════════════════════════════════════
   Estate Reserve — Vineyard Romance Wedding · Save-the-Date Flyer
   Wine tones · dusk vineyard scene · paper wine label · gold accents
   Cormorant Garamond + Great Vibes (script) + Jost (UI)

   Structure:
     1. Design tokens & fonts
     2. Base / reset
     3. App shell (single-viewport, one active panel) + no-JS fallback
     4. Floating actions (copy link / calendar)
     5. Panel rail (generated by main.js)
     6. Panel 1 · poster scene (sky, sun, birds, hills, grain)
     7. Panel 1 · poster label (the wine label)
     8. Countdown tiles (self-driven ceremony countdown)
     9. Photo chip (optional slot)
     9b. Our Moments (optional panel)
     9c. Zoom badges, banner, film (optional photo/video features)
    10. Panels 2–4 · shared paper ground (heads, timeline, venues, notes)
    11. RSVP form + RSVP deadline strip + injected states
    12. Guestbook injected markup
    13. Personalisation
    14. Reveals
    15. Reduced motion
    16. Print
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. tokens & fonts ───────────────────────────────────────────────── */
:root {
  --wine-deep: #3c131d;
  --wine: #5b1f2b;
  --wine-mid: #7e2b3c;
  --merlot: #a2444d;
  --rose: #c97a74;
  --blush: #f0d9cf;
  --cream: #faf3e7;
  --cream-deep: #f1e5d2;
  --ink: #2b1a1e;
  --ink-soft: #553a3f;
  --muted: #8a6f6a;
  --gold: #b98d3e;
  --gold-bright: #d4af5f;
  --gold-deep: #8a6426;
  --sage: #7b8768;
  --danger: #b0402f;
  --line: rgba(43, 26, 30, 0.14);
  --line-gold: rgba(185, 141, 62, 0.45);
  --shadow: 0 30px 70px rgba(30, 8, 14, 0.45);
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-script: "Great Vibes", "Snell Roundhand", "Segoe Script", cursive;
  --font-ui: "Jost", ui-sans-serif, system-ui, sans-serif;
}

/* ── 2. base ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--wine-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--gold); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* hidden inline SVG sprite */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ── 3. single-viewport shell (JS on) ────────────────────────────────── */
/* default (no-JS / print): panels stack; each is its own viewport and
   position: relative keeps absolutely-positioned art (the scene) anchored
   inside its own panel instead of over the whole page. */
.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

html.js .app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.js .panel-stack {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

html.js .panel { display: none; min-height: 0; }

html.js .panel.is-active {
  display: block;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* the poster panel scrolls its .poster, keeping the scene fixed behind */
html.js .panel-poster.is-active {
  display: flex;
  overflow: hidden;
  min-height: 0;
}
html.js .panel-poster .poster {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── no-JS fallback: everything stacked, page scrolls ────────────────── */
html:not(.js) .app { display: block; height: auto; }
html:not(.js) .panel { display: block; height: auto; min-height: 100vh; min-height: 100dvh; }
html:not(.js) .panel-poster .poster { overflow: visible; min-height: 0; }
html:not(.js) .panel-nav,
html:not(.js) .float-actions,
html:not(.js) .live-region { display: none; }
/* without JS the fixed scene has no scroll partner — drop it so the
   paper label sits cleanly on the dusk gradient and every panel below
   stays fully readable (paint-order safe). */
html:not(.js) .scene,
html:not(.js) .grain { display: none !important; }

/* ── 4. floating actions ─────────────────────────────────────────────── */
.float-actions {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  right: 12px;
  z-index: 40;
  display: flex;
  gap: 8px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-gold);
  background: rgba(250, 243, 231, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--wine-deep);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 18px rgba(30, 8, 14, 0.25);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.chip-btn:hover {
  transform: translateY(-1px);
  background: var(--cream);
  box-shadow: 0 8px 22px rgba(30, 8, 14, 0.32);
}
.chip-btn svg { flex: none; opacity: 0.85; }
.chip-btn.is-done { color: var(--wine); border-color: var(--gold); }

/* ── 5. panel rail ───────────────────────────────────────────────────── */
/* Fixed pill bar, auto-built by main.js from whatever .panel elements
   survive platform processing. The track scrolls horizontally; when it
   overflows (e.g. on phones with the optional Free page), main.js shows
   the prev/next chevron buttons so every section stays reachable. */
.panel-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(44px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border-radius: 999px;
  background: rgba(43, 16, 22, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(20, 5, 10, 0.4);
}

.panel-nav__track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.panel-nav__track::-webkit-scrollbar { display: none; }

.pn-scroll {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(250, 243, 231, 0.28);
  background: transparent;
  color: rgba(250, 243, 231, 0.85);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.pn-scroll:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pn-scroll:disabled { opacity: 0.35; cursor: default; }
.pn-scroll[hidden] { display: none; }

.panel-nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(250, 243, 231, 0.82);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, color 0.18s ease;
}
.panel-nav-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.panel-nav-btn[aria-selected="true"] {
  background: var(--gold);
  color: var(--wine-deep);
  font-weight: 600;
}
.pn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}
.panel-nav-btn[aria-selected="true"] .pn-dot { opacity: 0.9; }

/* keep scrollable content clear of the floating rail + powered-by strip */
html.js .panel-scroll { padding-bottom: 132px; }
html.js .poster { padding-bottom: 128px; }

/* ── 6. poster scene ─────────────────────────────────────────────────── */
.panel-poster {
  background:
    radial-gradient(120% 70% at 50% 108%, var(--blush) 0%, transparent 62%),
    linear-gradient(180deg, var(--wine-deep) 0%, var(--wine) 26%, var(--merlot) 52%, #d97a63 72%, #f0a478 86%, #f8d5ae 96%);
}

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.sun {
  position: absolute;
  left: 24%;
  bottom: 30%;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #ffe9c4 0%, #fbd9a8 42%, rgba(251, 217, 168, 0) 70%);
  box-shadow: 0 0 90px 46px rgba(251, 205, 150, 0.5);
}
@media (max-width: 560px) {
  .sun { width: 96px; height: 96px; left: 18%; bottom: 36%; box-shadow: 0 0 60px 30px rgba(251, 205, 150, 0.45); }
}

.birds {
  position: absolute;
  right: 16%;
  bottom: 40%;
  width: 120px;
  z-index: 1;
}

.hills {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.foreground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(46, 15, 22, 0) 0%, rgba(46, 15, 22, 0.85) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.05'/></svg>");
}

/* ── 7. poster label ─────────────────────────────────────────────────── */
.poster {
  position: relative;
  z-index: 3;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: 70px 14px 0;
}

.label {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  padding: 38px clamp(22px, 6vw, 48px) 32px;
  text-align: center;
  background: rgba(250, 243, 231, 0.94);
  border: 1px solid var(--gold);
  box-shadow: var(--shadow);
}

/* the wine-label double frame */
.label::before,
.label::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  bottom: 8px;
  border: 1px solid rgba(185, 141, 62, 0.55);
  pointer-events: none;
}
.label::after {
  left: 13px;
  right: 13px;
  top: 13px;
  bottom: 13px;
  border-color: rgba(185, 141, 62, 0.22);
}

.label__corner {
  position: absolute;
  width: 26px;
  height: 26px;
  z-index: 1;
}
.label__corner--tl { top: 3px; left: 3px; border-top: 2px solid var(--gold-bright); border-left: 2px solid var(--gold-bright); }
.label__corner--tr { top: 3px; right: 3px; border-top: 2px solid var(--gold-bright); border-right: 2px solid var(--gold-bright); }
.label__corner--bl { bottom: 3px; left: 3px; border-bottom: 2px solid var(--gold-bright); border-left: 2px solid var(--gold-bright); }
.label__corner--br { bottom: 3px; right: 3px; border-bottom: 2px solid var(--gold-bright); border-right: 2px solid var(--gold-bright); }

.label__head { margin-bottom: 4px; }

.label__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.label__eyebrow .rule {
  flex: none;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
@media (max-width: 480px) {
  .label__eyebrow { letter-spacing: 0.3em; }
  .label__eyebrow .rule { width: 34px; }
}

.label__vintage {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--merlot);
  letter-spacing: 0.18em;
}

.label__save {
  margin: 22px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--wine-mid);
}

.label__names {
  margin: 10px 0 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(46px, 10vw, 66px);
  line-height: 1.12;
  color: var(--wine);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.28em;
  flex-wrap: wrap;
}
.label__amp {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 0.42em;
  color: var(--gold);
}

.label__vine {
  width: 200px;
  margin: 12px auto 0;
  color: var(--gold-deep);
}
.label__vine svg { width: 100%; height: auto; display: block; }

.label__tagline {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-soft);
}

.label__date {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--wine);
  line-height: 1.35;
}

.label__place {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.label__foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(185, 141, 62, 0.4);
}
.label__follow {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.label__hashtag {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ── 8. countdown tiles (ceremony — self-driven) ─────────────────────── */
.countdown-tiles__label {
  margin: 18px 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
}

.tile {
  padding: 10px 4px 8px;
  border: 1px solid rgba(91, 31, 43, 0.22);
  border-radius: 10px;
  background: rgba(91, 31, 43, 0.05);
}
.tile-num {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  color: var(--wine);
  font-variant-numeric: tabular-nums;
}
.tile-cap {
  display: block;
  margin-top: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown-tiles.is-here .tiles { display: none; }
.countdown-tiles__here {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--merlot);
}

/* ── 9. photo chip (optional slot) ───────────────────────────────────── */
.photo-chip {
  position: relative;
  width: min(236px, 76%);
  margin: 20px auto 0;
  padding: 9px 9px 11px;
  background: #fffdf6;
  border-radius: 3px;
  box-shadow: 0 14px 30px rgba(60, 19, 29, 0.35);
  transform: rotate(-1.6deg);
}
.photo-chip__tape {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 74px;
  height: 18px;
  background: rgba(212, 175, 95, 0.65);
  box-shadow: 0 1px 3px rgba(60, 19, 29, 0.25);
}
.photo-chip__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  background: var(--cream-deep);
}
.photo-chip__note {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  color: var(--muted);
}
/* the polaroid is a photo slot — it opens full-screen in the lightbox */
.photo-chip {
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.photo-chip:hover,
.photo-chip:focus-visible {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 18px 38px rgba(60, 19, 29, 0.42);
}
.photo-chip:focus-visible { outline-offset: 6px; }

/* gentle zoom badge — whispers "tap me" on every photo slot */
.photo-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--cream);
  background: rgba(43, 16, 22, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  box-shadow: 0 3px 10px rgba(43, 16, 22, 0.35);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 2;
}
.photo-chip:hover .photo-zoom,
.photo-chip:focus-visible .photo-zoom,
.gallery-card:hover .photo-zoom,
.gallery-card:focus-visible .photo-zoom,
.free-figure:hover .photo-zoom,
.free-figure:focus-visible .photo-zoom,
.banner-open:hover .photo-zoom,
.banner-open:focus-visible .photo-zoom {
  opacity: 1;
  transform: none;
}
/* touch devices have no hover — keep the badge gently visible */
@media (hover: none) {
  .photo-zoom { opacity: 0.85; transform: none; }
}

/* ── 9b. our moments (optional panel) ───────────────────────────────── */
.gallery-hero { margin-bottom: clamp(14px, 2.4vw, 22px); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 22px);
  align-items: start;
}
.gallery-card {
  margin: 0;
  padding: 8px 8px 11px;
  position: relative;
  background: #fffdf6;
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(60, 19, 29, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-card:nth-child(odd) { transform: rotate(-0.8deg); }
.gallery-card:nth-child(even) { transform: rotate(0.9deg); }
.gallery-card:hover,
.gallery-card:focus-visible {
  transform: none;
  box-shadow: 0 18px 38px rgba(60, 19, 29, 0.28);
  cursor: zoom-in;
}
.gallery-card:focus-visible { outline-offset: 5px; }
.gallery-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  background: var(--cream-deep);
}
.gallery-card__note {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  color: var(--muted);
}
.gallery-card--hero {
  grid-column: 1 / -1;
  position: relative;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  transform: none;
}
.gallery-card--hero .gallery-photo { aspect-ratio: 21 / 9; }
.gallery-card--hero .photo-zoom {
  top: 14px;
  bottom: auto;
}
.gallery-card--hero .gallery-card__note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 30px 16px 12px;
  text-align: left;
  font-size: 14.5px;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(44, 12, 20, 0) 0%, rgba(44, 12, 20, 0.72) 100%);
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card--hero .gallery-photo { aspect-ratio: 4 / 3; }
}

/* ── 9d. free page (optional host-defined panel) ─────────────────────── */
/* A host-defined page of repeatable free blocks (title + text + optional
   photo). The platform removes the whole section when every block is left
   empty, so the panel and its rail button disappear together; the photo is
   optional — a block renders as title + text alone. The photo, when set,
   opens full-screen in the lightbox with zoom (main.js). */
.free-blocks {
  display: grid;
  gap: 18px;
}
.free-block {
  margin: 0;
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  background: rgba(250, 243, 231, 0.94);
  box-shadow: 0 14px 34px rgba(60, 19, 29, 0.12);
}
.free-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 27px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--wine);
}
.free-content {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.free-content p { margin: 0 0 0.6em; }
.free-content p:last-child { margin-bottom: 0; }
.free-figure {
  position: relative;
  margin: 18px auto 0;
  max-width: 460px;
  padding: 8px 8px 11px;
  background: #fffdf6;
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(60, 19, 29, 0.18);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.free-figure:hover,
.free-figure:focus-visible {
  transform: none;
  box-shadow: 0 18px 38px rgba(60, 19, 29, 0.28);
}
.free-figure:focus-visible { outline-offset: 5px; }
.free-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  background: var(--cream-deep);
}
.free-cap {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

/* ── 9c. optional official flyer / banner ─────────────────────────────── */
/* A slot for hosts who already have a designed flyer or banner for the
   event (the venue's poster, an illustrator's save-the-date, or the formal
   card's artwork) — display it so guests can confirm they are in the right
   place with the right link. Delete the whole <div class="banner-block">
   to hide the feature. Clicking it opens the full-screen viewer with zoom
   (main.js). */
.banner-block { margin-top: clamp(26px, 4vw, 36px); }
.banner-flyer {
  position: relative;
  margin: 0;
  text-align: center;
}
.banner-open {
  appearance: none;
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(185, 141, 62, 0.55);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--cream), var(--cream-deep));
  box-shadow: 0 8px 20px rgba(60, 19, 29, 0.18), 0 0 0 1px rgba(250, 243, 231, 0.7) inset;
  cursor: zoom-in;
  transform: rotate(-0.6deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.banner-open:hover,
.banner-open:focus-visible {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 18px 40px rgba(60, 19, 29, 0.3), 0 0 0 1px rgba(250, 243, 231, 0.7) inset;
}
.banner-img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--wine);   /* warm fallback behind the image */
}
.banner-caption {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 560px) {
  .banner-img { aspect-ratio: 8 / 4.4; }
}

/* ── 9c. optional film feature (video URL embed) ──────────────────────── */
/* Ships visible with the themed poster placeholder: without a URL the
   card shows a gentle "the film will play here soon" note (film-card--soon),
   and with a data-video-url it becomes playable — guests tap play and an
   <iframe> is lazily built, nothing loads until then. Delete the block =
   feature removed. */
.film-card {
  margin-top: clamp(30px, 5vw, 44px);
  padding-top: clamp(24px, 4vw, 34px);
  border-top: 1px dashed rgba(185, 141, 62, 0.45);
  text-align: center;
}
.film-card[hidden] { display: none; }
.film-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.film-frame {
  position: relative;
  width: 100%;
  max-width: 660px;
  margin: 16px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--wine-deep);
  border: 1px solid rgba(91, 31, 43, 0.35);
  box-shadow: 0 14px 32px rgba(60, 19, 29, 0.28);
}
.film-open {
  appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
/* shipped "coming soon" state: the play control is disabled and its
   overlays are swapped for a gentle "the film will play here soon" note */
.film-open:disabled { cursor: default; opacity: 1; }
.film-card--soon .film-play,
.film-card--soon .film-hint { display: none; }
.film-card:not(.film-card--soon) .film-soon { display: none; }
.film-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  background: linear-gradient(135deg, var(--rose), var(--merlot));
  box-shadow: 0 12px 26px -10px rgba(122, 43, 60, 0.9);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s ease;
}
.film-play svg { width: 27px; height: 27px; margin-left: 4px; }
.film-open:hover .film-play,
.film-open:focus-visible .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-hint,
.film-soon {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(43, 16, 22, 0.6);
  padding: 7px 14px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.film-frame.is-playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film-external {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-deep);
  border-bottom: 1px solid rgba(185, 141, 62, 0.5);
  padding-bottom: 2px;
}
.film-external:hover { color: var(--wine); border-color: var(--wine-mid); }
.film-external[hidden] { display: none; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 26px -10px rgba(122, 43, 60, 0.9); }
  50% { box-shadow: 0 12px 34px -6px rgba(122, 43, 60, 1); }
}

/* ── 10. shared paper ground (panels 2–4) ────────────────────────────── */
.panel:not(.panel-poster) {
  background:
    radial-gradient(140% 60% at 50% -10%, #fdf0e2 0%, rgba(253, 240, 226, 0) 62%),
    linear-gradient(180deg, #f6e4d8 0%, #fbf1e7 100%);
}

.panel-scroll {
  max-width: 720px;
  margin: 0 auto;
  padding: 68px clamp(16px, 4vw, 32px) 56px;
}

.section-head { margin-bottom: 26px; }

.kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.section-head h2,
.rsvp-title,
.guestbook-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  color: var(--wine);
}

.lede,
.rsvp-description,
.guestbook-description {
  margin: 12px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}

.block-title {
  margin: 30px 0 4px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  color: var(--wine);
}

.timeline { margin-top: 8px; }
.timeline-item {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-item__time {
  flex: none;
  width: 108px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--wine);
  font-variant-numeric: tabular-nums;
}
.timeline-item__text { font-size: 15px; color: var(--ink-soft); }
@media (max-width: 480px) {
  .timeline-item { flex-direction: column; gap: 3px; }
  .timeline-item__time { width: auto; }
}

.event-list { margin-top: 6px; }
.event-item {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background: rgba(250, 243, 231, 0.8);
}
.event-item__chip {
  display: inline-block;
  padding: 3px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.event-item__title { margin: 10px 0 4px; font-family: var(--font-display); font-size: 23px; font-weight: 600; color: var(--wine); }
.event-item__when { margin: 0; font-size: 13px; color: var(--muted); }
.event-item__addr { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.event-item__actions { margin-top: 12px; }

.notes { margin-top: 26px; }
.note {
  margin: 10px 0;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.note strong { color: var(--wine); }

/* ── 11. RSVP ────────────────────────────────────────────────────────── */
.rsvp-head { margin-bottom: 20px; }
.rsvp-date { color: var(--wine); font-weight: 600; }
.rsvp-deadline {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14.5px;
  color: var(--muted);
}

/* RSVP deadline strip — revealed only when the platform sets a deadline */
.rsvp-countdown {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 11px 18px;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--wine-deep), var(--wine));
  color: var(--cream);
}
.rsvp-countdown__label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(250, 243, 231, 0.8);
}
.rsvp-countdown__nums {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rsvp-card {
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  background: rgba(250, 243, 231, 0.94);
  box-shadow: 0 18px 44px rgba(60, 19, 29, 0.16);
}

.form-group { margin-bottom: 14px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--wine-deep);
}
.form-group label small {
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0;
}

.form-control {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(43, 26, 30, 0.24);
  border-radius: 9px;
  background: #fffdf8;
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-control::placeholder { color: rgba(138, 111, 106, 0.75); }
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185, 141, 62, 0.22);
}
textarea.form-control { resize: vertical; min-height: 74px; }

.error {
  display: block;
  min-height: 16px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--danger);
}

.form-hint {
  margin: -6px 0 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

.rsvp-extras { transition: opacity 0.25s ease; }
#rsvp-form.is-declining .rsvp-extras { display: none; }

.declined-note {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(176, 64, 47, 0.35);
  border-radius: 10px;
  background: rgba(176, 64, 47, 0.07);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--danger);
}
#rsvp-form.is-declining .declined-note { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(120deg, var(--wine-deep), var(--wine));
  color: var(--cream);
  box-shadow: 0 10px 24px rgba(60, 19, 29, 0.35);
}
.btn--primary:hover { box-shadow: 0 14px 30px rgba(60, 19, 29, 0.45); }
.btn--primary:disabled { opacity: 0.6; cursor: default; transform: none; }

.btn--ghost {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: transparent;
  padding: 9px 18px;
}
.btn--ghost:hover { background: rgba(185, 141, 62, 0.12); }

/* loading node (driven by the platform script) */
.loading {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0 0;
}

/* ── 12. guestbook (injected markup) ─────────────────────────────────── */
.guestbook-head { margin-bottom: 20px; }

.guestbook-section #guestbookForm {
  padding: clamp(18px, 4vw, 26px);
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  background: rgba(250, 243, 231, 0.94);
  box-shadow: 0 18px 44px rgba(60, 19, 29, 0.16);
}
.guestbook-section #guestbookForm .form-control { margin-bottom: 4px; }
.guestbook-section #guestbookForm button[type="submit"] {
  margin-top: 6px;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--wine-deep), var(--wine));
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(60, 19, 29, 0.35);
}
.guestbook-chapta { margin: 10px 0; }
.loading-guestbook { color: var(--muted); font-size: 13px; padding: 10px 0 0; }

.guestbook-wrap { margin-top: 22px; }

.guestbook-entry {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  background: rgba(250, 243, 231, 0.82);
}
.guestbook-entry h5 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--wine);
}
.guestbook-entry p { margin: 0 0 4px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.guestbook-entry small { color: var(--muted); font-size: 12px; }

.more-guestbook-wrap { text-align: center; margin-top: 18px; }
.more-guestbook-wrap #load-more {
  padding: 10px 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-deep);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* the platform injects the comment list into #comments-container */
.guestbook-section #comments-container {
  margin-top: 22px;
  min-height: 1px;
}

/* ── 12b. photo lightbox ─────────────────────────────────────────────── */
/* Full-screen viewer for every photo slot: the poster polaroid, the
   gallery cards and the optional flyer/banner. Tap/click the photo to
   zoom in — the frame scrolls to explore; tap again to zoom out.
   Keyboard: Esc closes, ← / → step, Enter/Space toggles zoom. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(38, 10, 16, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
}
.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  max-width: min(900px, 94vw);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: min(78vh, 82dvh);
  border-radius: 6px;
  border: 6px solid var(--cream);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  background: var(--wine);
  cursor: zoom-in;
}
/* zoomed: the frame scrolls to explore the full-size photo */
.lightbox__figure.is-zoomed {
  overflow: auto;
  max-width: 94vw;
  max-height: 94vh;
  -webkit-overflow-scrolling: touch;
}
.lightbox__figure.is-zoomed .lightbox__img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  cursor: zoom-out;
}
.lightbox__hint {
  margin: 10px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 243, 231, 0.65);
}
.lightbox__cap {
  margin-top: 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--cream);
}
.lightbox__count {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-bright);
}

.lightbox__close {
  position: absolute;
  top: clamp(12px, 3vw, 26px);
  right: clamp(12px, 3vw, 26px);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(250, 243, 231, 0.35);
  background: rgba(250, 243, 231, 0.08);
  color: var(--cream);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox__close:hover { background: rgba(250, 243, 231, 0.18); transform: rotate(90deg); }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(250, 243, 231, 0.35);
  background: rgba(250, 243, 231, 0.08);
  color: var(--cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox__nav:hover { background: rgba(250, 243, 231, 0.18); }
.lightbox__nav--prev { left: clamp(0.8rem, 3vw, 2.2rem); }
.lightbox__nav--next { right: clamp(0.8rem, 3vw, 2.2rem); }
.lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox__nav--next:hover { transform: translateY(-50%) translateX(3px); }
.lightbox__nav:disabled { opacity: 0.25; cursor: default; }

/* ── 12c. brand footer (tucked into the last panel by main.js) ───────── */
/* No-JS: a plain closing line at the end of the stacked document. JS
   shell: hidden where it starts (after </main>), then initFooter() tucks
   it into the last surviving panel so it reads as the invitation's
   closing line — even when RSVP / Guestbook are stripped. */
html:not(.js) .app-footer { display: block; padding: 26px 18px 42px; text-align: center; }
html.js .app-footer { display: none; }
html.js .panel .app-footer {
  display: block;
  margin-top: clamp(30px, 6vmin, 48px);
  padding-top: 18px;
  border-top: 1px solid rgba(185, 141, 62, 0.4);
}
.footer-brand {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-brand-name {
  font-family: var(--font-script);
  font-size: 1.3em;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--wine);
}

/* ── 12d. full-width powered-by brand strip ──────────────────────────── */
/* A slim, full-width "Powered by Kundangi" line: pinned to the foot of the
   JS shell (the panel rail floats above it) and a plain closing line at
   the end of the stacked document without JS. The platform swaps the
   literal Kundangi token inside .link-footer for its brand name at render;
   the cockpit's Free Powered By field can override the whole line. */
html.js .powered-by {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  text-align: center;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(250, 243, 231, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line-gold);
  box-shadow: 0 -8px 24px rgba(60, 19, 29, 0.1);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.js .powered-by .link-footer { color: var(--wine); }
html:not(.js) .powered-by {
  text-align: center;
  padding: 18px 18px 26px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
html:not(.js) .powered-by .link-footer { color: var(--wine); }

/* ── 13. personalisation ─────────────────────────────────────────────── */
.guest-greeting {
  margin: 0 auto 16px;
  max-width: 560px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--gold-bright);
  text-shadow: 0 1px 12px rgba(60, 19, 29, 0.6);
}
.panel-scroll .guest-greeting {
  color: var(--wine);
  text-shadow: none;
  margin: 0 0 16px;
  text-align: left;
}
.guest-greeting__name { font-weight: 600; }

/* ── 14. reveals ─────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ── 15. reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
/* the head-script fail-open class also stops the film-play pulse */
html.no-motion .film-play { animation: none; }

/* ── 16. print: flatten to readable pages ────────────────────────────── */
@media print {
  html.js .app { height: auto; display: block; overflow: visible; }
  html.js .panel { display: block !important; height: auto; overflow: visible !important; }
  html.js .panel-poster .poster { overflow: visible; }
  .scene, .grain, .panel-nav, .float-actions, .live-region, .svg-sprite, .no-print, .powered-by { display: none !important; }
  /* on-screen overlay & video frame — never print them */
  .lightbox { display: none !important; }
  .film-frame iframe { display: none !important; }
  .film-play, .film-hint { box-shadow: none; }
  body { background: #fff; }
  .panel-poster { background: #fff; }
  .poster { min-height: 0; padding: 0; }
  .label {
    margin: 0 auto;
    box-shadow: none;
    background: #fff;
    page-break-inside: avoid;
  }
  .panel-scroll { max-width: none; padding: 12px; }
  .countdown-tiles, .timeline-item, .event-item, .notes, .photo-chip, .gallery-card, .rsvp-card, .guestbook-entry { page-break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
