/* ============================================================
   EDIT YOUR DETAILS: most text lives in index.html.
   Search for the [BRACKETED] placeholders there to replace them.
   Colors/timing can be tweaked in the :root variables below.
   ============================================================ */
:root {
  --ivory: #f7f2e9;
  --ivory-deep: #efe6d6;
  --paper: #ece2cf;
  --paper-shade: #ddcfb4;
  --envelope: #c9c2b4;        /* flat envelope paper — same on front & flap */
  --envelope-inside: #b0a897; /* darker interior, revealed as the flap unfolds */
  /* flap unfold timing (0.8s duration after a 1.62s delay) is set as LITERALS on
     `.flap`'s transition AND the `.flap-shadow` animation — not CSS vars, because iOS
     Safari ignores var() in those shorthands. To change the speed, edit both places. */
  --gold: #b08d57;
  --gold-light: #ccae78;
  --ink: #4a4234;
  --ink-soft: #6f6553;
  --wax: #af7287;
  --wax-light: #95383f;
  /* soft-pink wax seal */
  --seal-pink-light: #fcdbe4;
  --seal-pink: #f3a9c1;
  --seal-pink-deep: #e487a3;
  --seal-ink: #dd91ab;
  /* soft powdery pink for ALL invitation text */
  --seal-text: #d5a6ba;
  --seal-glint: #fbeef3;
  --cue-grey: #a8a299;   /* grey for the scroll cue + the "tap to open" hint */
  --text-grey: #7d756a;  /* darker grey for the body invitation text */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Cormorant Garamond", serif;
  color: var(--ink);
  background: var(--ivory-deep);
  overflow: hidden; /* locked until invitation opens */
  overflow-x: hidden; /* never scroll sideways on phones */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* the couple photo sits FIXED behind everything — revealed as the envelope fades,
   and stays put while the white text cards scroll over it. Uses position:fixed
   (not background-attachment:fixed, which iOS Safari ignores). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* focus point tuned so the couple sits CENTERED when the wide photo is cropped
     on a tall phone screen (man ~34% / woman ~48% across the image) */
  background: url("images/couple.png") 36% center / cover no-repeat;
  z-index: -1;
}
body.unlocked { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ===================== SCENE (envelope) ===================== */
#scene {
  position: fixed;
  inset: 0;
  height: 100dvh; /* dynamic viewport: accounts for mobile address bar */
  perspective: 1600px;
  z-index: 30;
  transition: opacity 1.4s ease, visibility 1.4s ease;
}
#scene.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.greeting {
  text-align: center;
  margin-bottom: clamp(24px, 5vh, 38px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.greeting .small {
  font-size: clamp(0.8rem, 3vw, 1.05rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.greeting .name {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  line-height: 1.1;
  color: var(--ink);
  padding: 0 10px;
  overflow-wrap: break-word;
}
#scene.opening .greeting { opacity: 0; transform: translateY(-12px); }

/* The envelope */
.envelope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;               /* full-bleed — fills the entire screen */
  cursor: pointer;
  transform-style: preserve-3d;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
#scene.opening .envelope { animation-play-state: paused; }

.envelope > div { position: absolute; }

/* envelope front body — covers the whole envelope except the right flap triangle */
.env-front {
  inset: 0;
  background: var(--envelope);
  z-index: 3;
  /* full rectangle with a leftward V notch at right-center that the flap fills */
  clip-path: polygon(0 0, 100% 0, 50% 50%, 100% 100%, 0 100%);
}

/* guest name written on the front-left of the envelope, like a real invitation */
.address {
  left: 3%; right: 27%; top: 66%;
  z-index: 4;
  text-align: center;
  padding: 0 6px;
}
.address .addr-pre {
  font-size: clamp(0.6rem, 2.3vw, 0.85rem);
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 10px;
}
.address .addr-name {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.8rem, 7.5vw, 2.9rem);
  line-height: 1.05; color: var(--ink);
  overflow-wrap: break-word;
}
.address .addr-rule {
  width: 90px; height: 1px; margin: 14px auto 0;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* right-hand flap that swings open to the right.
   NOTE: clip-path lives on the inner .flap-paper, and the shadow on the outer
   .flap — otherwise the flap's own clip-path would clip its cast shadow away. */
.flap {
  top: 0; bottom: 0; right: 0;
  width: 50%;
  transform-origin: right center;
  transform: rotateY(0deg);
  /* deliberate paper-fold motion: pause (delay) lets the seal fade first, then it unfolds.
     Literals (0.8s duration / 1.62s delay) NOT CSS vars — iOS Safari ignores var() inside
     the transition/animation shorthand, which made the flap snap instantly on iPhone.
     KEEP IN SYNC with the .flap-shadow animation below. */
  transition: transform 0.8s cubic-bezier(0.5, 0, 0.15, 1) 1.62s;
  z-index: 6; /* above card while closed */
  /* the folded flap sits above the body and casts a soft, diffuse shadow along its edge */
  filter: drop-shadow(0 2px 7px rgba(0,0,0,0.22)) drop-shadow(0 0 4px rgba(0,0,0,0.13));
}
.flap-paper {
  position: absolute; inset: 0;
  background: var(--envelope);   /* same flat paper as the body */
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

/* Shadow the lifting flap casts onto the envelope body. It lives on the envelope
   surface (z5, just under the flap) so it stays on the plane and animates — in sync
   with the flap via the same vars — rather than rotating away with the flap.
   Blur on the outer; dark triangle on the inner. */
.flap-shadow {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 50%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform-origin: right center;
  filter: blur(9px);
}
.flap-shadow-tri {
  position: absolute; inset: 0;
  background: rgba(45, 35, 28, 0.5);
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}
/* Two animations: MOVE uses the EXACT same easing/duration/delay as the flap's
   transition (so the shadow's motion tracks the flap 1:1), while FADE handles
   opacity on its own quick curve so the shadow shows the instant the flap lifts. */
#scene.opening .flap-shadow {
  animation:
    flapShadowMove 0.8s cubic-bezier(0.5, 0, 0.15, 1) 1.62s forwards,
    flapShadowFade 0.8s ease-out 1.62s forwards;
}
@keyframes flapShadowMove {
  from { transform: translate(0, 0)      scaleY(1)    skewX(0deg); }
  to   { transform: translate(-10%, 22%) scaleY(1.45) skewX(-9deg); }
}
@keyframes flapShadowFade {
  0%   { opacity: 0; }
  9%   { opacity: 0.42; }   /* appears almost as soon as the flap starts lifting */
  60%  { opacity: 0.40; }
  100% { opacity: 0; }      /* gone by the time the flap has swept away */
}

/* ===== wax seal — soft pink, realistic bumpy edges ===== */
.seal {
  position: absolute;
  top: 50%; left: 0;   /* left:0 = the flap's apex (screen centre) — seal rides the flap */
  width: 180px; height: 180px;
  margin: -90px 0 0 -90px;   /* MUST be half the width/height to stay centred */
  z-index: 8;
  /* slow, gentle fade — finishes (and the flap then opens) before any tilt is seen */
  transition: opacity 1.8s ease, transform 0.4s ease;
}
/* wax seal image (transparent PNG) */
.seal-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  /* brightness/saturate deepen the pink a little; drop-shadow adds depth */
  filter: brightness(0.84) saturate(1.0) drop-shadow(0 4px 8px rgba(120,60,80,0.35));
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
/* ===== soft warm-glow halo around the seal (the chosen "tap me" cue) ===== */
.seal-glow {
  position: absolute;
  top: 50%; left: 0;
  width: 140px; height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,246,228,0.95) 0%, rgba(236,204,158,0.45) 42%, rgba(236,204,158,0) 72%);
  z-index: 7;
  opacity: 0;
  pointer-events: none;
  display: none;
}
#scene.fx-glow .seal-glow { display: block; animation: sealGlow 3.6s ease-in-out infinite; }
@keyframes sealGlow {
  0%, 100% { opacity: 0;  transform: scale(1.2); }
  50%      { opacity: 1;  transform: scale(2.1); }
}

.hint {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  text-align: center;
  font-size: clamp(0.78rem, 3vw, 0.95rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cue-grey);
  z-index: 5;
  animation: pulse 2.2s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
@keyframes pulse { 0%,100%{opacity:0.45;} 50%{opacity:1;} }
#scene.opening .hint { opacity: 0; }

/* speaker sound indicator — plain icon, centered above the hint; lives inside
   #scene so it fades away with the envelope */
.music-toggle {
  position: absolute;
  left: 0; right: 0;
  bottom: 13%;            /* sits just above the "tap the seal to open" hint (6%) */
  margin: 0 auto;
  z-index: 9;
  width: 40px; height: 40px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: none;
  color: var(--wax);   /* lighter, soft powdery pink */
  cursor: pointer;
}
.music-toggle svg { width: 28px; height: 28px; display: block; overflow: visible; }
/* sound waves ripple outward from the speaker (inner first, then outer) */
.music-toggle .wave { opacity: 0; }
.music-toggle .w1 { animation: soundWave 1.8s ease-in-out infinite; }
.music-toggle .w2 { animation: soundWave 1.8s ease-in-out infinite 0.35s; }
@keyframes soundWave {
  0%   { opacity: 0; }
  25%  { opacity: 1; }
  55%  { opacity: 1; }
  100% { opacity: 0; }
}

/* language chooser — at the TOP of the envelope (where the dev toggle used to be) */
.lang-switch {
  position: absolute;
  left: 0; right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 20px);   /* clears notches in viewport-fit=cover */
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;   /* fallback centering if flex ever fails to apply */
  transition: opacity 0.4s ease;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.82rem, 3vw, 1rem);
  letter-spacing: 0.12em;
  color: var(--cue-grey);
  padding: 3px 4px;
  transition: color 0.25s ease;
}
.lang-btn.is-active { color: var(--wax); }
.lang-sep { color: var(--cue-grey); opacity: 0.7; }
#scene.opening .lang-switch { opacity: 0; pointer-events: none; }

