/* ============================================================
   exhibition-show-poster — gallery "show poster" invitation
   Dark-gallery editorial poster: full-bleed cover artwork, big
   Fraunces display type, a single vermilion accent.

   Shell contract:
     - No JS / script failure (.js.poster-ready absent): a normal
       scrolling page; every panel stacks in document order, so all
       content is always reachable.
     - JS ready (.js.poster-ready on <html>): the .app grid locks to
       100dvh — tabs / panels. Only the active panel scrolls
       internally, never the page.
     - Very short viewports (landscape phones, on-screen keyboard)
       fall back to the stacked scrolling layout so nothing is ever
       clipped off-screen.
   ============================================================ */

:root {
  --paper: #16130f;
  --panel: rgba(22, 19, 15, 0.86);
  --ink: #f4efe4;
  --ink-soft: #ddd5c4;
  --muted: #a99e8c;
  --line: rgba(244, 239, 228, 0.16);
  --accent: #e2572f;            /* vermilion — the poster's one loud note */
  --accent-soft: #f0936f;
  --error: #ff8f7a;
  --radius: 14px;
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

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

/* Only the JS-ready shell locks scrolling — a no-JS page scrolls
   naturally so every panel stays reachable. */
.js.poster-ready body { overflow: hidden; }

.app {
  display: flex;
  flex-direction: column;
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}

/* JS shell: the app locks to the viewport — tabs / panels rows.
   Only the active panel scrolls internally, never the page. */
.js.poster-ready .app {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto; /* tabs / panels / powered-by */
}

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 12px 12px 10px;
}

.tabs__btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(16, 13, 10, 0.55);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 18px;           /* ≥ 40px touch target */
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.tabs__btn:hover { color: var(--ink); border-color: var(--accent); }

.tabs__btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.tabs__btn:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

/* ── Panels ───────────────────────────────────────────────── */
.panels {
  min-height: 0;
  position: relative;
  margin: 0 12px;
}

.panel {
  background: var(--panel);
  padding: 22px 20px 26px;
}

/* App mode only: the active panel fills the row and scrolls
   internally. Without .js.poster-ready every panel stacks in flow. */
.js.poster-ready .panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.js.poster-ready .panel:not(.is-active) { display: none; }

.js.poster-ready .panel::-webkit-scrollbar { width: 8px; }
.js.poster-ready .panel::-webkit-scrollbar-thumb { background: rgba(226, 87, 47, 0.5); border-radius: 4px; }
.js.poster-ready .panel::-webkit-scrollbar-track { background: transparent; }

/* The cover is the poster itself — full-bleed, no glass box. */
.js.poster-ready #panel-cover {
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
}

/* No-JS stacked mode: give each panel breathing room. */
html:not(.js.poster-ready) .panel {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.panel-scroll {
  max-width: 480px;
  margin: 0 auto;
}

/* ── Cover panel: the poster fills its page, centred ────────
   Spacer pseudo-elements centre the cover when it fits and
   collapse to 0 when it overflows, so content is never clipped
   (unlike plain flex centring). */
.js.poster-ready #panel-cover .panel-scroll {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.js.poster-ready #panel-cover .panel-scroll::before,
.js.poster-ready #panel-cover .panel-scroll::after {
  content: "";
  flex: 1 0 auto;
}
.cover-cta { text-align: center; margin-top: 24px; }

/* ── Cover content (the poster type) ──────────────────────── */
.front {
  text-align: center;
  padding: 22px 4px 6px;
  flex: none;
}

.front__guest {
  margin: 0 0 14px;
  font-size: 14px;
  font-style: italic;
  color: var(--accent-soft);
}

/* ── OPTIONAL cover artwork — the single hero image ─────────
   An exhibition poster leads with one artwork; tap it to view
   it full size (lightbox). Delete the .cover-art-link block in
   index.html to hide it. */
.cover-art-link {
  display: block;
  max-width: min(300px, 34vh); /* generous on phones, room for the type on desktop */
  margin: 0 auto 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 22px 60px -24px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}

.cover-art { margin: 0; }

.cover-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.js .cover-art-link:hover,
.js .cover-art-link:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.js .cover-art-link:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
.js .cover-art-link img { cursor: zoom-in; }

.front__kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

.front__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 12vw, 96px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.front__title-line { display: block; }

.front__title-line--italic {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  padding-left: 0.55em; /* the italic hangs into the line below */
}

.front__artist {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.front__artist em { font-style: italic; color: var(--accent-soft); }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 10px;
  max-width: 220px;
  color: var(--accent);
}

