/* ============================================================
   reuni-alumni-card-dear-alumni — "Dear Alumni" invitation
   ------------------------------------------------------------
   Design language: a letter from the reunion committee. Ivory
   stationery sheets on a deep-pine backdrop, brass hairline
   frames and class emblem, Fraunces serif with a personalised
   salutation.

   Layout: the COVER is its own full page (100dvh) — a complete
   letterhead with an optional flyer/banner. Below it, the rest
   of the letter scrolls as separate ivory sheets, connected by
   a slim text navigation that slides in after the cover.

   Progressive enhancement:
     • `.js` (inline in <head>)  → minimal capability flag.
     • `.invite-ready` (main.js) → enables the floating nav +
       entrance motion. Without it the page is plain normal flow
       with a sticky nav — the no-JS fallback.
     • `.no-motion` (fail-open)  → kills entrance animations.
   ============================================================ */

:root {
  --paper:      #fbf6ec;   /* ivory sheet */
  --paper-deep: #f2ead8;
  --pine:       #182a20;   /* backdrop */
  --pine-deep:  #10201a;
  --ink:        #23402f;   /* pine-green ink */
  --ink-soft:   #3d5c49;
  --brass:      #b7954b;
  --brass-deep: #8f7130;
  --charcoal:   #3c3426;
  --muted:      #7d7360;
  --error:      #a13a3a;
  --line:       rgba(35, 64, 47, 0.2);

  --font-display: "Fraunces", Georgia, serif;
  --font-ui:      "Karla", "Helvetica Neue", Arial, sans-serif;
  --font-type:    "Special Elite", "Courier New", monospace;

  --radius: 10px;
  --shadow: 0 24px 60px rgba(6, 14, 9, 0.45);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--charcoal);
  background:
    radial-gradient(900px 500px at 50% -12%, rgba(120, 160, 130, 0.18), transparent 60%),
    radial-gradient(700px 700px at 100% 110%, rgba(120, 160, 130, 0.1), transparent 55%),
    var(--pine);
  line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brass-deep); }
button { font-family: inherit; }

/* ============================================================
   THE COVER — its own full page
   ============================================================ */
section.cover {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 14px 18px;
}

/* shared "stationery sheet" look: ivory with a brass hairline */
.sheet {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  border: 1px solid rgba(35, 64, 47, 0.18);
  box-shadow: var(--shadow);
  position: relative;
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(183, 149, 75, 0.55);
  pointer-events: none;
  z-index: 3;
}

.cover__sheet {
  width: 100%;
  max-width: 680px;
  padding: 34px 36px 30px;
  text-align: center;
}
.invite-ready .cover__sheet { animation: rise 0.5s ease both; }

/* the cover's call to action */
.cover__cta { margin: 24px auto 2px; }

