/* ============================================================
   Signature (Standard) Wedding Invitation Template
   Default palette: rosewood — blush paper · deep wine · rose gold
   Switchable themes: rosewood · midnight · sage (see :root[data-theme])
   All client content lives in config.js
   ============================================================ */

:root,
:root[data-theme="rosewood"] {
  --blush: #faf4ef;         /* paper */
  --blush-soft: #fdf9f6;
  --blush-deep: #f2e5dc;

  --wine: #5b1c2e;          /* primary dark */
  --wine-deep: #431121;
  --wine-ink: #efd8dd;      /* light text on wine */

  --rose: #b76e79;          /* rose-gold accent */
  --rose-deep: #9d5560;
  --rose-soft: #e9c8cd;

  /* Gold foil (rose-gold) — seal, ampersand, rules, sheens */
  --gold: #c99b6a;
  --gold-soft: #e7c9a4;
  --gold-deep: #a3743f;

  --ink: #3a2530;
  --muted: #857077;
}

:root[data-theme="midnight"] {
  --blush: #f7f3ea;
  --blush-soft: #fbf8f1;
  --blush-deep: #ebe4d2;

  --wine: #1d2a45;
  --wine-deep: #131c31;
  --wine-ink: #dde3ef;

  --rose: #c1a15f;          /* champagne gold */
  --rose-deep: #a3853f;
  --rose-soft: #e6d9b2;

  --gold: #cbb26a;
  --gold-soft: #eddfae;
  --gold-deep: #a68d43;

  --ink: #232c3f;
  --muted: #6b7183;
}

:root[data-theme="sage"] {
  --blush: #f8f6f0;
  --blush-soft: #fdfbf7;
  --blush-deep: #eae7da;

  --wine: #47593f;
  --wine-deep: #33422e;
  --wine-ink: #dfe8da;

  --rose: #b57f5b;          /* soft copper */
  --rose-deep: #96633f;
  --rose-soft: #e5cfb9;

  --gold: #c08a5c;
  --gold-soft: #e4c39c;
  --gold-deep: #96633f;

  --ink: #2e362c;
  --muted: #6f7a6c;
}

:root {
  --serif: "Playfair Display", "Noto Serif Bengali", Georgia, serif;
  --sans: "Jost", "Noto Serif Bengali", system-ui, sans-serif;
  --script: "Parisienne", "Noto Serif Bengali", cursive;
  --arabic: "Amiri", "Noto Serif Bengali", serif;

  --foil: linear-gradient(115deg,
    var(--gold-soft) 0%, var(--gold-soft) 18%, var(--gold) 34%, #fbf3e2 50%,
    var(--gold) 66%, var(--gold-soft) 82%, var(--gold-soft) 100%);

  --paper-line: rgba(58, 37, 48, 0.15);
  --accent-line: rgba(183, 110, 121, 0.5);
  --shadow-card: 0 1px 2px rgba(40, 12, 24, 0.06), 0 14px 34px -12px rgba(40, 12, 24, 0.2);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--wine-deep);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(183, 110, 121, 0.12), transparent 60%),
    var(--wine-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--wine); color: var(--rose-soft); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ============ Phone-column layout ============ */
.invite {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--blush);
  overflow-x: clip;
  box-shadow: 0 0 0 1px rgba(183, 110, 121, 0.2), 0 30px 80px -20px rgba(0, 0, 0, 0.55);
}

@media (max-width: 559.98px) {
  .invite { box-shadow: none; }
}

/* ============ Type helpers ============ */
.eyebrow {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.eyebrow--light { color: var(--rose-soft); }
.eyebrow--accent { color: var(--rose-deep); }

.section-title {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 8.4vw, 40px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--wine);
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--rose-deep);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(56px, 9vh, 88px) 22px 96px;
  background:
    radial-gradient(140% 90% at 50% 0%, rgba(183, 110, 121, 0.22), transparent 55%),
    linear-gradient(180deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: var(--blush);
  text-align: center;
  overflow: hidden;
}

.hero__pattern,
.footer__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07'%3E%3Crect x='23' y='23' width='26' height='26'/%3E%3Crect x='23' y='23' width='26' height='26' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='2.2'/%3E%3Cpath d='M0 36 h12 M60 36 h12 M36 0 v12 M36 60 v12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.3));
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.3));
  will-change: transform;
}

/* Drifting petals (generated by script.js) */
.hero__petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -36px;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 1.25);
  background: linear-gradient(135deg, rgba(233, 200, 205, 0.75), rgba(183, 110, 121, 0.5));
  border-radius: 62% 38% 55% 45% / 68% 62% 38% 32%;
  opacity: 0;
  animation: petal-fall var(--t) linear var(--d) infinite;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

@keyframes petal-fall {
  0%   { transform: translate3d(0, -40px, 0) rotate(0deg); opacity: 0; }
  7%   { opacity: var(--o); }
  88%  { opacity: var(--o); }
  100% { transform: translate3d(var(--dx), 104vh, 0) rotate(var(--r)); opacity: 0; }
}

/* Corner garlands */
.hero__garland {
  position: absolute;
  top: 18px;
  width: clamp(88px, 22vw, 130px);
  color: var(--gold-soft);
  opacity: 0.72;
  pointer-events: none;
  will-change: transform;
}

.hero__garland--l { left: 14px; }
.hero__garland--r {
  right: 14px;
  transform: scaleX(-1);
}