/* ---- OPENING STATES ---- */
/* rotateY is POSITIVE so the flap lifts TOWARD the viewer (visible) instead of folding
   back behind the card. No z-index drop — 3D depth keeps it in front while lifting,
   then behind once it lays open. */
/* flap (and the seal riding on it) opens only HALFWAY, then the whole scene fades */
#scene.opening .flap { transform: rotateY(60deg); }
#scene.opening .seal { opacity: 0; animation: none; }   /* seal fades out FIRST (1.8s), before the flap opens */
#scene.opening .seal-glow { opacity: 0; animation: none; }   /* the glow cue fades out too */

/* ===================== INVITATION (scroll) ===================== */
/* The invitation sits UNDERNEATH the envelope from the start (z-10, below the
   z-30 scene). The opaque envelope front hides it until the front fades away,
   so the opening flap uncovers the real page 1 — no fade-in needed. */
#invitation {
  position: relative;
  z-index: 10;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(4px, 1.5vw, 12px) 90px;
}

/* ===== Invitation text is GREY by default; key items (quote, countdown numbers,
   names, map link, RSVP) are explicitly set to deep rose to stand out ===== */
#invitation {
  --gold: var(--seal-ink);
  --gold-light: var(--seal-glint);
  --ink: var(--text-grey);
  --ink-soft: var(--text-grey);
  color: var(--text-grey);
}
/* per-letter glow: text-shadow applies to every glyph, so each letter glows
   and gently shimmers (brightens/dims) — NOT a band sweeping across the block */
