/* ════════════════════════════════════════════════════════════════════════
   Date First — Save the Date Card (Minimal) · styles.css
   Kundangan template · category: Save-the-Date (Minimal)

   Design language (shared with the matching flyer template):
     • warm paper ground, near-black ink, one clay accent
     • refined serif for names, letterspaced sans for labels
     • a framed card holds the date — the calendar tab leads
     • optional photos: a soft backdrop behind the card + a framed
       gallery panel — both removable, both on-brand placeholders
   ════════════════════════════════════════════════════════════════════════ */

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --paper: #f5f2ec;            /* warm paper ground */
  --card:  #fffdf8;            /* the card sheet */
  --ink:   #211d16;            /* near-black ink */
  --ink-soft: #5f5748;         /* muted ink (labels, notes) — ≥4.5:1 on paper */
  --line:  #e2dbcb;            /* hairline */
  --accent:     #b4532a;       /* clay — the one accent */
  --accent-deep:#8f3e1d;       /* accent for small text — ≥4.5:1 on paper */
  --serif: Didot, "Bodoni MT", "Playfair Display", "Cormorant Garamond",
           Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;                       /* the shell owns scrolling */
}

img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }

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

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── the shell: one viewport, only the active panel scrolls ─────────────── */
.shell {
  height: 100dvh;
  height: 100vh;                          /* fallback for older engines */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── panels ─────────────────────────────────────────────────────────────── */
.panel {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow-y: auto;                       /* ONLY the active panel scrolls */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.panel:not(.is-active) { display: none; }

.panel.is-active { animation: panel-in 0.55s var(--ease) both; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── card stage ─────────────────────────────────────────────────────────── */
.stage {
  position: relative;                     /* sits above the photo backdrop */
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 4.5vh, 44px) 20px
           calc(126px + env(safe-area-inset-bottom));  /* room above tabs + foot */
}

/* margin:auto centers vertically AND lets tall content scroll without
   clipping the top — the robust "centered but scrollable" pattern. */
.stage-inner {
  margin: auto;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* the card itself — a quiet framed sheet */
.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 34px 70px -46px rgba(33, 29, 22, 0.45);
  padding: clamp(34px, 8.5vh, 72px) clamp(26px, 7vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(12px, 2.4vh, 22px);
}

.guest-greeting {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 3.6vw, 17px);
  color: var(--ink-soft);
  margin-bottom: clamp(2px, 1vh, 8px);
}

.eyebrow {
  font-size: clamp(10px, 2.4vw, 11.5px);
  font-weight: 500;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.44em;                   /* optically recenter tracked text */
}

/* THE DATE — a small calendar tab: month on the accent strip, day below. */
.cal-tab {
  width: clamp(84px, 24vw, 104px);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 14px 26px -16px rgba(33, 29, 22, 0.4);
  margin-top: clamp(4px, 1vh, 10px);
}
.cal-tab-head {
  background: var(--accent);
  color: var(--card);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 6px 7px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.cal-tab-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 12px 6px 14px;
}
.cal-tab-day {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 13vw, 60px);
  line-height: 1;
  color: var(--ink);
}

/* the couple */
.names {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 6.6vw, 36px);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-top: clamp(4px, 1.2vh, 12px);
  text-wrap: balance;
}
.names .amp {
  color: var(--accent);
  font-style: italic;
  padding: 0 0.18em;
}

.date-words {
  font-size: clamp(10.5px, 2.6vw, 12px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.28em;
}

.note-std {
  font-size: clamp(11px, 2.6vw, 12px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.2em;
}

/* ── photo backdrop (optional) — a soft photo layer behind the card ─────── */
.photo-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;                  /* never blocks taps on the card */
}
.photo-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  /* warm scrim — keeps the card and date readable over any photo */
  background: linear-gradient(180deg,
              rgba(245, 242, 236, 0.86) 0%,
              rgba(245, 242, 236, 0.42) 46%,
              rgba(245, 242, 236, 0.8) 100%);
}