/* scroll cue under the cover sheet (decorative) */
.cover__hint {
  margin: 18px 0 0;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(251, 246, 236, 0.45);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ============================================================
   CARD HEAD (lives on the cover sheet)
   ============================================================ */
.head__emblem { width: 84px; height: 84px; margin: 0 auto; display: block; }

/* postmark — decorative, tucked top-right */
.head__postmark {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 74px;
  height: 74px;
  border: 1.5px solid rgba(143, 113, 48, 0.5);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  transform: rotate(9deg);
  opacity: 0.75;
  padding: 6px;
}
.head__postmark-ring {
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(143, 113, 48, 0.4);
  border-radius: 50%;
  font-family: var(--font-type);
  font-size: 5.6px;
  letter-spacing: 0.14em;
  color: var(--brass-deep);
  padding-top: 6px;
  text-transform: uppercase;
}
.head__postmark-inner {
  font-family: var(--font-type);
  font-size: 9px;
  color: var(--brass-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.head__eyebrow {
  margin: 16px 0 0;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.head__greeting {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 21px;
  color: var(--ink);
}
.head__greeting[hidden] { display: none; }

.head__title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 5.4vw, 36px);
  line-height: 1.14;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.head__body {
  margin: 16px auto 0;
  max-width: 34em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--charcoal);
}

.head__rule {
  width: 64px;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.head__rule::after {
  content: "✦";
  display: block;
  text-align: center;
  color: var(--brass);
  font-size: 11px;
  margin-top: -7px;
  background: transparent;
}

/* facts */
.head__facts {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fact dt {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 4px;
}
.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}
.fact .fact__sub {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}
.fact .fact__due {
  color: var(--ink-soft);
  font-weight: 600;
}

.head__sig {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ============================================================
   OPTIONAL FLYER / BANNER (top of the cover)
   Clicking opens the ORIGINAL image full size with zoom (lightbox).
   Delete the <figure class="flyer"> block to hide the feature.
   ============================================================ */
.flyer {
  margin: 0 0 26px;
}
.flyer__btn {
  display: inline-block;
  max-width: 320px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(183, 149, 75, 0.6);
  box-shadow: 0 8px 20px rgba(6, 14, 9, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.flyer__btn:hover,
.flyer__btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(6, 14, 9, 0.35);
}
.flyer__btn:focus-visible {
  outline: 2px solid var(--brass-deep);
  outline-offset: 2px;
}
.flyer__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-deep);
}
.flyer__cap {
  margin: 8px 0 0;
  font-family: var(--font-type);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* broken-photo fallback (main.js adds .is-broken) */
.flyer__btn.is-broken .flyer__img { visibility: hidden; }
.flyer__btn.is-broken::after {
  content: "flyer unavailable — drop yours in assets/img";
  display: block;
  padding: 40px 12px;
  background: linear-gradient(180deg, rgba(35, 64, 47, 0.06), rgba(35, 64, 47, 0.14));
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ============================================================
   NAV — clear text navigation, easy to spot & operate.
   No-JS fallback: a plain sticky row. With JS: a floating pill
   that slides in once the cover is scrolled past; bottom-docked
   on phones. main.js hides links for stripped sections and
   collapses the bar when only one section remains.
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
}
.nav[hidden], .nav:empty { display: none; }

.nav__brand {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 6px;
  border: 1.5px solid rgba(183, 149, 75, 0.7);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--paper);
  text-decoration: none;
  background: rgba(24, 42, 32, 0.65);
}
.nav__link {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(251, 246, 236, 0.85);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 15px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav__link:hover { color: var(--paper); }
.nav__link:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: 3px;
}
.nav__link.is-active {
  color: var(--brass);
  border-bottom-color: var(--brass);
}

/* JS boot: float the nav as a pill that slides in after the cover */
.invite-ready .nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translate(-50%, -170%);
  background: rgba(24, 42, 32, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(183, 149, 75, 0.4);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(6, 14, 9, 0.5);
  padding: 6px 10px;
  transition: transform 0.3s ease;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.invite-ready .nav::-webkit-scrollbar { display: none; }
.invite-ready body.is-past-cover .nav { transform: translate(-50%, 0); }

/* ============================================================
   THE LETTER — one sheet per part, scrolls with the page
   ============================================================ */
.content {
  padding: 8px 14px 0;
}
.section {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 28px;
  padding: 32px 38px 36px;
  scroll-margin-top: 84px;
}
.section:last-child { margin-bottom: 8px; }

/* ============================================================
   PART 1 · THE INVITATION
   ============================================================ */
.invite { max-width: 34em; margin: 0 auto; }

.invite__lead {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

.invite__notes {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 12px;
}
.invite__notes p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--charcoal); }
.invite__notes strong { color: var(--ink); }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #c8a95f, var(--brass-deep));
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 20px;
  cursor: pointer;
  box-shadow: 0 3px 0 #6d551f;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 2px; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1.5px solid rgba(35, 64, 47, 0.45);
}
.btn--ghost:hover { background: rgba(35, 64, 47, 0.06); filter: none; }

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

.invite__reply {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.invite__reply strong { color: var(--ink); }

/* ============================================================
   OPTIONAL SNAPSHOTS — the memories photo strip
   (invitation sheet). Pure HTML + CSS horizontal polaroid
   gallery; tap any photo to open the ORIGINAL full size with
   zoom (the <a> also works without JS).
   To hide the whole feature, delete the <section class="memories">
   block in index.html — nothing else needs touching.
   ============================================================ */
.memories {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.memories__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
}
.memories__intro {
  margin: 6px 0 14px;
  font-size: 13px;
  color: var(--muted);
}

/* the strip: native horizontal scroll, gentle snap */
.snap-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 4px 4px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 149, 75, 0.55) transparent;
}
.snap-scroll::-webkit-scrollbar { height: 6px; }
.snap-scroll::-webkit-scrollbar-thumb {
  background: rgba(183, 149, 75, 0.55);
  border-radius: 999px;
}
.snap-scroll::-webkit-scrollbar-track { background: transparent; }
.snap-scroll:focus-visible {
  outline: 2px solid var(--brass-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

.snap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
  width: max-content; /* let the strip scroll sideways */
}
.snap { flex: 0 0 auto; scroll-snap-align: center; }

/* polaroid frames, slightly rotated; straighten on hover */
.snap__frame {
  margin: 0;
  width: 236px;
  background: #fffdf6;
  border: 1px solid rgba(35, 64, 47, 0.2);
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(6, 14, 9, 0.22);
  padding: 10px 10px 0;
  transform: rotate(var(--snap-tilt, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.snap:nth-child(odd)  { --snap-tilt: -1.4deg; }
.snap:nth-child(even) { --snap-tilt: 1.4deg; }
.snap:hover .snap__frame,
.snap:focus-within .snap__frame {
  transform: rotate(0deg);
  box-shadow: 0 10px 22px rgba(6, 14, 9, 0.3);
}

/* the whole photo is the click target (opens original + zoom) */
.snap__btn {
  display: block;
  border: 0;
  background: none;
  padding: 0;
  cursor: zoom-in;
  border-radius: 2px;
  overflow: hidden;
}
.snap__btn:focus-visible {
  outline: 2px solid var(--brass-deep);
  outline-offset: 2px;
}
.snap__btn:hover .snap__img { filter: brightness(1.02); }

.snap__img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-deep); /* shows while a photo loads / if it's missing */
  transition: filter 0.2s ease;
}
.snap__frame figcaption {
  padding: 9px 2px 11px;
  font-family: var(--font-type);
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.03em;
}

/* broken-photo fallback — main.js adds .is-broken on image error */
.snap__frame.is-broken .snap__img { visibility: hidden; }
.snap__frame.is-broken::after {
  content: "photo unavailable — drop yours in assets/img/memories";
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: grid;
  place-items: center;
  padding: 46px 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(35, 64, 47, 0.06), rgba(35, 64, 47, 0.14));
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

/* ============================================================
   OPTIONAL FILM FEATURE — a video URL embed.
   A poster + play button that lazy-loads an <iframe> from the
   URL in data-video-url on .film-card (YouTube / Vimeo / any
   embeddable URL). Nothing loads until the guest taps play.
   Delete the whole <section class="film-card"> block to hide it.
   ============================================================ */
.film-card {
  margin-top: 30px;
  text-align: center;
}
.film-label {
  margin: 0 0 2px;
  font-family: var(--font-type);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.film-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 12px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--pine-deep); /* mat behind the poster / while loading */
  border: 1px solid rgba(183, 149, 75, 0.55);
  box-shadow: 0 10px 24px rgba(6, 14, 9, 0.3);
}
.film-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.film-open img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* warm fallback while loading — and if the poster is missing,
     the inline onerror hides the <img> and this stays put */
  background: linear-gradient(135deg, #2c4a3a, #182a20);
}
.film-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(54px, 11vmin, 70px);
  height: clamp(54px, 11vmin, 70px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: radial-gradient(circle at 32% 28%, #e0c078, var(--brass) 58%, var(--brass-deep));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.65);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.65), 0 0 0 0 rgba(183, 149, 75, 0.45); }
  50%      { box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.65), 0 0 0 14px rgba(183, 149, 75, 0); }
}
.film-open:hover .film-play,
.film-open:focus-visible .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 3px; }
.film-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 32, 26, 0.66);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.film-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  color: rgba(251, 246, 236, 0.8);
  font-size: 13.5px;
  text-align: center;
}
.film-external {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ============================================================
   SHARED SECTION HEADERS (RSVP + guestbook)
   ============================================================ */
.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.rsvp-wrap, .guestbook-section { max-width: 30em; margin: 0 auto; }
.rsvp-title, .guestbook-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.1;
  color: var(--ink);
}
.rsvp-description, .guestbook-description {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}
.rsvp-description strong, .guestbook-description strong { color: var(--charcoal); }

