/* ============================================================
   The Meridian Summit — Business Conference FLYER (poster)
   template/creative/html/business-conference-flyer-meridian-summit
   ------------------------------------------------------------
   Design language: modern corporate poster. Deep-ink navy ground,
   gold-foil accent, editorial serif display + refined sans + mono
   datelines. Photography is optional: the template ships with local
   SVG placeholders for the Gallery and speaker headshots — swap in
   your own files or delete the slots to return to a pure-CSS look.

   Behaviour:
   - No JS: a normal scrolling page (all panels stacked).
   - JS on: fixed 100dvh shell; exactly one panel visible,
     that panel scrolls internally. Tabs derive from the DOM, so
     removed sections (RSVP/Guestbook off) hide their tabs.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg:        #070B14;
  --bg-2:      #0C1322;
  --ink:       #E9EDF5;
  --muted:     #93A0B5;
  --line:      rgba(233, 237, 245, 0.14);
  --gold:      #D6B45C;
  --gold-deep: #B98E34;
  --gold-soft: #E9D9A6;
  --danger:    #FF8A7A;
  --ok:        #7FD1A0;
  --serif: "Playfair Display", Didot, "Bodoni MT", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 14px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin-top: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(214, 180, 92, 0.35); }

/* ---------- App shell ----------
   No-JS state: a normal document flow, page scrolls.
   JS state (.js on <html>): fixed viewport shell, one active panel. */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.stage { flex: 1 1 auto; position: relative; }
.panel { outline: none; }
.panel-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1rem, 4vw, 1.75rem) clamp(2.4rem, 6vw, 3.5rem);
}

.js .app-shell { height: 100vh; height: 100dvh; overflow: hidden; }
.js .stage { overflow: hidden; }
.js .panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 180, 92, 0.4) transparent;
}
.js .panel.is-active { display: block; }
.js .panel:focus-visible { outline-offset: -2px; }
@media (prefers-reduced-motion: no-preference) {
  .js .panel { scroll-behavior: smooth; }
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.brand-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-name em { font-style: normal; color: var(--gold); }

/* Desktop pill nav — hidden by default, shown in JS mode at wide widths */
.topnav { display: none; gap: 0.25rem; }
@media (min-width: 860px) { .js .topnav { display: flex; } }
.topnav .tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.topnav .tab-btn:hover { color: var(--ink); border-color: var(--line); }
.topnav .tab-btn.is-active { color: var(--gold); border-color: var(--gold); }

/* ---------- Bottom tab bar (touch) ---------- */
.app-tabs { display: none; }
.js .app-tabs {
  display: flex;
  border-top: 1px solid var(--line);
  background: rgba(9, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  padding: 0.35rem 0.3rem env(safe-area-inset-bottom);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.js .app-tabs::-webkit-scrollbar { display: none; }
.app-tabs .tab-btn {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.45rem 0.35rem;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 10px;
}
.app-tabs .tab-btn svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-tabs .tab-btn.is-active { color: var(--gold); }
/* Six tabs on very small screens: keep the label text (clear navigation
   always reads as words) but let the bar scroll if it ever runs out of
   room, and tighten the type so everything still fits. */
@media (max-width: 420px) {
  .app-tabs .tab-btn { font-size: 0.55rem; letter-spacing: 0.02em; min-width: 3.4rem; padding: 0.45rem 0.2rem; }
  .app-tabs .tab-btn svg { width: 1.05rem; height: 1.05rem; }
}
.tab-btn[hidden] { display: none; }
@media (min-width: 860px) { .js .app-tabs { display: none; } }

/* ---------- Shared type bits ---------- */
.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.2rem;
}
.kicker::before, .kicker::after {
  content: "";
  height: 1px;
  width: 2.6rem;
  background: var(--gold);
  opacity: 0.6;
}

.panel-head { text-align: center; max-width: 720px; margin: 0 auto clamp(1.8rem, 5vw, 2.6rem); }
.panel-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}
.panel-sub { color: var(--muted); font-size: clamp(0.98rem, 2vw, 1.08rem); line-height: 1.6; margin: 0; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #0B1120;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(214, 180, 92, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(214, 180, 92, 0.35); }
.cta-btn:active { transform: translateY(0); }
.cta-btn svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cta-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Cover / poster ---------- */
.panel--hero {
  background:
    radial-gradient(1200px 520px at 50% -12%, rgba(214, 180, 92, 0.13), transparent 62%),
    radial-gradient(900px 620px at 112% 112%, rgba(44, 80, 148, 0.28), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 70%);
}
.panel--hero::before {   /* longitude/latitude grid, faded toward the edges */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(233, 237, 245, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 237, 245, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 38%, black 25%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 38%, black 25%, transparent 78%);
}
.panel--hero::after {    /* meridian rings — the conference's namesake motif */
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  width: 120vmax;
  height: 120vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(214, 180, 92, 0.12);
  box-shadow:
    0 0 0 70px rgba(214, 180, 92, 0.055),
    0 0 0 200px rgba(214, 180, 92, 0.04),
    0 0 0 390px rgba(214, 180, 92, 0.028);
  pointer-events: none;
}
.panel--hero .panel-inner { position: relative; }

.cover-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.cover-inner .cover-mid { margin: auto 0; }

/* Poster masthead + colophon (newspaper dateline furniture) */
.masthead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.7rem;
  margin: 0 0 clamp(1.2rem, 4vh, 2.2rem);
}
.colophon {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  margin: clamp(1.4rem, 5vh, 2.6rem) 0 0;
}

.cover-head h1, .ed-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.1rem, 12.5vw, 8.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
  text-wrap: balance;
}
.ed-title em { font-style: italic; color: var(--gold); font-weight: 500; }

