/* Crimson Nikah — Nikah invitation (invite-crimson-nikah.php)
   From the MARK BY ILARA THEAM 6 artwork: crimson velvet curtains and a chandelier, rose
   garlands between ivory and sand paper, wine panels and gold lines. Briany script for
   names and titles, Cinzel for headings, Maitree for body copy (all from the artwork's package), Syne & Inter (served from assets/fonts/sage-olive) for small labels.
   Sizes use the artwork's 1080px grid: --u is one artwork pixel, so "calc(73 * var(--u))" is
   the artwork's 73px at whatever width the phone column has. */
/* the artwork's own fonts (MARK BY ILARA THEAM 6 package), served from assets/fonts/crimson-nikah */
@font-face { font-family: "Briany"; src: url("../fonts/crimson-nikah/briany-italic.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/crimson-nikah/cinzel-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Maitree"; src: url("../fonts/crimson-nikah/maitree-light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Maitree"; src: url("../fonts/crimson-nikah/maitree-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Syne"; src: url("../fonts/sage-olive/syne-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/sage-olive/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/sage-olive/inter-medium.woff") format("woff"); font-weight: 500; font-display: swap; }

:root {
  --cn-crimson: #8c0f13;
  --cn-wine: #5a0014;
  --cn-wine-2: #3d0009;
  --cn-cream: #fceede;
  --cn-ivory: #f8ebdc;
  --cn-sand: #ead8bd;
  --cn-gold: #d8a43d;
  --cn-gold-2: #b8924a;
  --cn-muted: #8a968f;
  --cn-script: Briany, "Great Vibes", cursive;
  --cn-cinzel: Cinzel, "Times New Roman", serif;
  --cn-serif: Maitree, Georgia, serif;
  --cn-sans: Syne, "Segoe UI", sans-serif;
  --cn-ui: Inter, "Segoe UI", sans-serif;
  --cn-w: 540px;
  --u: calc(min(100vw, var(--cn-w)) / 1080);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.cn { margin: 0; background: var(--cn-wine-2) url("../images/invites/crimson-nikah/hero.jpg") center top / 1080px auto fixed; color: #111; font: 300 15px/1.55 var(--cn-serif); -webkit-font-smoothing: antialiased; }
body.cn.is-locked { overflow: hidden; height: 100vh; }
img { max-width: 100%; display: block; }
/* long text never pushes past its box: words break when they must, flex/grid items may shrink,
   and nothing inside the invitation is wider than the column */
.cn-main, .cn-intro, .cn-modal, .cn-sheet { overflow-wrap: break-word; word-break: normal; }
.cn-main *, .cn-intro *, .cn-modal *, .cn-sheet * { min-width: 0; max-width: 100%; }
/* these deliberately reach into the side margins (negative margins), still inside the column */
.cn-main .cn-wrap > .cn-script, .cn-main .cn-timeline, .cn-main .cn-timer { max-width: none; }
.cn-main p, .cn-main h1, .cn-main h2, .cn-main h3, .cn-main h4, .cn-main span, .cn-main b, .cn-main a, .cn-main time, .cn-main small, .cn-main em { overflow-wrap: anywhere; }
button { font: inherit; cursor: pointer; }

/* the invitation is a phone-width column; wide screens see the velvet around it */
.cn-main { max-width: var(--cn-w); margin: 0 auto; background: var(--cn-ivory); box-shadow: 0 0 60px rgba(40,0,8,.55); overflow: hidden; }
.cn-sec { position: relative; text-align: center; }
.cn-wrap { position: relative; z-index: 2; padding: 0 calc(110 * var(--u)); }
.cn-cream { background: radial-gradient(120% 70% at 50% 40%, #fbf1e4 0, var(--cn-ivory) 55%, #f1e1cc 100%); }
.cn-beige { background: radial-gradient(110% 70% at 50% 40%, #f1e3cf 0, var(--cn-sand) 60%, #e3cfb1 100%); }
/* wine panels with the artwork's fine diagonal gold lines */
.cn-wine { color: var(--cn-cream); background:
  linear-gradient(to top right, transparent calc(50% - .5px), rgba(216,164,61,.35) 50%, transparent calc(50% + .5px)),
  linear-gradient(to top left, transparent calc(50% - .5px), rgba(216,164,61,.35) 50%, transparent calc(50% + .5px)),
  linear-gradient(90deg, var(--cn-wine-2), #4f0011 45%, #5e0016); }

/* a rose garland straddles the top edge of every section after the hero */
.cn-garland { position: absolute; z-index: 3; left: calc(33 * var(--u)); top: calc(-209 * var(--u)); width: calc(1014 * var(--u)); height: auto; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(60,0,10,.18)); }
.cn-sec:not(.cn-hero) { padding: calc(330 * var(--u)) 0 calc(250 * var(--u)); }

/* ---------- shared type ---------- */
/* type sizes: script titles grow with the phone (30px at 375px wide, 43px at the 540px column);
   body copy and small labels stay at fixed pixel sizes */
.cn-script { margin: 0 0 calc(30 * var(--u)); font: 400 calc(86 * var(--u))/1.1 var(--cn-script); color: var(--cn-crimson); }
.cn-script--light { color: var(--cn-cream); }
.cn-script--names { margin-top: calc(40 * var(--u)); line-height: 1.05; }
/* the couple's names stack: name / & / name, each at the full title size */
.cn-script--names span { display: block; }
.cn-script--names i { display: block; margin: calc(-6 * var(--u)) 0; font: 400 .55em/1.2 var(--cn-script); color: var(--cn-gold-2); }
/* single-line titles: the script keeps the reference size and only shrinks when a title is too
   long for the phone (see fitTitles in the JS) */
.js .cn-script:not(.cn-script--names) { white-space: nowrap; }
/* titles may use nearly the whole column (the text wrap keeps 110px a side; titles keep 30px) */
.cn-wrap > .cn-script { margin-left: calc(-80 * var(--u)); margin-right: calc(-80 * var(--u)); text-wrap: balance; }
.cn-script--names span { white-space: nowrap; }
.cn-kicker { margin: 0 0 calc(14 * var(--u)); font: 400 11px/1.2 var(--cn-cinzel); letter-spacing: .26em; text-transform: uppercase; color: #111; }
.cn-kicker--gold { color: var(--cn-gold); }
.cn-kicker--sm { font-size: 11px; }
.cn-kicker--sans { font-family: var(--cn-sans); text-transform: uppercase; letter-spacing: .02em; }
.cn-body { max-width: calc(880 * var(--u)); margin: 0 auto; padding: 0; font: 300 15px/1.7 var(--cn-serif); color: #111; }
.cn-spaced { margin: 0 0 10px; font: 500 11px/1 var(--cn-ui); letter-spacing: .5em; text-indent: .5em; text-transform: uppercase; color: var(--cn-gold-2); }
.cn-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: calc(14 * var(--u)) auto calc(40 * var(--u)); }
.cn-divider::before, .cn-divider::after { content: ""; width: calc(130 * var(--u)); height: 1px; background: var(--cn-gold-2); }
.cn-divider i { width: 7px; height: 7px; background: var(--cn-gold-2); transform: rotate(45deg); }
.cn-maplink { display: inline-block; max-width: 100%; margin-top: calc(14 * var(--u)); padding: calc(10 * var(--u)) calc(22 * var(--u)); border: 1px solid #d9b56a; background: rgba(255,255,255,.18); color: #484848; font: 400 10px/1.2 var(--cn-sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s; }
.cn-maplink:hover { background: var(--cn-crimson); color: #fff; }
.cn-maplink--light { border-color: rgba(216,164,61,.7); background: transparent; color: #fff; font-family: var(--cn-serif); }
.cn-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-width: 230px; min-height: 48px; margin-top: 8px; padding: 8px 30px; border: 0; border-radius: 40px; background: linear-gradient(90deg, #a3151d, var(--cn-crimson) 55%, var(--cn-wine)); color: var(--cn-cream); font: 400 15px/1.2 var(--cn-cinzel); letter-spacing: .06em; text-decoration: none; box-shadow: 0 8px 18px rgba(90,0,20,.28); transition: transform .2s, box-shadow .2s; }
.cn-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(90,0,20,.34); }
.cn-btn:disabled { opacity: .6; cursor: default; transform: none; }
.cn-btn--ghost { background: transparent; border: 1px solid var(--cn-gold-2); color: var(--cn-crimson); box-shadow: none; }
.cn-textlink { margin-top: 14px; border: 0; background: none; color: var(--cn-gold); font: 400 14px var(--cn-serif); text-decoration: underline; text-underline-offset: 3px; }
.cn-textlink--ink { color: var(--cn-crimson); }

/* scroll-in reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- intro: the cover film, then the names over the stage ---------- */
.cn-intro { position: fixed; inset: 0; width: 100%; max-width: var(--cn-w); margin: 0 auto; z-index: 50; overflow: hidden; background: var(--cn-wine-2); box-shadow: 0 0 60px rgba(40,0,8,.55); -webkit-tap-highlight-color: transparent; transition: opacity .9s ease, visibility .9s; }
.cn-intro.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.cn-intro:focus-visible { outline: none; }
.cn-intro__video, .cn-intro__stage { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.cn-intro__stage { opacity: 0; transition: opacity .6s ease; }
.cn-intro.has-text .cn-intro__stage { opacity: 1; }
/* the text sits on the film's empty stage, centred under the chandelier */
.cn-intro__text { position: absolute; left: 12%; right: 12%; top: 50%; transform: translateY(-46%); text-align: center; color: var(--cn-cream); text-shadow: 0 2px 14px rgba(40,0,8,.55); pointer-events: none; }
.cn-intro__text > * { opacity: 0; transform: translateY(14px); filter: blur(4px); }
.cn-intro.has-text .cn-intro__text > * { animation: cn-rise 1s cubic-bezier(.2,.7,.2,1) forwards; }
.cn-intro.has-text .cn-intro__text > :nth-child(2) { animation-delay: .35s; }
.cn-intro.has-text .cn-intro__text > :nth-child(3) { animation-delay: .7s; }
.cn-intro.has-text .cn-intro__text > :nth-child(4) { animation-delay: 1.1s; }
/* the artwork's own Bismillah calligraphy (bismillah.png), at its size on the 1080 grid */
.cn-intro__bism { display: block; width: 35%; max-width: 190px; height: auto; margin: 0 auto 22px; filter: drop-shadow(0 2px 8px rgba(40,0,8,.5)); }
.cn-intro__kicker { margin: 0 0 6px; font: 400 clamp(13px, 3.9vw, 16px)/1.35 var(--cn-cinzel); }
.cn-intro__names { margin: 0; font: 400 clamp(30px, 8vw, 42px)/1.15 var(--cn-script); }
.cn-intro__names span { display: block; }
.cn-intro__names i { display: block; margin: -4px 0; font: 400 .5em/1 var(--cn-script); color: var(--cn-gold); }
.cn-intro__date { margin: 16px 0 0; font: 400 clamp(11px, 3.3vw, 14px)/1.4 var(--cn-cinzel); letter-spacing: .08em; color: #f3d9a4; }
.cn-intro__hint { position: absolute; left: 0; right: 0; bottom: max(40px, env(safe-area-inset-bottom)); margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 500 12px/1 var(--cn-ui); letter-spacing: .32em; text-indent: .32em; text-transform: uppercase; color: #fff3dc; text-shadow: 0 1px 8px rgba(40,0,8,.7); transition: opacity .4s ease; }
.cn-intro__hint span { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(243,217,164,.9); background: rgba(90,0,20,.45); backdrop-filter: blur(3px); }
.cn-intro__hint span::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(243,217,164,.7); animation: cn-ring 2s ease-out infinite; }
.cn-intro__hint svg { width: 20px; fill: #f3d9a4; animation: cn-beat 1.8s ease-in-out infinite; }
.cn-intro.is-playing .cn-intro__hint { opacity: 0; }
.cn-intro__loading { position: absolute; left: 50%; bottom: max(44px, env(safe-area-inset-bottom)); width: 36px; height: 36px; margin-left: -18px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.cn-intro__loading i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #f3d9a4; animation: cn-spin .8s linear infinite; }
.cn-intro.is-buffering .cn-intro__loading { opacity: 1; }
.cn-draft { position: sticky; top: 0; z-index: 30; max-width: var(--cn-w); margin: 0 auto; padding: 9px 14px; background: rgba(61,0,9,.9); color: var(--cn-cream); font: 500 12px/1.3 var(--cn-ui); text-align: center; backdrop-filter: blur(6px); }

/* ---------- 1 · hero ---------- */
.cn-hero { min-height: calc(1897 * var(--u)); background: var(--cn-crimson) url("../images/invites/crimson-nikah/hero.jpg") center top / 100% auto no-repeat; color: #fff; }
.cn-hero__body { padding: calc(790 * var(--u)) calc(120 * var(--u)) calc(380 * var(--u)); }
.cn-hero__kicker { margin: 0 0 calc(4 * var(--u)); font: 400 9.5px/1.45 var(--cn-cinzel); letter-spacing: .16em; text-transform: uppercase; color: var(--cn-cream); }
.cn-hero__name { margin: calc(10 * var(--u)) 0 calc(6 * var(--u)); font: 400 calc(88 * var(--u))/1.15 var(--cn-script); color: var(--cn-cream); }
.cn-hero__rel, .cn-hero__par { margin: 0; font: 400 12px/1.4 var(--cn-cinzel); }
.cn-hero__rel { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; }
.cn-hero__par { margin-bottom: calc(60 * var(--u)); }
.cn-hero__par + .cn-hero__home { margin-top: calc(-56 * var(--u)); }
.cn-hero__home { opacity: .85; }
.cn-hero__end { margin: calc(80 * var(--u)) 0 0; font: 400 9.5px/1.45 var(--cn-cinzel); letter-spacing: .16em; text-transform: uppercase; }
/* the hero's lines rise in one after another once the curtain film has finished */
.js .cn-in { opacity: 0; transform: translateY(16px); filter: blur(3px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1), filter 1s; }
.cn-hero.is-in .cn-in { opacity: 1; transform: none; filter: none; }
.cn-hero.is-in .cn-in:nth-child(2) { transition-delay: .15s; }
.cn-hero.is-in .cn-in:nth-child(3) { transition-delay: .25s; }
.cn-hero.is-in .cn-in:nth-child(4) { transition-delay: .35s; }
.cn-hero.is-in .cn-in:nth-child(5) { transition-delay: .55s; }
.cn-hero.is-in .cn-in:nth-child(6) { transition-delay: .65s; }
.cn-hero.is-in .cn-in:nth-child(7) { transition-delay: .75s; }
.cn-hero.is-in .cn-in:nth-child(n+8) { transition-delay: .9s; }

/* ---------- 3 · scratch to reveal ---------- */
.cn-reveal { position: relative; width: calc(1030 * var(--u)); aspect-ratio: 1562 / 1007; margin: calc(20 * var(--u)) auto 0; }
.cn-reveal__frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
/* the stage inside the rose frame: the date under a crimson foil */
.cn-reveal__date, .cn-reveal__foil { position: absolute; left: 11.2%; top: 15.4%; width: 77.6%; height: 70.4%; }
.cn-reveal__date { z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, #7b0b1e, var(--cn-wine-2)); color: var(--cn-cream); }
.cn-reveal__date span { font: 400 max(11px, calc(24 * var(--u)))/1.3 var(--cn-cinzel); letter-spacing: .08em; }
.cn-reveal__date b { font: 400 calc(150 * var(--u))/1 var(--cn-cinzel); color: #f3d9a4; text-shadow: 0 0 18px rgba(216,164,61,.45); }
.cn-reveal__date em { margin-top: calc(10 * var(--u)); font: italic 300 max(12px, calc(24 * var(--u)))/1.25 var(--cn-serif); color: #f3d9a4; }
.cn-reveal__date { padding: 0 6%; text-align: center; overflow: hidden; }
.cn-reveal__foil { z-index: 2; touch-action: none; cursor: grab; transition: opacity .8s ease; }
.cn-reveal.is-done .cn-reveal__foil { opacity: 0; pointer-events: none; }
.cn-reveal.is-done .cn-reveal__date b { animation: cn-glow 2.4s ease-in-out infinite; }
.cn-reveal__skip { position: relative; z-index: 4; margin-top: calc(26 * var(--u)); border: 0; background: none; color: var(--cn-crimson); font: 400 13px var(--cn-serif); text-decoration: underline; text-underline-offset: 3px; }
.cn-reveal.is-done .cn-reveal__skip { visibility: hidden; }

/* ---------- 4 · our story ---------- */
.cn-story__photo { display: block; width: calc(880 * var(--u)); margin: calc(40 * var(--u)) auto 0; padding: 0; border: 0; background: none; }
.cn-story__photo img { width: 100%; aspect-ratio: 919 / 560; object-fit: cover; box-shadow: 0 14px 30px rgba(60,0,10,.18); }
.cn-story .cn-body { margin-top: calc(50 * var(--u)); }
.cn-story__video { display: block; width: calc(880 * var(--u)); margin: calc(40 * var(--u)) auto 0; }
/* the gallery slider: one photo at a time, swipe sideways (snaps to each photo), dots below */
.cn-slider { width: calc(880 * var(--u)); margin: calc(50 * var(--u)) auto 0; }
.cn-slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; border: calc(12 * var(--u)) solid #fff; background: #fff; box-shadow: 0 14px 30px rgba(60,0,10,.18); }
.cn-slider__track::-webkit-scrollbar { display: none; }
.cn-photo { flex: 0 0 100%; display: block; padding: 0; border: 0; background: #f4e6d6; scroll-snap-align: center; scroll-snap-stop: always; }
.cn-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.cn-slider__dots { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; }
.cn-dot { width: 9px; height: 9px; padding: 0; border: 1px solid var(--cn-gold-2); border-radius: 9px; background: transparent; transition: width .3s ease, background .3s ease; }
.cn-dot.is-on { width: 24px; background: var(--cn-crimson); border-color: var(--cn-crimson); }
.cn-dot:focus-visible { outline: 2px solid var(--cn-gold); outline-offset: 3px; }

/* ---------- 5 · countdown ---------- */
.cn-count { padding-bottom: calc(300 * var(--u)) !important; }
.cn-timer { display: grid; grid-template-columns: repeat(4, 1fr); margin: calc(40 * var(--u)) calc(-40 * var(--u)) 0; }
.cn-timer b { display: block; font: 400 calc(110 * var(--u))/1 "Times New Roman", Tinos, serif; color: var(--cn-cream); }
.cn-timer span { display: block; margin-top: calc(14 * var(--u)); font: 400 9.5px/1 Helvetica, Arial, sans-serif; letter-spacing: .22em; text-indent: .3em; text-transform: uppercase; color: var(--cn-cream); }
.cn-count__done { margin: 20px 0 0; font: italic 300 16px var(--cn-serif); color: #f3d9a4; }

/* ---------- 6 · the Nikah day timeline ---------- */
/* the Nikah-day timeline, about 75% larger than the first pass; it may use nearly the whole column */
.cn-timeline { list-style: none; margin: calc(60 * var(--u)) calc(-80 * var(--u)) 0; padding: 0; display: flex; flex-direction: column; align-items: center; text-align: left; }
.cn-timeline li { width: max-content; max-width: 100%; }
.cn-timeline li { display: grid; grid-template-columns: calc(270 * var(--u)) calc(76 * var(--u)) minmax(0, calc(620 * var(--u))); align-items: start; min-height: calc(150 * var(--u)); }
.cn-timeline time { padding-top: calc(22 * var(--u)); text-align: right; font: 400 15px/1.2 var(--cn-cinzel); letter-spacing: .06em; color: #111; }
.cn-timeline i { position: relative; align-self: stretch; }
.cn-timeline i::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--cn-gold); }
.cn-timeline i::after { content: ""; position: absolute; left: 50%; top: calc(26 * var(--u)); width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--cn-gold); box-shadow: 0 0 0 3px rgba(216,164,61,.18); }
.cn-timeline b { display: block; font: 400 24px/1.2 var(--cn-cinzel); color: #111; }
.cn-timeline span { display: block; padding: 3px 0 calc(44 * var(--u)); font: 300 17px/1.35 var(--cn-serif); color: #333; }

/* ---------- 7 · venue ---------- */
/* wide and tall (about twice the first version's height); the content sits in the middle */
.cn-venue__card { position: relative; width: calc(1000 * var(--u)); min-height: calc(1100 * var(--u)); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; padding: calc(110 * var(--u)) calc(60 * var(--u)) calc(100 * var(--u)); background: linear-gradient(90deg, var(--cn-wine-2), #4f0011 50%, #5e0016); color: #fff; box-shadow: 0 18px 36px rgba(60,0,10,.25); }
.cn-venue__card::before { content: ""; position: absolute; inset: calc(16 * var(--u)); border: 1px solid rgba(216,164,61,.45); pointer-events: none; }
.cn-venue__card .cn-divider { margin: calc(10 * var(--u)) auto calc(44 * var(--u)); }
.cn-venue__card .cn-divider::before, .cn-venue__card .cn-divider::after { width: calc(70 * var(--u)); background: var(--cn-gold); }
.cn-venue__card .cn-divider i { width: 5px; height: 5px; background: var(--cn-gold); }
/* larger type and more air between the lines inside the venue card */
.cn-venue__card .cn-kicker { margin-bottom: calc(18 * var(--u)); font-size: 13.5px; letter-spacing: .3em; }
.cn-venue__card .cn-script { align-self: stretch; margin: 0 0 calc(44 * var(--u)); font-size: calc(108 * var(--u)); }
/* nothing in the card may be wider than the card: a long venue name shrinks a little or wraps */
.cn-venue__card > * { max-width: 100%; }
.cn-venue__card .cn-maplink { margin-top: calc(56 * var(--u)); padding: 10px 20px; font-size: 12px; }
.cn-venue__photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin: 0 0 calc(50 * var(--u)); border: 1px solid rgba(216,164,61,.45); }
.cn-venue__addr { margin: 0; font: 300 17px/1.6 var(--cn-serif); }

/* ---------- 8 · dress code ---------- */
.cn-dress .cn-script { margin-bottom: calc(50 * var(--u)); }
.cn-swatches { display: flex; justify-content: center; margin-top: calc(80 * var(--u)); }
.cn-swatches i { width: calc(100 * var(--u)); height: calc(100 * var(--u)); margin: 0 calc(-8 * var(--u)); border-radius: 50%; border: calc(6 * var(--u)) solid #f8e6d2; box-shadow: 0 4px 10px rgba(60,0,10,.15); transition: transform .3s; }
.cn-swatches i:hover { transform: translateY(-6px); }
/* each circle's colour is set on the page (the couple's palette); on narrow phones a long palette wraps */
.cn-swatches { flex-wrap: wrap; row-gap: 10px; }

/* ---------- 9 · festivities ---------- */
.cn-fest .cn-script { margin-bottom: calc(10 * var(--u)); }
.cn-event { position: relative; width: calc(820 * var(--u)); margin: calc(40 * var(--u)) auto 0; padding: calc(80 * var(--u)) calc(30 * var(--u)) calc(70 * var(--u)); background: #ead8bd; transform-origin: 50% 0; }
.cn-event::before { content: ""; position: absolute; inset: calc(14 * var(--u)); border: 1px solid #d9b56a; pointer-events: none; }
.cn-event h3 { margin: 0 0 calc(20 * var(--u)); font: 400 21px/1.15 var(--cn-cinzel); color: var(--cn-crimson); }
.cn-event p { margin: 0 0 calc(10 * var(--u)); font: 400 11px/1.6 var(--cn-cinzel); letter-spacing: .12em; text-transform: uppercase; color: #111; }
.cn-event p + p { font: 300 14px/1.6 var(--cn-serif); letter-spacing: 0; text-transform: none; }

/* ---------- 10 · presence & greetings ---------- */
.cn-present__sub { max-width: calc(860 * var(--u)); margin: 0 auto; font: 300 15px/1.7 var(--cn-serif); color: #fff; }
.cn-heartbtn { position: relative; display: block; width: calc(280 * var(--u)); min-width: 132px; aspect-ratio: 120 / 108; margin: calc(60 * var(--u)) auto 0; padding: 0; border: 0; background: none; color: var(--cn-cream); animation: cn-beat 2.2s ease-in-out infinite; }
.cn-heartbtn__shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cn-heartbtn__shape path { fill: #4b0010; stroke: #fceede; stroke-width: 7; filter: drop-shadow(0 6px 12px rgba(0,0,0,.35)); }
/* coin and label sit in the heart's wide upper half so the writing stays inside the outline */
.cn-heartbtn__coin { position: absolute; left: 50%; top: 21%; display: grid; place-items: center; width: 21%; aspect-ratio: 1; margin-left: -10.5%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7e2a2, #c99a36 70%); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.cn-heartbtn__coin svg { width: 46%; fill: #6c0b16; }
.cn-heartbtn__label { position: absolute; left: 20%; right: 20%; top: 45%; font: 400 max(9px, calc(17 * var(--u)))/1.1 var(--cn-cinzel); white-space: nowrap; }
.cn-heartbtn:hover { animation-play-state: paused; transform: scale(1.06); }
.cn-wall__count { margin: calc(40 * var(--u)) 0 0; font: italic 300 14px var(--cn-serif); color: #f3d9a4; }
.cn-cards { display: grid; gap: 12px; margin-top: 14px; text-align: left; }
.cn-card { padding: 16px 16px 12px; border: 1px solid rgba(216,164,61,.35); border-radius: 16px; background: rgba(252,238,222,.07); }
.cn-card__head { display: flex; align-items: center; gap: 10px; }
.cn-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7e2a2, #c99a36 70%); color: var(--cn-wine); font: 500 15px var(--cn-cinzel); }
.cn-card__name { margin: 0; font: 400 15px var(--cn-cinzel); color: var(--cn-cream); }
.cn-card__when { font: 400 11px var(--cn-ui); color: rgba(252,238,222,.6); }
.cn-card__msg { margin: 10px 0 6px; font: 300 14px/1.5 var(--cn-serif); color: #fff; }
.cn-heart { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid rgba(216,164,61,.4); border-radius: 20px; background: none; color: #f3d9a4; font: 400 12px var(--cn-ui); }
.cn-heart svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.cn-heart.is-on svg { fill: #e04a5a; stroke: #e04a5a; }
.cn-heart.pop svg { animation: cn-pop .4s ease; }
.cn-empty { padding: 18px; border: 1px dashed rgba(216,164,61,.4); border-radius: 16px; text-align: center; font: italic 300 14px var(--cn-serif); color: rgba(252,238,222,.8); }

/* ---------- 11 · RSVP ---------- */
.cn-panel { position: relative; z-index: 2; width: calc(1000 * var(--u)); max-width: calc(100% - 32px); margin: 0 auto; padding: calc(120 * var(--u)) calc(80 * var(--u)) calc(110 * var(--u)); border-radius: calc(110 * var(--u)) calc(110 * var(--u)) calc(110 * var(--u)) calc(110 * var(--u)); background: #fff; box-shadow: 0 20px 40px rgba(90,40,10,.1); }
.cn-panel__title { margin: 0; font: 400 clamp(28px, 7.6vw, 38px)/1.1 var(--cn-cinzel); color: #000; }
.cn-panel__sub { margin: 0 0 6px; font: 400 16px/1.4 var(--cn-serif); color: #111; }
.cn-panel__sub small { font-size: 13px; color: var(--cn-gold-2); }
.cn-form { margin-top: 12px; text-align: left; }
.cn-label { display: block; margin: 18px 0 8px 6px; font: 400 10px/1 var(--cn-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--cn-gold-2); }
.cn-label small { letter-spacing: .1em; text-transform: none; }
.cn-input { width: 100%; padding: 11px 18px; border: 1px solid #d3b27a; border-radius: 30px; background: #fff; color: #111; font: 300 16px/1.3 var(--cn-serif); outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
select.cn-input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b8924a' stroke-width='1.5'/%3E%3C/svg%3E") right 18px center no-repeat; }
textarea.cn-input { border-radius: 20px; resize: vertical; }
.cn-input::placeholder { color: var(--cn-muted); }
.cn-input:focus { border-color: var(--cn-crimson); box-shadow: 0 0 0 3px rgba(140,15,19,.1); }
.cn-input.is-invalid, .cn-choices.is-invalid .cn-choice { border-color: #c0392b; }
.cn-choices { display: grid; gap: 14px; }
.cn-choice { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 16px 24px; border: 1px solid #d3b27a; border-radius: 34px; background: #f9f4ea; cursor: pointer; transition: background .2s, border-color .2s; }
.cn-choice input { position: absolute; opacity: 0; }
.cn-choice span { font: 300 16px var(--cn-serif); color: #111; }
.cn-choice i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--cn-gold-2); transition: box-shadow .2s, background .2s; }
.cn-choice:has(input:checked) { background: #fbeee0; border-color: var(--cn-crimson); }
.cn-choice input:checked ~ i { background: var(--cn-crimson); box-shadow: inset 0 0 0 3px #fff; border-color: var(--cn-crimson); }
.cn-choice input:focus-visible ~ span { text-decoration: underline; }
.cn-form__msg { min-height: 18px; margin: 14px 0 0; font: 400 13px/1.4 var(--cn-ui); color: #c0392b; text-align: center; }
.cn-form__msg.ok { color: #2e7d4f; }
.cn-form .cn-btn { display: flex; width: 100%; margin-top: 10px; }
.cn-thanks { padding: 20px 0 4px; }
.cn-thanks h3 { margin: 12px 0 6px; font: 400 26px var(--cn-cinzel); color: var(--cn-crimson); }
.cn-thanks p { margin: 0; font: 300 15px/1.5 var(--cn-serif); }
.cn-coin { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7e2a2, #c99a36 70%); box-shadow: 0 6px 14px rgba(140,90,20,.3); }
.cn-coin svg { width: 22px; fill: var(--cn-crimson); }

/* ---------- 12 · closing arch ---------- */
.cn-end { padding-bottom: calc(160 * var(--u)) !important; }
.cn-arch { position: relative; width: calc(870 * var(--u)); margin: 0 auto; padding: calc(110 * var(--u)) calc(60 * var(--u)) calc(110 * var(--u)); border: 1px solid #d9b56a; border-bottom: 0; border-radius: calc(130 * var(--u)) calc(130 * var(--u)) 0 0; }
.cn-arch::before { content: ""; position: absolute; inset: calc(-16 * var(--u)) calc(-16 * var(--u)) 0; border: 1px solid rgba(217,181,106,.6); border-bottom: 0; border-radius: calc(146 * var(--u)) calc(146 * var(--u)) 0 0; pointer-events: none; }
.cn-arch .cn-divider::before, .cn-arch .cn-divider::after { width: calc(90 * var(--u)); }
.cn-arch .cn-divider i { width: 4px; height: 4px; }
.cn-end__title { margin: 0 0 calc(30 * var(--u)); font: 400 calc(52 * var(--u))/1.2 var(--cn-cinzel); color: #000; }
.cn-end__date { margin: 0 0 calc(50 * var(--u)); font: 400 9.5px/1.6 var(--cn-cinzel); letter-spacing: .16em; text-transform: uppercase; }
.cn-own { display: block; margin-top: 22px; font: 400 13px var(--cn-serif); color: var(--cn-crimson); }

/* ---------- overlays ---------- */
.cn-petals { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; }
.cn-petal { position: absolute; top: 0; left: 0; will-change: transform, opacity; }
.cn-petal svg { width: 100%; height: 100%; display: block; }
.cn-modal { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(40,0,8,.6); backdrop-filter: blur(5px); overflow-y: auto; animation: cn-fade .3s ease both; }
.cn-modal[hidden] { display: none; }
.cn-modal__panel { position: relative; width: min(420px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 40px 26px 30px; border-radius: 36px; background: #fff; text-align: center; box-shadow: 0 30px 70px rgba(40,0,8,.45); animation: cn-pop-in .45s cubic-bezier(.2,1.2,.4,1) both; }
.cn-modal__panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, #d8a43d, var(--cn-crimson)); }
.cn-modal__close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--cn-ivory); color: var(--cn-crimson); font-size: 24px; line-height: 1; }
.cn-modal .cn-coin { margin: 0 auto 12px; }
.cn-modal .cn-panel__sub { margin: 6px 0 4px; font-style: italic; }
.cn-sheet, .cn-lightbox { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(40,0,8,.55); backdrop-filter: blur(4px); }
.cn-sheet[hidden], .cn-lightbox[hidden] { display: none; }
.cn-sheet__panel { width: min(440px, 100%); padding: 26px 22px 30px; border-radius: 28px 28px 0 0; background: var(--cn-ivory); text-align: center; animation: cn-up .35s ease both; }
.cn-sheet__panel h3 { margin: 0 0 16px; font: 400 34px var(--cn-script); color: var(--cn-crimson); }
.cn-sheet__panel button { position: relative; overflow: hidden; display: block; width: 100%; margin: 0 0 10px; padding: 14px; border: 1px solid #d3b27a; border-radius: 30px; background: #fff; font: 400 15px var(--cn-serif); }
.cn-sheet__panel .cn-sheet__close { border: 0; background: none; color: #3a2929; }
.cn-lightbox { align-items: center; background: rgba(30,0,6,.94); }
.cn-lightbox img { max-width: 92vw; max-height: 86vh; border: 6px solid #fff; }
.cn-lightbox button { position: absolute; border: 0; background: none; color: #fff; font-size: 42px; line-height: 1; padding: 12px 16px; }
.cn-lightbox__close { top: 10px; right: 10px; }
.cn-lightbox__nav--prev { left: 4px; }
.cn-lightbox__nav--next { right: 4px; }
.cn-toast { position: fixed; left: 50%; bottom: 26px; z-index: 70; padding: 11px 20px; border-radius: 30px; background: var(--cn-crimson); color: #fff; font: 500 13px var(--cn-ui); transform: translate(-50%, 30px); opacity: 0; transition: .3s; pointer-events: none; }
.cn-toast.show { transform: translate(-50%, 0); opacity: 1; }
/* the round song button, bottom right of the phone column */
.cn-music { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); right: max(16px, calc(50vw - var(--cn-w) / 2 + 16px)); z-index: 55; display: flex; align-items: center; justify-content: center; gap: 3px; width: 44px; height: 44px; border: 1px solid rgba(252,238,222,.75); border-radius: 50%; background: rgba(61,0,9,.45); backdrop-filter: blur(4px); }
.cn-music i { width: 2px; height: 14px; border-radius: 2px; background: var(--cn-cream); transform-origin: 50% 100%; }
.cn-music i:nth-child(2) { height: 20px; }
.cn-music[aria-pressed="true"] i { animation: cn-bars 1s ease-in-out infinite; }
.cn-music[aria-pressed="true"] i:nth-child(2) { animation-delay: -.3s; }
.cn-music[aria-pressed="true"] i:nth-child(3) { animation-delay: -.6s; }
.cn-music[aria-pressed="false"] i { transform: scaleY(.35); }
.cn-touchfx { position: fixed; inset: 0; z-index: 90; width: 100vw; height: 100vh; pointer-events: none; }
.cn-ripple { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,220,.55) 0, rgba(255,240,220,.2) 40%, transparent 70%); transform: scale(0); pointer-events: none; animation: cn-ripple .65s ease-out forwards; }
.cn-choice .cn-ripple, .cn-sheet__panel .cn-ripple { background: radial-gradient(circle, rgba(140,15,19,.14) 0, rgba(140,15,19,.06) 40%, transparent 70%); }
.is-preview, .is-preview * { scrollbar-width: none; }
.is-preview ::-webkit-scrollbar { display: none; }

@keyframes cn-rise { to { opacity: 1; transform: none; filter: none; } }
@keyframes cn-ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes cn-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.08); } 30% { transform: scale(1); } 45% { transform: scale(1.05); } }
@keyframes cn-spin { to { transform: rotate(360deg); } }
@keyframes cn-glow { 50% { text-shadow: 0 0 28px rgba(243,217,164,.85); } }
@keyframes cn-bars { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
@keyframes cn-pop { 50% { transform: scale(1.4); } }
@keyframes cn-fade { from { opacity: 0; } }
@keyframes cn-up { from { transform: translateY(100%); } }
@keyframes cn-pop-in { from { opacity: 0; transform: scale(.85); } }
@keyframes cn-ripple { to { transform: scale(1); opacity: 0; } }