/* countdown (revealed by main.js only when the platform sets a deadline) */
.countdown-inline {
  margin-top: 14px;
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--brass-deep);
  font-size: 14px;
  letter-spacing: 0.05em;
}
.countdown-inline span:first-child {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--muted);
  margin-right: 8px;
}
.countdown-inline i { font-style: normal; margin-right: 6px; color: var(--muted); font-weight: 400; }

/* ============================================================
   FORMS (RSVP + injected guestbook share these styles)
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}
.label-hint {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.form-control {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--charcoal);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(35, 64, 47, 0.35);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control::placeholder { color: #a89e88; }
.form-control:focus {
  outline: none;
  border-color: var(--brass-deep);
  box-shadow: 0 0 0 3px rgba(183, 149, 75, 0.25);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 62px; }

.error {
  display: block;
  min-height: 0;
  margin-top: 5px;
  font-size: 13px;
  color: var(--error);
}
.error:empty { display: none; }

.field-help {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* guest-count chips (UX: quick party-size selection) */
.guest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.chip {
  appearance: none;
  border: 1.5px solid rgba(35, 64, 47, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--brass-deep); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* decline note (shown when attending = no) */
.rsvp-decline-note {
  margin: 4px 0 18px;
  padding: 13px 15px;
  border-left: 3px solid var(--brass);
  background: rgba(183, 149, 75, 0.14);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14.5px;
  color: var(--charcoal);
}

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

/* loading state (platform toggles it during AJAX) */
.loading {
  display: none;
  text-align: center;
  margin-top: 14px;
  font-family: var(--font-type);
  font-size: 13px;
  color: var(--muted);
}
.loading:not(:empty) { display: block; }

/* ============================================================
   INJECTED GUESTBOOK — style the platform's functional markup
   (docs/template-rsvp-guestbook-guide.md §3.4)
   ============================================================ */
.guestbook-body .form-group { margin-bottom: 13px; }

/* the injected submit button carries Bootstrap-ish classes; make
   them look like our .btn without a Bootstrap dependency */
#guestbookForm .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  margin-top: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(180deg, #c8a95f, var(--brass-deep));
  color: #fff;
  box-shadow: 0 3px 0 #6d551f;
}
#guestbookForm .btn .ph { font-size: 16px; }
#guestbookForm .d-flex { display: flex; }
#guestbookForm .mx-auto { margin-left: auto; margin-right: auto; }
#guestbookForm .px-3 { padding-left: 16px; padding-right: 16px; }
#guestbookForm .mt-2 { margin-top: 8px; }
#guestbookForm .text-white { color: #fff; }