.theme {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
  font-size: clamp(1.2rem, 3.4vw, 1.9rem);
  margin: 0 0 1.3rem;
}
.cover-sub {
  max-width: 560px;
  margin: 0 auto 1.6rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.7;
}
.keynote-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.8rem;
  font-size: 0.9rem;
}
.k-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}
.keynote-line .ed-keynote { color: var(--ink); }

.cover-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 clamp(1.6rem, 4vh, 2.2rem);
}
.chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.chip-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.chip > span:last-child { font-size: 0.9rem; font-weight: 500; }

.cover-cta { margin: 0 0 0.9rem; }
.cover-hint {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin: 0;
}

/* ---------- Agenda ---------- */
.agenda-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 860px) { .agenda-grid { grid-template-columns: repeat(3, 1fr); } }
.day-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
/* Foil-stamped top edge: a gold hairline that fades at the ends, like hot foil */
.day-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold) 75%, transparent);
  opacity: 0.75;
  pointer-events: none;
}
.day-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
}
.day-num { font-family: var(--mono); color: var(--gold); font-size: 0.82rem; }
/* Agenda day cards are a repeatable group (cloned by the platform). The
   ordinal is auto-numbered via a CSS counter so cloned rows never repeat a
   hardcoded number — each .day-card in the grid gets its own 01, 02, 03… */
.agenda-grid { counter-reset: agenda-day; }
.day-card { counter-increment: agenda-day; }
.day-num::before { content: counter(agenda-day, decimal-leading-zero); }
.day-name {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.day-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0.2rem 0 0;
}
.day-copy { color: var(--muted); font-size: 0.92rem; line-height: 1.6; margin: 0; }
.day-time {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- Speakers ---------- */
.speakers-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 620px) { .speakers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .speakers-grid { grid-template-columns: repeat(3, 1fr); } }
.speaker-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.speaker-card:hover { border-color: rgba(214, 180, 92, 0.55); transform: translateY(-2px); }
.avatar {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  background: radial-gradient(circle at 30% 25%, rgba(214, 180, 92, 0.2), transparent 62%);
}
.speaker-meta { min-width: 0; }
.speaker-role {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 0.3rem;
}
.speaker-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.25;
  margin: 0 0 0.2rem;
}
.speaker-org { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* Headshot photos: fill the avatar ring, monogram initials fall back
   automatically if the image is missing or fails to load (onerror). */
.avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar:has(.avatar-photo) .avatar-initials { display: none; }

/* ---------- Gallery (optional photography — remove the section to hide) ---------- */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 16 / 10;
}
@media (min-width: 620px) { .gallery-item--wide { grid-column: span 2; } }
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
/* Scrim so captions stay legible over any photo */
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(7, 11, 20, 0.82));
  pointer-events: none;
}
.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem 0.95rem;
}
.g-cap-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.g-cap-text {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.4;
  text-wrap: balance;
}

/* ---------- Free page (optional — delete the section to hide) ----------
   A page of the host's own: repeatable "free blocks", each with a free
   title, free text and an OPTIONAL photo (the block works without it).
   Tabs are derived from the DOM, so deleting the section hides its tab. */
.free-blocks {
  display: grid;
  gap: 1.25rem;
  max-width: 760px;
  margin: 0 auto;
}
.free-block {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.free-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold) 75%, transparent);
  opacity: 0.6;
  pointer-events: none;
}
.free-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0;
}
.free-content { color: var(--muted); font-size: 0.98rem; line-height: 1.7; }
.free-content p { margin: 0; }
.free-figure { margin: 0.25rem 0 0; }
.free-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.free-cap {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
}

/* Platform-filled photo slots arrive as <picture> wrappers (renderAsset
   keeps the original class, so the template's layout keeps working): make
   sure the picture fills the same frame the <img> did. */
