/* =====================================================================
   business-corporate-holiday-flyer-evergreen-toast
   Evergreen & gold corporate holiday party poster.

   Design language: a festive yet professional party poster — deep
   evergreen backdrop, gold-foil typography, falling snow, glassy info
   chips. The template works as a single-viewport app (only the active
   panel scrolls) and degrades to a plain stacked page when JS is off.

   Palette is driven by CSS custom properties at the top — recolor the
   whole template by editing those values.
   ===================================================================== */

:root {
  --ink: #08170f;              /* deepest green (text-on-gold) */
  --green-950: #0b241c;        /* page / shell background */
  --green-900: #0f2d22;
  --green-800: #14382a;
  --green-700: #1c4a38;
  --gold-200: #f4e7b8;
  --gold-300: #e9d8a0;         /* primary gold (headings, accents) */
  --gold-400: #ddbf6a;
  --gold-500: #c9a44a;
  --ivory: #f7f2e4;            /* body text on green */
  --muted: #aec7b6;            /* secondary text on green */
  --coral: #ffb4a3;            /* validation / soft accent */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 14px;
  --shell-pad: clamp(20px, 5vw, 48px);
  --foil-gradient: linear-gradient(100deg, #f4e7b8 0%, #e9d093 26%, #c79a3e 52%, #f0dfa4 74%, #e3c878 100%);
}

/* ---------- reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ivory);
  background: var(--green-950);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
dd { margin: 0; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; border-radius: 4px; }

/* ---------- utilities ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ivory);
  color: var(--green-950);
  font-weight: 700;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Keep the [hidden] attribute authoritative even where a class sets a
   display value (lightbox, panels, feature blocks). */
[hidden] { display: none !important; }

/* =====================================================================
   SHELL — progressive enhancement
   Without JS everything is a normal stacked page that scrolls.
   With .js it becomes a single-viewport app: 100dvh shell, absolutely
   positioned panels, only the active panel scrolls.
   ===================================================================== */

.shell { min-height: 100vh; }

.panel { display: block; }

.panel-scroll {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--shell-pad) var(--shell-pad) 48px;
}

/* ---- app mode ---- */

.js body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

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

.js .panels {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.js .panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 216, 160, 0.4) transparent;
  padding: 0 0 158px;                  /* clearance for footer + bottom nav */
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s linear 0.45s;
}

.js .panel::-webkit-scrollbar { width: 10px; }
.js .panel::-webkit-scrollbar-thumb {
  background: rgba(233, 216, 160, 0.35);
  border-radius: 8px;
  border: 3px solid var(--green-950);
}

.js .panel.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.js .panel-scroll { min-height: 100%; }

/* Cover centers vertically; falls back to normal scroll on short screens. */
.js .cover-scroll {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.event-kicker { display: inline-flex; align-items: center; gap: 14px; }
.event-kicker::before,
.event-kicker::after {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400));
}
.event-kicker::after { background: linear-gradient(90deg, var(--gold-400), transparent); }

.event-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.6rem, 8.5vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--gold-300);
}

/* Gold-foil text (progressive: falls back to flat gold). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .event-title,
  .section-title,
  .rsvp-title,
  .guestbook-title,
  .gallery-title,
  .free-heading {
    color: transparent;
    background-image: var(--foil-gradient);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.section-title,
.rsvp-title,
.guestbook-title,
.gallery-title,
.free-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  line-height: 1.1;
  color: var(--gold-300);
}

.event-subtitle {
  max-width: 46ch;
  margin: 18px auto 0;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ivory);
}

.guest-greeting {
  margin-top: 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--gold-300);
}

.event-host {
  margin-top: 30px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =====================================================================
   COVER / POSTER
   ===================================================================== */

/* ---- optional photo backdrop ----
   A decorative photo behind the poster content. Delete the .cover-photo
   block from index.html to hide it; the cover falls back to the flat
   evergreen design. A gradient scrim keeps the gold/ivory text readable
   regardless of the image underneath. */

.cover-scroll { position: relative; }

.cover-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* The cover photo is a button — tap anywhere on it (or the chip) to view
   it larger in the lightbox. It fills the cover behind the poster copy. */
.cover-photo-open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: none;
  cursor: zoom-in;
}

/* The button fills the whole cover — show focus on the chip, not a giant
   ring around the screen. */