.guestbook-chapta { margin: 6px 0; }

#comments-container {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
  max-height: 52vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.guestbook-entry {
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}
.guestbook-entry h5 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.guestbook-entry p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; }
.guestbook-entry small { font-size: 11.5px; color: var(--muted); font-family: var(--font-type); }

.more-guestbook-wrap { text-align: center; margin-top: 14px; }
#load-more {
  appearance: none;
  border: 1.5px solid rgba(35, 64, 47, 0.45);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 20px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
#load-more:hover { background: rgba(35, 64, 47, 0.06); }

.loading-guestbook {
  text-align: center;
  margin-top: 12px;
  font-family: var(--font-type);
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   PHOTO LIGHTBOX — built by main.js only when a [data-lightbox]
   photo exists (cover flyer, snapshots). Full-screen viewer:
   tap a photo to open the ORIGINAL, zoom with click / double-tap
   / + − reset buttons / + − 0 keys, pan by scrolling while
   zoomed, navigate with ‹ › / arrow keys / swipe, close with
   Esc / backdrop / ×. Focus returns to the tapped photo.
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 18, 13, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lightbox-fade 0.25s ease both;
}
.lightbox[hidden] { display: none; }
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
body.lightbox-open { overflow: hidden; }

/* the stage is the scroll container: when the photo is zoomed past the
   viewport you pan by scrolling (touch + trackpad + keyboard scroll) */