.banner-flyer picture, .free-figure picture { display: block; width: 100%; }
.gallery-item picture { display: block; width: 100%; height: 100%; }
.avatar picture { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.avatar picture img { border-radius: 50%; }

/* ---------- RSVP ---------- */
.rsvp-inner { max-width: 760px; }
.rsvp-head { max-width: 640px; }
.guest-greeting {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
  font-size: 1.05rem;
  margin: 0 0 0.9rem;
}

.rsvp-form { margin-top: clamp(0.6rem, 2vw, 1rem); }
.form-row { display: grid; gap: 0 1rem; }
.form-row.two { grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.form-group { margin: 0 0 1.05rem; }
.form-group label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.form-group label small { text-transform: none; letter-spacing: 0.02em; font-size: 0.82em; opacity: 0.85; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(147, 160, 181, 0.6); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 180, 92, 0.18);
}
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23D6B45C' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}
.form-group select option { color: #0B1120; }
.form-group textarea { resize: vertical; min-height: 4.2rem; }

.error {
  display: block;
  min-height: 1.05em;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.3rem;
}

/* Decline-friendly: fields that only matter when attending are softly dimmed */
.form-group.is-muted { opacity: 0.45; }
.attend-hint {
  font-size: 0.8rem;
  color: var(--gold-soft);
  margin: 0.35rem 0 0;
}

.rsvp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

/* Loading node — hidden by default; the platform script reveals it while sending */
.loading { display: none; }
.loading[style*="display: block"], .loading[style*="display:block"], .loading.is-visible {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.loading .spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Countdown — visible only when the platform sets an RSVP deadline */
.rsvp-countdown { margin: 1.5rem auto 0; max-width: 430px; }
.countdown-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.7rem;
}
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.count-cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.3rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}
.count-cell > span:first-child {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--gold);
  line-height: 1.1;
}
.count-cell > span:last-child {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ---------- Guestbook (styles apply to the platform-injected UI) ---------- */
.guestbook-body { max-width: 640px; margin: 0 auto; }
.guestbook-body input[type="text"],
.guestbook-body input[type="email"],
.guestbook-body input[type="tel"],
.guestbook-body textarea,
.guestbook-body .form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}
.guestbook-body input:focus, .guestbook-body textarea:focus, .guestbook-body .form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 180, 92, 0.18);
}
.guestbook-body textarea { resize: vertical; min-height: 5rem; }
.guestbook-body button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #0B1120;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  margin-top: 0.4rem;
}
.guestbook-body .guestbook-chapta { margin: 0.6rem 0; }
.guestbook-wrap { margin-top: 2rem; display: grid; gap: 0.9rem; }
.guestbook-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
}
.guestbook-entry h5 {
  font-family: var(--serif);
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
  color: var(--gold-soft);
}
.guestbook-entry p { margin: 0 0 0.4rem; line-height: 1.6; font-size: 0.95rem; }
.guestbook-entry small { color: var(--muted); font-size: 0.76rem; }
.more-guestbook-wrap { text-align: center; margin-top: 1.4rem; }
.more-guestbook-wrap #load-more {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
}
.more-guestbook-wrap #load-more:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Optional media below the poster fold (cover panel) ----------
   The poster itself fills the viewport; these two optional blocks — the
   official flyer/banner and the recap film — sit just beneath it and come
   into view as the cover panel scrolls. Delete either block to hide the
   feature; nothing else depends on them. */
.cover-extras {
  position: relative;
  z-index: 1; /* keep the decorative meridian rings behind the media blocks */
  margin-top: clamp(1.6rem, 5vh, 3rem);
  padding: clamp(1.4rem, 4vw, 2.4rem) 0 clamp(2.4rem, 6vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.cover-extras-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.75rem);
}
.gallery-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin: 0 0 1.2rem;
}

/* ---------- Optional official flyer / banner ---------- */
.banner-flyer {
  margin: 0 auto;
  max-width: 820px;
  text-align: center;
}
.banner-flyer img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid rgba(214, 180, 92, 0.5);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -26px rgba(0, 0, 0, 0.8);
}
.banner-flyer figcaption {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- Optional film feature (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 — fast, and consent-friendly. */
.film-card {
  margin-top: clamp(2rem, 6vh, 3rem);
  text-align: center;
}
.film-card[hidden] { display: none; }
.film-frame {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px -26px rgba(0, 0, 0, 0.8);
}
.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;
}
.film-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 12vmin, 76px);
  height: clamp(56px, 12vmin, 76px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0B1120;
  background: radial-gradient(circle at 32% 28%, var(--gold-soft), var(--gold) 60%, var(--gold-deep));
  border: 1px solid rgba(233, 217, 166, 0.7);
  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 ease;
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
.film-open:hover .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.film-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.66);
  color: var(--gold-soft);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  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: 0.86rem;
  font-style: italic;
  text-align: center;
  background: var(--bg-2);
}
.film-external {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(214, 180, 92, 0.5);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.film-external:hover { color: var(--gold-soft); border-color: var(--gold-soft); }
.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(214, 180, 92, 0.35); }
  50% { box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.65), 0 0 0 14px rgba(214, 180, 92, 0); }
}