.cover-photo-open:focus-visible { outline: none; }
.cover-photo-open:focus-visible .cover-photo-chip {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
}

.cover-photo-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-photo-chip {
  position: absolute;
  top: 56px;
  right: 16px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-950);
  background: rgba(247, 242, 228, 0.92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.cover-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none; /* decorative scrim — don't block photo clicks */
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(8, 23, 15, 0.10) 0%, rgba(8, 23, 15, 0.55) 55%, rgba(8, 23, 15, 0.9) 100%),
    linear-gradient(180deg, rgba(8, 23, 15, 0.5) 0%, rgba(8, 23, 15, 0.32) 42%, rgba(8, 23, 15, 0.94) 100%);
}

.cover-scroll > *:not(.cover-photo) { position: relative; z-index: 1; }

.cover-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 26px;
  color: var(--gold-400);
  pointer-events: none; /* decorative — let photo clicks pass through */
}

.rule { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-400)); }
.rule-right { background: linear-gradient(90deg, var(--gold-400), transparent); }

.ornament-snowflake { width: 26px; height: 26px; }

.cover-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0 12px;
}

.cover-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 34px;
}

.detail-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 150px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(233, 216, 160, 0.28);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ivory);
}

.detail-chip-wide { flex: 1 1 100%; }

@media (min-width: 720px) { .detail-chip-wide { flex: 0 1 auto; } }

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  color: var(--green-950);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(233, 216, 160, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(233, 216, 160, 0.6);
}

.btn-ghost {
  color: var(--gold-300);
  border: 1px solid rgba(233, 216, 160, 0.55);
  background: transparent;
}
.btn-ghost:hover { background: rgba(233, 216, 160, 0.08); }

/* ---------- panel advance CTA ---------- */

.panel-advance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  margin: 44px auto 0;
  padding: 12px 22px;
  border: 1px solid rgba(233, 216, 160, 0.4);
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-300);
  transition: background-color 0.18s ease;
}
.panel-advance:hover { background: rgba(233, 216, 160, 0.08); }

.advance-chevron { width: 16px; height: 16px; }

/* =====================================================================
   SECTION HEADS (details / rsvp / guestbook)
   ===================================================================== */

.section-head,
.rsvp-head,
.guestbook-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 34px;
}

.rsvp-description,
.guestbook-description {
  margin-top: 12px;
  font-size: 1.02rem;
  color: var(--muted);
}

/* =====================================================================
   DETAILS PANEL
   ===================================================================== */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 880px;
  margin: 0 auto;
}

@media (min-width: 680px) { .detail-grid { grid-template-columns: 1fr 1fr; } }

.info-card {
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(233, 216, 160, 0.24);
  border-radius: var(--radius);
  break-inside: avoid;
}

.info-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 10px;
}

.info-card p + p { margin-top: 6px; }
.info-venue { font-size: 1.15rem; font-weight: 700; }
.info-note { font-size: 0.92rem; color: var(--muted); }

.agenda {
  max-width: 560px;
  margin: 40px auto 0;
  text-align: center;
}

.agenda-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ivory);
  margin-bottom: 18px;
}

.event-agenda {
  text-align: left;
  border-top: 1px solid rgba(233, 216, 160, 0.3);
}

.agenda-item {
  display: flex;
  gap: 18px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(233, 216, 160, 0.3);
}

.agenda-time {
  flex: 0 0 92px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gold-400);
}

.agenda-text { color: var(--ivory); }

.event-notes {
  max-width: 640px;
  margin: 34px auto 0;
  text-align: center;
  font-size: 0.98rem;
  color: var(--muted);
}

/* =====================================================================
   GALLERY (optional photo showcase)
   Each item is a framed placeholder photo with a caption. Swap the <img>
   src in index.html for real photography, or delete the whole section to
   hide the feature — the nav adapts automatically. Grid shows 4:3 tiles,
   with the wide (16:9) venue shot spanning the full row. */

.gallery-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 34px;
}

.gallery-description {
  margin-top: 12px;
  font-size: 1.02rem;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

.gallery-item-wide { grid-column: 1 / -1; }

.gallery-figure {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 216, 160, 0.24);
  border-radius: var(--radius);
  break-inside: avoid;
}