/* #invitation .verse,
#invitation .parents,
#invitation .invite-line,
#invitation .hero-date,
#invitation .flourish,
#invitation .section-title,
#invitation .section-sub,
#invitation .big-date,
#invitation .time,
#invitation .ev-line,
#invitation .venue-name,
#invitation .venue-addr,
#invitation .map-link,
#invitation .timeline,
#invitation .closing .line,
#invitation .closing .sig {
  animation: engraveShimmer 3.6s ease-in-out infinite;
}
@keyframes engraveShimmer {
  0%, 100% { text-shadow: 0 1px 0.5px rgba(255,255,255,0.75), 0 -1px 1px rgba(102,58,80,0.34); }
  50%      { text-shadow: 0 1.5px 1.5px rgba(255,255,255,1),  0 -1px 1px rgba(102,58,80,0.40); }
} */
/* "Scroll" cue is grey, like the "Tap the seal to open" hint (no pink, no glow) */
#invitation .scroll-cue,
#invitation .scroll-cue .chev {
  color: var(--cue-grey);
  text-shadow: none;
  animation: pulse 2.2s ease-in-out infinite;
}
#invitation .scroll-cue .chev { animation: bob 1.8s ease-in-out infinite; }

.panel {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(176,141,87,0.3);
  border-radius: 6px;
  box-shadow: 0 24px 60px -26px rgba(43,33,26,0.6);
  /* generous gap so the couple photo is revealed between cards while scrolling */
  margin-top: clamp(60px, 16vh, 150px);
  padding: clamp(34px, 7vw, 46px) clamp(8px, 3vw, 22px);
  text-align: center;
}
.panel:first-child { margin-top: min(12dvh, 110px); }