/* ---------- Full-width powered-by brand strip ----------
   A slim, full-width "Powered by Kundangi" line pinned above the tab bar 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 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
html.js .powered-by {
  padding: 5px 14px;
  background: rgba(9, 14, 26, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.powered-by .link-footer { color: var(--gold); }

/* ---------- 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) .app-footer { display: block; padding: 1.6rem 1rem 2.6rem; text-align: center; }
html.js .app-footer { display: none; }
html.js .panel .app-footer {
  display: block;
  margin-top: clamp(1.8rem, 5vh, 2.8rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.footer-brand {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-brand-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25em;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--gold);
}

/* ---------- Photo viewer (lightbox) — click any photo to view it full-screen ----------
   Plain enhancement over the optional photo slots (flyer/banner, speaker
   headshots, gallery). The viewer markup is built by main.js only when a
   photo slot exists, so removing those blocks removes the viewer entirely —
   nothing orphaned, no platform contract. */
html.js [data-lightbox] { cursor: zoom-in; }

/* Small "view full size" badge on hover / keyboard focus — shows the photo
   is clickable. Purely visual; without JS (no viewer) it never appears. */
html.js .banner-flyer, html.js .gallery-item, html.js .avatar, html.js .free-figure { position: relative; }
html.js .banner-flyer::after,
html.js .gallery-item::before,
html.js .avatar::after,
html.js .free-figure::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(9, 14, 26, 0.82)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D6B45C' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E")
    center / 15px no-repeat;
  border: 1px solid rgba(214, 180, 92, 0.5);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
html.js .banner-flyer:hover::after,
html.js .banner-flyer:focus-within::after,
html.js .gallery-item:hover::before,
html.js .gallery-item:focus-within::before,
html.js .avatar:hover::after,
html.js .avatar:focus-within::after,
html.js .free-figure:hover::after,
html.js .free-figure:focus-within::after {
  opacity: 1;
  transform: none;
}
html.js .avatar::after { width: 26px; height: 26px; background-size: 13px; }

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: rgba(4, 7, 14, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.photo-viewer.is-open { display: flex; }
.photo-viewer figure {
  margin: 0;
  max-width: min(92vw, 960px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.photo-viewer img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  max-height: 76dvh;
  width: auto;
  height: auto;
  border: 6px solid var(--bg-2);
  border-radius: 10px;
  background: var(--bg-2);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
}
.photo-viewer figcaption {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.photo-viewer .pv-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(72vw, 520px);
  height: min(46vh, 360px);
  border: 6px solid var(--bg-2);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.pv-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(214, 180, 92, 0.5);
  background: rgba(9, 14, 26, 0.9);
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.pv-btn:hover { transform: scale(1.06); background: var(--bg-2); }
.pv-close { top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); }
.pv-prev  { left: 12px;  top: 50%; transform: translateY(-50%); }
.pv-next  { right: 12px; top: 50%; transform: translateY(-50%); }
.pv-prev:hover, .pv-next:hover { transform: translateY(-50%) scale(1.06); }
.photo-viewer :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Narrow screens: prev/next drop below the photo so they never cover it. */
@media (max-width: 520px) {
  .photo-viewer { flex-direction: column; gap: 10px; }
  .photo-viewer img { max-height: 62vh; max-height: 62dvh; }
  .pv-prev, .pv-next { position: static; transform: none; }
  .pv-prev:hover, .pv-next:hover { transform: scale(1.06); }
  .pv-prev, .pv-next { width: 40px; height: 40px; }
  .photo-viewer figure { flex: 1 1 auto; justify-content: center; }
  .photo-viewer .pv-close { top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print: every panel prints as its own page ---------- */
@page { margin: 12mm; }
@media print {
  html, body { height: auto; background: #fff; }
  .js .app-shell, .js .stage { height: auto; overflow: visible; }
  .js .panel { display: block !important; overflow: visible; height: auto; }
  .app-header, .app-tabs, .topnav, .cover-hint, .powered-by, .no-print { display: none !important; }
  .panel { page-break-after: always; break-after: page; }
  .panel:last-child { page-break-after: auto; break-after: auto; }
  .panel--hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Guestbook (platform-injected form + message list) ─────────────── */
/* The template's own .form-group / .error / .guestbook-* rules already
   style the injected fields, labels, entries and load-more; this block
   only fills the gaps: the form card shell, the loading text and the
   list divider (overriding the inline border-top on #comments-container). */
#guestbookForm {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
#guestbookForm .form-control { height: auto; }
.loading-guestbook {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
#comments-container.guestbook-wrap {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