.gallery-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item-wide .gallery-photo { aspect-ratio: 16 / 9; }

.gallery-figure:hover .gallery-photo,
.gallery-figure:focus-within .gallery-photo { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .gallery-figure:hover .gallery-photo,
  .gallery-figure:focus-within .gallery-photo { transform: none; }
}

.gallery-caption {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-400);
}

/* Each photo is a button: tap it to view it larger in the lightbox. */
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

.gallery-open:focus-visible { outline-offset: -5px; }

.gallery-hint {
  margin: 20px auto 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =====================================================================
   FLYER/BANNER FEATURE (optional)
   The official invitation graphic at the top of the Details panel —
   guests recognise the event and confirm they are on the right page.
   Tap it to view it larger in the lightbox. Delete the .flyer-banner
   block (or set showFlyer: false in main.js) to hide it. */

.flyer-banner {
  max-width: 620px;
  margin: 0 auto 36px;
}

.flyer-banner__card { position: relative; }

.flyer-banner__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(233, 216, 160, 0.5);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-900);
  cursor: zoom-in;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flyer-banner__open:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.7);
}
.flyer-banner__open:active { transform: translateY(0); }
.flyer-banner__open:focus-visible { outline-offset: 3px; }

.flyer-banner__open img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9; /* banner-shaped: wide flyers and covers fit neatly */
  object-fit: cover;
  background: var(--green-900);
}

.flyer-banner__chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-950);
  background: rgba(247, 242, 228, 0.92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.flyer-banner__label {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--gold-300);
}

/* =====================================================================
   VIDEO FEATURE (optional)
   An embedded video (YouTube/Vimeo highlight reel, after-movie…). Paste
   the URL into data-video-embed in index.html; tap the thumbnail to
   watch it in the lightbox. Delete the .video-section block (or set
   showVideo: false in main.js) to hide it. */

.video-section { margin-top: clamp(26px, 5vw, 36px); }

.video-card { max-width: 560px; margin: 0 auto; }

.video-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(233, 216, 160, 0.5);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-900);
  cursor: pointer;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-open:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.7);
}
.video-open:active { transform: translateY(0); }
.video-open:focus-visible { outline-offset: 3px; }

.video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--green-900);
}

/* gentle gold play disc over the thumbnail */
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--green-950);
  text-indent: 3px; /* optically centre the triangle */
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(247, 242, 228, 0.28);
  transition: transform 0.2s ease;
}

.video-open:hover .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-open:active .video-play { transform: translate(-50%, -50%) scale(0.96); }

.video-chip {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-950);
  background: rgba(247, 242, 228, 0.92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.video-card__label {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--gold-300);
}

/* =====================================================================
   LIGHTBOX (photo & video viewer)
   One viewer serves every image/video feature: gallery photos (album
   mode), cover photo + official flyer (single mode), and the embedded
   video (video mode). Photos zoom with + / − buttons, the mouse wheel,
   pinch, or a double-tap; zoomed photos pan by scrolling the stage. */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(8, 23, 15, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: none;
  cursor: default;
}

.lightbox-figure {
  position: relative;
  z-index: 1;
  max-width: min(880px, 94vw);
  max-height: 90vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: rgba(15, 45, 34, 0.98);
  border: 1px solid rgba(233, 216, 160, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.7);
}

.lightbox-stage {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 216, 160, 0.5) transparent;
  cursor: zoom-in;
}

.lightbox-stage.is-zoomed { cursor: zoom-out; }

.lightbox-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  background: var(--green-900);
}

/* When zoomed the image widens past the stage and pans by scrolling. */
.lightbox-stage.is-zoomed .lightbox-img { max-height: none; }

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(233, 216, 160, 0.2);
}

.lightbox-cap {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
  overflow-wrap: anywhere;
}

.lightbox-count {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* video mode — embedded player keeps a tidy 16:9 frame on any screen */
.lightbox-video {
  position: relative;
  z-index: 1;
  width: min(920px, 94vw);
  background: rgba(15, 45, 34, 0.98);
  border: 1px solid rgba(233, 216, 160, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.7);
}

.lightbox-iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.lightbox-video-cap {
  margin: 0;
  padding: 12px 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
  border-top: 1px solid rgba(233, 216, 160, 0.2);
}

.lightbox-nav,
.lightbox-tool,
.lightbox-close {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  color: var(--ivory);
  background: rgba(247, 242, 228, 0.14);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 1.35rem;
  line-height: 1;
  transition: background-color 0.15s ease;
}

.lightbox-nav:hover:not(:disabled),
.lightbox-tool:hover,
.lightbox-close:hover { background: rgba(247, 242, 228, 0.28); }

.lightbox-nav:disabled { opacity: 0.35; cursor: default; }

.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }

.lightbox-tools {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8, 23, 15, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox-tool { position: static; }
.lightbox-tool[data-lightbox-zoom-reset] {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  width: auto;
  padding: 0 14px;
  border-radius: 999px;
}

.lightbox-close { top: 14px; right: 14px; }

/* In video mode the zoom controls are irrelevant — hide them. */
.lightbox.is-video .lightbox-tools { display: none; }

/* =====================================================================
   RSVP FORM (dark-on-green)
   ===================================================================== */

.rsvp-form { max-width: 640px; margin: 0 auto; }

.rsvp-form-display {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label,
.attending-fieldset legend {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.label-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea,
.guestbook-body input[type="text"],
.guestbook-body input[type="email"],
.guestbook-body textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ivory);
  background: rgba(8, 23, 15, 0.45);
  border: 1px solid rgba(233, 216, 160, 0.35);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group textarea,
.guestbook-body textarea { min-height: 96px; resize: vertical; }

.form-group input::placeholder,
.form-group textarea::placeholder,
.guestbook-body input::placeholder,
.guestbook-body textarea::placeholder { color: rgba(174, 199, 182, 0.6); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.guestbook-body input:focus,
.guestbook-body textarea:focus {
  outline: none;
  border-color: var(--gold-300);
  box-shadow: 0 0 0 3px rgba(233, 216, 160, 0.18);
}

.form-group select,
.guestbook-body select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%23e9d8a0' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 38px;
}

.form-group select option { color: #0b241c; background: #f7f2e4; }

.error {
  min-height: 1.2em;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--coral);
}
.error:empty { display: none; }

.form-hint { font-size: 0.86rem; color: var(--muted); }

/* ---------- attending segmented control ---------- */

.attending-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.attending-fieldset legend { margin-bottom: 8px; }

.attending-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attending-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(233, 216, 160, 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ivory);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.attending-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--gold-400);
}

.attending-btn.is-selected {
  background: rgba(233, 216, 160, 0.14);
  border-color: var(--gold-300);
}
.attending-btn.is-selected .attending-dot {
  background: var(--gold-300);
  box-shadow: 0 0 0 3px rgba(233, 216, 160, 0.25);
}

/* When the guest declines, guest-count and meal fields collapse.
   The inputs stay enabled so the platform still serializes the form. */
.rsvp-guest-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.is-declining .rsvp-guest-fields { display: none; }

/* ---------- guest stepper ---------- */

.stepper { display: inline-flex; align-items: center; gap: 10px; }

.stepper input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  width: 64px;
  text-align: center;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stepper-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(233, 216, 160, 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-300);
  font-size: 1.4rem;
  line-height: 1;
  transition: background-color 0.15s ease;
}
.stepper-btn:hover { background: rgba(233, 216, 160, 0.1); }

/* ---------- submit & loading ---------- */

#submit-button {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.05em;
  color: var(--green-950);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
#submit-button:hover { transform: translateY(-1px); }
#submit-button:disabled { opacity: 0.6; cursor: not-allowed; }

.loading {
  margin-top: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--gold-300);
}

/* ---------- RSVP deadline countdown ---------- */

.rsvp-deadline {
  display: none;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(233, 216, 160, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}
html.rsvp-deadline-live .rsvp-deadline { display: block; }

.rsvp-deadline-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 8px;
}

.count-wrap { display: flex; gap: 8px; justify-content: center; }

.count-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.count-day, .count-hour, .count-minute, .count-second {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1.1;
  color: var(--ivory);
}

.count-unit {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =====================================================================
   FREE PAGE (optional "In Our Words" panel)
   A host-written page of repeatable free blocks. Each block has a free
   title, free text and an OPTIONAL photo. The .free-media figure
   collapses via :empty when its photo is empty (the engine removes the
   <img> when the host leaves it blank), so a text-only block still reads
   cleanly. Delete the whole <section class="panel panel-free"> to hide
   the page; the nav adapts automatically. */

.free-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 34px;
}

