/* ── Digital Invitation — cinematic live preview ──
   Palette vars are set inline from the product (or editor theme):
   --base, --deep, --ink, --gold, --gold-soft */
:root {
  --base: #3a0f1c;
  --deep: #1c0710;
  --ink: #f7ece6;
  --gold: #e0b35a;
  --gold-soft: #f0d9a8;
  --soft: color-mix(in srgb, var(--ink) 78%, transparent);
  --mute: color-mix(in srgb, var(--ink) 55%, transparent);
  --hair: color-mix(in srgb, var(--gold) 30%, transparent);
  --glass: color-mix(in srgb, var(--ink) 5%, transparent);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Helvetica Neue', sans-serif;
  --script: 'Pinyon Script', 'Cormorant Garamond', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.cp {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.cp.is-locked { overflow: hidden; height: 100vh; }
.cp a { color: inherit; }
:where(.cp) :where(button, input, select, textarea) { font: inherit; color: inherit; }

/* ── shared atoms ── */
.cp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.cp-eyebrow::before, .cp-eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--hair); }
.cp-title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(44px, 7.4vw, 76px);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ink);
}
.cp-title em { display: block; font-style: italic; font-weight: 300; color: var(--gold-soft); }
.cp-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 24px auto;
  color: var(--gold);
  font-size: 11px;
}
.cp-orn::before, .cp-orn::after { content: ""; width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--hair)); }
.cp-orn::after { transform: scaleX(-1); }
.cp-lead { max-width: 540px; margin: 0 auto; font-size: 19px; line-height: 1.75; color: var(--soft); }
.cp-cap { font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--mute); }
.cp-frame {
  position: relative;
  border: 1px solid var(--hair);
  border-radius: 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ink) 7%, transparent), color-mix(in srgb, var(--ink) 2%, transparent));
  box-shadow: 0 24px 60px rgba(0,0,0,.28), inset 0 1px 0 color-mix(in srgb, var(--ink) 10%, transparent);
  backdrop-filter: blur(6px);
}

/* ── sections ── */
.cp-sec {
  position: relative;
  overflow: hidden;
  padding: 120px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%),
    linear-gradient(180deg, var(--base), var(--deep));
}
.cp-sec:nth-of-type(even) {
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%),
    linear-gradient(0deg, var(--base), var(--deep));
}
.cp-sec::before {
  /* fine vertical silk stripes */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 2.5%, transparent) 0 1px, transparent 1px 7px);
}
.cp-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.cp-rule { width: 1px; height: 64px; margin: 56px auto 0; background: linear-gradient(var(--hair), transparent); }

/* botanical side art */
.cp-branch {
  position: absolute;
  z-index: 1;
  width: clamp(120px, 20vw, 260px);
  color: var(--gold);
  opacity: .5;
  pointer-events: none;
}
.cp-branch--l { left: -30px; top: 40px; }
.cp-branch--r { right: -30px; bottom: 40px; transform: scale(-1, -1); }
.cp-branch--r-top { right: -30px; top: 40px; transform: scaleX(-1); }
.cp-branch--l-bottom { left: -30px; bottom: 40px; transform: scaleY(-1); }

/* ── intro envelope ── */
.cp-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--env-bg, var(--base)) 85%, #000), color-mix(in srgb, var(--env-bg, var(--base)) 45%, #000));
  cursor: pointer;
  transition: opacity .9s ease, transform 1.1s ease, visibility .9s;
}
.cp-intro__box { position: relative; height: 100%; max-height: 100vh; aspect-ratio: 9 / 16; max-width: 100vw; box-shadow: 0 0 80px rgba(0,0,0,.5); }
.cp-intro .env { overflow: hidden; }
.cp-intro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.cp-intro.is-video video { opacity: 1; }
.cp-intro.is-done { opacity: 0; visibility: hidden; transform: scale(1.08); pointer-events: none; }
.cp-intro:focus-visible { outline: 2px solid var(--gold); outline-offset: -6px; }

/* ── envelope with a brushed-gold seal (Nikah Gold = navy, Cathedral Grace = plum), from the
   "HOME THEAM 1/2" artwork. Laid out on its 1080×1920 artboard in % and cqw so it scales with the box.
   The top flap starts folded shut (out of sight) and swings up into a triangle when the card is opened. ── */