.hero__inner {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__arch {
  position: relative;
  width: min(100%, 430px);
  padding: clamp(52px, 11vw, 68px) 26px clamp(44px, 9vw, 56px);
  border: 1px solid var(--accent-line);
  border-radius: min(215px, 47vw) min(215px, 47vw) 10px 10px;
}

.hero__arch::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(233, 200, 205, 0.28);
  border-radius: min(205px, 44vw) min(205px, 44vw) 6px 6px;
  pointer-events: none;
}

/* Optional couple photo behind the arch content (set in config.js) */
.hero__arch > * { position: relative; z-index: 1; }

.hero__photo {
  position: absolute;
  inset: 9px;
  z-index: 0;
  overflow: hidden;
  border-radius: min(203px, 43.5vw) min(203px, 43.5vw) 5px 5px;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.03);
}

.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(28, 6, 14, 0.66) 0%,
      rgba(28, 6, 14, 0.34) 42%,
      rgba(28, 6, 14, 0.72) 100%),
    radial-gradient(120% 80% at 50% 100%, rgba(67, 17, 33, 0.5), transparent 60%);
  opacity: var(--tint, 0.55);
}

.hero__arch.has-photo .hero__name { text-shadow: 0 2px 26px rgba(0, 0, 0, 0.6); }
.hero__arch.has-photo .hero__date,
.hero__arch.has-photo .blessing { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55); }

/* Hero entrance — staggered rise, triggered when the envelope intro
   opens (html.is-open flips the values; the transition does the rest). */
.anim {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.is-open .anim { opacity: 1; transform: none; }

html.is-open .anim--1 { transition-delay: 0.1s; }
html.is-open .anim--2 { transition-delay: 0.24s; }
html.is-open .anim--3 { transition-delay: 0.38s; }
html.is-open .anim--4 { transition-delay: 0.5s; }
html.is-open .anim--5 { transition-delay: 0.68s; }
html.is-open .anim--6 { transition-delay: 0.82s; }

@keyframes foil-sheen {
  from { background-position: 0% 50%; }
  to   { background-position: 220% 50%; }
}

.blessing {
  margin: 0 0 clamp(22px, 5vw, 30px);
  font-family: var(--arabic);
  font-size: clamp(17px, 4.6vw, 19px);
  line-height: 2;
  color: var(--gold-soft);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

/* Wax-seal monogram with a gold-foil face and rotating halo */
.seal {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto clamp(18px, 4vw, 24px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  box-shadow:
    inset 0 0 0 4px var(--wine-deep),
    inset 0 0 0 5px var(--gold-deep),
    0 6px 18px -6px rgba(0, 0, 0, 0.5),
    0 0 34px -8px rgba(201, 162, 95, 0.4);
  background:
    radial-gradient(circle at 32% 30%, rgba(233, 200, 205, 0.3), transparent 55%),
    var(--wine-deep);
}

.seal::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px dashed rgba(231, 201, 164, 0.45);
  animation: halo-spin 46s linear infinite;
}

@keyframes halo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.seal__initials {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  background: var(--foil);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 7px rgba(231, 201, 164, 0.4));
  animation: foil-sheen 7s linear infinite;
}

.hero__names {
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__name {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(42px, 11vw, 56px);
  line-height: 1.22;
  color: var(--blush-soft);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.28);
}

.hero__amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 7vw, 34px);
  line-height: 1.15;
  background: var(--foil);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: foil-sheen 7s linear infinite;
}

.sprig { color: var(--gold-soft); }
.sprig--hero { width: 160px; margin: clamp(16px, 3.5vw, 22px) auto 0; }
.sprig--footer { width: 56px; margin: 0 auto clamp(18px, 4vw, 26px); }

.hero__date {
  margin: clamp(18px, 4vw, 24px) 0 0;
  font-family: var(--serif);
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blush-soft);
}

.hero__place {
  margin: 8px 0 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose-soft);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--rose-soft);
  opacity: 0.75;
}

.hero__scroll span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero__scroll svg {
  width: 20px;
  height: 20px;
  animation: nudge 2.2s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(5px); opacity: 0.45; }
}

.scallop {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
}

.scallop svg { width: 100%; height: 44px; }

/* ============ WELCOME ============ */
.welcome {
  padding: clamp(52px, 9vw, 72px) 26px clamp(40px, 7vw, 56px);
  text-align: center;
  background: var(--blush);
}

.ornament {
  width: 190px;
  margin: 0 auto clamp(22px, 5vw, 30px);
  color: var(--gold-deep);
}

.welcome__parents {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 4.6vw, 19px);
  color: var(--ink);
}

/* Center divider between the two families — desktop only */
.welcome__divider { display: none; }

.welcome__line {
  max-width: 400px;
  margin: clamp(22px, 5vw, 30px) auto 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--muted);
}

/* ============ COUNTDOWN ============ */
.countdown {
  padding: clamp(16px, 4vw, 28px) 26px clamp(52px, 9vw, 72px);
  background: linear-gradient(180deg, var(--blush) 0%, var(--blush-soft) 100%);
}

.countdown__panel {
  padding: clamp(34px, 7vw, 46px) clamp(20px, 5vw, 30px) clamp(30px, 6vw, 40px);
  text-align: center;
  background: var(--blush-soft);
  border: 1px solid var(--accent-line);
  box-shadow: var(--shadow-card);
}

