/* ============================================================
   Rhona & Francis — Wedding Invitation
   styles.css
   ------------------------------------------------------------
   1. Tokens & base
   2. Typography helpers
   3. Envelope landing view + open sequence
   4. Invitation — hero
   5. Countdown
   6. RSVP CTA
   7. Keepsake (boarding pass)
   8. Details grid
   9. Gallery + lightbox
   10. Footer
   11. Music player
   12. Reveal animations & reduced motion
   ============================================================ */

/* ── 1. Tokens & base ──────────────────────────────────────── */
:root {
  /* Palette (client style guide) */
  --soft-white: #FDFBF8;
  --ivory:      #FFF8F1;
  --beige:      #EFE1D3;
  --champagne:  #E9DCC8;
  --nude:       #D9BFAE;
  --blush:      #F1DCD5;
  --rose-gold:  #B98871;
  --rose-gold-deep: #A47159;
  --charcoal:   #3A2E28;
  --taupe:      #8A7B6E;
  --greige:     #D6D3CC;

  /* Type */
  --font-script: "Brooklyn", "Ms Madi", cursive;
  --font-head:   "Cormorant SC", "Cormorant Garamond", serif;
  --font-body:   "Nunito Sans", system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --radius-card: 26px;
  --radius-photo: 30px;
  --shadow-soft: 0 18px 45px -18px rgba(58, 46, 40, .22);
  --shadow-card: 0 10px 30px -14px rgba(58, 46, 40, .18);
  --section-pad: clamp(64px, 10vw, 120px);
  --container: 1080px;
  --ease-luxe: cubic-bezier(.22, .8, .3, 1);
}

/* Client-supplied Brooklyn font — drop the file into fonts/
   and this rule activates automatically. Falls back to Ms Madi. */
@font-face {
  font-family: "Brooklyn";
  src: url("../fonts/Brooklyn.woff2") format("woff2"),
       url("../fonts/Brooklyn.ttf") format("truetype");
  font-display: swap;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 18px; } }

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
figure { margin: 0; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--rose-gold); }

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

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}
.center { text-align: center; }
.section { padding-block: var(--section-pad); }

/* Lock scroll while envelope view is active */
body.envelope-active { overflow: hidden; }

/* ── 2. Typography helpers ─────────────────────────────────── */
.eyebrow {
  font-family: var(--font-head);
  font-size: clamp(15px, 1.8vw, 19px);
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--taupe);
}

.script-xl {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 108px);
  line-height: 1.12;
  color: var(--charcoal);
}
@media (min-width: 860px) {
  /* Keep "Rhona & Francis" on one line once the script font nears its
     max size — the envelope stage's fixed 640px box otherwise wraps it. */
  .script-xl { white-space: nowrap; }
}
.script-md {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 52px);
  line-height: 1.2;
  color: var(--charcoal);
}
.amp { color: var(--rose-gold); }

.heading-lg {
  font-family: var(--font-head);
  font-weight: 500;
  /* 23px floor keeps "Celebrate With Us" on one line at 375px */
  font-size: clamp(23px, 4.6vw, 40px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--charcoal);
}

/* ── 3. Envelope landing view ──────────────────────────────── */
.envelope-view {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: var(--ivory) url("../images/paper-texture.jpg") center / cover;
  transition: opacity .9s var(--ease-luxe), transform .9s var(--ease-luxe), visibility 0s .9s;
}
.envelope-view.is-leaving {
  opacity: 0;
  transform: scale(1.12);
  visibility: hidden;
  pointer-events: none;
}
.envelope-view.is-gone { display: none; }

.envelope-stage {
  text-align: center;
  padding: 24px;
  width: min(100%, 640px);
}

.env-eyebrow { animation: env-in 1s var(--ease-luxe) both; }
.env-names   { animation: env-in 1s .18s var(--ease-luxe) both; margin-top: 6px; }
.env-cta {
  font-family: var(--font-head);
  font-size: clamp(15px, 1.9vw, 19px);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-top: 26px;
  cursor: pointer;
  animation: env-in 1s .55s var(--ease-luxe) both, cta-glow 3s 1.6s ease-in-out infinite;
}