.cp-flapenv {
  --fe-flap: #081b35; --fe-body: #152d53; --fe-line: rgba(196, 214, 240, .7); --fe-gold: #e3c27a;
  position: absolute;
  inset: 0;
  container-type: size;
  perspective: 180cqw;
}
.cp-flapenv--plum { --fe-flap: #c4929e; --fe-body: #461f30; --fe-line: rgba(246, 225, 232, .7); --fe-gold: #ecc9a0; }
/* the glow fills the whole screen so the 9:16 box has no visible edge on wide screens */
.cp-intro:has(.cp-flapenv--navy) { background: radial-gradient(ellipse 70vmin 60vmax at 50% 48%, #1e3460, #0b1a34); }
.cp-intro:has(.cp-flapenv--plum) { background: radial-gradient(ellipse 70vmin 60vmax at 50% 48%, #4f2541, #210815); }
.cp-intro:has(.cp-flapenv) .cp-intro__box { box-shadow: none; }

/* hinged on the envelope's top edge; folded down behind the front until opened */
.cp-flapenv__flap {
  position: absolute;
  z-index: 1;
  left: 17.41%; width: 65.15%;
  top: 24.78%; height: 18.32%;
  background: var(--fe-flap);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform-origin: 50% 100%;
  transform: rotateX(180deg);
  backface-visibility: hidden;
}
.cp-flapenv--plum .cp-flapenv__flap { left: 18.95%; width: 62.09%; top: 26.5%; height: 17.46%; }

.cp-flapenv__body {
  position: absolute;
  z-index: 3;
  left: 18.41%; width: 63.18%;
  top: 42.64%; height: 23.52%;
  background: var(--fe-body);
  box-shadow: 0 4cqw 7cqw rgba(0, 0, 0, .45), 0 1cqw 2cqw rgba(0, 0, 0, .25);
}
.cp-flapenv__body::after {
  content: "";
  position: absolute;
  inset: 2.22cqw 1.68cqw;
  border: max(1px, .07cqw) solid var(--fe-line);
  pointer-events: none;
}

/* card that rises out of the envelope on open */
.cp-flapenv__letter {
  position: absolute;
  z-index: 2;
  left: 22%; right: 22%;
  top: 43.5%; height: 21%;
  background: linear-gradient(160deg, #fffdf8, #f2e9d8);
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .3), inset 0 0 0 1.2cqw #fffdf8, inset 0 0 0 1.3cqw #d8c08a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4cqw;
  text-align: center;
  color: #3b2c1c;
}
.cp-flapenv__letter small { font-family: 'Jost', sans-serif; font-size: max(8px, 1.8cqw); letter-spacing: .32em; text-transform: uppercase; opacity: .7; }
.cp-flapenv__letter strong { font-family: 'Pinyon Script', 'Cormorant Garamond', cursive; font-weight: 400; font-size: 7cqw; line-height: 1.15; padding: 0 3cqw; }
.cp-flapenv__letter em { font-size: 3.6cqw; font-style: normal; color: #b8912f; }

/* the couple's names on the envelope front, below the seal */
.cp-flapenv__front {
  position: absolute;
  inset: 2.22cqw 1.68cqw;
  padding: 7.5cqw 4cqw 3cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.3cqw;
  text-align: center;
  color: var(--fe-gold);
  backface-visibility: hidden;
}
.cp-flapenv__front small {
  font-family: 'Jost', sans-serif;
  font-size: max(8px, 1.75cqw);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.cp-flapenv__front strong {
  font-family: 'Pinyon Script', 'Cormorant Garamond', cursive;
  font-weight: 400;
  font-size: 7cqw;
  line-height: 1.15;
  text-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .35);
}
.cp-flapenv__front i {
  display: block;
  width: 16cqw;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fe-gold), transparent);
}
.cp-flapenv__front span {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: max(9px, 2.3cqw);
  letter-spacing: .24em;
  color: rgba(255, 255, 255, .85);
}

/* brushed-gold coin; the plum design adds an outer gold ring */
.cp-flapenv__seal {
  position: absolute;
  z-index: 4;
  left: 50%; top: 42.87%;
  width: 11.76cqw;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 72%, rgba(120, 80, 10, .55) 76%, transparent 80%),
    conic-gradient(from 20deg, #fdf282, #d9a93c, #b5822a, #f6dc78, #c38f2f, #fff0a0, #c99734, #a87422, #f3d46c, #fdf282);
  box-shadow:
    0 .8cqw 1.6cqw rgba(0, 0, 0, .45),
    inset 0 0 0 .55cqw #e6b84a,
    inset 0 .3cqw .4cqw rgba(255, 255, 255, .6),
    inset 0 -.4cqw .6cqw rgba(110, 70, 0, .45);
}
.cp-flapenv--plum .cp-flapenv__seal {
  top: 43.85%;
  width: 9.4cqw;
  box-shadow:
    0 0 0 1.25cqw transparent,
    0 0 0 1.65cqw #d9ab4c,
    0 .9cqw 2cqw 1.4cqw rgba(0, 0, 0, .45),
    inset 0 0 0 .45cqw #e6b84a,
    inset 0 .3cqw .4cqw rgba(255, 255, 255, .6),
    inset 0 -.4cqw .6cqw rgba(110, 70, 0, .45);
}
.cp-flapenv--plum .cp-flapenv__seal::before {
  content: "";
  position: absolute;
  inset: -1.65cqw;
  border-radius: 50%;
  border: .45cqw solid #f3d27a;
  box-shadow: inset 0 0 .4cqw rgba(110, 70, 0, .5), 0 0 .4cqw rgba(110, 70, 0, .4);
}

.cp-flapenv__tap {
  position: absolute;
  z-index: 5;
  left: 0; right: 0;
  top: 71.4%;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: max(10px, 2.11cqw);
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  animation: feTap 2.4s ease-in-out infinite;
}
@keyframes feTap { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

/* opening: the seal breaks, the flap swings up into its triangle, the card rises out, then the page
   reveals (card-preview.js adds .is-open and reveals 3s later) */
.cp-intro.is-open .cp-flapenv__seal { animation: feSeal .7s cubic-bezier(.4, 0, .2, 1) forwards; }
.cp-intro.is-open .cp-flapenv__tap { animation: none; opacity: 0; transition: opacity .4s ease; }
.cp-intro.is-open .cp-flapenv__flap { animation: feFlap .9s cubic-bezier(.4, 0, .2, 1) .45s forwards; }
.cp-intro.is-open .cp-flapenv__letter { animation: feLetter 1.4s cubic-bezier(.2, .7, .2, 1) 1.25s forwards; }
@keyframes feSeal {
  30% { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(.4) rotate(-30deg); opacity: 0; }
}
@keyframes feFlap {
  0% { transform: rotateX(180deg); }
  100% { transform: rotateX(0); }
}
@keyframes feLetter {
  0% { transform: translateY(0); }
  100% { transform: translateY(-62%) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .cp-flapenv__tap { animation: none; } }

/* ── hero ── */
.cp-hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 90px;
  padding-bottom: 110px;
  background:
    radial-gradient(ellipse 55% 45% at 50% 42%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%),
    radial-gradient(ellipse at center, var(--base), var(--deep) 78%);
}
.cp-hero__names { margin: 6px 0 0; font-weight: 300; line-height: .92; color: var(--ink); }
.cp-hero__names > span { display: block; font-size: clamp(64px, 12vw, 128px); letter-spacing: -.015em; }
.cp-hero__names .cp-amp { font-family: var(--script); font-size: clamp(34px, 5vw, 52px); line-height: 1.2; color: var(--gold); margin: 6px 0; }
.cp-hero__names.is-single > span:first-child { font-size: clamp(46px, 10vw, 108px); line-height: 1; overflow-wrap: anywhere; }
.cp-hero__date { margin: 28px 0 6px; font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .42em; text-transform: uppercase; color: var(--gold-soft); }
.cp-hero__place { font-family: var(--sans); font-size: 10.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--mute); }
.cp-discover {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
}
.cp-discover i { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cpDrop 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cpDrop { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* letter-by-letter name reveal */
.cp-hero__names [data-name] span { display: inline-block; opacity: 0; transform: translateY(24px); filter: blur(6px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1), filter .9s ease; }
.is-revealed .cp-hero__names [data-name] span { opacity: 1; transform: none; filter: none; }

/* bokeh + petals */
.cp-bokeh { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.cp-bokeh i {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold-soft) 70%, transparent), transparent 70%);
  filter: blur(2px);
  animation: cpFloat linear infinite;
  opacity: 0;
}
.cp-bokeh i.petal {
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold-soft) 90%, #fff), var(--gold));
  filter: none;
  animation-name: cpFall;
}
@keyframes cpFloat {
  0% { transform: translateY(20px); opacity: 0; }
  20%, 80% { opacity: .55; }
  100% { transform: translateY(-120px); opacity: 0; }
}
@keyframes cpFall {
  0% { transform: translate(0, -10vh) rotate(0); opacity: 0; }
  10%, 85% { opacity: .75; }
  100% { transform: translate(var(--dx, 60px), 110vh) rotate(540deg); opacity: 0; }
}

/* ── scratch reveal ── */
.cp-scratch { position: relative; width: min(300px, 78vw); aspect-ratio: 1 / .92; margin: 40px auto 18px; }
.cp-scratch__heart, .cp-scratch canvas {
  position: absolute;
  inset: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 92'%3E%3Cpath d='M50 90C22 68 2 52 2 28 2 12 14 2 28 2c10 0 18 6 22 14C54 8 62 2 72 2c14 0 26 10 26 26 0 24-20 40-48 62z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 92'%3E%3Cpath d='M50 90C22 68 2 52 2 28 2 12 14 2 28 2c10 0 18 6 22 14C54 8 62 2 72 2c14 0 26 10 26 26 0 24-20 40-48 62z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cp-scratch__heart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 18% 14%;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--base) 70%, #fff 8%), var(--deep));
  box-shadow: inset 0 0 0 1px var(--hair);
}
.cp-scratch__heart b { font-weight: 400; font-size: clamp(30px, 8vw, 40px); line-height: 1; color: var(--gold-soft); }
.cp-scratch__heart span { font-family: var(--sans); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--soft); }
.cp-scratch__heart em { font-size: 16px; color: var(--mute); }
.cp-scratch canvas { width: 100%; height: 100%; cursor: grab; touch-action: none; transition: opacity .8s ease; filter: drop-shadow(0 10px 22px rgba(0,0,0,.35)); }
.cp-scratch.is-clear canvas { opacity: 0; pointer-events: none; }
.cp-scratch__hint { font-style: italic; color: var(--mute); font-size: 16px; }

/* ── countdown ── */
.cp-count { max-width: 620px; margin: 44px auto 0; padding: 30px 26px 24px; }
.cp-count__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.cp-count__grid div { padding: 18px 6px 14px; border: 1px solid var(--hair); border-radius: 14px; background: color-mix(in srgb, var(--deep) 45%, transparent); }
.cp-count__grid b { display: block; font-weight: 400; font-size: clamp(30px, 6vw, 46px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-count__grid span { display: block; margin-top: 8px; font-family: var(--sans); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--mute); }
.cp-count__grid b.tick { animation: cpTick .35s ease; }
@keyframes cpTick { 0% { transform: translateY(-6px); opacity: .3; } 100% { transform: none; opacity: 1; } }

/* ── save the date film (YouTube, loaded on tap) ── */
.cp-film { max-width: 680px; margin: 40px auto 0; padding: 10px; }
.cp-film__play, .cp-film iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; overflow: hidden; }
.cp-film__play { position: relative; padding: 0; background: #000; cursor: pointer; }
.cp-film__play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform 1s ease, opacity .4s ease; }
.cp-film__play:hover img { transform: scale(1.04); opacity: 1; }
.cp-film__btn { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 1px solid var(--gold); background: color-mix(in srgb, var(--deep) 55%, transparent); backdrop-filter: blur(6px); transition: transform .3s ease; }
.cp-film__btn::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -12px 0 0 -7px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--gold-soft); }
.cp-film__play:hover .cp-film__btn { transform: scale(1.08); }