.countdown__panel::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1px auto clamp(30px, 6vw, 40px);
  width: min(200px, 60%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(26px, 6vw, 34px);
}

/* Airy clock-face cells: big serif numerals, hairline separators */
.countdown__cell {
  position: relative;
  padding: 8px 2px 4px;
}

.countdown__cell + .countdown__cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 30%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-line) 30%, var(--accent-line) 70%, transparent);
}

.countdown__num {
  display: block;
  min-height: 1.2em;
  font-family: var(--serif);
  font-size: clamp(34px, 10vw, 42px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--wine);
  font-variant-numeric: tabular-nums lining-nums;
}

.countdown__num.is-tick {
  animation: tick-pop 0.45s ease;
}

@keyframes tick-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.1); color: var(--gold-deep); }
  100% { transform: scale(1); }
}

.countdown__label {
  display: block;
  margin-top: 8px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.countdown__note {
  margin: clamp(22px, 5vw, 28px) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

.countdown__today {
  margin: clamp(26px, 6vw, 34px) 0 0;
  font-family: var(--script);
  font-size: clamp(30px, 8vw, 38px);
  line-height: 1.3;
  color: var(--wine);
}

/* ============ OUR STORY — timeline ============ */
.story {
  padding: clamp(52px, 9vw, 72px) 26px;
  text-align: center;
  background: linear-gradient(180deg, var(--blush-soft) 0%, var(--blush-deep) 100%);
}

.story__timeline {
  position: relative;
  max-width: 460px;
  margin: clamp(34px, 7vw, 44px) auto 0;
  padding-left: 36px;
  text-align: left;
}

.story__timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--paper-line) 10%, var(--paper-line) 90%, transparent);
}

/* Gold thread that fills as the guest scrolls (height set by script.js) */
.story__fill {
  position: absolute;
  left: 11px;
  top: 8px;
  width: 2px;
  height: 0;
  max-height: calc(100% - 16px);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 8px rgba(201, 162, 95, 0.45);
  pointer-events: none;
}

.chapter {
  position: relative;
  padding-bottom: clamp(30px, 6vw, 38px);
}

.chapter:last-child {
  padding-bottom: 0;
}

.chapter__dot {
  position: absolute;
  /* 13px dot centred on the thread: thread centre = 12px in the
     timeline (left 11px + 1px half-width); dot left = 12 − 6.5 = 5.5px
     in timeline coords = −30.5px from the chapter's padded edge. */
  left: -30.5px;
  top: 5px;
  z-index: 1; /* keep both threads behind the dots */
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--blush-soft);
  border: 2.5px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 95, 0.18);
}

.chapter__label {
  display: inline-block;
  margin: 0;
  padding: 5px 14px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--blush-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
}

.chapter__title {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 5.6vw, 26px);
  line-height: 1.2;
  color: var(--wine);
}

.chapter__text {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
}

/* ============ EVENTS ============ */
.events {
  padding: clamp(52px, 9vw, 72px) 26px;
  background: var(--blush);
  text-align: center;
}

.events__list {
  display: grid;
  gap: 26px;
  max-width: 430px;
  margin: clamp(30px, 6vw, 40px) auto 0;
}

.event-card {
  position: relative;
  padding: clamp(30px, 6vw, 38px) clamp(22px, 5vw, 30px) clamp(26px, 5vw, 32px);
  background: var(--blush-soft);
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(40, 12, 24, 0.06), 0 22px 44px -14px rgba(40, 12, 24, 0.26);
}

.event-card:active {
  transform: translateY(-2px) scale(0.99);
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--accent-line);
  border-radius: 9px;
  pointer-events: none;
}

/* Round icon medallion (icon chosen per event in config.js) */
.event-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: var(--gold-deep);
  background:
    radial-gradient(circle at 32% 30%, rgba(201, 162, 95, 0.16), transparent 60%),
    var(--blush);
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--blush), inset 0 0 0 4px var(--gold-soft);
}

.event-card__icon svg {
  width: 26px;
  height: 26px;
}

/* Ticket-stub date chip, top-right */
.event-card__chip {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 10px 6px 12px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gold-deep);
  background: var(--blush);
  border: 1px solid var(--gold-soft);
  border-left: 1px dashed var(--gold-deep);
  border-radius: 4px 10px 10px 4px;
}

.event-card__tag {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.event-card__name {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.15;
  color: var(--wine);
}

.event-card__tagline {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  color: var(--muted);
}

.event-card__divider {
  width: min(220px, 70%);
  height: 1px;
  margin: clamp(22px, 5vw, 28px) auto;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}

.event-card__rows {
  display: grid;
  gap: 14px;
  margin: 0;
  text-align: left;
}

.event-card__rows .row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: baseline;
}

.event-card__rows dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-deep);
  white-space: nowrap;
}

.event-card__rows dt svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--rose-deep);
}

.row__dot {
  width: 15px;
  height: 15px;
  display: inline-block;
  text-align: center;
  line-height: 15px;
}

.row__dot::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose-deep);
}

.event-card__rows dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}

.event-card__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: clamp(24px, 5vw, 30px);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--wine);
  border-bottom: 1px solid var(--rose);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.link-btn:hover,
.link-btn:focus-visible {
  color: var(--rose-deep);
  border-color: var(--rose-deep);
}