@keyframes env-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes cta-glow {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

/* Layered scene */
.envelope-scene {
  position: relative;
  display: block;
  width: min(84vw, 480px);
  margin: 26px auto 0;
  aspect-ratio: 980 / 690;
  animation: env-in 1s .35s var(--ease-luxe) both;
  -webkit-tap-highlight-color: transparent;
}
.envelope-scene:focus-visible { outline-offset: 12px; }

.env-shadow {
  position: absolute;
  left: 50%; bottom: -16%;
  width: 96%;
  transform: translateX(-50%);
  opacity: .8;
}
.env-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  filter: drop-shadow(0 24px 30px rgba(58, 46, 40, .16));
  transition: transform .5s var(--ease-luxe);
}
.envelope-scene:hover .env-body { transform: translateY(-4px); }

.env-seal {
  position: absolute;
  z-index: 3;
  width: 27%;
  left: 50%; top: 41%;
  transform: translate(-50%, -50%);
  transition: transform .5s var(--ease-luxe), opacity .4s ease;
  filter: drop-shadow(0 8px 14px rgba(58, 46, 40, .25));
}
.envelope-scene:hover .env-seal { transform: translate(-50%, -50%) scale(1.06); }

.env-bouquet {
  position: absolute;
  z-index: 4;
  width: 34%;
  right: -7%; bottom: -9%;
  animation: bouquet-float 6s ease-in-out infinite;
}
@keyframes bouquet-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(-1.5deg); }
}

/* Card starts hidden behind the envelope flap, rises in front on open */
.env-card {
  position: absolute;
  z-index: 4;
  left: 8%; right: 8%;
  top: 6%;
  height: 78%;
  background: var(--soft-white);
  border-radius: 14px;
  border: 1px solid rgba(185, 136, 113, .25);
  box-shadow: 0 14px 34px -16px rgba(58, 46, 40, .3);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  padding-top: 9%;
  transform: translateY(24%);
  opacity: 0;
  transition: transform 1s var(--ease-luxe), opacity .5s ease;
}
.env-card-eyebrow {
  font-family: var(--font-head);
  font-size: clamp(9px, 2vw, 12px);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--taupe);
}
.env-card-names {
  font-family: var(--font-script);
  font-size: clamp(22px, 6vw, 34px);
  color: var(--charcoal);
  line-height: 1.1;
}
.env-card-date {
  font-family: var(--font-head);
  font-size: clamp(15px, 4vw, 22px);
  font-weight: 600;
  letter-spacing: .26em;
  color: var(--rose-gold);
  margin-top: 4px;
}
.env-card-place {
  font-family: var(--font-head);
  font-size: clamp(9px, 2.1vw, 12px);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-top: 4px;
}

/* Open sequence: seal breaks → card rises → view scales away */
.envelope-scene.is-open .env-seal {
  transform: translate(-50%, -50%) rotate(28deg) scale(.55);
  opacity: 0;
}
.envelope-scene.is-open .env-card {
  transform: translateY(-58%);
  opacity: 1;
  transition-delay: .35s, .35s;
}
.envelope-scene.is-open .env-body { transform: translateY(3%); }

/* ── 4. Invitation — hero ──────────────────────────────────── */
.invitation { animation: page-in 1s ease .05s both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

.hero {
  background: var(--ivory);
  padding-top: clamp(72px, 12vw, 140px);
  /* the photo already dissolves into the page — no need to pad it out */
  padding-bottom: clamp(20px, 3.5vw, 40px);
  text-align: center;
}
.hero-inner > .script-xl { margin-top: 10px; }

/* Photo is masked — not overlaid — at the bottom, so it dissolves into
   whatever sits behind it (including the paper texture) with no seam. */
.hero-photo {
  position: relative;
  width: min(100%, 470px);
  margin: clamp(26px, 4.5vw, 42px) auto 0;
}
.hero-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center bottom;
  border-radius: var(--radius-photo);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 64%, rgba(0, 0, 0, .55) 84%, transparent 99%);
          mask-image: linear-gradient(180deg, #000 0%, #000 64%, rgba(0, 0, 0, .55) 84%, transparent 99%);
}

