/* =========================================================
   Harsha & Geo — Engagement Invitation
   Palette: ivory · cream · blush · dusty rose · terracotta · antique gold · warm brown
   ========================================================= */

:root {
  --ivory: #fbf7f0;
  --cream: #f5ede0;
  --paper: #f8f2e7;
  --blush: #f1dfd6;
  --rose: #b98a80;
  --rose-deep: #9a6559;
  --terracotta: #ad6a52;
  --gold: #a88450;
  --gold-deep: #8f6c3b;
  --gold-soft: #cdb07c;
  --brown: #5b4031;
  --brown-soft: #7a5b4a;

  --ink: #5a2f2b;          /* maroon-brown text, as on the printed card */
  --copper: #a9622d;       /* signature-script names */
  --maroon: #86302e;
  --berry: #8b2a2c;
  --twig: #6d5246;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --script: "Ephesis", "Segoe Script", cursive;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .25, 1);

  --grain: url("grain.png");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ivory);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--brown);
  font-family: var(--serif);
  font-size: clamp(1.02rem, 3.9vw, 1.15rem);
  line-height: 1.55;
  background:
    var(--grain),
    radial-gradient(120% 60% at 50% 0%, #fdf9f3 0%, transparent 70%),
    linear-gradient(180deg, var(--ivory) 0%, var(--cream) 55%, var(--blush) 100%);
  background-attachment: scroll;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; height: 100%; }

img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 400; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography helpers ---------- */
.script {
  font-family: var(--script);
  font-weight: 400;
  color: var(--copper);
  line-height: 1.1;
  padding: .06em .12em; /* room for swashes */
}
.script-sm { font-family: var(--script); color: var(--copper); }
.caps {
  font-family: var(--serif);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(.66rem, 2.7vw, .76rem);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--brown-soft);
}
.dot {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-soft); vertical-align: middle; margin: 0 .7em; transform: translateY(-1px);
}
.amp { font-size: .78em; padding: 0 .06em; }

/* ---------- Botanicals ---------- */
.botanical { position: absolute; color: var(--twig); pointer-events: none; }
.botanical--tl {
  top: -18px; left: -6vw;
  width: clamp(140px, 30vw, 320px); height: clamp(118px, 25.4vw, 272px);
  transform: scaleX(-1);
}
.botanical--bl {
  bottom: -6px; left: -10px;
  width: clamp(170px, 48vw, 340px); height: clamp(115px, 32vw, 226px);
  opacity: .55;
}

/* =========================================================
   1. INTRO / ENVELOPE
   ========================================================= */