/* ============ GALLERY ============ */
.gallery {
  padding: clamp(52px, 9vw, 72px) 26px;
  background: linear-gradient(180deg, var(--blush) 0%, var(--blush-soft) 100%);
  text-align: center;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  gap: 10px;
  max-width: 470px;
  margin: clamp(30px, 6vw, 40px) auto 0;
}

.g-photo {
  position: relative;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  background: var(--blush-deep);
  cursor: zoom-in;
  box-shadow: 0 6px 18px -8px rgba(40, 12, 24, 0.22);
}

.g-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.g-photo:hover img,
.g-photo:focus-visible img {
  transform: scale(1.06);
}

.g-photo__cap {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 34px 12px 11px;
  font-family: var(--script);
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, transparent, rgba(28, 8, 16, 0.62));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.g-photo:hover .g-photo__cap,
.g-photo:focus-visible .g-photo__cap {
  opacity: 1;
}

.g-photo--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1.02;
}

/* Echo the hero arch on selected tiles (assigned by script.js) */
.g-photo--arch {
  border-radius: 999px 999px 12px 12px;
}

.gallery__hint {
  margin: clamp(20px, 4vw, 26px) 0 0;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
}

/* ============ VENUE / MAP ============ */
.venue {
  padding: clamp(16px, 4vw, 28px) 26px clamp(56px, 9vw, 76px);
  text-align: center;
  background: linear-gradient(180deg, var(--blush-soft) 0%, var(--blush-deep) 100%);
}

/* Arch-topped mat that matches the hero; the map itself is greyscaled
   then re-warmed so the Google iframe sits inside the palette. */
.venue__frame {
  max-width: 470px;
  margin: clamp(30px, 6vw, 40px) auto 0;
  padding: 9px;
  background: var(--blush-soft);
  border: 1px solid var(--accent-line);
  border-radius: 170px 170px 16px 16px;
  box-shadow: var(--shadow-card);
}

.venue__frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 160px 160px 9px 9px;
  filter: grayscale(1) sepia(0.34) saturate(1.35) hue-rotate(-14deg) brightness(0.99) contrast(0.93);
}

.venue__name {
  max-width: 430px;
  margin: clamp(22px, 5vw, 28px) auto 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--wine);
}

.venue__address {
  max-width: 430px;
  margin: 8px auto 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.venue__address:empty { display: none; }

.venue__directions {
  margin-top: 16px;
}

/* ============ RSVP ============ */
.rsvp {
  padding: clamp(56px, 10vw, 80px) 26px;
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(183, 110, 121, 0.2), transparent 55%),
    linear-gradient(180deg, var(--blush-deep) 0%, var(--wine) 26%, var(--wine-deep) 100%);
}

.rsvp__panel {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 54px) clamp(24px, 6vw, 44px) clamp(34px, 7vw, 46px);
  text-align: center;
  background: var(--blush-soft);
  border: 1px solid var(--rose-soft);
  border-radius: 18px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.55);
}

.rsvp__panel::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1px auto clamp(28px, 6vw, 36px);
  width: min(200px, 60%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.rsvp__note {
  max-width: 400px;
  margin: 14px auto 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.rsvp__form {
  display: grid;
  gap: 26px;
  margin-top: clamp(28px, 6vw, 36px);
  text-align: left;
}

.field { display: grid; gap: 9px; }

.field__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.field__optional {
  letter-spacing: 0.08em;
  text-transform: none;
  font-weight: 400;
  color: var(--muted);
}

/* Stationery inputs — hairline underline, no boxes */
.field__input {
  width: 100%;
  padding: 10px 2px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--paper-line);
  border-radius: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field__input:focus {
  outline: none;
  border-bottom-color: var(--gold-deep);
  box-shadow: 0 1px 0 var(--gold-soft);
}

.field__input::placeholder { color: var(--muted); opacity: 0.55; }

.field__input--area { resize: vertical; min-height: 84px; }

select.field__input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a3743f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 30px;
  cursor: pointer;
}

.field--choice {
  border: 0;
  margin: 0;
  padding: 0;
}

.field--choice legend {
  padding: 0;
  margin-bottom: 8px;
}

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice__opt {
  position: relative;
  display: inline-block;
}

.choice__opt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice__opt span {
  display: inline-block;
  padding: 9px 17px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink);
  background: var(--blush);
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.choice__opt:hover span {
  border-color: var(--rose);
}

.choice__opt input:checked + span {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--rose-soft);
}

.choice__opt input:focus-visible + span {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.rsvp__submit {
  position: relative;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 16px 44px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--wine-deep);
  background: linear-gradient(120deg, var(--gold-deep), var(--gold-soft) 48%, var(--gold-deep));
  background-size: 220% 100%;
  background-position: 0% 0;
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  box-shadow: 0 10px 26px -10px rgba(157, 133, 74, 0.65);
  overflow: hidden;
  transition: background-position 0.6s ease, transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.rsvp__submit:hover,
.rsvp__submit:focus-visible {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(157, 133, 74, 0.8);
}

.rsvp__submit:active { transform: translateY(0); }

.rsvp__submit:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.rsvp__done {
  padding: clamp(20px, 5vw, 30px) 0 6px;
  text-align: center;
}

.rsvp__done svg {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  color: var(--rose);
}

.rsvp__done-note {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

/* ============ GOOD TO KNOW (dress code, gifts…) ============ */
.details {
  padding: clamp(52px, 9vw, 72px) 26px;
  text-align: center;
  background: linear-gradient(180deg, var(--blush-soft) 0%, var(--blush) 100%);
}

.details__cards {
  display: grid;
  gap: 20px;
  max-width: 470px;
  margin: clamp(30px, 6vw, 40px) auto 0;
}

.details-card {
  padding: clamp(26px, 5vw, 34px) clamp(20px, 5vw, 30px) clamp(24px, 5vw, 30px);
  background: var(--blush-soft);
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.details-card__icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: var(--gold-deep);
  background:
    radial-gradient(circle at 32% 30%, rgba(201, 162, 95, 0.16), transparent 60%),
    var(--blush);
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--blush-soft), inset 0 0 0 4px var(--gold-soft);
}

.details-card__icon svg {
  width: 23px;
  height: 23px;
}

.details-card__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  color: var(--wine);
}