/* ── story ── */
.cp-story { max-width: 560px; margin: 40px auto 0; padding: 34px 32px; font-size: 19px; line-height: 1.8; color: var(--soft); }
.cp-facts { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 600px; margin: 26px auto 0; border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; }
.cp-facts div { padding: 16px 10px; }
.cp-facts div + div { border-left: 1px solid var(--hair); }
.cp-facts strong { display: block; margin-top: 6px; font-weight: 500; font-size: 17px; line-height: 1.3; color: var(--ink); }

/* ── events ── */
.cp-events { display: grid; gap: 18px; max-width: 520px; margin: 40px auto 0; }
.cp-event { padding: 30px 24px; }
.cp-event h3 { margin: 10px 0 4px; font-weight: 400; font-size: clamp(30px, 5vw, 40px); line-height: 1.1; }
.cp-event time { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--sans); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); }
.cp-event time::before, .cp-event time::after { content: ""; width: 22px; height: 1px; background: var(--hair); }
.cp-event p { margin: 10px 0 0; color: var(--soft); }

/* ── families ── */
.cp-families { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 700px; margin: 40px auto 0; }
.cp-families.is-one { grid-template-columns: 1fr; max-width: 420px; }
.cp-family { padding: 30px 20px; }
.cp-family h3 { margin: 12px 0 0; font-weight: 400; font-size: clamp(24px, 3.6vw, 32px); line-height: 1.2; }