.free-description {
  margin-top: 12px;
  font-size: 1.02rem;
  color: var(--muted);
}

.free-blocks {
  display: grid;
  gap: clamp(28px, 5vh, 44px);
  max-width: 720px;
  margin: 0 auto;
}

.free-block { margin: 0; text-align: center; }

.free-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.2;
  color: var(--gold-300);
  overflow-wrap: anywhere;
}

/* The engine moves focus to the block title; don't paint a focus ring on
   a heading that is only focused for screen-reader navigation. */
.free-title:focus { outline: none; }

.free-media {
  margin: 0 auto clamp(16px, 3vmin, 22px);
  max-width: 520px;
  overflow: hidden;
  background: var(--green-900);
  border: 1px solid rgba(233, 216, 160, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.6);
}

/* Text-only block: the engine removes the <img> when the host left the
   photo blank, so the figure collapses and leaves no gap. */
.free-media:empty { display: none; }

.free-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.6s ease;
}

.free-media:hover .free-img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .free-media:hover .free-img { transform: none; }
}

.free-img:focus-visible { outline: 2px solid var(--gold-300); outline-offset: -4px; }

.free-content {
  margin: 0 auto;
  max-width: 34em;
  text-align: left;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ivory);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* =====================================================================
   GUESTBOOK (mount styling for platform-injected markup)
   ===================================================================== */

.guestbook-body { max-width: 640px; margin: 0 auto; }

.guestbook-body #guestbookForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.guestbook-body button[type="submit"] {
  align-self: center;
  min-height: 48px;
  padding: 12px 34px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: var(--green-950);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.guestbook-body .error { color: var(--coral); }

.guestbook-chapta { display: flex; justify-content: center; }

.loading-guestbook { text-align: center; font-weight: 600; color: var(--gold-300); }

.guestbook-wrap { display: flex; flex-direction: column; gap: 14px; }

.guestbook-entry {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(233, 216, 160, 0.24);
  border-radius: var(--radius);
  overflow-wrap: break-word;
}

.guestbook-entry h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-300);
}

.guestbook-entry p {
  margin-top: 6px;
  font-size: 0.98rem;
  color: var(--ivory);
  overflow-wrap: break-word;
}

.guestbook-entry small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.more-guestbook-wrap { text-align: center; margin-top: 18px; }

#load-more {
  min-height: 44px;
  padding: 10px 26px;
  border-radius: 999px;
  border: 1px solid rgba(233, 216, 160, 0.5);
  color: var(--gold-300);
  font-weight: 600;
}
#load-more:hover { background: rgba(233, 216, 160, 0.08); }

/* =====================================================================
   BOTTOM NAVIGATION
   ===================================================================== */

.panel-nav {
  flex: 0 0 auto;
  z-index: 6;
  position: relative;
  display: flex;
  justify-content: center;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(8, 23, 15, 0), rgba(8, 23, 15, 0.94) 34%);
}

/* The tab list is a slide-style bar on very narrow screens: it scrolls
   sideways (scrollbar hidden) when the tabs overflow, and centers itself
   whenever they fit. main.js shows the prev/next arrow buttons only when
   it is actually overflowing. */
.panel-nav-list {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.panel-nav-list::-webkit-scrollbar { display: none; }

.panel-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  color: var(--gold-300);
  background: rgba(8, 23, 15, 0.72);
  border: 1px solid rgba(233, 216, 160, 0.3);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background-color 0.15s ease;
}
.panel-nav.is-overflow .panel-nav-arrow { display: flex; }
.panel-nav-arrow:hover:not(:disabled) { background: rgba(233, 216, 160, 0.18); }
.panel-nav-arrow:disabled { opacity: 0.35; cursor: default; }
.panel-nav-prev { left: 2px; }
.panel-nav-next { right: 2px; }

.panel-nav-item { list-style: none; }

.panel-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 58px;
  min-height: 52px;
  padding: 8px 10px 6px;
  border-radius: 12px;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.panel-nav-btn svg { width: 20px; height: 20px; }

.panel-nav-btn:hover { color: var(--ivory); }