.details-card__text {
  max-width: 360px;
  margin: 8px auto 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

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

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid var(--blush-soft);
  box-shadow: 0 0 0 1px var(--paper-line), 0 4px 10px -4px rgba(40, 12, 24, 0.35);
}

/* ============ FOOTER ============ */
.footer {
  position: relative;
  padding: clamp(60px, 11vw, 84px) 30px calc(clamp(48px, 8vw, 64px) + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: var(--blush);
  background:
    radial-gradient(130% 100% at 50% 100%, rgba(183, 110, 121, 0.18), transparent 55%),
    linear-gradient(180deg, var(--wine-deep) 0%, var(--wine) 100%);
}

.footer__closing {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 5vw, 21px);
  color: var(--wine-ink);
}

.footer__names {
  margin: 14px 0 0;
  font-family: var(--script);
  font-size: clamp(40px, 10.5vw, 50px);
  line-height: 1.3;
  color: var(--rose-soft);
}

.footer__date {
  margin: 6px 0 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--wine-ink);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 6vw, 36px);
  padding: 15px 30px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--rose-soft);
  background: transparent;
  border: 1px solid var(--rose);
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.share-btn svg { width: 17px; height: 17px; }

.share-btn:hover,
.share-btn:focus-visible {
  background: var(--rose);
  color: var(--wine-deep);
  transform: translateY(-2px);
}

.footer__hashtag {
  margin: clamp(26px, 5vw, 34px) 0 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--rose);
}

.footer__credit {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(233, 200, 205, 0.2);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(239, 216, 221, 0.5);
}

/* ============ Language toggle (English ⇄ বাংলা) ============ */
/* Pill in the top-right corner — mirrors the floating music/share
   controls. Sits below the intro envelope (z 120), so it only appears
   once the invitation is open. */
.lang-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px 9px 12px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--rose-soft);
  background: var(--wine);
  border: 1px solid var(--rose);
  border-radius: 999px;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s ease, background 0.3s ease;
}

.lang-btn[hidden] { display: none; }

.lang-btn svg { width: 15px; height: 15px; flex: none; }

.lang-btn:hover { background: var(--wine-deep); transform: translateY(-2px); }

/* While the envelope intro is on screen the toggle sits above it
   (the intro itself is z 200), so guests can pick their language
   before opening. */
.intro-active .lang-btn { z-index: 210; }

/* Bangla mode — the Noto Bengali faces take over from the Latin display
   fonts, and the wide tracking used for Latin small-caps is relaxed
   (letter-spacing breaks Bengali conjuncts apart). The couple's names
   (and the countdown closing line / gallery captions) use Atma, a bouncy
   handwritten Bengali face, in place of formal Noto Serif. */
html[data-lang="bn"] {
  --serif: "Noto Serif Bengali", "Playfair Display", Georgia, serif;
  --sans: "Noto Sans Bengali", "Jost", system-ui, sans-serif;
  --script: "Atma", "Noto Serif Bengali", cursive;
}

html[data-lang="bn"] body { line-height: 1.85; }

/* Bengali script needs more room than Latin small-caps — bump the small
   utility text (eyebrows, labels, chips) so it stays legible. */
html[data-lang="bn"] .eyebrow { font-size: 14.5px; }
html[data-lang="bn"] .hero__scroll span { font-size: 12.5px; }
html[data-lang="bn"] .hero__place { font-size: 14.5px; }
html[data-lang="bn"] .chapter__label { font-size: 13.5px; }
html[data-lang="bn"] .event-card__tag { font-size: 14px; }
html[data-lang="bn"] .event-card__chip { font-size: 13px; }
html[data-lang="bn"] .event-card__rows dt { font-size: 13.5px; }
html[data-lang="bn"] .countdown__label { font-size: 12.5px; }
html[data-lang="bn"] .g-photo__cap { font-size: 19.5px; }
html[data-lang="bn"] .intro__hint { font-size: 15px; }
html[data-lang="bn"] .footer__date { font-size: 14.5px; }
html[data-lang="bn"] .footer__credit { font-size: 13px; }
html[data-lang="bn"] .link-btn { font-size: 14.5px; }

html[data-lang="bn"] .hero__name,
html[data-lang="bn"] .intro__card-names,
html[data-lang="bn"] .footer__names { font-weight: 700; }