.ornament span:first-child,
.ornament span:last-child {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.ornament span:nth-child(2) { font-size: 9px; }

.front__date {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.front__date em { font-style: italic; color: var(--accent-soft); }

.front__place {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Shared type ──────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.panel-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.05;
}

.panel-title em { font-style: italic; font-weight: 300; color: var(--accent); }

/* ── Invitation lead ──────────────────────────────────────── */
.invite__lead {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

.invite__lead em { color: var(--ink); }

.invite__reply {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

/* ── Official flyer / banner (optional) ─────────────────────
   A wide framed image slot for hosts who already have a
   designed poster for the show — display it so guests can
   confirm they're in the right place. Tap to view it full size
   (lightbox). Delete the <figure class="banner-flyer"> block in
   index.html to hide the feature. */
.banner-flyer {
  margin: 0 0 20px;
  text-align: center;
}

.banner-flyer a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px -26px rgba(0, 0, 0, 0.75);
  transition: border-color 0.3s;
}

.banner-flyer a:hover,
.banner-flyer a:focus-visible { border-color: var(--accent); }
.banner-flyer a:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.banner-flyer img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 3;
  object-fit: cover;
}

.js .banner-flyer img { cursor: zoom-in; }

.banner-flyer figcaption {
  margin-top: 8px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}

/* ── Artist ───────────────────────────────────────────────── */
.artist {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

/* ── OPTIONAL artist portrait — tap to view full size. Delete
     the <a class="artist__photo"> block to hide it. ── */
.artist__photo {
  flex: 0 0 38%;
  max-width: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color 0.3s;
}

.artist__photo:hover,
.artist__photo:focus-visible { border-color: var(--accent); }
.artist__photo:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.artist__portrait { margin: 0; }

.artist__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.js .artist__photo img { cursor: zoom-in; }

.artist__bio { flex: 1; min-width: 0; }

.artist__bio p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.artist__bio p em { color: var(--ink); }

/* ── Gallery (selected works grid) ────────────────────────── */
.gallery-section { }

.gallery-head { margin-bottom: 16px; }

.gallery-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.works {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.work { min-width: 0; }

.work__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.work__frame {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(150deg, #2a241c, #1c1812); /* fallback while loading */
  border: 1px solid var(--line);
}

.work__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .work__link:hover .work__frame img { transform: scale(1.05); }

/* the gallery doubles as a viewer — hint at the affordance */
.js .work__link img { cursor: zoom-in; }
.js .work__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.work__cap {
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  line-height: 1.35;
}

.work__no {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.work__name { color: var(--ink-soft); font-style: italic; }

.work__media { color: var(--muted); }

/* ── Free page (optional, host-defined) ────────────────────
   A free-text page of repeatable blocks: each has a title, text
   and an OPTIONAL photo (a block renders as title + text without
   it). Delete the whole #panel-free section in index.html to hide
   the page (its tab disappears with it); the platform also removes
   the panel when every block is left empty. */
.free-blocks {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.free-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  background: rgba(244, 239, 228, 0.03);
}

.free-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  color: var(--ink);
}

.free-title em { font-style: italic; font-weight: 300; color: var(--accent); }

.free-content {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.free-content p { margin: 0; }

.free-figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, #2a241c, #1c1812); /* fallback while loading */
}

.free-figure__link { display: block; }

.free-figure__link:hover,
.free-figure__link:focus-visible { border-color: var(--accent); }
.free-figure__link:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.free-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.js .free-figure__link img { cursor: zoom-in; }

.free-cap {
  padding: 8px 12px 10px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

/* ── Facts ────────────────────────────────────────────────── */
.facts {
  margin: 0 0 18px;
  border-top: 1px solid var(--line);
}

.fact {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.fact dt {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.fact dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ── Buttons ──────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #1a0e08; }
.btn:active { transform: scale(0.98); }

.btn svg { width: 14px; height: 14px; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover { background: var(--accent); color: #fff; }

.btn--block { width: 100%; justify-content: center; }

/* ── Film feature (optional video URL embed) ────────────────
   A poster + play button that lazy-loads an <iframe> from the
   URL in data-video-url (YouTube / Vimeo / any embeddable URL).
   Nothing loads until the guest taps play. Delete the whole
   <section class="film-card"> block in index.html to hide it. */
.film-card {
  margin: 0 0 20px;
  text-align: center;
}

.film-label {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.film-frame {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 12px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #211c15; /* mat behind the poster / while loading */
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px -26px rgba(0, 0, 0, 0.75);
}

.film-open {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0; background: none;
  cursor: pointer;
}

.film-open img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.film-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 12vmin, 72px); height: clamp(56px, 12vmin, 72px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #1a0e08;
  background: radial-gradient(circle at 32% 28%, #f9a282, var(--accent) 58%, #b43f1d);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.65);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.film-play svg { width: 26px; height: 26px; margin-left: 3px; }

.film-open:hover .film-play,
.film-open:focus-visible .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.film-hint {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 13, 10, 0.66);
  color: var(--ink);
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.film-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.film-note {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0 18px;
  color: var(--muted);
  font-size: 13.5px; font-style: italic; text-align: center;
  background: #211c15;
}

.film-external {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.film-external:hover { color: var(--accent); border-color: var(--accent); }
.film-external[hidden] { display: none; }

@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.65), 0 0 0 0 rgba(226, 87, 47, 0.35); }
  50% { box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.65), 0 0 0 14px rgba(226, 87, 47, 0); }
}

/* ── RSVP / guestbook shared language ─────────────────────── */
.rsvp-description,
.guestbook-description {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(244, 239, 228, 0.06);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control::placeholder { color: #6f6659; }

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 87, 47, 0.2);
}

select.form-control { appearance: none; }

textarea.form-control { resize: vertical; }

.error {
  display: block;
  color: var(--error);
  font-size: 12px;
  margin-top: 4px;
}

.form-submit { margin-top: 4px; }

.loading,
.loading-guestbook {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 10px 0;
}

/* the party-size group dims when the guest declines — a pure
   visual hint; the field is never disabled (platform submits it) */
#guest-group.is-dimmed { opacity: 0.45; }

/* ── RSVP countdown-inline (only shown when platform sets a deadline) ── */
.countdown-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 16px;
}

.countdown-inline span:first-child {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
  margin-right: 6px;
}

.countdown-inline .count-day,
.countdown-inline .count-hour,
.countdown-inline .count-minute,
.countdown-inline .count-second {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-soft);
}

/* ── Guestbook (injected markup) ──────────────────────────── */
.guestbook-body { }

#guestbookForm .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

#guestbookForm textarea.form-control { min-height: 84px; }

#guestbookForm .d-flex { display: flex; justify-content: center; }

#guestbookForm button[type="submit"] {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

#guestbookForm button[type="submit"]:hover { background: var(--accent-soft); color: #1a0e08; }

.guestbook-chapta { display: flex; justify-content: center; margin: 10px 0; }

#comments-container.guestbook-wrap {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.guestbook-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.guestbook-entry:last-child { border-bottom: 0; }

.guestbook-entry h5 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--accent-soft);
}

.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: 11px;
  letter-spacing: 0.06em;
}

.more-guestbook-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0 4px;
}

#load-more {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
}

#load-more:hover { border-color: var(--accent); color: var(--ink); }

.thank-you-message { text-align: center; padding: 20px 0; }

.thank-you-message h3,
.thank-you-message h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.03em;
  margin: 0 0 6px;
  color: var(--accent-soft);
}

.thank-you-message p { color: var(--muted); font-size: 13px; margin: 2px 0; }

/* ── Photo viewer (lightbox) — optional, JS-driven ────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lightbox.is-open { display: flex; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.92);
  backdrop-filter: blur(6px);
}

.lightbox__stage {
  position: relative;
  margin: 0;
  max-width: min(92vw, 860px);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: lightbox-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox__img {
  width: 100%;
  max-height: calc(92dvh - 70px);
  object-fit: contain;
  border-radius: 12px;
  background: #211c15; /* while the photo loads */
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  transition: opacity 0.18s ease;
}