.flourish {
  color: var(--gold);
  letter-spacing: 0.45em;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.hero .pretext {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.hero .guest {
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 22px;
}
.hero .guest:empty { margin-bottom: 0; }
/* Page 1: the verse on its own full screen, centered */
.page-verse {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 clamp(6px, 2.5vw, 40px);
}
/* countdown card — content height so the photo shows above & below it */
/* white card on the photo, with the picture showing above & below it.
   The flower decoration lives inside this frame (behind the text, above the card bg). */
.verse-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;          /* clip the flower to the rounded card */
  width: 100%;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(176,141,87,0.3);
  border-radius: 6px;
  box-shadow: 0 24px 60px -26px rgba(43,33,26,0.6);
}
.verse {
  font-family: "Italianno", cursive;
  font-weight: 400;
  /* smaller / more zoomed-out on the page; never wider than the screen (keeps 4 lines) */
  font-size: min(2.2rem, 8vw);
  line-height: 1.35;
  max-width: none;
  white-space: nowrap;
  color: var(--seal-ink);   /* quote stays deep rose */
  padding: clamp(34px, 8vw, 60px) clamp(8px, 2vw, 20px);
}
.verse .ref {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.46em;
  letter-spacing: 0.08em;
  margin-top: 0.8em;
}
/* church drawing above the parents — edges fade softly into the page */
.church-img {
  align-self: center;
  width: 100%;
  max-width: 240px;
  height: auto;
  /* sits under the ceremony text, above the map link */
  margin: clamp(14px, 4vw, 26px) auto clamp(10px, 3vw, 18px);
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 82% 74% at 50% 46%, #000 44%, rgba(0,0,0,0) 100%);
          mask-image: radial-gradient(ellipse 82% 74% at 50% 46%, #000 44%, rgba(0,0,0,0) 100%);
}

.hero .parents {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  /* scales down on narrow phones so both names always stay on ONE row */
  font-size: clamp(0.58rem, 3vw, 1.25rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.5;
  margin-top: 20px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: nowrap;          /* never wrap to a second line */
  justify-content: center;
  gap: 1.6em;                 /* space between the two names (scales with font) */
}
.hero .parents .fam { white-space: nowrap; }
.hero .invite-line {
  font-style: italic;
  font-size: clamp(0.9rem, 3.7vw, 1.18rem);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: none;
  margin: 20px auto 30px;
}

.hero .names {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.15rem, 9.8vw, 4.3rem);
  line-height: 1.4;
  white-space: nowrap;
  /* shine sweep: rose names with a bright gleam that crosses periodically.
     The gradient tiles (background-size 200%, repeat) so the letters are always
     filled; the transparent text fill is what lets the gradient show through. */
  background-image: linear-gradient(105deg,
    var(--seal-ink) 0%, var(--seal-ink) 45%,
    #edd2d2 50%,
    var(--seal-ink) 55%, var(--seal-ink) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: nameShine 10s linear infinite;
}
@keyframes nameShine {
  0%   { background-position: -220% 0; }
  100% { background-position: 0 0; }
}

.hero .amp { color: var(--gold); font-size: 0.58em; margin: 0 0.5em; }
.hero .hero-date {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.85rem, 3.7vw, 1.3rem);
  color: var(--ink);
  margin-top: 40px;
}
.hero .tagline {
  margin-top: 22px;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
}

h2.section-title {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 6vw, 1.8rem);
  color: var(--ink);
  margin-bottom: 6px;
}
.section-sub { color: var(--ink-soft); font-size: 1.05rem; letter-spacing: 0.05em; }

.divider {
  width: 70px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 18px auto 24px;
  position: relative;
}
.divider::after {
  content: "❦"; color: var(--gold);
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(160deg, #fffdf8 0%, #f5eede 100%);
  padding: 0 10px; font-size: 0.95rem;
}

.big-date {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 8vw, 2.4rem);
  color: var(--ink);
  margin: 6px 0;
}
.big-date .day-name { display:block; letter-spacing: 0.3em; font-size: 1rem; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.time { font-size: 1.3rem; color: var(--ink-soft); }

/* parents page + ceremony page: taller / portrait, content vertically centered */
.hero, .info-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
/* decorative flowers (static) — top-left inside the verse card, bottom-right on the hero */
.hero { isolation: isolate; }   /* local stacking (verse flower uses .verse-frame's context) */
.corner-flower {
  position: absolute;
  z-index: -1;                 /* behind the text, above the card/photo */
  width: clamp(86px, 27vw, 145px);
  pointer-events: none;
}
.corner-flower img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.9;
}
.corner-flower-tl { top: 0; left: -6px; width: clamp(70px, 22vw, 115px); }   /* top-left of the verse card */
.corner-flower-tl img { opacity: 1; }    /* full opacity (sits behind the text, above the card) */
.corner-flower-br { bottom: 0px; right: -6px; transform: scale(-1, -1); }  /* flipped + inverted */
/* single info panel — each sentence on its own line, all caps */
.ev-line {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  /* scales down enough that the longest line (EN ceremony) fits on ONE line */
  font-size: clamp(0.6rem, 3.25vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: none;
  white-space: nowrap;   /* each sentence stays on one line */
  margin: 0 auto 22px;
}
.ev-line:last-child { margin-bottom: 0; }
/* villa drawing under the Bikfaya line — sized & toned to match the church drawing
   (villa ink was lighter/warmer rgb(207,177,174); church is rgb(175,140,149)) */
.villa-img {
  display: block;
  align-self: center;
  width: 100%;
  max-width: 220px;          /* same width as the church picture */
  height: auto;
  /* nudged slightly upward (small negative top margin) */
  margin: clamp(-10px, -2vw, -4px) auto clamp(12px, 3.5vw, 18px);
  /* filter: brightness(1.08) saturate(0.9) hue-rotate(-6deg); */
  /* soft-fade the edges into the card (portrait ellipse) */
  -webkit-mask-image: radial-gradient(ellipse 80% 82% at 50% 50%, #000 46%, rgba(0,0,0,0) 100%);
          mask-image: radial-gradient(ellipse 80% 82% at 50% 50%, #000 46%, rgba(0,0,0,0) 100%);
}
/* the villa/dinner card is shorter — less vertical padding than other panels */
.dinner-panel { padding-top: clamp(20px, 5vw, 30px); padding-bottom: clamp(20px, 5vw, 30px); }
.ev-line .ev-sub {
  display: block;
  font-weight: 500;
  font-size: 0.92em;
  letter-spacing: 0.1em;
  margin-top: 5px;
}

.venue-name { font-family:"Playfair Display", serif; font-size: 1.6rem; color: var(--ink); margin-bottom: 4px; }
.venue-addr { font-size: 1.15rem; color: var(--ink-soft); line-height: 1.5; }
/* elegant "View on map" link under each venue */
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-top: 4px;
  padding: 7px 17px;
  border: 1px solid var(--ink);
  border-radius: 40px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.62rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.map-link .pin { width: 0.95em; height: 0.95em; fill: none; stroke: currentColor; stroke-width: 1.7; }
.map-link:hover, .map-link:focus-visible { background: var(--seal-ink); color: #fffaf6; }

/* group each venue with its map link */
.ev-group + .ev-group { margin-top: clamp(24px, 6vw, 40px); }
.ev-group .ev-line { margin-bottom: 9px; }

.timeline { list-style: none; margin: 10px auto 0; max-width: 360px; text-align: left; }
.timeline li {
  display: flex; align-items: baseline; gap: 18px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(176,141,87,0.35);
}
.timeline li:last-child { border-bottom: none; }
.timeline .t-time {
  font-family: "Playfair Display", serif;
  color: var(--gold);
  font-size: 1.15rem;
  min-width: 90px;
  text-align: right;
}
.timeline .t-event { font-size: 1.2rem; color: var(--ink); }

.closing {
  text-align: center;
  /* white card to match the panels, photo revealed above & below */
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(176,141,87,0.3);
  border-radius: 6px;
  box-shadow: 0 24px 60px -26px rgba(43,33,26,0.6);
  margin-top: clamp(60px, 16vh, 150px);
  padding: clamp(40px, 9vw, 56px) clamp(16px, 5vw, 30px) clamp(34px, 7vw, 46px);
}
.closing .line { font-style: italic; font-size: 1.3rem; color: var(--ink-soft); }
.closing .sig-line { font-style: italic; font-size: clamp(1.05rem, 4.4vw, 1.35rem); color: var(--seal-text); }
.closing .sig { font-family: "Great Vibes", cursive; font-size: 35px; color: var(--seal-ink); margin-top: 18px; }

/* RSVP */
.rsvp {
  margin-bottom: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
/* RSVP alone on its own page — no trailing margin needed */
.rsvp-panel .rsvp { margin-bottom: 0; }
/* warm note under the RSVP date */
.rsvp-note {
  font-style: italic;
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  line-height: 1.5;
  color: var(--seal-text);   /* soft pink, warm */
  max-width: 22em;
  margin: 20px auto 0;
}
/* optional "Number of persons: N" line (shown via ?n= in the URL) */
.rsvp-count {
  margin-top: 16px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.rsvp::after {
  content: "";
  width: 46px;
  height: 1px;
  background: var(--text-grey);
  opacity: 0.45;
  margin-top: 16px;
}
.rsvp-word {
  font-family: "Playfair Display", serif;
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--text-grey);
}
.rsvp-date {
  font-style: italic;
  font-size: clamp(0.92rem, 4vw, 1.1rem);
  color: var(--text-grey);
}

/* live countdown to the wedding */
.cd-intro {
  font-style: italic;
  font-size: clamp(1.05rem, 4.4vw, 1.35rem);
  color: var(--text-grey);
  margin-bottom: 20px;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3.5vw, 22px);
  margin-bottom: 35px;   /* extra breathing room before the sign-off line */
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4em;
}
.cd-num {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.55rem, 8vw, 2.6rem);
  line-height: 1;
  color: var(--seal-ink);
  font-variant-numeric: tabular-nums;
}
.cd-label {
  margin-top: 7px;
  font-size: clamp(0.52rem, 2.5vw, 0.7rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cue-grey);
}

/* scroll cue */
.scroll-cue {
  /* in normal flow, BELOW the date — no overlap on the content-height hero */
  margin-top: clamp(30px, 8vw, 48px);
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.8rem;
  animation: pulse 2.2s ease-in-out infinite;
}
.scroll-cue .chev { display:block; font-size: 1.3rem; margin-top: 4px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0);} 50%{transform:translateY(6px);} }

@media (max-width: 380px) {
  .timeline li { gap: 12px; }
  .timeline .t-time { min-width: 74px; font-size: 1.05rem; }
  .timeline .t-event { font-size: 1.1rem; }
  .hero .tagline { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .envelope, .seal, .seal-glow, .flap-shadow, .hint, .scroll-cue, .scroll-cue .chev, .music-toggle .wave { animation: none !important; }
  .music-toggle .wave { opacity: 0.85; }   /* show static waves when motion is reduced */
  .seal-glow, .flap-shadow { display: none; }
  #invitation * { animation: none !important; }  /* hold the text shimmer static */
  * { transition-duration: 0.25s !important; }
}