html[data-lang="bn"] .eyebrow,
html[data-lang="bn"] .hero__scroll span,
html[data-lang="bn"] .hero__place,
html[data-lang="bn"] .chapter__label,
html[data-lang="bn"] .event-card__tag,
html[data-lang="bn"] .event-card__chip,
html[data-lang="bn"] .g-photo__cap,
html[data-lang="bn"] .footer__date,
html[data-lang="bn"] .intro__hint {
  letter-spacing: 0.05em;
  text-transform: none;
}

/* The S&Z monogram (hero seal, envelope seals) is Latin initials — keep
   the Playfair look identical in both languages. Bengali stays as the
   fallback in case a client uses Bengali initials. */
html[data-lang="bn"] .seal__initials,
html[data-lang="bn"] .intro__card-seal span,
html[data-lang="bn"] .intro__seal span {
  font-family: "Playfair Display", "Noto Serif Bengali", Georgia, serif;
}

/* ============ Music button ============ */
.music-btn {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--rose-soft);
  background: var(--wine);
  border: 1px solid var(--rose);
  border-radius: 50%;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s ease, opacity 0.4s ease;
}

.music-btn:hover { transform: translateY(-2px); }

.music-btn__disc { width: 21px; height: 21px; }

.music-btn.is-playing .music-btn__disc {
  display: none;
}

.music-btn__bars {
  display: none;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}

.music-btn.is-playing .music-btn__bars {
  display: flex;
}

.music-btn__bars i {
  width: 2.5px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  animation: eq 0.9s ease-in-out infinite;
}

.music-btn__bars i:nth-child(2) { animation-delay: 0.22s; }
.music-btn__bars i:nth-child(3) { animation-delay: 0.44s; }

@keyframes eq {
  0%, 100% { height: 5px; }
  50% { height: 15px; }
}

/* ============ Share FAB + toast ============ */
/* Compact round share button, bottom-right — mirrors the music button
   bottom-left so neither floats over headings. */
.share-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--rose-soft);
  background: var(--wine);
  border: 1px solid var(--rose);
  border-radius: 50%;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease;
}

.share-fab svg { width: 17px; height: 17px; }

.share-fab span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.share-fab.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.share-fab:hover { background: var(--wine-deep); transform: translateY(-2px); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  z-index: 95;
  max-width: calc(100vw - 48px);
  padding: 11px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--blush-soft);
  background: var(--wine);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 6, 13, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox[hidden] { display: none; }

.lightbox.is-open { opacity: 1; }

.lightbox__stage {
  margin: 0;
  max-width: min(92vw, 1040px);
  text-align: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

/* Slow Ken Burns drift while a photo is viewed (restarted per photo) */
.lightbox.is-open .lightbox__img.is-zoom {
  animation: kb-zoom 9s ease-in-out infinite alternate;
}

@keyframes kb-zoom {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.07) translate(0.6%, -0.8%); }
}

.lightbox__caption {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 16px;
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--rose-soft);
}

#lbCount {
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.18em;
  opacity: 0.6;
}

.lightbox__nav,
.lightbox__close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--rose-soft);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox__nav:hover,
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.06);
}

.lightbox__nav svg,
.lightbox__close svg { width: 20px; height: 20px; }

.lightbox__nav--prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__nav--next:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__close { top: 16px; right: 16px; }

/* ============================================================
   ENVELOPE INTRO — full-screen wax-sealed envelope (script.js)
   Tap the seal → flap opens → petals drift out → card lifts, then
   is pulled toward the camera while the empty envelope sinks away;
   the backdrop pushes in gently and the hero entrance begins
   (html.is-open).
   ============================================================ */
body.intro-active { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(183, 110, 121, 0.16), transparent 55%),
    var(--wine-deep);
  transition: opacity 1s ease,
              transform 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07'%3E%3Crect x='23' y='23' width='26' height='26'%3E%3C/rect%3E%3Crect x='23' y='23' width='26' height='26' transform='rotate(45 36 36)'%3E%3C/rect%3E%3Ccircle cx='36' cy='36' r='2.2'%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 50%, rgba(0,0,0,0.9), transparent);
  mask-image: radial-gradient(80% 70% at 50% 50%, rgba(0,0,0,0.9), transparent);
}

/* Soft camera push-in while the backdrop clears */
.intro.is-done {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.intro__envelope {
  position: relative;
  width: min(78vw, 330px);
  aspect-ratio: 1.42;
  perspective: 1100px;
  filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.5));
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.intro.is-lifting .intro__envelope {
  transform: translateY(-12px) scale(1.04);
}

/* The empty envelope, relieved of its card, sinks away and tumbles
   with a gravity-like ease while the card flies on without it. */
.intro.is-revealing .intro__envelope {
  transform: translateY(118%) rotate(-7deg);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.55, 0, 0.85, 0.36),
              opacity 0.6s ease 0.3s;
}

/* Envelope body + side folds — sits above the card so the card is
   tucked inside and only emerges above the top edge as it lifts. */
.intro__pocket {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 10px;
  -webkit-clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, var(--wine) 0%, var(--wine-deep) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(231, 201, 164, 0.22),
    inset 0 8px 16px -8px rgba(0, 0, 0, 0.45);
}

.intro__pocket::before,
.intro__pocket::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
}

.intro__pocket::before {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), transparent 55%);
  clip-path: polygon(0 0, 56% 34%, 0 82%);
}

.intro__pocket::after {
  background: linear-gradient(-135deg, rgba(0, 0, 0, 0.3), transparent 55%);
  clip-path: polygon(100% 0, 44% 34%, 100% 82%);
}