/* Music badge + "Save the Date" ride inside the faded zone */
.hero-overlay {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(4px, 1.4vw, 12px);
  display: grid;
  justify-items: center;
  gap: clamp(12px, 2.4vw, 20px);
}
.hero-music {
  width: clamp(54px, 9vw, 68px);
  height: clamp(54px, 9vw, 68px);
  border-radius: 50%;
  background: var(--soft-white);
  color: var(--charcoal);
  font-size: clamp(21px, 3.4vw, 27px);
  line-height: 1;
  display: grid;
  place-items: center;
  animation: hero-music-pulse 2.6s ease-out infinite;
  transition: transform .35s var(--ease-luxe), background .3s ease;
}
.hero-music:hover { transform: scale(1.07); background: var(--blush); }
@keyframes hero-music-pulse {
  0%   { box-shadow: 0 8px 22px -10px rgba(58, 46, 40, .5), 0 0 0 0 rgba(253, 251, 248, .85); }
  70%  { box-shadow: 0 8px 22px -10px rgba(58, 46, 40, .5), 0 0 0 20px rgba(253, 251, 248, 0); }
  100% { box-shadow: 0 8px 22px -10px rgba(58, 46, 40, .5), 0 0 0 0 rgba(253, 251, 248, 0); }
}

.hero-std {
  font-family: var(--font-head);
  font-size: clamp(30px, 6.4vw, 46px);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--charcoal);
}
.hero-std em {
  font-family: var(--font-script);
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.02em;
  margin: 0 .1em;
}
.hero-std-date {
  margin-top: clamp(6px, 1.6vw, 12px);
  font-family: var(--font-head);
  font-size: clamp(17px, 2.6vw, 22px);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--rose-gold-deep);
}

/* ── 5. Countdown ──────────────────────────────────────────── */
/* Full-bleed band — embossed floral texture under a --greige wash.
   The overlay is translucent so the texture keeps reading through it. */
.countdown-section {
  position: relative;
  background-color: var(--greige);
  background-image:
    linear-gradient(rgba(214, 211, 204, .78), rgba(214, 211, 204, .78)),
    url("../images/92cf57cd084dc9389bbee85475f92bbc.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-block: clamp(52px, 8vw, 90px);
  text-align: center;
  overflow: hidden;
}
.countdown-inner {
  position: relative;
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}
.countdown-label { position: relative; }
.countdown-rsvp { margin-top: clamp(30px, 5vw, 46px); }

.countdown-grid {
  position: relative;
  margin-top: clamp(22px, 4vw, 34px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2.4vw, 22px);
  max-width: 640px;
  margin-inline: auto;
}
.cd-unit {
  background: rgba(253, 251, 248, .75);
  border-radius: 18px;
  padding: clamp(14px, 2.6vw, 24px) 6px;
  display: grid;
  gap: 2px;
}
.cd-num {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(26px, 5.4vw, 46px);
  line-height: 1;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}
.cd-lbl {
  font-size: clamp(11px, 1.6vw, 13px);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--taupe);
}
.countdown-done {
  margin-top: 22px;
  font-family: var(--font-head);
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: .1em;
}

/* ── 6. RSVP CTA ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  font-family: var(--font-head);
  letter-spacing: .26em;
  text-transform: uppercase;
}
.btn-rsvp {
  background: var(--rose-gold);
  color: var(--soft-white);
  font-size: clamp(15px, 2vw, 18px);
  padding: clamp(17px, 2.6vw, 21px) clamp(38px, 6vw, 58px);
  box-shadow: 0 14px 30px -12px rgba(185, 136, 113, .65);
  transition: background .35s ease, transform .35s var(--ease-luxe);
}
.btn-rsvp:hover { background: var(--rose-gold-deep); transform: translateY(-2px); }

/* Oversized variant for the countdown band */
.btn-lg {
  font-size: clamp(16px, 2.2vw, 20px);
  padding: clamp(19px, 3vw, 25px) clamp(44px, 7vw, 70px);
}