.intro {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: max(5vh, env(safe-area-inset-top)) 20px max(4vh, env(safe-area-inset-bottom));
  height: 100vh; height: 100svh;
  overflow: hidden;
  background:
    var(--grain),
    radial-gradient(90% 55% at 50% 52%, rgba(255,255,255,.65) 0%, transparent 70%),
    linear-gradient(180deg, #fbf6ee 0%, #f4ebdd 100%);
  transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
.intro .botanical { animation: grow 2.4s var(--ease) both .2s; }
.intro .botanical--bl { animation-delay: .5s; }

.intro__head { text-align: center; position: relative; z-index: 2; animation: fadeUp 1.4s var(--ease) both .15s; }
.intro__eyebrow { margin-bottom: .6rem; }
.intro__names { font-size: clamp(3.3rem, 15vw, 6.4rem); }
.intro__date { margin-top: .3rem; color: var(--brown); }

.intro__foot { text-align: center; position: relative; z-index: 2; animation: fadeUp 1.4s var(--ease) both .55s; }
.intro__hint {
  font-style: italic; font-size: clamp(1.05rem, 4.2vw, 1.25rem); color: var(--rose-deep);
  margin-bottom: 1rem;
}

.intro__head, .intro__foot { transition: opacity .7s var(--ease), transform .9s var(--ease); }

.stage {
  flex: 1; display: grid; place-items: center; width: 100%;
  min-height: 0; position: relative; z-index: 1;
  animation: fadeIn 1.6s var(--ease) both .3s;
}

/* ---------- Envelope ---------- */
.envelope {
  --ew: min(88vw, 440px, calc(42vh * 1.55));
  --ew: min(88vw, 440px, calc(40svh * 1.55));
  position: relative;
  width: var(--ew);
  height: calc(var(--ew) / 1.55);
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit;
  touch-action: manipulation;
  transition: transform .6s var(--ease);
  animation: float 6s ease-in-out infinite 2s;
}
.envelope:focus-visible { outline: 1px dashed var(--gold); outline-offset: 14px; border-radius: 6px; }
@media (hover: hover) {
  .intro:not(.s-open) .envelope:hover { transform: translateY(-4px) rotate(-.4deg); }
  .intro:not(.s-open) .envelope:hover .seal { transform: translate(-50%, -50%) scale(1.04); }
}

.env-back, .env-pocket, .env-flap, .env-letter, .env-shadow, .seal { position: absolute; }

.env-back {
  inset: 0; z-index: 0; border-radius: 4px;
  background: linear-gradient(180deg, #e3d2ba, #eadbc6);
  box-shadow: inset 0 0 0 1px rgba(150, 120, 80, .12);
}
.env-shadow {
  left: 4%; right: 4%; bottom: -10%; height: 18%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(90, 47, 43, .34), transparent 70%);
  filter: blur(6px);
  transition: opacity .8s var(--ease), transform .9s var(--ease-io);
}
.env-pocket {
  inset: 0; width: 100%; height: 100%; z-index: 3;
  filter: drop-shadow(0 -1px 1px rgba(91, 64, 49, .06));
  border-radius: 4px; overflow: hidden;
}
.env-flap {
  top: 0; left: 0; width: 100%; height: 60%; z-index: 4;
  transform-origin: 50% 0;
  transform: perspective(900px) rotateX(0deg);
  filter: drop-shadow(0 2px 2px rgba(91, 64, 49, .12));
  transition:
    transform 1s var(--ease-io) .3s,
    z-index 0s linear .78s;
}
.env-flap__face { position: absolute; inset: 0; width: 100%; height: 100%; }
.env-flap__outside { transition: opacity 0s linear .78s; }

/* letter tucked inside */
.env-letter {
  left: 5%; right: 5%; top: 5%; height: 90%; z-index: 2;
  border-radius: 3px;
  background: var(--grain), linear-gradient(180deg, #fffdf8, #f8f1e5);
  box-shadow: 0 1px 2px rgba(91, 64, 49, .12), 0 8px 24px rgba(91, 64, 49, .08);
  transform: translateY(0);
  transition: transform 1.05s var(--ease-io), opacity .8s var(--ease);
}
.env-letter__inner {
  position: absolute; inset: 7%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 6%;
  border: 1px solid rgba(168, 132, 80, .45);
  border-radius: 999px 999px 3px 3px / 46% 46% 3px 3px;
}
.env-letter__kicker { font-size: clamp(.5rem, 2.1vw, .62rem); letter-spacing: .34em; margin-top: 10%; }
.env-letter__mono {
  font-size: calc(var(--ew) * .17); line-height: 1; margin-top: 4%;
}
.env-letter__mono em { font-style: normal; font-size: .6em; padding: 0 .08em; }
.env-letter__sprig { width: 40%; height: auto; aspect-ratio: 8 / 1; color: var(--twig); margin-top: 3%; }
.env-letter__date { font-size: clamp(.48rem, 2vw, .6rem); margin-top: 3%; }

/* wax seal */
.seal {
  left: 50%; top: 59%; z-index: 5;
  width: 21%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 2px rgba(70, 30, 20, .35)) drop-shadow(0 6px 10px rgba(70, 30, 20, .18));
  transition: transform .5s var(--ease);
}
.seal svg { width: 100%; height: 100%; }
.seal__text {
  font-family: var(--script); font-size: 34px; fill: #f0c9b6; fill-opacity: .92;
  paint-order: stroke; stroke: #6a2f24; stroke-width: .8px; stroke-opacity: .5;
}
.seal__amp { font-size: 22px; }

/* ---- Opening sequence ---- */
.intro.s-open .seal { animation: sealLift .7s var(--ease) forwards; }
.intro.s-open .env-flap { transform: perspective(900px) rotateX(180deg); z-index: 1; }
.intro.s-open .env-flap__outside { opacity: 0; }
.intro.s-open .envelope { animation: none; }

.intro.s-rise .env-letter { transform: translateY(-60%); }
.intro.s-rise .intro__head { opacity: 0; transform: translateY(-14px); }
.intro.s-rise .intro__foot { opacity: 0; transform: translateY(14px); }

.intro.s-out .env-back,
.intro.s-out .env-pocket,
.intro.s-out .env-flap {
  transition: transform 1s var(--ease-io), opacity .8s var(--ease) .15s;
  transform: translateY(70%);
  opacity: 0;
}
.intro.s-out .env-flap { transform: perspective(900px) translateY(70%) rotateX(180deg); }
.intro.s-out .env-shadow { opacity: 0; transform: translateY(60%); }
.intro.s-out .env-letter {
  z-index: 6;
  transition: transform 1.1s var(--ease-io), z-index 0s linear .35s, opacity .8s var(--ease) .5s;
  transform: translateY(-8%) scale(1.22);
}
.intro.s-out .seal { opacity: 0; }

.intro.s-done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro.s-done .env-letter { opacity: 0; transform: translateY(-8%) scale(1.4); }

@keyframes sealLift {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  35%  { transform: translate(-50%, -54%) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -30%) scale(.86); opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow {
  from { opacity: 0; scale: .9; }
  to   { scale: 1; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 15px 34px;
  font-family: var(--sans); font-size: .74rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  text-decoration: none; color: var(--ivory);
  background: linear-gradient(180deg, #6c4e3c, #5b4031);
  border: 1px solid #5b4031; border-radius: 999px;
  box-shadow: 0 8px 22px -10px rgba(91, 64, 49, .55);
  cursor: pointer; touch-action: manipulation;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), color .35s;
}
.btn::after {
  content: ""; position: absolute; inset: 4px; border-radius: inherit;
  border: 1px solid rgba(205, 176, 124, .45); pointer-events: none;
}
.btn span { padding-left: .3em; } /* optically balance letter-spacing */
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn--ghost {
  color: var(--brown); background: rgba(255, 252, 246, .6);
  border-color: rgba(168, 132, 80, .6); box-shadow: none;
}
.btn--ghost::after { border-color: rgba(168, 132, 80, .25); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(91, 64, 49, .6); background: linear-gradient(180deg, #8a5a45, #74493a); }
  .btn--ghost:hover { background: #fffaf2; color: var(--brown); box-shadow: 0 10px 24px -14px rgba(91, 64, 49, .45); }
}

/* =========================================================
   MAIN
   ========================================================= */
.main { visibility: hidden; }
body.is-open .main { visibility: visible; }

.section {
  position: relative;
  padding: clamp(72px, 14vw, 130px) 18px;
  text-align: center;
  overflow: hidden;
}
.section__kicker { margin-bottom: .9rem; color: var(--rose-deep); }
.section__title { font-size: clamp(2.6rem, 11vw, 4.4rem); }
.section__title--caps {
  font-family: var(--serif); font-weight: 500; text-transform: uppercase;
  font-size: clamp(1.55rem, 6.4vw, 2.5rem); letter-spacing: .14em; color: var(--brown);
}
.sprig { width: 150px; height: 19px; color: var(--twig); margin: 1.4rem auto; }
.sprig--title { margin-bottom: 2.6rem; }

/* scroll reveals */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s);
}
.reveal.in-view { opacity: 1; transform: none; }
.botanical.reveal { transform: translateY(14px) scale(.94); }
.botanical.reveal.in-view { transform: none; }

/* =========================================================
   2. INVITATION CARD  (after the printed card)
   ========================================================= */
.section--card { padding: max(28px, calc(env(safe-area-inset-top) + 18px)) 12px 56px; min-height: 100vh; }

.card {
  --arch: clamp(150px, 42vw, 300px);
  position: relative;
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: clamp(28px, 7vw, 44px) clamp(10px, 3vw, 22px) clamp(24px, 6vw, 36px);
  border-radius: 6px;
  color: var(--ink);
  background:
    var(--grain),
    radial-gradient(90% 60% at 50% 35%, #f8f3ef 0%, transparent 80%),
    linear-gradient(180deg, #f3ece8 0%, #efe6e1 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 2px 4px rgba(90, 47, 43, .05),
    0 30px 60px -28px rgba(90, 47, 43, .35),
    0 60px 90px -60px rgba(173, 106, 82, .35);

  opacity: 0;
  clip-path: inset(50% -60px 50% -60px);
  transform: perspective(1400px) rotateX(10deg) translateY(26px) scale(.97);
  transform-origin: 50% 30%;
}
/* the single fine arch line */
.card::before {
  content: ""; position: absolute; pointer-events: none;
  inset: clamp(16px, 4.5vw, 30px) clamp(10px, 4vw, 30px) clamp(14px, 3vw, 24px);
  border: 1px solid rgba(90, 70, 64, .55);
  border-radius: 50% 50% 2px 2px / var(--arch) var(--arch) 2px 2px;
}

body.is-revealed .card {
  opacity: 1;
  clip-path: inset(-60px -60px -60px -60px);
  transform: none;
  transition: clip-path 1.5s var(--ease-io), opacity .7s var(--ease), transform 1.6s var(--ease);
}

.card__branch, .card__pines { position: absolute; pointer-events: none; z-index: 1; color: var(--twig); }
.card__branch {
  top: -2px; right: -4px;
  width: clamp(170px, 52vw, 330px); height: clamp(143px, 44vw, 277px);
  transform-origin: 100% 0;
}
.card__pines {
  left: clamp(4px, 2vw, 18px); bottom: clamp(10px, 2.6vw, 22px);
  width: clamp(130px, 40vw, 250px); height: clamp(87px, 27vw, 167px);
  opacity: .6; transform-origin: 0 100%;
}
.card__branch, .card__pines { opacity: 0; scale: .9; transition: opacity 1.6s var(--ease) 1.1s, scale 2s var(--ease) 1.1s; }
body.is-revealed .card__branch { opacity: 1; scale: 1; }
body.is-revealed .card__pines { opacity: .6; scale: 1; }

.card__body {
  position: relative; z-index: 2; text-wrap: balance; text-align: center;
  padding: calc(var(--arch) * .55) clamp(14px, 5vw, 46px) 0;
}
.card__body > * {
  opacity: 0; transform: translateY(10px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(.4s + var(--i, 0) * .06s);
}
body.is-revealed .card__body > * { opacity: 1; transform: none; }

.card .caps { font-weight: 700; letter-spacing: .05em; }
.card__parents { font-size: clamp(.86rem, 3.6vw, 1.1rem); line-height: 1.45; }
.card__parents--groom { margin-top: .9rem; }
.card__house { font-size: clamp(.86rem, 3.6vw, 1.1rem); line-height: 1.45; }
.card__invite {
  margin: 1.2rem auto .6rem;
  font-size: clamp(.84rem, 3.5vw, 1.08rem); line-height: 1.55; letter-spacing: .07em !important;
}
.card__name {
  font-size: clamp(2.5rem, 11.5vw, 4.1rem); line-height: 1.05;
  margin: .25rem -.2em .35rem; white-space: normal;
}
.card__lineage {
  font-size: clamp(.8rem, 3.2vw, .92rem) !important; line-height: 1.55; font-weight: 600 !important;
  max-width: 54ch; margin: 0 auto;
}
.card__to { font-size: clamp(.95rem, 3.8vw, 1.15rem); margin: 1.2rem 0 .1rem; letter-spacing: .12em !important; }

.card__when {
  list-style: none; padding: 0; margin: 1.8rem auto 0; display: inline-grid; gap: .85rem; text-align: left;
}
.card__when li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; }
.card__when svg { width: 20px; height: 20px; color: var(--maroon); margin-top: .12em; }
.card__when .caps { font-size: clamp(.9rem, 3.8vw, 1.16rem); letter-spacing: .13em; line-height: 1.4; font-weight: 600; }
.card__when sup { font-size: .6em; letter-spacing: 0; }

.card .sprig { width: 170px; color: var(--maroon); margin: 1.8rem auto 1.2rem; }
.card__sharing-wrap { text-align: right; padding-right: clamp(0px, 2vw, 16px); }
.card__sharing { font-family: var(--script); font-size: clamp(1.7rem, 7vw, 2.3rem); color: var(--ink); line-height: 1.1; }
.card__sister { color: var(--maroon); font-size: clamp(.82rem, 3.4vw, 1rem); margin-top: .1rem; }
@media (max-width: 380px) { .card__sharing-wrap { text-align: center; } }

@media (max-width: 420px) { .br-sm { display: block; } }
@media (min-width: 421px) { .br-sm { display: none; } }

.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 42px; text-decoration: none; padding: 8px 16px;
}
.scroll-cue i {
  width: 1px; height: 40px; background: linear-gradient(var(--copper), transparent);
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* =========================================================
   3. COUNTDOWN
   ========================================================= */
.section--countdown { background: linear-gradient(180deg, transparent, rgba(241, 223, 214, .35) 50%, transparent); }
.botanical--section-r { right: -30px; top: 0; width: 220px; height: 185px; }
.botanical--section-r.in-view { opacity: .55; }

.countdown {
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(8px, 2.6vw, 18px);
  margin: 2.4rem auto 1.6rem; max-width: 640px;
}
.cd-unit {
  position: relative;
  flex: 1 1 0; max-width: 128px; min-width: 0;
  padding: clamp(20px, 6vw, 32px) 4px clamp(14px, 4vw, 20px);
  border: 1px solid rgba(168, 132, 80, .5);
  border-radius: 999px 999px 8px 8px / 60px 60px 8px 8px;
  background: var(--grain), linear-gradient(180deg, rgba(255, 253, 248, .9), rgba(248, 240, 227, .9));
  box-shadow: 0 18px 34px -22px rgba(91, 64, 49, .4);
}
.cd-unit::before {
  content: ""; position: absolute; inset: 5px; pointer-events: none;
  border: 1px solid rgba(185, 138, 128, .25);
  border-radius: 999px 999px 5px 5px / 55px 55px 5px 5px;
}
.cd-num {
  display: block;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.85rem, 8.4vw, 3.3rem); line-height: 1;
  color: var(--brown);
  font-variant-numeric: lining-nums tabular-nums;
}
.cd-num.tick { animation: tick .6s var(--ease); }
@keyframes tick { from { opacity: .2; transform: translateY(-6px); filter: blur(1px); } to { opacity: 1; transform: none; filter: none; } }
.cd-label { display: block; margin-top: .65rem; font-size: clamp(.52rem, 2.2vw, .66rem); letter-spacing: .24em; padding-left: .24em; }
.cd-sep { align-self: center; color: var(--gold); font-size: 1.4rem; display: none; }
@media (min-width: 560px) { .cd-sep { display: block; } }
.countdown__done { font-size: clamp(2rem, 8vw, 3rem); margin: 2rem 0 1rem; }
.countdown__foot { color: var(--brown); }

/* =========================================================
   4. DETAILS
   ========================================================= */
.details {
  display: grid; gap: 16px;
  max-width: 980px; margin: 0 auto 2.6rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .details { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

.detail {
  position: relative;
  padding: 34px 22px 30px;
  border-radius: 999px 999px 12px 12px / 90px 90px 12px 12px;
  background: var(--grain), linear-gradient(180deg, #fffcf7, #f7efe2);
  border: 1px solid rgba(168, 132, 80, .38);
  box-shadow: 0 22px 40px -30px rgba(91, 64, 49, .45);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity 1.1s var(--ease) var(--d, 0s);
}
.detail::before {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  border: 1px solid rgba(185, 138, 128, .22);
  border-radius: 999px 999px 8px 8px / 84px 84px 8px 8px;
}
@media (hover: hover) {
  .detail.in-view:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(91, 64, 49, .5); }
}
.detail__icon { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--terracotta); }
.detail__label { color: var(--rose-deep); margin-bottom: .55rem; }
.detail__value { font-size: clamp(1.22rem, 4.8vw, 1.42rem); line-height: 1.35; color: var(--brown); font-weight: 500; }
.detail__sub { font-weight: 400; font-style: italic; color: var(--brown-soft); font-size: .88em; }

/* =========================================================
   5. LOCATION
   ========================================================= */
.section--location { padding-bottom: clamp(110px, 22vw, 190px); }
.botanical--section-pines { left: 0; bottom: 0; width: clamp(180px, 40vw, 320px); height: clamp(120px, 27vw, 214px); }
.botanical--section-pines.in-view { opacity: .4; }

.location {
  display: grid; gap: 30px; align-items: center;
  max-width: 1000px; margin: 2.2rem auto 0;
}
@media (min-width: 860px) { .location { grid-template-columns: 1.15fr 1fr; gap: 56px; text-align: left; } }

.map-frame {
  padding: 10px;
  border-radius: 999px 999px 16px 16px / 150px 150px 16px 16px;
  border: 1px solid rgba(168, 132, 80, .5);
  background: rgba(255, 252, 246, .7);
  box-shadow: 0 30px 50px -32px rgba(91, 64, 49, .45);
}
.map-frame__inner {
  position: relative; overflow: hidden;
  height: clamp(280px, 72vw, 420px);
  border-radius: 999px 999px 10px 10px / 140px 140px 10px 10px;
  background: var(--grain), linear-gradient(180deg, #f1e6d6, #eadcc8);
  isolation: isolate;
}
.map-frame__inner iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: sepia(.28) saturate(.72) contrast(.96) brightness(1.02);
}
.map-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  text-decoration: none; color: var(--terracotta);
}
.map-placeholder svg { width: 48px; height: 48px; }

.location__name { font-size: clamp(1.25rem, 5.2vw, 1.6rem); letter-spacing: .1em; }
.location__addr { font-style: italic; color: var(--brown-soft); margin: .4rem 0 1rem; font-size: clamp(1.08rem, 4.2vw, 1.24rem); }
.location__when { color: var(--rose-deep); line-height: 1.9; }
.location__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 1.8rem; }
@media (min-width: 860px) { .location__actions { justify-content: flex-start; } }
@media (max-width: 420px) { .location__actions .btn { width: 100%; } }

/* =========================================================
   6. CLOSING
   ========================================================= */
.section--closing {
  padding-top: clamp(90px, 16vw, 150px); padding-bottom: clamp(100px, 18vw, 170px);
  background: radial-gradient(70% 60% at 50% 60%, rgba(241, 223, 214, .7), transparent 75%);
}
.wreath { position: relative; width: 250px; height: 110px; margin: 0 auto 1.6rem; color: var(--twig); }
.wreath svg { position: absolute; top: 0; width: 131px; height: 110px; }
.wreath__l { left: 0; transform: rotate(-4deg); }
.wreath__r { right: 0; transform: scaleX(-1) rotate(-4deg); }
.wreath.reveal { transform: scale(.9); filter: blur(2px); transition: opacity 1.8s var(--ease), transform 2.2s var(--ease), filter 1.8s var(--ease); }
.wreath.reveal.in-view { transform: none; filter: none; }

.closing__line {
  max-width: 22ch; margin: 0 auto;
  font-style: italic; font-size: clamp(1.45rem, 6vw, 2.15rem); line-height: 1.35; color: var(--brown);
}
.closing__names { font-size: clamp(3rem, 13vw, 5rem); margin-top: 1.6rem; }
.closing__date { margin-top: .6rem; letter-spacing: .5em; color: var(--brown); }

.site-foot { text-align: center; padding: 0 20px calc(40px + env(safe-area-inset-bottom)); }
.site-foot .label { font-size: .66rem; opacity: .8; }

/* =========================================================
   MUSIC TOGGLE
   ========================================================= */
.music {
  position: fixed; z-index: 60;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--brown);
  background: rgba(251, 247, 240, .82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 132, 80, .55);
  box-shadow: 0 10px 24px -12px rgba(91, 64, 49, .5);
  cursor: pointer; touch-action: manipulation;
  transition: transform .35s var(--ease), background .35s, opacity .6s;
  animation: fadeIn 1s var(--ease) both 1.2s;
}
.music:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) { .music:hover { transform: scale(1.06); background: #fffaf2; } }
.music__note { width: 22px; height: 22px; grid-area: 1 / 1; transition: opacity .3s, transform .3s; }
.music__bars { grid-area: 1 / 1; display: flex; align-items: flex-end; gap: 3px; height: 16px; opacity: 0; transition: opacity .3s; }
.music__bars i { width: 2px; height: 100%; background: var(--terracotta); border-radius: 1px; transform-origin: bottom; transform: scaleY(.3); }
.music.is-playing .music__note { opacity: 0; transform: scale(.7); }
.music.is-playing .music__bars { opacity: 1; }
.music.is-playing .music__bars i { animation: bar 1.1s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-delay: -.4s; }
.music.is-playing .music__bars i:nth-child(3) { animation-delay: -.75s; }
.music.is-playing .music__bars i:nth-child(4) { animation-delay: -.2s; }
@keyframes bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.music__tip {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; font-size: .6rem; letter-spacing: .26em;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(251, 247, 240, .92); border: 1px solid rgba(168, 132, 80, .35);
  opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s var(--ease);
}
.music.show-tip .music__tip { opacity: 1; transform: translate(0, -50%); }

/* =========================================================
   Larger screens
   ========================================================= */
@media (min-width: 900px) {
  .botanical--tl { left: 0; top: 0; }
  .botanical--section-r { right: 2vw; width: 300px; height: 252px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .intro { padding-top: 14px; padding-bottom: 14px; }
  .intro__names { font-size: 2.8rem; }
  .intro__eyebrow, .intro__hint { display: none; }
  .envelope { --ew: min(60vw, calc(52vh * 1.55)); }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
  }
  .reveal, .botanical.reveal, .wreath.reveal { transform: none !important; filter: none !important; transition: opacity .6s ease !important; }
  .card { transform: none; clip-path: none; transition: opacity .6s ease !important; }
  .card__body > *, .card__branch, .card__pines { transform: none; scale: 1; transition: opacity .6s ease !important; }
  .envelope { animation: none; }
  .intro { transition: opacity .5s ease, visibility 0s linear .5s; }
  .cd-num.tick { animation: none; }
}

/* =========================================================
   SONG MOMENTS — note, glow and petals
   ========================================================= */
.intro__song { margin-top: .9rem; font-size: .6rem; letter-spacing: .28em; color: var(--rose-deep); opacity: .85; }
.intro__song::before { content: "¶A"; margin-right: .6em; letter-spacing: 0; font-size: 1.15em; }

.script { transition: text-shadow 1.6s var(--ease), filter 1.6s var(--ease); }
body.is-glowing .script { text-shadow: 0 0 18px rgba(205, 150, 95, .55), 0 0 2px rgba(255, 236, 214, .9); }
body.is-glowing .card { box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 0 0 1px rgba(205, 176, 124, .25),
    0 30px 70px -26px rgba(173, 106, 82, .5),
    0 0 90px -30px rgba(205, 150, 95, .55);
  transition: box-shadow 1.6s var(--ease); }

.petals { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.petals i {
  position: absolute; top: -24px; width: 11px; height: 14px;
  border-radius: 80% 10% 80% 10%;
  background: linear-gradient(135deg, #e8bfb2, #c98c80);
  opacity: 0;
  animation: petal 7s cubic-bezier(.3, .1, .4, 1) forwards;
}
.petals i:nth-child(3n) { background: linear-gradient(135deg, #f1d6cb, #d7a698); }
.petals i:nth-child(4n) { width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #b5504c, #7e2627); }
@keyframes petal {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(var(--r)); }
  12%  { opacity: .9; }
  85%  { opacity: .75; }
  100% { opacity: 0; transform: translate3d(var(--dx), 105vh, 0) rotate(calc(var(--r) + 300deg)); }
}
@media (prefers-reduced-motion: reduce) { .petals { display: none; } }