/* The invitation card tucked inside — hidden by the pocket until it
   lifts out above the envelope on open. */
.intro__card {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 6%;
  bottom: 12%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 26px 20px;
  border-radius: 8px;
  background: var(--blush);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.3);
  transition: transform 0.95s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.75s ease 0.1s;
}

.intro__card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  pointer-events: none;
}

.intro.is-lifting .intro__card {
  transform: translateY(-52%) scale(1.05);
}

/* The card keeps rising, swelling toward the viewer and dissolving —
   as if drawn out of the envelope and into the page itself. */
.intro.is-revealing .intro__card {
  transform: translateY(-140%) scale(1.7);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.85s ease 0.05s;
}

.intro__card-seal {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  box-shadow:
    inset 0 0 0 3px var(--blush),
    inset 0 0 0 4px var(--gold-deep);
}

.intro__card-seal span {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--wine);
}

.intro__card-names {
  margin: 0;
  font-family: var(--script);
  font-size: 25px;
  line-height: 1.2;
  color: var(--wine);
}

.intro__card-date {
  margin: 0;
  font-family: var(--serif);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

/* Top flap — wine outside, gold-foil lining on the back */
.intro__flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 62%;
  z-index: 3;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.55, 0.06, 0.35, 1),
              z-index 0s linear 0.75s;
}

.intro__flap-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.intro__flap-face--front {
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, var(--wine-deep) 0%, var(--wine-deep) 55%, var(--wine) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(231, 201, 164, 0.4);
}

.intro__flap-face--back {
  -webkit-clip-path: polygon(0 100%, 100% 100%, 50% 0);
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  transform: rotateX(180deg);
  background: linear-gradient(180deg, var(--gold-deep) 0%, var(--gold-soft) 100%);
}

.intro.is-opening .intro__flap {
  z-index: 0;
  transform: rotateX(-178deg);
}

/* Wax seal sitting on the flap tip */
.intro__seal {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 4;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 32% 28%, #7d2940, var(--wine-deep) 74%);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(0, 0, 0, 0.18),
    inset 0 3px 8px rgba(255, 255, 255, 0.22),
    inset 0 -6px 12px rgba(0, 0, 0, 0.45);
  border: 0;
  cursor: pointer;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}

.intro__seal::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(233, 200, 205, 0.35);
}

.intro__seal::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(231, 201, 164, 0.35);
}

.intro__seal span {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--rose-soft);
}

.intro__seal:hover,
.intro__seal:focus-visible {
  transform: translate(-50%, -50%) scale(1.07);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.6),
    inset 0 2px 6px rgba(255, 255, 255, 0.22),
    inset 0 -5px 10px rgba(0, 0, 0, 0.4),
    0 0 30px -4px rgba(201, 162, 95, 0.5);
}

.intro.is-opening .intro__seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.3);
  pointer-events: none;
}

.intro__hint {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--rose-soft);
  animation: hint-pulse 2.4s ease-in-out infinite;
  transition: opacity 0.4s ease;
}

.intro.is-opening .intro__hint { opacity: 0; animation: none; }

/* Petals that flutter out of the opened envelope (spawned by script.js) */
.intro__petals {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}

.intro__petal {
  position: absolute;
  top: 0;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 1.25);
  background: linear-gradient(135deg, var(--rose-soft), var(--rose));
  border-radius: 62% 38% 55% 45% / 68% 62% 38% 32%;
  opacity: 0;
  animation: petal-drift var(--t) cubic-bezier(0.22, 0.61, 0.36, 1) var(--dl, 0s) forwards;
}