.lightbox__img.is-swapping { opacity: 0; }

.lightbox__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 0 4px;
}

.lightbox__name { font-style: italic; }

.lightbox__count {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  white-space: nowrap;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(22, 19, 15, 0.72);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.lightbox__close {
  top: -8px;
  right: -8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 14px;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  padding-bottom: 3px; /* optically centre ‹ › */
}

.lightbox__nav--prev { left: -60px; }
.lightbox__nav--next { right: -60px; }

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.98) translateY(8px); }
  to { opacity: 1; transform: none; }
}

.js .no-motion .lightbox__stage { animation: none; }

/* narrow screens: nav buttons sit on the image instead of outside it */
@media (max-width: 640px) {
  .lightbox { padding: 8px; }
  .lightbox__close { top: 8px; right: 8px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

/* ── Brand footer (placeholder) ─────────────────────────────
   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 existing panel so it
   reads as the invitation's closing line — even when RSVP /
   Guestbook are stripped. */
html:not(.js.poster-ready) .app-footer { display: block; padding: 22px 18px 40px; text-align: center; }
html.js.poster-ready .app-footer { display: none; }
html.js.poster-ready .panel .app-footer {
  display: block;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-brand {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Full-width powered-by brand strip ──────────────────────
   A slim full-width "Powered by Kundangi" line pinned below the
   panels in the JS shell (and at the end of the stacked document
   without JS). The engine swaps the literal Kundangi token inside
   .link-footer for the platform name at render; the cockpit's Free
   Powered By field can override the whole line. */
.powered-by {
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

html.js.poster-ready .powered-by {
  padding: 6px 14px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 13, 10, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.powered-by .link-footer { color: var(--accent-soft); }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 20px);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── Reveal (progressive enhancement) ─────────────────────── */
.js .panel.is-active .panel-scroll {
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* staggered fade-up for [data-reveal] blocks — only under .js,
   so a JS-less page is fully readable from the first paint */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-in { opacity: 1; transform: none; }

.js .no-motion .panel.is-active .panel-scroll { animation: none; }
.js .no-motion [data-reveal],
.js .no-motion [data-reveal].is-in { opacity: 1; transform: none; transition: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion: keep content, drop the flourish ──────── */
@media (prefers-reduced-motion: reduce) {
  .js .panel.is-active .panel-scroll { animation: none; }
  .js [data-reveal],
  .js [data-reveal].is-in { opacity: 1; transform: none; transition: none; }
  .js .work__link:hover .work__frame img { transform: none; }
  .js .cover-art-link:hover { transform: none; }
  .lightbox__stage { animation: none; }
  .lightbox__img { transition: none; }
  .film-play { animation: none; }
}

/* ── Short viewports: fall back to the stacked scrolling page
   so content is never clipped (landscape phones, keyboard). ── */
@media (max-height: 560px) {
  .js.poster-ready body { overflow: visible; }
  .js.poster-ready .app { height: auto; max-height: none; display: block; }
  .js.poster-ready .panel { position: static; display: block !important; overflow: visible; margin: 0 0 14px; border-radius: 20px; border: 1px solid var(--line); }
  .js.poster-ready #panel-cover .panel-scroll { min-height: 0; display: block; }
  .js.poster-ready #panel-cover .panel-scroll::before,
  .js.poster-ready #panel-cover .panel-scroll::after { display: none; }
  .js.poster-ready .panel.is-active .panel-scroll { animation: none; }
  .js.poster-ready .app-footer { display: block; }
  .js.poster-ready .panel .app-footer { display: block; }
}

/* ── Small / short screens: shrink cover type, guard panels ── */
@media (max-height: 760px) {
  .front { padding-top: 6px; }
  .front__guest { margin-bottom: 10px; }
  .cover-art-link { max-width: min(210px, 28vh); margin-bottom: 12px; }
  .front__title { font-size: clamp(36px, 9.5vh, 64px); }
  .ornament { margin: 10px auto 8px; }
  .cover-cta { margin-top: 16px; }
  .panel { padding: 18px 16px 20px; }
  .panel-title { font-size: 30px; }
  .works { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* ── Narrow phones: poster stays bold, tabs wrap ──────────── */
@media (max-width: 380px) {
  .tabs__btn { padding: 11px 12px; font-size: 11px; letter-spacing: 0.1em; }
  .work__media { display: none; }
  .artist { flex-direction: column; }
  .artist__photo { max-width: 160px; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  body { overflow: visible; height: auto; background: #fff; }
  .app { height: auto; display: block; }
  .tabs, .toast, .powered-by { display: none; }
  .lightbox { display: none !important; }
  .panel {
    position: static;
    overflow: visible;
    display: block !important;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    margin: 0 0 26px;
  }
  .panel-scroll { max-width: none; }
  .panel-title em, .invite__lead em, .artist__bio p em, .front__artist em, .front__title-line--italic, .front__date em { color: #000; }
  .front__title-line--italic { color: #555; }
  .fact dt, .eyebrow { color: #333; }
  .fact dd, .invite__lead, .work__name, .artist__bio p { color: #222; }
  .work__frame, .cover-art-link, .artist__photo, .banner-flyer a, .film-frame, .free-figure { border-color: #ddd; }
  .film-frame { break-inside: avoid; }
}