/* ── photo gallery (optional) — framed moments in the stationery language */
.gallery-head {
  text-align: center;
  margin-bottom: clamp(22px, 4.5vh, 36px);
}
.gallery-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 6.5vw, 38px);
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.gallery-description {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 3.4vw, 24px);
}
@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-frame:first-child { grid-column: 1 / -1; }
}

.photo-frame {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 42px -30px rgba(33, 29, 22, 0.4);
}
.photo-frame img {
  width: 100%;
  height: 240px;                         /* fallback crop for old engines */
  object-fit: cover;
  background: var(--paper);
}
@supports (aspect-ratio: 1) {
  .photo-frame img { height: auto; aspect-ratio: 4 / 3; }
  .photo-frame:first-child img { aspect-ratio: 16 / 9; }
}
.photo-caption {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
  padding: 13px 16px 14px;
  padding-left: calc(16px + 0.26em);     /* optically recenter tracked text */
}

/* every photo slot is a real button — tap to open it full-size */
.photo-open {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.photo-open img { transition: transform 0.55s var(--ease); }
.photo-open:hover img,
.photo-open:focus-visible img { transform: scale(1.04); }

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

/* ── optional free page (host-filled, repeatable blocks) ──────────────
   The .panel--free page holds repeatable .free-block units, each with a
   title (.free-title), an OPTIONAL photo (.free-media > img.free-img) and
   free text (.free-content). The whole panel is removed server-side when
   no blocks exist (or the host toggles the section off); main.js also
   hides the page (and its tab) whenever every block is empty client-
   side. The photo opens in the lightbox like every other photo slot. */
.free-blocks {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 5vh, 44px);
}
.free-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.free-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 6.2vw, 34px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: clamp(14px, 3vh, 22px);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.free-media {
  margin: 0 0 clamp(14px, 3vh, 22px);
  width: 100%;
  max-width: 560px;
}
.free-media .photo-open {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 42px -30px rgba(33, 29, 22, 0.4);
}
.free-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper);
}
.free-content {
  margin: 0 auto;
  max-width: 30em;
  text-align: left;
  font-size: clamp(14px, 3.4vw, 16px);
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ── official flyer / banner (optional) ──────────────────────────────────
   A slot for hosts who already have a designed flyer or save-the-date
   poster (this card's companion poster is the matching flyer template)
   — display it so guests can confirm they are in the right place with
   the right link. Delete the whole <figure class="banner-flyer"> block
   to hide the feature (it also hides itself when its src is empty).
   Clicking it opens the full-screen viewer with zoom (main.js). */
.banner-flyer {
  margin: clamp(28px, 6vh, 52px) auto 0;
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.banner-open {
  appearance: none;
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  box-shadow: 0 22px 48px -34px rgba(33, 29, 22, 0.45);
  cursor: zoom-in;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.banner-open:hover,
.banner-open:focus-visible {
  box-shadow: 0 30px 60px -34px rgba(33, 29, 22, 0.55);
  transform: translateY(-2px);
}
.banner-img {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  background: var(--paper);
  transition: transform 0.55s var(--ease);
}
.banner-open:hover .banner-img,
.banner-open:focus-visible .banner-img { transform: scale(1.02); }
.banner-caption {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ── optional film feature (video URL embed) ────────────────────────────
   Ships visible with a placeholder poster; main.js plays a video from
   data-video-url (YouTube / Vimeo / any embeddable link) on tap — an
   <iframe> is lazily built, nothing loads until then. Empty URL (as
   shipped) = a gentle "coming soon" note over the poster; paste a URL
   and the play affordance returns; delete the block = feature removed. */
.film-card {
  margin-top: clamp(30px, 5vw, 46px);
  padding-top: clamp(24px, 4vw, 34px);
  border-top: 1px dashed var(--line);
  text-align: center;
}
.film-card[hidden] { display: none; }
.film-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-deep);
  padding-left: 0.3em;
}
.film-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 16px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 22px 48px -34px rgba(33, 29, 22, 0.5);
}
.film-open {
  appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.film-poster { width: 100%; height: 100%; object-fit: cover; }
.film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card);
  background: var(--accent);
  box-shadow: 0 12px 26px -10px rgba(143, 62, 29, 0.9);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s var(--ease);
}
.film-play svg { width: 26px; height: 26px; margin-left: 4px; }
.film-open:hover .film-play,
.film-open:focus-visible .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--card);
  background: rgba(33, 29, 22, 0.6);
  padding: 7px 14px;
  padding-left: calc(14px + 0.22em);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.film-frame.is-playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* gentle empty state — the card ships visible with this note over the
   placeholder poster until a video URL is added; the play affordance
   (.film-play / .film-hint) is hidden by .film-card.is-empty */