@keyframes petal-drift {
  0%   { transform: translate(0, 6px) rotate(0deg) scale(0.5); opacity: 0; }
  12%  { opacity: 0.95; }
  55%  { transform: translate(calc(var(--dx) * 0.6), var(--dy)) rotate(calc(var(--dr) * 0.6)) scale(1); opacity: 0.95; }
  100% { transform: translate(var(--dx), calc(var(--dy) * 0.3)) rotate(var(--dr)) scale(0.94); opacity: 0; }
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ============ RSVP petal burst (spawned by script.js) ============ */
.burst-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.burst-petal {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: calc(var(--s) * 1.2);
  background: linear-gradient(135deg, var(--rose-soft), var(--rose));
  border-radius: 62% 38% 55% 45% / 68% 62% 38% 32%;
  opacity: 0;
  animation: burst-fly 1.35s cubic-bezier(0.17, 0.67, 0.35, 1) var(--dl, 0s) forwards;
}

@keyframes burst-fly {
  0%   { transform: translate(0, 0) rotate(0deg) scale(0.4); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translate(var(--bx), var(--by)) rotate(var(--br)) scale(1); opacity: 0; }
}

/* ============ Reveal-on-scroll (enhanced, staggered) ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============ Focus ============ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   DESKTOP ≥ 960px — full-width layout
   Corner garlands scale up, alternating story timeline,
   three event cards in a row, 3-column gallery mosaic,
   venue split, roomier RSVP panel.
   ============================================================ */
@media (min-width: 960px) {
  .invite {
    max-width: none;
    box-shadow: none;
  }

  /* --- Hero --- */
  .hero { padding: 72px 48px 108px; }

  .hero__garland {
    top: 26px;
    width: 150px;
  }

  .hero__garland--l { left: 34px; }
  .hero__garland--r { right: 34px; }

  .hero__arch {
    width: min(100%, 640px);
    padding: 72px 64px 60px;
    border-radius: 320px 320px 12px 12px;
  }

  .hero__arch::before {
    inset: 9px;
    border-radius: 306px 306px 8px 8px;
  }

  .blessing { font-size: 17px; }

  .seal {
    width: 106px;
    height: 106px;
    margin-bottom: 26px;
  }

  .seal__initials { font-size: 34px; }

  .hero__name { font-size: 66px; }

  .hero__amp {
    font-size: 38px;
    margin: 4px 0;
  }

  .sprig--hero { width: 190px; }

  .hero__date { font-size: 24px; }

  .hero__place { font-size: 11.5px; }

  .hero__scroll { bottom: 84px; }

  .scallop svg { height: 56px; }

  /* --- Welcome: families side by side --- */
  .welcome {
    padding: 104px 48px 72px;
  }

  .welcome__line { max-width: 560px; }

  .welcome__families {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px 52px;
    max-width: 880px;
    margin: 26px auto 0;
  }

  .welcome__parents { margin: 0; }

  .welcome__parents:first-child { text-align: right; }

  .welcome__parents:last-child { text-align: left; }

  .welcome__divider {
    display: block;
    width: 1px;
    height: 76px;
    background: linear-gradient(180deg, transparent, var(--rose), transparent);
  }

  /* --- Countdown --- */
  .countdown { padding: 24px 48px 104px; }

  .countdown__panel {
    max-width: 700px;
    margin: 0 auto;
    padding: 54px 56px 46px;
  }

  .countdown__grid { gap: 14px; margin-top: 38px; }

  .countdown__cell { padding: 22px 8px 16px; }

  .countdown__num { font-size: 46px; }

  .countdown__label { font-size: 9.5px; }

  /* --- Story: alternating around a centre line --- */
  .story { padding: 104px 48px; }

  .story__timeline {
    max-width: 880px;
    padding-left: 0;
    margin-top: 52px;
  }

  .story__timeline::before {
    left: calc(50% - 1px);
    top: 4px;
    bottom: 4px;
  }

  .story__fill {
    left: calc(50% - 1px);
    top: 4px;
    max-height: calc(100% - 8px);
  }

  .chapter {
    width: 50%;
    padding-right: 64px;
    text-align: right;
  }

  .chapter:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 64px;
    text-align: left;
  }

  /* 13px dots centred exactly on the 50% axis (6.5px = half dot) */
  .chapter__dot { left: auto; right: -6.5px; }
  .chapter:nth-child(even) .chapter__dot { right: auto; left: -6.5px; }

  .chapter__text { max-width: 340px; }
  .chapter:nth-child(odd) .chapter__text { margin-left: auto; }

  /* --- Events: cards in a row --- */
  .events { padding: 104px 48px; }

  .events__list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    justify-content: center;
    gap: 26px;
    max-width: none;
    margin-top: 44px;
  }

  .event-card__name { font-size: 34px; }

  .event-card__rows dd { font-size: 18px; }

  /* --- Gallery: 3-column mosaic --- */
  .gallery { padding: 104px 48px; }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 900px;
    margin-top: 44px;
  }

  .g-photo--wide { aspect-ratio: 2 / 1.02; }

  .gallery__hint { margin-top: 30px; }

  /* --- Venue: details left, map right --- */
  .venue { padding: 24px 48px 112px; }

  .venue__split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 24px 64px;
    max-width: 1040px;
    margin: 48px auto 0;
  }

  .venue__info { text-align: left; }

  .venue__info .section-title { text-align: left; }

  .venue__name {
    max-width: none;
    margin: 22px 0 0;
    font-size: 22px;
  }

  .venue__address {
    max-width: none;
    margin: 10px 0 0;
  }

  .venue__directions { margin-top: 22px; }

  .venue__frame {
    max-width: none;
    margin: 0;
  }

  .venue__frame iframe { aspect-ratio: 5 / 4; }

  /* --- RSVP --- */
  .rsvp { padding: 112px 48px; }

  .rsvp__panel {
    max-width: 640px;
    padding: 58px 64px 52px;
  }

  .rsvp__note { max-width: 440px; }

  .rsvp__form { gap: 26px; }

  /* --- Footer --- */
  .footer {
    padding: 112px 48px calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .footer__inner {
    max-width: 760px;
    margin: 0 auto;
  }

  .footer__names { font-size: 60px; }

  /* --- Floating controls --- */
  .music-btn {
    left: 26px;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    height: 50px;
  }

  .lang-btn {
    top: 26px;
    right: 26px;
    font-size: 13.5px;
  }

  .share-fab {
    right: 26px;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    width: 50px;
    height: 50px;
  }

  .toast { bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }

  /* --- New premium pieces --- */
  .hero__photo {
    inset: 11px;
    border-radius: 305px 305px 5px 5px;
  }

  .countdown__num { font-size: 54px; }

  .details { padding: 104px 48px; }

  .details__cards {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    max-width: 880px;
    margin-top: 44px;
  }

  .details-card__text { max-width: none; }

  .event-card__chip { top: 18px; right: 18px; }

  .intro__envelope { width: min(40vw, 380px); }

  .venue__frame iframe { aspect-ratio: 5 / 4; }
}