/* ── notes ── */
.cp-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 700px; margin: 40px auto 0; text-align: left; }
.cp-note { padding: 22px 22px 20px; }
.cp-note h3 { margin: 0 0 6px; font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); }
.cp-note p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--soft); }

/* ── gallery ── */
.cp-gallery { display: grid; grid-template-columns: 1.2fr 1fr; grid-auto-rows: 200px; gap: 14px; max-width: 720px; margin: 40px auto 0; }
.cp-gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: 18px; border: 1px solid var(--hair); }
.cp-gallery figure:first-child { grid-row: span 2; }
.cp-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.cp-gallery figure:hover img { transform: scale(1.05); }
.cp-gallery .cp-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 65%),
    color-mix(in srgb, var(--deep) 60%, transparent);
  color: var(--gold-soft);
}
.cp-ph b { font-family: var(--script); font-weight: 400; font-size: 46px; line-height: 1; }
.cp-ph span { font-family: var(--sans); font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--mute); }

/* ── rsvp ── */
.cp-form { max-width: 560px; margin: 40px auto 0; padding: 34px 30px; text-align: left; }
.cp-field { margin-bottom: 22px; }
.cp-field > label, .cp-field > .cp-label { display: block; margin-bottom: 8px; font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); }
.cp-field input, .cp-field select, .cp-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: color-mix(in srgb, var(--deep) 55%, transparent);
  font-size: 18px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.cp-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.cp-field select option { background: var(--deep); color: var(--ink); }