.lightbox__stage {
  max-width: min(900px, 92vw);
  max-height: 88dvh;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 4px;
}
.lightbox figure {
  margin: 0;
  display: inline-block;
  max-width: 100%;
}
.lightbox__img {
  display: block;
  max-width: min(86vw, 860px);
  max-height: 72dvh;
  object-fit: contain;
  background: var(--paper);
  border: 8px solid var(--paper);   /* polaroid frame in the viewer too */
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  transform-origin: 50% 50%;
  transition: transform 0.2s ease;
  touch-action: manipulation;
}
.lightbox__img.is-zoomed { cursor: zoom-out; }
.lightbox__caption {
  margin: 0;
  padding: 0 4px;
  text-align: center;
  font-family: var(--font-type);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--paper);
}
.lightbox__counter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  margin: 0;
  text-align: center;
  font-family: var(--font-type);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(251, 246, 236, 0.65);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(251, 246, 236, 0.4);
  background: rgba(251, 246, 236, 0.08);
  color: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(251, 246, 236, 0.2); }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.lightbox__close {
  top: 16px;
  right: 16px;
  font-size: 24px;
  line-height: 1;
}
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 26px; line-height: 1; padding-bottom: 3px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__nav[hidden] { display: none; }

/* zoom controls — a small pill under the photo */
.lightbox__zoom {
  position: absolute;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(251, 246, 236, 0.1);
  border: 1px solid rgba(251, 246, 236, 0.25);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox__zoom button {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(251, 246, 236, 0.35);
  background: rgba(251, 246, 236, 0.08);
  color: var(--paper);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}
.lightbox__zoom button:hover { background: rgba(251, 246, 236, 0.22); }
.lightbox__zoom button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.lightbox__zoom button.is-dimmed { opacity: 0.4; }
.lightbox__zoom svg { width: 18px; height: 18px; }

/* ============================================================
   FREE PAGE — optional sheet of the host's own words
   (repeatable blocks: title + free text + optional photo).
   The photo is a lightbox target like every other photo slot:
   tapping opens the ORIGINAL full size with zoom. main.js flags
   a missing photo with .is-broken and this shows a friendly note.
   ============================================================ */
.free-page { padding-top: 44px; padding-bottom: 44px; }
.free-blocks {
  max-width: 34em;
  margin: 0 auto;
  display: grid;
  gap: 30px;
}
.free-block { text-align: center; }
.free-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.35;
  color: var(--ink);
}
.free-media {
  margin: 0 0 16px;
  position: relative;
}
.free-img {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid rgba(183, 149, 75, 0.5);
  border-radius: 3px;
  box-shadow: 0 8px 20px rgba(6, 14, 9, 0.18);
  cursor: zoom-in;
}
.free-img:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.free-content {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}