.panel-nav-btn.is-active {
  color: var(--gold-300);
  background: rgba(233, 216, 160, 0.1);
}

.panel-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Text labels stay visible even on the smallest phones so navigation is
   always clear — items just tighten to fit. */
@media (max-width: 420px) {
  .panel-nav-btn { min-width: 52px; min-height: 48px; padding: 7px 6px 5px; }
  .panel-nav-label { font-size: 9px; letter-spacing: 0.08em; }
}

/* =====================================================================
   POWERED-BY BRAND STRIP
   A slim full-width "Powered by Kundangi" line above the bottom nav.
   Static platform HTML — no morph binds to this node. It stays visible
   even when the free page is hidden. */

.powered-by {
  flex: 0 0 auto;
  z-index: 6;
  width: 100%;
  padding: 8px 16px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(8, 23, 15, 0.7), rgba(8, 23, 15, 0.96));
  border-top: 1px solid rgba(233, 216, 160, 0.18);
}

.powered-by .link-footer { color: var(--gold-300); }

/* =====================================================================
   FOOTER (brand placeholder)
   ===================================================================== */

.app-footer {
  flex: 0 0 auto;
  z-index: 6;
  padding: 8px 16px 4px;
  text-align: center;
  background: linear-gradient(180deg, rgba(8, 23, 15, 0.55), rgba(8, 23, 15, 0.94));
}

.app-footer p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Brand placeholder — the platform can drop its own brand here. */
.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--gold-300);
  vertical-align: baseline;
}

/* =====================================================================
   AMBIENT FX (snow)
   ===================================================================== */

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.fx-snowflake {
  position: absolute;
  top: -16px;
  border-radius: 50%;
  background: rgba(247, 242, 228, 0.95);
  box-shadow: 0 0 6px rgba(247, 242, 228, 0.5);
  animation-name: snow-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes snow-fall {
  0%   { transform: translate3d(0, -12px, 0); opacity: 0; }
  8%   { opacity: 1; }
  100% { transform: translate3d(var(--sway, 0px), 108vh, 0); opacity: 0.55; }
}

/* =====================================================================
   NO-JS FALLBACK
   The shell needs JS for the panel app; without it the stacked page must
   still be usable: show the attending select, hide JS-only widgets.
   ===================================================================== */

.no-js .attending-btn { display: none; }
.no-js #attending {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  min-height: 48px;
  padding: 11px 14px;
  font-size: 1rem;
  color: var(--ivory);
  background: rgba(8, 23, 15, 0.45);
  border: 1px solid rgba(233, 216, 160, 0.35);
  border-radius: 10px;
}
.no-js .panel-advance { display: none; }

/* Without JS the lightbox does not exist — image buttons become plain
   pictures (inert, no misleading affordances). */
.no-js .cover-photo-open,
.no-js .gallery-open,
.no-js .video-open,
.no-js .flyer-banner__open,
.no-js .free-img { pointer-events: none; cursor: default; }
.no-js .cover-photo-chip,
.no-js .flyer-banner__chip,
.no-js .video-chip { display: none; }

/* =====================================================================
   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;
  }
  .fx-layer { display: none !important; }
  .js .panel { transform: none; }
}

/* =====================================================================
   PRINT
   All panels print as stacked pages; nav and effects are hidden.
   ===================================================================== */

@media print {
  @page { margin: 12mm; }

  html, body { background: #ffffff !important; }
  body { color: #111; }

  .js body,
  .js .shell { height: auto !important; overflow: visible !important; }

  .js .panel {
    position: static !important;
    inset: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    overflow: visible !important;
    padding: 0 !important;
    transition: none !important;
  }

  .panel + .panel { break-before: page; }

  .panel-scroll { max-width: none; padding: 6mm 0; }
  .cover-scroll { justify-content: flex-start; }

  .panel-nav,
  .app-footer,
  .powered-by,
  .fx-layer,
  .skip-link,
  .panel-advance,
  .rsvp-deadline,
  .cover-photo,
  .lightbox,
  .flyer-banner,
  .video-section { display: none !important; }

  .cover-actions { display: none; }

  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"],
  .form-group input[type="number"],
  .form-group select,
  .form-group textarea,
  .guestbook-body input,
  .guestbook-body textarea {
    background: #ffffff !important;
    color: #111 !important;
    border-color: #999 !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