.cp-field input::placeholder, .cp-field textarea::placeholder { color: var(--mute); font-style: italic; }
.cp-field input:focus, .cp-field select:focus, .cp-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.cp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cp-reply { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cp-reply button, .cp-choice button {
  padding: 16px 12px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: all .25s ease;
}
.cp-reply strong { display: block; font-weight: 500; font-size: 19px; }
.cp-reply small { display: block; margin-top: 2px; font-size: 14px; font-style: italic; color: var(--mute); }
.cp-reply button.is-on, .cp-choice button.is-on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); box-shadow: inset 0 0 0 1px var(--gold); }
.cp-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-choice button { padding: 10px 16px; font-size: 16px; border-radius: 999px; }
.cp-counter { display: block; margin-top: 6px; text-align: right; font-family: var(--sans); font-size: 10px; letter-spacing: .1em; color: var(--mute); }
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 24px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--deep) !important;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cp-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--gold) 35%, transparent); }
.cp-btn--ghost { width: auto; background: transparent; color: var(--gold-soft) !important; }
.cp-btn--ghost:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.cp-thanks { display: none; max-width: 520px; margin: 40px auto 0; padding: 40px 28px; }
.cp-thanks.is-on { display: block; animation: cpIn .6s ease; }
.cp-thanks h3 { margin: 0 0 8px; font-weight: 400; font-size: 36px; }
.cp-thanks p { margin: 0 0 22px; color: var(--soft); }
@keyframes cpIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── venue ── */
.cp-venue { max-width: 620px; margin: 40px auto 0; padding: 14px; }
.cp-venue__map { height: 260px; border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--deep) 60%, transparent); }
.cp-venue__map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.05); }
.cp-venue__body { padding: 26px 18px 18px; }
.cp-venue__body h3 { margin: 8px 0 4px; font-weight: 400; font-size: clamp(28px, 4.6vw, 36px); line-height: 1.15; }
.cp-venue__body address { margin: 0 0 22px; font-style: normal; color: var(--soft); }