/* broken-photo fallback for the free-page photo */
.free-media.is-broken .free-img { visibility: hidden; }
.free-media.is-broken::after {
  content: "photo unavailable — drop yours in assets/img";
  display: block;
  padding: 40px 12px;
  background: linear-gradient(180deg, rgba(35, 64, 47, 0.06), rgba(35, 64, 47, 0.14));
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ============================================================
   FOOTER — brand placeholder (.footer-brand; the platform can
   inject its brand into the empty .footer-brand span)
   ============================================================ */
.app-footer {
  padding: 26px 18px calc(38px + env(safe-area-inset-bottom));
  text-align: center;
}
.footer-brand {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(251, 246, 236, 0.6);
}

/* Full-width powered-by brand strip — a "Powered by Kundangi" line at
   the very bottom of the page. Static platform HTML (NOT a morph): the
   engine swaps the literal brand token for the platform name at render. */
.powered-by {
  width: 100%;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid rgba(183, 149, 75, 0.18);
  background: rgba(12, 22, 16, 0.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(251, 246, 236, 0.55);
}
.powered-by .link-footer {
  color: var(--brass);
  text-decoration: none;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(6, 14, 9, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   MOTION — subtle, gated behind reduced-motion + fail-open
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@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;
  }
  .head__postmark { transform: none; }
  .cover__hint { animation: none; }
}
.no-motion .invite-ready .cover__sheet { animation: none; }

/* ============================================================
   RESPONSIVE — narrow phones
   ============================================================ */
@media (max-width: 640px) {
  /* nav docks to the bottom as a floating pill (thumb-friendly) */
  .invite-ready .nav {
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    transform: translateY(180%);
    justify-content: space-between;
    padding: 5px 8px;
    max-width: none;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .invite-ready .nav::-webkit-scrollbar { display: none; }
  .invite-ready body.is-past-cover .nav { transform: translateY(0); }
  .nav__brand { margin-right: 2px; }
  .nav__link { padding: 10px 8px; font-size: 11.5px; letter-spacing: 0.09em; }
  .section { scroll-margin-top: 12px; }

  .content { padding: 6px 8px 0; }
  .section { padding: 24px 20px 28px; }
  section.cover { padding: 16px 10px 14px; }
  .cover__sheet { padding: 24px 20px 22px; }
  .head__emblem { width: 58px; height: 58px; margin-bottom: -4px; }
  .head__postmark { display: none; } /* too busy on small screens */
  .head__eyebrow { margin-top: 12px; font-size: 10.5px; letter-spacing: 0.2em; }
  .head__greeting { margin-top: 12px; font-size: 18px; }
  .head__title { margin-top: 10px; font-size: 24px; }
  .head__body { margin-top: 12px; font-size: 14px; line-height: 1.62; }
  .head__rule { margin-top: 16px; }
  .cover__hint { margin-top: 14px; }

  /* facts become compact inline detail lines on phones */
  .head__facts { margin-top: 14px; grid-template-columns: 1fr; gap: 5px; }
  .fact { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 8px; }
  .fact dt { margin: 0; }
  .fact dd { font-size: 14px; }
  .fact .fact__sub { width: 100%; }

  .head__sig { margin-top: 12px; font-size: 13.5px; }
  .flyer { margin-bottom: 20px; }
  .flyer__btn { max-width: 260px; }

  /* snapshots tighten on phones */
  .snap__frame { width: 198px; }
  .memories__title { font-size: 18px; }
  .cover__cta { margin-top: 20px; }
}

/* narrow lightbox controls */
@media (max-width: 640px) {
  .lightbox { padding: 10px; }
  .lightbox__close { top: 10px; right: 10px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__zoom { bottom: 58px; }
}

/* ============================================================
   PRINT — flatten to a clean, readable letter
   ============================================================ */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; }
  section.cover { min-height: 0 !important; padding: 0 !important; display: block !important; }
  .sheet { box-shadow: none !important; border: 0 !important; max-width: none !important; margin: 0 0 10mm !important; padding: 0 !important; }
  .sheet::before, .head__postmark, .nav, .cover__cta, .cover__hint, .actions, .btn, .toast, .lightbox { display: none !important; }
  .flyer, .memories, .film-card, .free-media, .powered-by { display: none !important; } /* media stays a screen-only treat; the letter stays a letter */
  .section { scroll-margin-top: 0 !important; }
  .invite, .rsvp-wrap, .guestbook-section { max-width: none !important; }
  #comments-container { max-height: none !important; overflow: visible !important; }
  .head__emblem, .head__rule { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 11px; color: #555; }
}