.film-note {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin: 0;
  max-width: min(88%, 340px);
  padding: 10px 18px;
  color: var(--card);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.4;
  text-align: center;
  background: rgba(33, 29, 22, 0.62);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.film-card.is-empty .film-play,
.film-card.is-empty .film-hint { display: none; }
.film-card.is-empty .film-open { cursor: default; }
.film-external {
  display: inline-block;
  margin-top: 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  padding: 10px 18px;
  border: 1px solid rgba(143, 62, 29, 0.4);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.film-external:hover { background: rgba(180, 83, 42, 0.08); border-color: var(--accent); }
.film-external[hidden] { display: none; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 26px -10px rgba(143, 62, 29, 0.9), 0 0 0 0 rgba(143, 62, 29, 0.4); }
  50%      { box-shadow: 0 12px 26px -10px rgba(143, 62, 29, 0.9), 0 0 0 14px rgba(143, 62, 29, 0); }
}

/* ── backdrop "View photo" pill (optional) ──────────────────────────────
   A quiet affordance that opens the backdrop photo in the lightbox.
   main.js shows it only while the backdrop has a usable photo. */
.backdrop-zoom {
  position: absolute;
  right: clamp(12px, 3vw, 22px);
  bottom: calc(112px + env(safe-area-inset-bottom));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--card) 84%, transparent);
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 26px -14px rgba(33, 29, 22, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: zoom-in;
  transition: background 0.25s var(--ease), transform 0.15s var(--ease);
}
.backdrop-zoom:hover,
.backdrop-zoom:focus-visible { background: var(--card); }
.backdrop-zoom:active { transform: scale(0.97); }
.backdrop-zoom svg { color: var(--accent-deep); flex: none; }

/* ── add-to-calendar ────────────────────────────────────────────────────── */
.cal {
  position: relative;
  margin-top: clamp(8px, 2.2vh, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cal-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;                    /* optically recenter tracked text */
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 14px 28px;
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.15s var(--ease);
}
.cal-btn:hover, .cal-btn:focus-visible {
  background: var(--ink);
  color: var(--card);
}
.cal-btn:active { transform: scale(0.97); }
.cal-btn[aria-expanded="true"] { background: var(--ink); color: var(--card); }
.cal-btn-ico { transition: transform 0.25s var(--ease); }
.cal-btn:hover .cal-btn-ico { transform: rotate(90deg); }

/* the popover opens downward when space allows, upward when not */
.cal-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  min-width: 210px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 50px -22px rgba(33, 29, 22, 0.35);
  padding: 8px;
  z-index: 30;
  animation: menu-in 0.22s var(--ease) both;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) none; }
}

.cal-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 11px 14px;
  border-radius: 9px;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.cal-opt svg { flex: none; color: var(--accent-deep); }
.cal-opt:hover, .cal-opt:focus-visible { background: var(--paper); }
.cal-opt:hover svg, .cal-opt:focus-visible svg { color: var(--ink); }
.cal-opt--copy { border: 0; }