/* Gentle breathing glow — an expanding, fading shadow ring every 3s.
   No scale, no bounce. */
.pulse { animation: rsvp-breathe 3s ease-out infinite; }
@keyframes rsvp-breathe {
  0%   { box-shadow: 0 14px 30px -12px rgba(185,136,113,.65), 0 0 0 0 rgba(185,136,113,.45); }
  70%  { box-shadow: 0 14px 30px -12px rgba(185,136,113,.65), 0 0 0 22px rgba(185,136,113,0); }
  100% { box-shadow: 0 14px 30px -12px rgba(185,136,113,.65), 0 0 0 0 rgba(185,136,113,0); }
}

/* ── 7. Celebrate with us + boarding pass ──────────────────── */
.celebrate-section { padding-block: clamp(56px, 8vw, 96px); }

.celebrate-copy {
  margin-top: 12px;
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.75;
  color: var(--taupe);
  max-width: 48ch;
  margin-inline: auto;
}
.celebrate-copy:first-of-type { margin-top: clamp(18px, 3vw, 26px); }

.boarding-pass { margin-top: clamp(30px, 5vw, 48px); }
.boarding-pass-btn {
  display: block;
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding: 0;
  border-radius: clamp(12px, 2vw, 20px);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
  transition: transform .5s var(--ease-luxe), box-shadow .45s ease;
}
.boarding-pass-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px -22px rgba(58, 46, 40, .42);
}
.boarding-pass-btn img { width: 100%; display: block; }
.boarding-pass-hint {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--taupe);
}
/* Phones: reclaim the container gutters so the pass reads as large as
   possible before anyone needs to tap it open. */
@media (max-width: 600px) {
  .boarding-pass { margin-inline: -24px; }
  .boarding-pass-btn { border-radius: 10px; }
}

/* ── 8. Details grid ───────────────────────────────────────── */
.details-section {
  position: relative;
  background: var(--ivory);
}

.details-grid {
  margin-top: clamp(36px, 6vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
}
.detail-card {
  background: var(--soft-white);
  border: 1px solid rgba(217, 191, 174, .45);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 30px 24px 26px;
  text-align: center;
  display: grid;
  /* icon · title · pill — the middle row absorbs slack so the pills
     line up across the row no matter how long a title runs */
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 12px;
  transition: transform .45s var(--ease-luxe), box-shadow .45s ease;
}
.detail-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}
/* Bootstrap Icons glyph — same rose-gold as the outgoing SVG set */
.card-ico {
  font-size: 34px;
  line-height: 1;
  color: var(--rose-gold);
}
.detail-card h3 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.35;
}
.pill {
  background: var(--blush);
  color: var(--rose-gold-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 16px;
}

/* Cards the client has already filled in — the copy reads straight under
   the title, so the slack falls below it instead of above */
.detail-card:has(.card-info) { grid-template-rows: auto auto 1fr; }
.card-info {
  align-self: start;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--taupe);
}
.card-info p + p,
.card-info-list { margin-top: 6px; }
.card-info-lead {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .06em;
  color: var(--charcoal);
}
.card-info-list {
  list-style: none;
  display: grid;
  gap: 4px;
}
.card-info a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rose-gold);
}

/* ── 9. Gallery + lightbox ─────────────────────────────────── */
.gallery-section { background: var(--soft-white); }

.gallery-grid {
  margin-top: clamp(36px, 6vw, 56px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 22px);
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
.g-item {
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 3 / 4.4;            /* portrait-friendly, no square crush */
}
.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-luxe);
}
.g-item:hover img { transform: scale(1.05); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(24, 18, 15, .93);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .4s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-figure {
  max-width: min(94vw, 1100px);
  max-height: 86vh;
}
#lb-img {
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  opacity: 1;
  transition: opacity .3s ease;
}
#lb-img.is-fading { opacity: 0; }