/* ── closing ── */
.cp-close { padding-bottom: 90px; }
.cp-mono { display: inline-flex; align-items: center; justify-content: center; width: 86px; height: 86px; margin: 34px auto 18px; border: 1px solid var(--hair); border-radius: 50%; font-size: 26px; letter-spacing: .12em; color: var(--gold-soft); }
.cp-sign { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(44px, 8vw, 68px); line-height: 1.1; color: var(--ink); }

.cp-madeby {
  padding: 46px 24px 120px;
  text-align: center;
  background: var(--deep);
  border-top: 1px solid var(--hair);
}
.cp-madeby p { margin: 0 0 16px; font-style: italic; color: var(--mute); }
.cp-madeby a { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); text-decoration: none; }
.cp-madeby a:hover { color: var(--ink); }

/* ── floating controls ── */
.cp-fab {
  position: fixed;
  z-index: 60;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--deep) 72%, transparent);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, opacity .5s ease;
}
.cp-fab:hover { background: color-mix(in srgb, var(--gold) 22%, var(--deep)); border-color: var(--gold); }
.cp-fab--use { left: 22px; }
.cp-fab--music { right: 22px; width: 46px; padding: 0; justify-content: center; font-size: 15px; letter-spacing: 0; }
.cp-fab--music .cp-eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.cp-fab--music .cp-eq i { width: 2px; height: 30%; background: var(--gold-soft); border-radius: 1px; }
.cp-fab--music.is-on .cp-eq i { animation: cpEq 1s ease-in-out infinite; }
.cp-fab--music.is-on .cp-eq i:nth-child(2) { animation-delay: -.3s; }
.cp-fab--music.is-on .cp-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes cpEq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.is-locked .cp-fab { opacity: 0; pointer-events: none; }
.cp-progress { position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transform: scaleX(0); transform-origin: left; }

/* ── reveal on scroll ── */
.js-anim .r { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.js-anim .r.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  body.cp { font-size: 17px; }
  .cp-sec { padding: 90px 20px; }
  .cp-hero { padding-top: 70px; }
  .cp-lead, .cp-story { font-size: 17.5px; }
  .cp-count { padding: 24px 14px 20px; }
  .cp-count__grid { gap: 8px; }
  .cp-facts { grid-template-columns: 1fr; }
  .cp-facts div + div { border-left: 0; border-top: 1px solid var(--hair); }
  .cp-families, .cp-notes { grid-template-columns: 1fr; }
  .cp-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .cp-form { padding: 26px 18px; }
  .cp-two { grid-template-columns: 1fr; gap: 0; }
  .cp-branch { opacity: .32; }
  .cp-fab { height: 42px; bottom: 16px; }
  .cp-fab--use { left: 16px; padding: 0 16px; }
  .cp-fab--music { right: 16px; width: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-bokeh, .cp-discover i { display: none; }
  .js-anim .r { opacity: 1; transform: none; transition: none; }
  .cp-hero__names [data-name] span { opacity: 1; transform: none; filter: none; transition: none; }
}

/* optional uploads: couple photo, video and venue photo (each shown only when uploaded) */
.cp-couple { max-width: 420px; margin: 36px auto 0; padding: 10px; }
.cp-couple img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
.cp-reel { max-width: 640px; margin: 40px auto 0; padding: 10px; }
.cp-reel video { display: block; width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.cp-venue__photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin-bottom: 14px; }
[data-couple-photo][hidden], [data-video-sec][hidden], [data-venue-photo][hidden], [data-tg-moments][hidden], [data-tg-gallery][hidden] { display: none !important; }


/* ---------- long text (every catalogue card and its skins) ----------
   A long name, venue, address or link never runs out of its box: a word too long for its line
   breaks onto the next line instead of being cut off or overlapping. overflow-wrap is inherited,
   so this one rule covers every text in the design; it only acts when a word would overflow. */
body.cp { overflow-wrap: break-word; word-wrap: break-word; }