.cal-note {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
}
.tba-note {
  margin-top: 14px;
  font-size: clamp(12px, 3vw, 13.5px);
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}
.cal-noscript {
  margin-top: 14px;
  max-width: 300px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.cal-noscript strong { color: var(--ink); }

/* ── section panels (RSVP / guestbook share a quiet column) ─────────────── */
.panel-col {
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  padding: clamp(28px, 7vh, 64px) 24px
           calc(132px + env(safe-area-inset-bottom));
}

.rsvp-head, .guestbook-head { text-align: center; margin-bottom: clamp(26px, 5vh, 44px); }

.rsvp-title, .guestbook-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 6.5vw, 38px);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.rsvp-description, .guestbook-description {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.rsvp-due { margin-top: 4px; color: var(--ink); font-weight: 600; }
.rsvp-due-date { white-space: nowrap; }

/* ── RSVP deadline countdown (shown by main.js only when live) ──────────── */
.rsvp-countdown {
  margin-top: 18px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cd-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.3em;
}
.cd-cells {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}
.cd-cell {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}
.cd-unit {
  margin-left: 3px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── RSVP form (built by the template; driven by the platform script) ───── */
#rsvp-form { display: flex; flex-direction: column; gap: 18px; }

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

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

.form-group label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.22em;
}

.form-control {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 2px;
  transition: border-color 0.2s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.form-control::placeholder { color: #a99e89; }
.form-control:focus {
  outline: none;
  border-bottom-color: var(--accent-deep);
}
/* selects keep a tiny chevron so they still read as menus */
select.form-control {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
  cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 44px; border: 1px solid var(--line); padding: 10px 12px; border-radius: 6px; }
textarea.form-control:focus { border-color: var(--accent-deep); }

/* validation feedback — the platform writes into #*-error spans */
.error {
  display: block;
  min-height: 1em;
  font-size: 12px;
  color: #a63a24;
  margin-top: 2px;
}

.form-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: -8px;
}

.rsvp-no-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--accent-deep);
}

.rsvp-actions { display: flex; justify-content: center; margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  border-radius: 999px;
  padding: 15px 32px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--ink); color: var(--card); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--accent-deep); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* shown by the platform's script while submitting */
.loading {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
  padding: 6px 0 0;
}

/* thank-you / closed states — markup injected by the platform's script */
.thank-you-message { text-align: center; padding: 10px 0 30px; }
.thank-you-message h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 6vw, 32px);
  margin-bottom: 10px;
}
.thank-you-message p { color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.thank-you-message small { display: block; margin-top: 22px; color: var(--ink-soft); font-size: 12.5px; }

/* ── guestbook (Style A: platform injects form + list into .guestbook-body) */
.guestbook-body { display: flex; flex-direction: column; gap: 26px; }

#guestbookForm { display: flex; flex-direction: column; gap: 16px; }

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

.guestbook-chapta { min-height: 70px; display: flex; justify-content: center; }

#guestbookForm button[type="submit"] {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  border-radius: 999px;
  padding: 14px 30px;
  background: var(--ink);
  color: var(--card);
  transition: background 0.25s var(--ease), transform 0.15s var(--ease);
}
#guestbookForm button[type="submit"]:hover { background: var(--accent-deep); }
#guestbookForm button[type="submit"]:active { transform: scale(0.97); }

.loading-guestbook {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
}

/* the message list the platform renders */
#comments-container { display: flex; flex-direction: column; }

.guestbook-entry {
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
}
.guestbook-entry:last-child { border-bottom: 0; }
.guestbook-entry h5 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  margin-bottom: 5px;
}
.guestbook-entry p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 6px;
  word-break: break-word;
}
.guestbook-entry small {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.more-guestbook-wrap { text-align: center; padding-top: 6px; }
#load-more {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding-left: 0.26em;
  color: var(--accent-deep);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.2s var(--ease);
}
#load-more:hover { border-color: var(--accent-deep); }