.lb-btn {
  position: absolute;
  z-index: 2;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(253, 251, 248, .12);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  transition: background .3s ease;
}
.lb-btn:hover { background: rgba(253, 251, 248, .25); }
/* display:grid would otherwise beat the hidden attribute (single-image mode) */
.lb-btn[hidden], .lb-count[hidden] { display: none; }
.lb-btn svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--soft-white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lb-close { top: 18px; right: 18px; }
.lb-prev  { left: 12px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 12px; top: 50%; transform: translateY(-50%); }
@media (min-width: 900px) {
  .lb-prev { left: 5vw; }
  .lb-next { right: 5vw; }
}
.lb-count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--greige);
  font-family: var(--font-head);
  letter-spacing: .3em;
  font-size: 14px;
}

/* ── 10. Footer ────────────────────────────────────────────── */
.footer-section {
  background: linear-gradient(180deg, var(--soft-white), var(--ivory) 30%);
  padding-bottom: clamp(90px, 12vw, 140px);
}
.footer-photo {
  width: min(100%, 420px);
  margin: 0 auto clamp(30px, 5vw, 44px);
}
.footer-photo img {
  border-radius: var(--radius-photo);
  box-shadow: var(--shadow-soft);
}
.footer-line {
  font-family: var(--font-head);
  font-size: clamp(21px, 3.2vw, 28px);
  letter-spacing: .12em;
  margin-bottom: clamp(26px, 4vw, 36px);
}
.footer-names { margin-top: clamp(44px, 7vw, 64px); }
.footer-date {
  margin-top: 8px;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--taupe);
}

/* ── 11. Music player ──────────────────────────────────────── */
.music-player {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(253, 251, 248, .88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 191, 174, .5);
  border-radius: 999px;
  padding: 7px 14px 7px 7px;
  box-shadow: var(--shadow-card);
  animation: env-in .8s var(--ease-luxe) both;
}
.music-player[hidden] { display: none; }
.mp-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .3s ease;
}
.mp-btn:hover { background: var(--blush); }
.mp-btn svg {
  width: 19px; height: 19px;
  fill: none;
  stroke: var(--rose-gold-deep);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mp-ico-play path { fill: var(--rose-gold-deep); stroke: none; }

/* icon state switching */
.music-player .mp-ico-play   { display: none; }
.music-player .mp-ico-pause  { display: block; }
.music-player.is-paused .mp-ico-play  { display: block; }
.music-player.is-paused .mp-ico-pause { display: none; }
.music-player .mp-ico-muted  { display: none; }
.music-player.is-muted .mp-ico-vol   { display: none; }
.music-player.is-muted .mp-ico-muted { display: block; }

/* Tiny equalizer wave */
.mp-wave {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 15px;
  margin-left: 4px;
}
.mp-wave i {
  width: 2.5px;
  background: var(--rose-gold);
  border-radius: 2px;
  animation: wave 1.1s ease-in-out infinite;
}
.mp-wave i:nth-child(1) { height: 60%; }
.mp-wave i:nth-child(2) { height: 100%; animation-delay: .18s; }
.mp-wave i:nth-child(3) { height: 45%;  animation-delay: .36s; }
@keyframes wave { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.music-player.is-paused .mp-wave i,
.music-player.is-muted  .mp-wave i { animation-play-state: paused; transform: scaleY(.35); }

/* ── 12. Reveal animations & reduced motion ────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s var(--ease-luxe);
}
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
.reveal[data-delay="4"] { transition-delay: .48s; }
.reveal.is-in {
  opacity: 1;
  transform: none;
}
/* Stagger inside grids */
.details-grid .reveal:nth-child(3n+2) { transition-delay: .1s; }
.details-grid .reveal:nth-child(3n+3) { transition-delay: .2s; }
.gallery-grid .reveal:nth-child(3n+2) { transition-delay: .1s; }
.gallery-grid .reveal:nth-child(3n+3) { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .music-player { right: 12px; bottom: 12px; }
  /* 44px keeps the controls at a comfortable thumb target on phones */
  .mp-btn { width: 44px; height: 44px; }
}


/* ============================================================
   PAGE CHROME — was an inline <style> in index.html; lives here now
   so index.html and details.html cannot drift apart.
   ============================================================ */
/* ── Paper-texture page background ───────────────────────── */
body {
  background: var(--ivory) url("../images/paper-texture.jpg") center top / cover fixed no-repeat;
}
/* Let the texture read through the invitation's lightest bands */
.hero,
.details-section       { background: transparent; }
.gallery-section       { background: rgba(253, 251, 248, .72); }
.footer-section        { background: linear-gradient(180deg, rgba(253, 251, 248, .78), rgba(255, 248, 241, .55) 30%); }

/* ── Top navigation ──────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 75;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(20px, 3.4vw, 38px);
  padding: 14px clamp(20px, 4vw, 44px);
  background: rgba(253, 251, 248, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(217, 191, 174, .35);
}
.site-nav a {
  font-family: var(--font-head);
  font-size: clamp(12px, 1.5vw, 14px);
  letter-spacing: .28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--taupe);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.site-nav a:hover { color: var(--rose-gold-deep); }
.site-nav a[aria-current="page"] {
  color: var(--charcoal);
  font-weight: 600;
  border-bottom-color: var(--rose-gold);
}

/* Clear the fixed bar on both pages */
.envelope-view { padding-top: 56px; }
.hero          { padding-top: clamp(104px, 13vw, 168px); }

/* ── Envelope landing type ───────────────────────────────── */
.env-eyebrow {
  /* Must hold one line down to the narrowest phones — the lower bound of
     the clamp tracks the viewport instead of bottoming out at a fixed px */
  font-size: clamp(16px, 5.5vw, 31px);
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--charcoal);
  white-space: nowrap;
}
.env-subline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(13px, 1.7vw, 15px);
  letter-spacing: .01em;
  color: var(--charcoal);
  opacity: .82;
  margin-top: 7px;
  animation: env-in 1s .1s var(--ease-luxe) both;
}
.env-names { margin-top: 2px; }
.env-invite-line {
  font-family: var(--font-head);
  font-size: clamp(12px, 1.7vw, 15px);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-top: 6px;
  animation: env-in 1s .26s var(--ease-luxe) both;
}

/* ── Envelope scene ──────────────────────────────────────── */
.env-body {
  object-fit: cover;
  border-radius: 5px;
  filter: drop-shadow(0 26px 34px rgba(58, 46, 40, .18));
}

/* Seal wrapper carries the position/animation; img + initials stack inside */
.env-seal-wrap {
  position: absolute;
  z-index: 3;
  width: 22%;
  left: 50%; top: 60%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 14px rgba(58, 46, 40, .25));
  transition: transform .5s var(--ease-luxe), opacity .4s ease;
}
.env-seal-wrap .env-seal {
  position: static;
  z-index: auto;
  grid-area: 1 / 1;
  width: 100%;
  left: auto; top: auto;
  transform: none;
  filter: none;
}
.env-initials {
  grid-area: 1 / 1;
  z-index: 1;
  font-family: var(--font-script);
  font-size: clamp(22px, 4.4vw, 36px);
  line-height: 1;
  color: #F6F0E4;
  transform: translateY(-3%) rotate(-4deg);
  text-shadow: 0 1px 2px rgba(58, 46, 40, .3);
  pointer-events: none;
  white-space: nowrap;
}
.env-initials em { font-style: normal; margin-left: .06em; }

.envelope-scene:hover .env-seal-wrap { transform: translate(-50%, -50%) scale(1.06); }
.envelope-scene:hover .env-seal-wrap .env-seal { transform: none; }
.envelope-scene.is-open .env-seal-wrap {
  transform: translate(-50%, -50%) rotate(28deg) scale(.55);
  opacity: 0;
}
.envelope-scene.is-open .env-seal-wrap .env-seal { transform: none; opacity: 1; }

/* Bouquet — sits low-right over the envelope, per the reference */
.env-bouquet { width: 40%; right: -8%; bottom: -14%; }

@media (max-width: 480px) {
  .site-nav { justify-content: center; gap: 26px; padding: 12px 16px; }
  .env-bouquet { width: 44%; right: -6%; bottom: -12%; }
}