/* ── section nav (the quiet tab bar) ────────────────────────────────────── */
.tabs {
  flex: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;                       /* four tabs still fit narrow phones */
  gap: 6px clamp(10px, 3.4vw, 44px);
  align-items: center;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.tabs:empty { display: none; }

.tab {
  position: relative;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  padding: 8px 2px 10px;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width 0.25s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { width: 100%; }

.tabs-noscript {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

/* ── full-width powered-by brand strip ──────────────────────────────────
   A slim, full-width "Powered by …" line above the tab bar. The engine
   swaps the literal brand token (Kundangi) for the platform name at
   render; the strip is static platform brand (never a morph).
   Keep the class exactly 'powered-by'. */
.powered-by {
  flex: none;
  width: 100%;
  text-align: center;
  padding: 6px 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.powered-by .link-footer { color: var(--accent-deep); }

/* ── foot (slim closing line with the .footer-brand placeholder) ───────── */
.foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(14px, 3vw, 28px);
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.foot::-webkit-scrollbar { display: none; }
.foot__dot { opacity: 0.5; }
.footer-brand { font-weight: 700; letter-spacing: 0.12em; }
.footer-brand-name { color: var(--accent-deep); font-style: normal; }

/* ── lightbox (full-screen photo viewer) ─────────────────────────────────
   Every photo slot opens here — gallery frames, the official
   flyer/banner and the backdrop. prev/next + counter, and tap the photo
   to zoom (the frame scrolls to explore; tap again to zoom out).
   Esc / close / clicking the backdrop dismisses it. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(33, 29, 22, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
}
.lightbox[hidden] { display: none; }
.lightbox__figure {
  margin: 0;
  max-width: min(900px, 94vw);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: min(76vh, 80dvh);
  border-radius: 6px;
  border: 6px solid var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  background: var(--paper);
  cursor: zoom-in;
}
.lightbox__figure.is-zoomed {
  overflow: auto;
  max-width: 94vw;
  max-height: 94vh;
  -webkit-overflow-scrolling: touch;
}
.lightbox__figure.is-zoomed .lightbox__img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  cursor: zoom-out;
}
.lightbox__hint {
  margin: 10px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-left: 0.22em;
  color: rgba(245, 242, 236, 0.65);
}
.lightbox__cap {
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 3vw, 17px);
  color: var(--paper);
}
.lightbox__count {
  margin: 8px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(245, 242, 236, 0.6);
}
.lightbox__close {
  position: absolute;
  top: clamp(12px, 3vw, 26px);
  right: clamp(12px, 3vw, 26px);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 236, 0.35);
  background: rgba(245, 242, 236, 0.08);
  color: var(--paper);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox__close:hover { background: rgba(245, 242, 236, 0.18); transform: rotate(90deg); }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 236, 0.35);
  background: rgba(245, 242, 236, 0.08);
  color: var(--paper);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox__nav:hover { background: rgba(245, 242, 236, 0.18); }
.lightbox__nav--prev { left: clamp(0.8rem, 3vw, 2.2rem); }
.lightbox__nav--next { right: clamp(0.8rem, 3vw, 2.2rem); }
.lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox__nav--next:hover { transform: translateY(-50%) translateX(3px); }
.lightbox__nav:disabled { opacity: 0.25; cursor: default; }

/* ── reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  .panel.is-active { animation: none; }
}

/* ── print: a clean paper save-the-date ─────────────────────────────────── */
@media print {
  @page { margin: 1.2cm; }

  html, body { height: auto; overflow: visible; background: #fff; }

  .shell { height: auto; overflow: visible; display: block; }
  .panel { display: none !important; overflow: visible; animation: none !important; }
  .panel.is-active { display: flex !important; }

  .stage { padding: 0; min-height: 0; }
  .stage-inner { margin: 0 auto; }

  .card {
    max-width: none;
    box-shadow: none;
    border: 1px solid #000;
    border-radius: 0;
  }

  .tabs { display: none !important; }
  .powered-by { display: none !important; }
  .foot { display: none !important; }
  .photo-backdrop { display: none !important; }
  .backdrop-zoom { display: none !important; }
  .banner-flyer { display: none !important; }
  .film-card { display: none !important; }
  .lightbox { display: none !important; }
  .cal-btn, .cal-menu, .cal-note, .cal-meta { display: none !important; }
  .guest-greeting, .eyebrow, .cal-tab-body, .date-words,
  .names, .note-std { color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .names .amp { color: var(--accent-deep); }
}
