/* =========================================================
   Katb Kitab — white & purple, royal stationery
   Open-source pieces: Three.js (envelope), Vara.js (handwriting),
   Magic UI patterns (blur fade, number ticker, spotlight), Phosphor icons, Lenis, GSAP.
   ========================================================= */
:root {
  --white: #FBF9F6;          /* warm cotton-paper white */
  --card: #FFFFFF;
  --fg: #221628;
  --muted: #74687A;
  --faint: #ABA1B0;
  --border: rgba(90, 45, 82, 0.10);
  --plum: #5A2D52;           /* her dress */
  --plum-deep: #45213F;
  --plum-2: #7A4A6E;
  --lilac: #C9B6E4;          /* table runners */
  --lilac-50: #F5F0F8;

  --caps: "Cinzel", "Trajan Pro", serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 5vw, 40px);
  --shadow-paper: 0 0 0 1px rgba(90,45,82,0.06), 0 1px 2px rgba(90,45,82,0.05), 0 24px 60px -32px rgba(90,45,82,0.30);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; color: var(--fg); background: var(--white); font-family: var(--sans); line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; height: 100dvh; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--plum); }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; border-radius: 8px; }

/* soft light on the paper + fine grain */
/* one real surface for the whole invitation: cream silk satin (Unsplash) */
.bg { position: fixed; inset: 0; z-index: -1; background:
  linear-gradient(rgba(250,246,240,0.18), rgba(250,246,240,0.18)),
  url("assets/linen.jpg") center / 900px repeat,
  #EFE6DA; }
.bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .38  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* legacy class names now mean "purple accent" (no gold) */
.foil-text { color: var(--plum-2); }

.paper { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-paper); }
.eyebrow { margin: 0 0 0.9rem; font-family: var(--caps); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--plum-2); }
.h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 7vw, 3.8rem); line-height: 1.02; letter-spacing: -0.01em; }
.lead { margin: 1rem auto 0; max-width: 32rem; color: var(--muted); }
.rule { display: block; width: clamp(24px, 7vw, 56px); height: 1px; background: var(--lilac); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 48px; padding: 0 1.4rem; border-radius: 999px; border: 0; cursor: pointer; font-size: 0.95rem; font-weight: 500; white-space: nowrap; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background-color 0.4s var(--ease); }
.btn:active { transform: scale(0.97); }
.btn i { transition: transform 0.4s var(--ease); }
.btn:hover i.ph-arrow-right { transform: translateX(3px); }
.btn--sm { height: 38px; padding: 0 1.1rem; font-size: 0.875rem; }
.btn--block { width: 100%; }
.btn--plum { color: #fff; background-color: var(--plum); background-image: linear-gradient(110deg, transparent 38%, rgba(255,255,255,0.2) 50%, transparent 62%); background-size: 250% 100%; background-repeat: no-repeat; box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 10px 24px -10px rgba(90,45,82,0.6); animation: shine 4s var(--ease) infinite; }
.btn--plum:hover { background-color: var(--plum-deep); }
@keyframes shine { 0% { background-position: 130% 0; } 60%, 100% { background-position: -30% 0; } }
.btn--ghost { background: var(--card); box-shadow: var(--shadow-paper); }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0; border: 0; background: none; cursor: pointer; font-size: 0.92rem; font-weight: 500; color: var(--plum); }
.link i { transition: transform 0.4s var(--ease); }
.link:hover i { transform: translate(2px, -2px); }
.link--muted { align-self: center; color: var(--muted); font-weight: 400; font-size: 0.875rem; }

/* =========================================================
   OPENING
   ========================================================= */
.opening { position: fixed; inset: 0; z-index: 40; background:
  radial-gradient(70% 50% at 50% 45%, rgba(255,250,244,0.35), rgba(255,250,244,0) 70%),
  url("assets/linen.jpg") center / 900px repeat,
  #EFE6DA; overflow: hidden; }
.env3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s var(--ease); }
.opening.is-ready .env3d { opacity: 1; }
.env-hit { position: absolute; left: 50%; top: 50%; width: min(86vw, 520px); height: min(62vw, 380px); transform: translate(-50%, -50%); border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; z-index: 2; }
.opening__to { position: absolute; top: max(8vh, 56px); left: 0; right: 0; margin: 0; text-align: center; font-family: var(--caps); font-size: 0.72rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--plum-2); z-index: 1; }
.opening__hint { position: absolute; bottom: max(9vh, 56px); left: 0; right: 0; margin: 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--plum-2); animation: breathe 3s var(--ease) infinite; z-index: 1; }
@keyframes breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.opening.no-webgl .env3d { display: none; }

/* the card (HTML) — white, raised double border */
.card {
  position: relative; z-index: 2;
  width: min(86vw, 380px); margin: 0;
  padding: 4.4rem 1.6rem 2.6rem;
  text-align: center;
  background: var(--card);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(90,45,82,0.06), 0 34px 70px -28px rgba(69,33,63,0.32), 0 10px 22px -14px rgba(69,33,63,0.18);
  opacity: 0;
}
body.is-open .card { opacity: 1; }

/* arched double frame (as in classic nikah cards) */
.card__arch {
  position: absolute; inset: 14px; pointer-events: none;
  border: 1px solid rgba(90,45,82,0.34);
  border-radius: 999px 999px 26px 26px / 999px 999px 26px 26px;
}
.card__arch::after {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid rgba(90,45,82,0.14);
  border-radius: inherit;
}
.card__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }

.card__bismillah { margin: 0.6rem 0 0; font-family: "Amiri", serif; font-size: 1.3rem; line-height: 1.6; color: var(--plum); }
.card__host { margin: 0.8rem 0 0; font-family: var(--caps); font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.card__hosts { margin: 0.9rem 0 0; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.card__hosts p { margin: 0; font-family: var(--caps); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--plum); }
.card__hosts-and { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--plum-2); line-height: 1.3; }
.card__intro { margin: 0.7rem 0 0; line-height: 1.35; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--muted); }

.card__names { margin: 0.5rem 0 0; display: flex; flex-direction: column; align-items: center; font-weight: 400; line-height: 1; }
.card__names .nm {
  display: block; padding: 0 0.25em;
  font-family: "Italianno", cursive; font-size: clamp(3rem, 14vw, 3.7rem); line-height: 1.25; color: var(--plum);
  clip-path: inset(-20% 100% -20% 0);
}
.card__names .amp { display: block; margin: -0.35rem 0 -0.25rem; font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--plum-2); opacity: 0; transform: scale(0.8); transition: opacity 0.6s var(--ease) 0.75s, transform 0.6s var(--ease) 0.75s; }
.card__names.is-written .nm { animation: pen 0.95s cubic-bezier(0.55, 0.1, 0.35, 1) forwards; }
.card__names.is-written .nm:last-child { animation-delay: 0.9s; }
.card__names.is-written .amp { opacity: 1; transform: none; }
@keyframes pen { to { clip-path: inset(-20% -5% -20% 0); } }

.card__rule { display: block; width: 64%; height: 1px; margin: 1.1rem 0 1rem; background: linear-gradient(90deg, transparent, rgba(90,45,82,0.4), transparent); }

/* Canva-style date block */
.card__date { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-family: var(--caps); color: var(--plum); }
.d-month, .d-year { font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; }
.d-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.8rem; width: 100%; max-width: 280px; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; }
.d-row > span:first-child { text-align: right; }
.d-row > span:last-child { text-align: left; }
.d-day { padding: 0 0.8rem; border-left: 1px solid rgba(90,45,82,0.35); border-right: 1px solid rgba(90,45,82,0.35); font-family: var(--serif); font-size: 2.3rem; font-weight: 500; letter-spacing: 0; line-height: 1; }
.card__venue { margin: 1.1rem 0 0; font-family: var(--serif); font-size: 1rem; line-height: 1.35; color: var(--muted); }
.card__venue strong { font-family: var(--caps); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; color: var(--plum); text-transform: uppercase; }

.card__links { display: flex; align-items: center; gap: 0.7rem; margin-top: 1.3rem; font-family: var(--caps); font-size: 0.64rem; letter-spacing: 0.24em; color: var(--plum); }
.card__links a, .card__links button { position: relative; padding: 0.35rem 0; border: 0; background: none; cursor: pointer; font: inherit; letter-spacing: inherit; color: inherit; text-transform: uppercase; }
.card__links a::after, .card__links button::after { content: ""; position: absolute; left: 0; right: 0.24em; bottom: 0; height: 1px; background: currentColor; opacity: 0.3; transition: opacity 0.4s var(--ease); }
.card__links a:hover::after, .card__links button:hover::after { opacity: 1; }
.card__links span { color: var(--lilac); }

/* real white peonies resting on the card corners */
.flora {
  position: absolute; z-index: 3; pointer-events: none; user-select: none; height: auto;
  filter: sepia(0.08) saturate(0.55) hue-rotate(-12deg) brightness(1.07) drop-shadow(0 10px 14px rgba(69,33,63,0.16)) drop-shadow(0 2px 3px rgba(69,33,63,0.1));
  opacity: 0;
  transition: opacity 1.4s var(--ease), transform 1.8s var(--ease);
}
.flora--tr { width: clamp(120px, 31vw, 210px); top: -40px; right: -34px; transform: translate(30px, -30px) rotate(-4deg) scale(0.9);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%); mask-image: linear-gradient(to bottom, #000 62%, transparent 96%); }
.flora--bl { width: clamp(130px, 34vw, 230px); bottom: -14px; left: -40px; transform: translate(-30px, 30px) scaleX(-1) rotate(-20deg) scale(0.9); }
body.is-open .flora { opacity: 1; }
body.is-open .flora--tr { transform: rotate(-4deg); transition-delay: 0.35s; }
body.is-open .flora--bl { transform: scaleX(-1) rotate(-20deg); transition-delay: 0.6s; }

.scroll-cue { position: absolute; bottom: 2rem; left: 50%; z-index: 2; width: 1px; height: 46px; margin-left: -0.5px; background: rgba(90,45,82,0.18); overflow: hidden; opacity: 0; transition: opacity 1s var(--ease) 1.6s; }
body.is-open .scroll-cue { opacity: 1; }
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--plum); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }

/* =========================================================
   PAGE
   ========================================================= */
.nav { position: fixed; top: 14px; left: 50%; z-index: 30; transform: translateX(-50%); display: flex; align-items: center; gap: 0.25rem; width: max-content; max-width: calc(100% - 24px); padding: 6px 6px 6px 18px; border-radius: 999px; background: rgba(255,255,255,0.75); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 0 0 1px var(--border), 0 8px 30px -12px rgba(90,45,82,0.22); opacity: 0; pointer-events: none; transition: opacity 0.8s var(--ease) 0.6s; }
body.is-open .nav { opacity: 1; pointer-events: auto; }
.nav__brand { font-family: var(--caps); font-size: 0.95rem; letter-spacing: 0.12em; margin-right: 0.75rem; color: var(--plum); white-space: nowrap; }
.nav__links { display: flex; margin-right: 0.5rem; }
.nav__links a { padding: 0.45rem 0.75rem; border-radius: 999px; font-size: 0.875rem; color: var(--muted); transition: color 0.3s, background-color 0.3s; }
.nav__links a:hover { color: var(--fg); background: rgba(90,45,82,0.05); }

.hero { position: relative; overflow: hidden; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem var(--gutter) 5rem; }
.hero__names { margin: 0.8rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 0.22em; font-family: var(--serif); font-weight: 500; font-size: clamp(4rem, 15vw, 9.5rem); line-height: 0.95; letter-spacing: -0.015em; color: var(--fg); }
.hero__names em { color: var(--plum-2); font-weight: 400; }
.hero__sub { margin: 1.4rem auto 0; max-width: 26rem; font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 3.4vw, 1.45rem); color: var(--muted); line-height: 1.4; }
.hero__date { display: flex; align-items: center; gap: 1rem; margin-top: 1.8rem; font-family: var(--caps); font-size: 0.82rem; letter-spacing: 0.16em; color: var(--plum); }
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2.2rem; }
.h-in { opacity: 0; transform: translateY(16px); filter: blur(10px); }
body.is-open .h-in { opacity: 1; transform: none; filter: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease); }
body.is-open .h-in:nth-child(1) { transition-delay: 0.3s; }
body.is-open .h-in:nth-child(2) { transition-delay: 0.42s; }
body.is-open .h-in:nth-child(3) { transition-delay: 0.56s; }
body.is-open .h-in:nth-child(4) { transition-delay: 0.68s; }
body.is-open .h-in:nth-child(5) { transition-delay: 0.8s; }

.countdown { max-width: 860px; margin: 0 auto; padding: 0 var(--gutter); }
.countdown__card { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: clamp(1.3rem, 4vw, 2rem) 0.25rem; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat__n { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 9vw, 4.4rem); line-height: 1; color: var(--plum); font-variant-numeric: tabular-nums lining-nums; }
.stat__l { font-family: var(--caps); font-size: 0.66rem; letter-spacing: 0.2em; color: var(--muted); }

.section { max-width: 1040px; margin: 0 auto; padding: clamp(6rem, 14vw, 9rem) var(--gutter) 0; }
.section--narrow { max-width: 680px; }
.section__head { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 3.5rem); }

.details { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .details { grid-template-columns: repeat(3, 1fr); } }
.tile { position: relative; overflow: hidden; padding: 1.6rem; display: flex; flex-direction: column; align-items: flex-start; }
.tile > * { position: relative; }
.tile__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--lilac-50); color: var(--plum); font-size: 1.3rem; box-shadow: inset 0 0 0 1px var(--border); }
.tile__label { margin-top: 1.2rem; font-family: var(--caps); font-size: 0.66rem; letter-spacing: 0.22em; color: var(--faint); }
.tile h3 { margin: 0.35rem 0 0.3rem; font-family: var(--serif); font-weight: 500; font-size: 1.65rem; line-height: 1.15; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile .link { margin-top: auto; padding-top: 1.2rem; }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s var(--ease); background: radial-gradient(340px circle at var(--x, 50%) var(--y, 50%), rgba(201,182,228,0.3), transparent 60%); }
.spot:hover::before { opacity: 1; }

.timeline { position: relative; }
.timeline__rail { position: absolute; left: 21px; top: 22px; bottom: 22px; width: 1px; background: rgba(90,45,82,0.16); }
.timeline__rail span { position: absolute; inset: 0; background: linear-gradient(180deg, var(--plum), var(--lilac)); transform: scaleY(var(--p, 0)); transform-origin: top; }
.timeline__list { list-style: none; margin: 0; padding: 0; }
.stop { display: grid; grid-template-columns: 44px 1fr; gap: 1.1rem; padding-bottom: 1.1rem; }
.stop:last-child { padding-bottom: 0; }
.stop__icon { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: var(--muted); font-size: 1.25rem; box-shadow: var(--shadow-paper); transition: color 0.6s var(--ease), box-shadow 0.6s var(--ease), background-color 0.6s var(--ease); }
.stop.is-active .stop__icon { color: #fff; background: var(--plum); box-shadow: 0 0 0 5px rgba(90,45,82,0.1), 0 8px 18px -6px rgba(90,45,82,0.5); }
.stop__card { padding: 1rem 1.2rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.15rem 1rem; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-paper); }
.stop__title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.15; }
.stop__note { grid-column: 1 / -1; margin: 0; font-size: 0.92rem; color: var(--muted); }
.stop__time { font-size: 0.78rem; font-weight: 500; color: var(--plum); padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--lilac-50); white-space: nowrap; }

.rsvp { padding: clamp(1.5rem, 5vw, 2.25rem); }
.step { display: none; flex-direction: column; gap: 1.1rem; }
.step.is-active { display: flex; }
.step__q { margin: 0; text-align: center; font-family: var(--serif); font-weight: 500; font-size: 1.9rem; line-height: 1.1; }
.step__msg { margin: 0; min-height: 1.3em; text-align: center; font-size: 0.875rem; color: var(--plum-2); }
.step__msg.is-error { color: #B42318; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field > span { font-size: 0.85rem; font-weight: 500; }
.input { position: relative; }
.input i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 1.1rem; pointer-events: none; }
.input input { width: 100%; height: 48px; padding: 0 1rem 0 2.6rem; border: 0; border-radius: 12px; background: #fff; color: var(--fg); font: inherit; font-size: 1rem; box-shadow: inset 0 0 0 1px rgba(90,45,82,0.16); transition: box-shadow 0.3s var(--ease); }
.input input::placeholder { color: var(--faint); }
.input input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--plum-2), 0 0 0 4px rgba(201,182,228,0.45); }
.matches { display: flex; flex-direction: column; gap: 0.5rem; }
.match { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 56px; padding: 0 0.75rem 0 1rem; border: 0; border-radius: 14px; cursor: pointer; text-align: left; background: #fff; box-shadow: inset 0 0 0 1px rgba(90,45,82,0.16); font-size: 1rem; font-weight: 500; transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease); }
.match:hover { box-shadow: inset 0 0 0 1px var(--plum-2), 0 0 0 4px rgba(201,182,228,0.35); }
.match:active { transform: scale(0.99); }
.match small { display: inline-flex; align-items: center; height: 30px; padding: 0 0.75rem; border-radius: 999px; background: var(--plum); color: #fff; font-size: 0.8rem; font-weight: 500; }
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--lilac-50); box-shadow: inset 0 0 0 1px var(--border); }
.segment label { position: relative; cursor: pointer; }
.segment input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segment span { display: flex; align-items: center; justify-content: center; gap: 0.4rem; height: 44px; border-radius: 10px; font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: background-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.segment input:checked + span { background: #fff; color: var(--fg); box-shadow: 0 1px 2px rgba(90,45,82,0.1), 0 4px 12px -4px rgba(90,45,82,0.18); }
.segment input:checked + span i { color: var(--plum); }
.segment input:focus-visible + span { outline: 2px solid var(--lilac); outline-offset: -2px; }
.done__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: var(--lilac-50); color: var(--plum); font-size: 1.9rem; box-shadow: 0 0 0 6px rgba(201,182,228,0.25); }
.done__body { margin: 0; text-align: center; color: var(--muted); }

.footer { margin-top: clamp(6rem, 14vw, 9rem); padding: 3rem var(--gutter) 3.5rem; text-align: center; border-top: 1px solid var(--border); }
.footer__names { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 2.3rem; line-height: 1; }
.footer__meta { margin: 0.8rem 0 0; font-family: var(--caps); font-size: 0.72rem; letter-spacing: 0.3em; }

.fade { opacity: 0; transform: translateY(18px); filter: blur(8px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0s); }
.fade.in { opacity: 1; transform: none; filter: none; }

@media (max-width: 560px) {
  .nav__links { display: none; }
  .countdown__card { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .segment { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .fade, .h-in { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* =========================================================
   v2 — card built on Canva artwork (assets/canva/card-art.png)
   The art is 1200×1680; text sits inside its arch and scales with the card.
   ========================================================= */
.card {
  width: min(94vw, 460px);
  aspect-ratio: 1200 / 1680;
  container-type: inline-size;
  padding: 33% 16% 11%;
  display: flex; flex-direction: column; justify-content: center;
  background: #FFFDFA;
  border-radius: 4px;
  overflow: hidden;
}
.card__art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; user-select: none; }
.card__inner { position: relative; z-index: 1; }
.card__bismillah { margin: 0; font-size: 6.6cqw; line-height: 1.45; }
.card__hosts { margin-top: 2.4cqw; gap: 0; }
.card__hosts p { font-size: 3.3cqw; letter-spacing: 0.12em; }
.card__hosts-and { font-size: 4.2cqw; line-height: 1.25; }
.card__intro { margin-top: 2.6cqw; font-size: 4.4cqw; line-height: 1.3; }
.card__names { margin-top: 1.4cqw; }
.card__names .nm { font-size: 15cqw; line-height: 1.18; }
.card__names .amp { font-size: 6.4cqw; margin: -1.6cqw 0 -1.2cqw; }
.card__date { margin-top: 3cqw; gap: 0.8cqw; }
.d-month, .d-year { font-size: 3.1cqw; }
.d-row { gap: 3cqw; max-width: none; font-size: 3cqw; }
.d-day { font-size: 10cqw; padding: 0 3cqw; }
.card__venue { margin-top: 3.2cqw; font-size: 4.2cqw; line-height: 1.3; }
.card__venue strong { font-size: 3.2cqw; }
.card__links { position: relative; z-index: 2; justify-content: center; margin-top: 1.4rem; font-size: 0.66rem; opacity: 0; transition: opacity 1s var(--ease) 1.4s; }
body.is-open .card__links { opacity: 1; }

/* =========================================================
   v2 — the stationery set: matching insert cards below the invitation
   Fonts: Cormorant (text) + Italianno (names/titles); Amiri only for Arabic.
   Drawings: Canva hand-drawn set (Iryna Danyliuk), tinted plum with CSS masks.
   ========================================================= */
:root { --sans: var(--serif); --caps: var(--serif); --paper: #FFFDFA; --ink-soft: #5E5263; }
body { font-family: var(--serif); font-size: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* plum line art from Canva (black lines → any colour via mask) */
.sketch {
  display: block; background: var(--plum);
  -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat;
}

.insert {
  position: relative; z-index: 1;
  width: min(92vw, 460px); margin: clamp(3.5rem, 12vw, 5.5rem) auto 0;
  padding: 3.4rem clamp(1.4rem, 6vw, 2.4rem) 3rem;
  background: var(--paper); border-radius: 4px; text-align: center;
  box-shadow: 0 1px 2px rgba(90,45,82,0.06), 0 34px 70px -32px rgba(69,33,63,0.34), 0 10px 22px -14px rgba(69,33,63,0.16);
}
.insert::before {
  content: ""; position: absolute; inset: 12px; pointer-events: none; border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(90,45,82,0.32), inset 0 0 0 5px var(--paper), inset 0 0 0 6px rgba(90,45,82,0.12);
}
.insert--details { rotate: -0.7deg; }
.insert--evening { rotate: 0.5deg; }
.insert--reply { rotate: -0.4deg; margin-bottom: 1rem; }
.insert > * { position: relative; }
.insert__title { margin: 0; font-family: "Italianno", cursive; font-weight: 400; font-size: clamp(2.5rem, 10vw, 3rem); line-height: 1.1; color: var(--plum); }
.insert__countdown { margin: 0.4rem 0 0; font-style: italic; font-size: 1.1rem; color: var(--ink-soft); font-variant-numeric: lining-nums; }
.insert__countdown span[data-unit] { font-style: normal; font-weight: 600; color: var(--plum); }
.insert__note { margin: 0.4rem auto 0; max-width: 30ch; font-style: italic; font-size: 1.08rem; color: var(--ink-soft); }

/* details */
.facts { margin: 1.8rem 0 0; }
.fact { padding: 1.3rem 0.5rem; border-top: 1px solid rgba(90,45,82,0.14); }
.fact:last-child { padding-bottom: 0.2rem; }
.fact dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--plum-2); }
.fact dd { margin: 0.45rem 0 0; font-size: 1.35rem; font-weight: 500; line-height: 1.3; color: var(--fg); }
.fact__soft { font-size: 1.08rem; font-weight: 400; font-style: italic; color: var(--ink-soft); }
.fact__link {
  display: inline-block; margin-top: 0.75rem; padding: 0.2rem 0; border: 0; background: none; cursor: pointer;
  font: 600 0.78rem/1.2 var(--serif); letter-spacing: 0.2em; text-transform: uppercase; color: var(--plum); text-decoration: none;
  box-shadow: inset 0 -1px 0 rgba(90,45,82,0.35); transition: box-shadow 0.4s var(--ease);
}
.fact__link:hover { box-shadow: inset 0 -2px 0 var(--plum); }

/* the evening: zig-zag of drawings */
.timeline { margin-top: 1.8rem; }
.timeline__rail { display: none; }
.timeline__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.6rem; }
.stop { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; align-items: center; gap: 1rem; padding: 0; text-align: left; }
.stop--flip { grid-template-columns: 1fr minmax(96px, 36%); text-align: right; }
.stop--flip .stop__art { order: 2; }
.stop__art {
  width: 100%; aspect-ratio: 540 / 550;
  opacity: 0.3; clip-path: inset(0 0 55% 0);
  transition: opacity 1.1s var(--ease), clip-path 1.4s var(--ease);
}
.stop.is-active .stop__art { opacity: 1; clip-path: inset(0 0 0 0); }
.stop__time { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; color: var(--plum-2); white-space: nowrap; }
.stop__title { margin: 0.2rem 0 0.15rem; font-size: 1.4rem; font-weight: 500; line-height: 1.15; color: var(--fg); }
.stop__note { margin: 0; font-style: italic; font-size: 1.02rem; line-height: 1.35; color: var(--ink-soft); }

/* reply card — styled like a printed response card */
.sketch--reply { width: 128px; aspect-ratio: 540 / 550; margin: -0.6rem auto 0.4rem; }
.sketch--done { width: 120px; aspect-ratio: 540 / 550; margin: 0 auto; }
.insert--reply .rsvp { margin-top: 1.6rem; padding: 0; text-align: left; }
.insert--reply .field > span { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--plum-2); }
.insert--reply .field input {
  width: 100%; padding: 0.55rem 0.1rem; border: 0; border-bottom: 1px solid rgba(90,45,82,0.4); border-radius: 0; background: transparent;
  font: 500 1.3rem var(--serif); color: var(--fg); transition: border-color 0.3s var(--ease);
}
.insert--reply .field input::placeholder { font-style: italic; color: #A99CAD; }
.insert--reply .field input:focus { outline: none; border-bottom: 2px solid var(--plum); }
.insert--reply .btn { font: 600 1rem var(--serif); letter-spacing: 0.12em; text-transform: uppercase; height: 50px; }
.insert--reply .step__q { font-size: 1.6rem; font-weight: 500; }
.insert--reply .step__msg { font-style: italic; font-size: 1rem; color: var(--plum-2); }
.insert--reply .match { height: auto; padding: 0.9rem 0.2rem; border-radius: 0; background: none; box-shadow: none; border-bottom: 1px solid rgba(90,45,82,0.2); font: 500 1.3rem var(--serif); }
.insert--reply .match:hover { box-shadow: none; color: var(--plum); }
.insert--reply .match small { font: 600 0.72rem var(--serif); letter-spacing: 0.16em; text-transform: uppercase; }
.insert--reply .link--muted { font: italic 1rem var(--serif); }
.reply-choice { display: flex; flex-direction: column; gap: 0.7rem; }
.reply-choice label { position: relative; cursor: pointer; }
.reply-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.reply-choice span { display: flex; align-items: center; gap: 0.85rem; font-size: 1.3rem; font-weight: 500; color: var(--fg); }
.reply-choice span::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--plum); transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.reply-choice input:checked + span::before { background: var(--plum); box-shadow: inset 0 0 0 1.5px var(--plum), inset 0 0 0 5px var(--paper); }
.reply-choice input:focus-visible + span { outline: 2px solid var(--lilac); outline-offset: 4px; }
.insert--reply .done__body { text-align: center; font-style: italic; font-size: 1.1rem; }

.footer { margin-top: clamp(4rem, 12vw, 6rem); border-top: 0; }
.footer__names { font-family: "Italianno", cursive; font-size: 2.6rem; color: var(--plum); }
.footer__meta { letter-spacing: 0.3em; font-weight: 600; color: var(--plum-2); }
.card__links { font-family: var(--serif); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.2em; }

@media (prefers-reduced-motion: reduce) {
  .stop__art { opacity: 1; clip-path: none; }
  .insert { rotate: 0deg; }
}
.insert__countdown.countdown__card { display: block; background: none; box-shadow: none; border-radius: 0; }
.stop__time { background: none; padding: 0; border-radius: 0; }

/* =========================================================
   v2.2 — real lilac flat-lay background (Canva photo) + layered deckled card
   ========================================================= */
.bg, .opening {
  background: url("assets/canva/bg-phone.jpg?v=2") center / cover no-repeat, #F4F1F2;
}
@media (min-aspect-ratio: 1/1) {
  .bg, .opening { background-image: url("assets/canva/bg-desktop.jpg?v=2"); }
}
.bg::after { display: none; }
.opening__hint { color: var(--plum); text-shadow: 0 1px 8px rgba(255,255,255,0.9); font-size: 1.25rem; }

/* the card is now the Canva art itself: lilac backing + white handmade paper with torn edges */
.card {
  width: min(96vw, 480px);
  padding: 33% 17% 21%;
  background: none; box-shadow: none; border-radius: 0; overflow: visible;
}
.card__art { filter: drop-shadow(0 18px 24px rgba(69,33,63,0.22)) drop-shadow(0 3px 5px rgba(69,33,63,0.14)); }
.card__hosts { margin-top: 0; }
.card__hosts p { font-size: 3.2cqw; }
.card__intro { margin-top: 2.4cqw; }
.card__names .nm { font-size: 14.5cqw; }
.card__links { color: var(--plum); text-shadow: 0 1px 6px rgba(255,255,255,0.95); }
.scroll-cue { background: rgba(90,45,82,0.3); }
.opening__hint { left: 50%; right: auto; translate: -50% 0; padding: 0.55rem 1.2rem; border-radius: 999px; background: rgba(255,253,250,0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 20px -8px rgba(69,33,63,0.35); white-space: nowrap; text-shadow: none; }
.card__links { display: inline-flex; margin: 1.4rem auto 0; padding: 0.6rem 1.2rem; gap: 0.7rem; border-radius: 999px; white-space: nowrap; font-size: 0.68rem; letter-spacing: 0.16em; background: rgba(255,253,250,0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 20px -8px rgba(69,33,63,0.35); text-shadow: none; }
.card__links a::after, .card__links button::after { display: none; }
.card__names .nm { font-size: 15cqw; }

/* plain background for now (photo backgrounds kept in assets/canva/ if wanted later) */
.bg, .opening, html, body { background: #ECE8EF; }
@media (min-aspect-ratio: 1/1) { .bg, .opening { background: #ECE8EF; } }

/* =========================================================
   Card lock-up: the text is pinned to the art's own coordinates, so it can't
   drift when the window is zoomed or resized. Every size below is a fraction
   of the card width (cqw); nothing uses rem/px, so the art and the words
   always scale together. The card grows with the screen height on desktop.
   ========================================================= */
.card {
  width: min(94vw, calc(86svh * 1200 / 1680), 720px);
  padding: 0;
  display: block;
}
.card__inner {
  position: absolute; z-index: 1;
  top: 30%; bottom: 19%; left: 16%; right: 16%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.card__inner > * { flex: none; }
.card__hosts { margin: 0; gap: 0; }
.card__hosts p { font-size: 3.2cqw; letter-spacing: 0.14em; line-height: 1.5; }
.card__hosts-and { font-size: 4cqw; line-height: 1.2; }
.card__intro { margin: 2.6cqw 0 0; font-size: 4.3cqw; line-height: 1.3; }
.card__names { margin: 1.2cqw 0 0; }
.card__names .nm { font-size: 14.5cqw; line-height: 1.15; }
.card__names .amp { font-size: 6.2cqw; margin: -1.4cqw 0 -1cqw; }
.card__rule { width: 56%; margin: 2.6cqw 0 2.4cqw; }
.card__date { margin: 0; gap: 0.9cqw; }
.d-month, .d-year { font-size: 3.1cqw; letter-spacing: 0.3em; }
.d-row { width: 100%; max-width: none; gap: 3cqw; font-size: 3cqw; }
.d-day { font-size: 10cqw; padding: 0 3cqw; }
.card__venue { margin: 3cqw 0 0; font-size: 4.2cqw; line-height: 1.3; }
.card__venue strong { font-size: 3.2cqw; }
/* the hero gives the card room on tall desktop screens */
.hero { padding-top: max(3rem, 5svh); padding-bottom: max(3rem, 6svh); }

/* countdown insert: four numerals set like the card's date row, divided by fine plum rules */
.count { display: grid; grid-template-columns: repeat(4, 1fr); margin: 2rem 0 0; padding: 1.4rem 0; border-top: 1px solid rgba(90,45,82,0.16); border-bottom: 1px solid rgba(90,45,82,0.16); }
.count__unit { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.count__unit + .count__unit { border-left: 1px solid rgba(90,45,82,0.22); }
.count__n { font-family: var(--serif); font-weight: 500; font-size: clamp(2.3rem, 10vw, 3.1rem); line-height: 1; color: var(--plum); font-variant-numeric: tabular-nums lining-nums; }
.count__l { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--plum-2); }
/* fit everything between the Bismillah and the bottom rule of the art */
.card__inner { top: 25.5%; bottom: 17.5%; left: 14%; right: 14%; }
.card__hosts p { font-size: 3cqw; line-height: 1.45; }
.card__hosts-and { font-size: 3.6cqw; line-height: 1.1; }
.card__intro { margin-top: 2cqw; font-size: 4cqw; }
.card__names { flex-direction: row; align-items: baseline; justify-content: center; gap: 2.4cqw; margin-top: 1.6cqw; white-space: nowrap; }
.card__names .nm { font-size: 11.5cqw; line-height: 1.2; }
.card__names .amp { margin: 0; font-size: 5.6cqw; }
.card__date { margin-top: 2.2cqw; gap: 0.6cqw; }
.d-month, .d-year { font-size: 2.9cqw; }
.d-row { font-size: 2.8cqw; }
.d-day { font-size: 8.6cqw; }
.card__venue { margin-top: 2.6cqw; font-size: 3.8cqw; }
.card__venue strong { font-size: 3cqw; }
@media (max-width: 420px) { .count__l { font-size: 0.6rem; letter-spacing: 0.12em; } }
.card__names .nm { font-size: 10cqw; } .card__names { gap: 2cqw; }

/* names stacked, the classic invitation lock-up: each name centred on its own line with
   generous paper on both sides; the ampersand tucks between them */
.card__names { flex-direction: column; align-items: center; gap: 0; margin-top: 2cqw; white-space: nowrap; }
.card__names .nm { font-size: 12cqw; line-height: 1.02; }
.card__names .amp { font-size: 5.2cqw; line-height: 1; margin: -0.6cqw 0 -0.2cqw; }
.card__intro { margin-top: 1.6cqw; }
.card__date { margin-top: 2.6cqw; }
.card__venue { margin-top: 2.2cqw; }
.card__inner { top: 24.5%; bottom: 15.5%; }
.card__names .nm { font-size: 11.2cqw; } .card__inner { top: 26%; bottom: 15%; } .card__date { margin-top: 2.2cqw; }

/* names back on one line: smaller, pulled close, the ampersand tucked in tight,
   so the pair sits well inside the paper with an even margin each side */
.card__names { flex-direction: row; align-items: baseline; justify-content: center; gap: 0; margin-top: 2cqw; white-space: nowrap; }
.card__names .nm { font-size: 8.6cqw; line-height: 1.25; }
.card__names .amp { font-size: 4.6cqw; margin: 0 1.6cqw 0 1.2cqw; }
.card__inner { top: 25.5%; bottom: 17.5%; }
.card__intro { margin-top: 2cqw; }
.card__date { margin-top: 2.4cqw; }
.card__venue { margin-top: 2.6cqw; }
.card__inner { top: 24%; bottom: 18.5%; }

/* =========================================================
   Card typography & composition (v3)
   Hierarchy: names (hero) > date > family + venue > intro.
   Grouped by proximity into four sections with generous space
   between groups and tight leading inside them:
     Bismillah (in the art) · who invites · the couple · when & where
   Measure: text stays between 18% and 82% of the card; the art's
   inner frame runs 11%–89% wide and 10.6%–89.3% tall.
   ========================================================= */
.insert__title { font-size: clamp(3.1rem, 12.5vw, 3.8rem); line-height: 1; }
.footer__names { font-size: 3.2rem; }

.card { width: min(94vw, calc((100svh - 8.5rem) * 1200 / 1680), 700px); }
.hero { padding-top: 2.5rem; padding-bottom: 2rem; }
.card__links { margin-top: 1rem; }

.card__inner { top: 25.5%; bottom: 14.5%; left: 18%; right: 18%; justify-content: center; }

/* 1 · who invites: quiet, small capitals, one colour step lighter */
.card__hosts { margin: 0; gap: 0; }
.card__hosts p { font-size: 2.7cqw; font-weight: 500; letter-spacing: 0.17em; line-height: 1.6; color: var(--plum-2); }
.card__hosts-and { font-size: 3.4cqw; line-height: 1.15; font-style: italic; color: var(--plum-2); opacity: 0.8; }
.card__intro { margin-top: 2.2cqw; font-size: 3.9cqw; line-height: 1.35; color: #54475A; }

/* 2 · the couple: the one big moment on the card */
.card__names { flex-direction: row; align-items: baseline; justify-content: center; gap: 0; margin-top: 5.5cqw; white-space: nowrap; }
.card__names .nm { font-family: "Italianno", cursive; font-size: 11.8cqw; line-height: 1; letter-spacing: 0.01em; color: var(--plum); }
.card__names .amp { font-family: var(--serif); font-style: italic; font-size: 4.4cqw; margin: 0 2.2cqw; color: var(--plum-2); }

/* 3 · when & where: a calm, tracked block under the names */
.card__date { margin-top: 5.5cqw; gap: 1cqw; }
.d-month, .d-year { font-size: 2.7cqw; letter-spacing: 0.36em; font-weight: 500; padding-left: 0.36em; }
.d-row { gap: 3.2cqw; font-size: 2.6cqw; letter-spacing: 0.2em; font-weight: 500; }
.d-day { font-size: 8cqw; padding: 0 3.4cqw; font-weight: 500; letter-spacing: 0.02em; }
.card__venue { margin-top: 4cqw; font-size: 3.6cqw; line-height: 1.35; color: #54475A; }
.card__venue strong { font-size: 2.7cqw; letter-spacing: 0.2em; font-weight: 600; }
.card__names .nm { font-size: 11.2cqw; }
/* scroll cue flows under the links instead of overlapping them */
.scroll-cue { position: relative; bottom: auto; left: auto; margin: 1.1rem auto 0; height: 34px; }
.hero { padding-bottom: 1.2rem; }
.card { width: min(94vw, calc((100svh - 10.5rem) * 1200 / 1680), 700px); }
/* legibility floor: the small capitals never drop below ~10px on a phone */
.card__hosts p { font-size: max(2.7cqw, 10px); }
.d-month, .d-year { font-size: max(2.7cqw, 10px); }
.d-row { font-size: max(2.6cqw, 9.5px); }
.card__venue strong { font-size: max(2.7cqw, 10px); }
.card__intro { font-size: max(3.9cqw, 13px); }
.card__venue { font-size: max(3.6cqw, 12.5px); }

/* =========================================================
   Straight cards, a joining thread, and comfortable reading
   ========================================================= */
/* real stationery sits square; the slight tilt read as a mistake */
.insert, .insert--details, .insert--evening, .insert--reply { rotate: 0deg; }

/* the thread between insert cards: hairline · lavender diamond · hairline,
   drawn downward as it scrolls into view, so the cards read as one set */
.insert { margin-top: 0; }
#countdown { margin-top: clamp(3rem, 10vw, 4.5rem); }
.joiner { display: flex; flex-direction: column; align-items: center; gap: 7px; height: 92px; padding: 10px 0; margin: 0 auto; }
.joiner span { width: 1px; flex: 1; background: rgba(90,45,82,0.32); transform-origin: top; }
.joiner i { width: 9px; height: 9px; flex: none; background: #CDBBDC; border: 1px solid rgba(90,45,82,0.45); transform: rotate(45deg); }
.joiner.fade { opacity: 1; filter: none; transform: none; }
.joiner.fade span { transform: scaleY(0); transition: transform 0.9s var(--ease); }
.joiner.fade span + i + span { transition-delay: 0.35s; }
.joiner.fade i { opacity: 0; transition: opacity 0.6s var(--ease) 0.25s; }
.joiner.fade.in span { transform: none; }
.joiner.fade.in i { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .joiner.fade span { transform: none; } .joiner.fade i { opacity: 1; } }
/* the scroll cue under the card uses the same thread */
.scroll-cue { background: rgba(90,45,82,0.32); }

/* comfortable for every guest, including older relatives on small phones */
.insert__note { font-size: 1.16rem; line-height: 1.5; color: #4F4357; }
.stop__title { font-size: 1.5rem; }
.stop__note { font-size: 1.1rem; color: #4F4357; }
.stop__time { font-size: 0.85rem; }
.count__n { font-size: clamp(2.6rem, 11vw, 3.2rem); }
.count__l { font-size: 0.72rem; letter-spacing: 0.14em; }
.insert--reply .field > span { font-size: 0.82rem; }
.insert--reply .field input { font-size: 1.2rem; min-height: 52px; }
.insert--reply .btn { height: 58px; font-size: 1.05rem; }
.insert--reply .match { font-size: 1.4rem; min-height: 56px; }
.reply-choice span { font-size: 1.15rem; }
.card__links { font-size: 0.74rem; }
.card__links a, .card__links button { padding: 0.6rem 0.2rem; }
.card__hosts p { font-size: max(2.7cqw, 11px); }
.d-month, .d-year { font-size: max(2.7cqw, 11px); }
.d-row { font-size: max(2.6cqw, 10.5px); }
.card__venue strong { font-size: max(2.7cqw, 11px); }
.card__intro { font-size: max(3.9cqw, 14px); }
.card__venue { font-size: max(3.6cqw, 13.5px); }

/* optional ayah under the Bismillah (Amiri Quran: proper Quranic shaping and harakat) */
.card__ayah { margin: 0 0 2.6cqw; }
.ayah__ar { margin: 0; font-family: "Amiri Quran", "Amiri", serif; font-size: max(3.7cqw, 13px); line-height: 2; color: var(--plum); text-wrap: balance; }
.ayah__ref { margin: 0.2cqw 0 0; font-family: "Amiri Quran", "Amiri", serif; font-size: max(2.4cqw, 10px); color: var(--plum-2); opacity: 0.85; }
.ayah__ref:empty, .ayah__en:empty { display: none; }
.ayah__en { margin: 0.6cqw 0 0; font-style: italic; font-size: max(2.9cqw, 11.5px); line-height: 1.35; color: #54475A; }
/* with a verse, the rest of the card tightens a step so everything still fits the frame */
.card.has-ayah .card__inner { top: 22.5%; bottom: 13%; }
.card.has-ayah .card__intro { margin-top: 1.4cqw; }
.card.has-ayah .card__names { margin-top: 3.4cqw; }
.card.has-ayah .card__names .nm { font-size: 10.2cqw; }
.card.has-ayah .card__date { margin-top: 3.6cqw; }
.card.has-ayah .card__venue { margin-top: 2.8cqw; }
.card__links { font-size: 0.7rem; letter-spacing: 0.12em; gap: 0.55rem; padding-left: 1.1rem; padding-right: 1.1rem; max-width: calc(100vw - 32px); }
/* the verse starts below the Bismillah artwork (which ends at ~22% of the card) */
.card.has-ayah .card__inner { top: 24%; bottom: 12.5%; }
.card__ayah { margin-bottom: 3cqw; }
.ayah__ar { font-size: max(4.2cqw, 14px); line-height: 1.9; }
.card.has-ayah .card__hosts p { line-height: 1.45; }
.card.has-ayah .card__inner { justify-content: flex-start; top: 23.6%; bottom: 11.5%; }
.card.has-ayah .ayah__ar { line-height: 1.65; }
.card.has-ayah .card__ayah { margin-bottom: 2.2cqw; }
.card.has-ayah .card__hosts p { line-height: 1.38; }
.card.has-ayah .card__intro { line-height: 1.25; }
.card.has-ayah .card__names .nm { font-size: 9.8cqw; }
.card.has-ayah .card__names { margin-top: 2.6cqw; }
.card.has-ayah .card__date { margin-top: 2.8cqw; gap: 0.6cqw; }
.card.has-ayah .d-day { font-size: 7cqw; }
.card.has-ayah .card__venue { margin-top: 2.2cqw; }

/* a second dancing moment reuses the dancing couple, mirrored */
.stop__art--mirror { transform: scaleX(-1); }

/* =========================================================
   Kindly Reply · family step (large, clear targets for every age)
   ========================================================= */
.step__lead { margin: -0.4rem 0 0.2rem; text-align: center; font-style: italic; font-size: 1.15rem; line-height: 1.4; color: #4F4357; }
.members { display: flex; flex-direction: column; gap: 1.1rem; }
.member { margin: 0; padding: 0; border: 0; min-width: 0; }
.member legend { padding: 0; margin-bottom: 0.55rem; font-size: 1.35rem; font-weight: 500; color: var(--plum); }
.member legend small { font-size: 0.95rem; font-style: italic; font-weight: 400; color: #7A6A80; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.yn label { position: relative; cursor: pointer; }
.yn input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.yn span {
  display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 0.6rem;
  border: 1.5px solid rgba(90,45,82,0.35); border-radius: 999px; background: #FFFDFA;
  font-size: 1.08rem; font-weight: 600; color: var(--plum); text-align: center; line-height: 1.15;
  transition: background-color .25s, color .25s, border-color .25s;
}
.yn input:checked + span { background: var(--plum); border-color: var(--plum); color: #FFFDFA; }
.yn input[value="no"]:checked + span { background: #EDE6EE; border-color: #9C8BA0; color: #4F4357; }
.yn input:focus-visible + span { outline: 3px solid var(--lilac); outline-offset: 2px; }
.insert--reply textarea {
  width: 100%; padding: 0.6rem 0; border: 0; border-bottom: 1px solid rgba(90,45,82,0.3); background: none; resize: vertical;
  font: italic 1.15rem var(--serif); color: var(--fg);
}
.insert--reply textarea:focus { outline: none; border-bottom: 2px solid var(--plum); }
.insert--reply .match { text-align: left; }
.insert--reply .match small { flex: none; }
.done__list { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.done__list:empty { display: none; }
.done__list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(90,45,82,0.16); font-size: 1.2rem; }
.done__list em { font-style: italic; color: #7A6A80; }
.done__list em.is-yes { color: var(--plum); font-style: normal; font-weight: 600; }
.insert--reply .done__body { font-size: 1.15rem; line-height: 1.5; color: #4F4357; }

/* =========================================================
   Stationery controls: no pills. Every link and button now uses the
   suite's own language (fine rules, small capitals, square corners).
   ========================================================= */
/* links under the card: two small-caps links on a hairline, divided by the diamond */
.card__links {
  padding: 0; background: none; box-shadow: none; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
  gap: 1rem; margin-top: 1.4rem; font-size: 0.74rem; letter-spacing: 0.18em; color: var(--plum);
}
.card__links a, .card__links button { padding: 0.55rem 0.1rem; border-bottom: 1px solid rgba(90,45,82,0.35); }
.card__links a:hover, .card__links button:hover { border-bottom-color: var(--plum); }
.card__links > span { font-size: 0; width: 6px; height: 6px; background: #CDBBDC; border: 1px solid rgba(90,45,82,0.45); transform: rotate(45deg); }

/* "Tap the seal to open": words, not a lozenge */
.opening__hint {
  padding: 0; background: none; box-shadow: none; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
  font-size: 1.2rem; font-style: italic; color: var(--plum); text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

/* main buttons: a printed plate (square corners, inner hairline like the card borders) */
.btn--plum, .insert--reply .btn {
  border-radius: 2px; animation: none; background-image: none; background-color: var(--plum);
  box-shadow: inset 0 0 0 4px var(--plum), inset 0 0 0 5px rgba(255,253,250,0.4);
  letter-spacing: 0.2em;
}
.btn--plum:hover, .insert--reply .btn:hover { background-color: var(--plum-deep); box-shadow: inset 0 0 0 4px var(--plum-deep), inset 0 0 0 5px rgba(255,253,250,0.45); }

/* "Is this you?" rows: the action reads as a small-caps link with an arrow */
.insert--reply .match small { height: auto; padding: 0.3rem 0; border-radius: 0; background: none; color: var(--plum); border-bottom: 1px solid rgba(90,45,82,0.4); }
.insert--reply .match small::after { content: " →"; letter-spacing: 0; }

/* Attending / Not attending: two ruled boxes, the chosen one inked */
.yn span { border-radius: 2px; border-width: 1px; }
.yn input:checked + span { box-shadow: inset 0 0 0 3px var(--plum), inset 0 0 0 4px rgba(255,253,250,0.4); }
.yn input[value="no"]:checked + span { box-shadow: none; }

/* =========================================================
   ARABIC CARD. Names and monogram in Aref Ruqaa, a calligraphic hand that sits with the
   Bismillah; everything else in Amiri (Naskh), the easiest Arabic to read at small sizes.
   No letter-spacing or capitals anywhere: spacing breaks the joins between Arabic letters.
   ========================================================= */
.card__inner[dir="rtl"] { font-family: "Amiri", serif; }
.card__inner[dir="rtl"] * { letter-spacing: 0 !important; text-transform: none !important; font-style: normal !important; }
.card__inner[dir="rtl"] .card__hosts p { font-family: "Amiri", serif; font-weight: 700; font-size: 4cqw; line-height: 1.5; color: var(--plum); }
.card__inner[dir="rtl"] .card__hosts-and { font-family: "Amiri", serif; font-size: 3.8cqw; line-height: 1.2; color: var(--plum-2); }
.card__inner[dir="rtl"] .card__intro { margin-top: 2.2cqw; font-family: "Amiri", serif; font-size: 4.3cqw; line-height: 1.75; color: var(--muted); }
.card__inner[dir="rtl"] .card__names { flex-direction: row; align-items: baseline; justify-content: center; gap: 0; margin-top: 3.4cqw; }
.card__inner[dir="rtl"] .card__names .nm { font-family: "Aref Ruqaa", serif; font-weight: 700; font-size: 11cqw; line-height: 1.35; padding: 0 0.15em; color: var(--plum); clip-path: inset(-30% 0 -30% 100%); }
.card__inner[dir="rtl"] .card__names.is-written .nm { animation-name: pen-rtl; }
.card__inner[dir="rtl"] .card__names .amp { font-family: "Aref Ruqaa", serif; font-size: 6.4cqw; margin: 0 2cqw; color: var(--plum-2); }
@keyframes pen-rtl { to { clip-path: inset(-30% -5% -30% -5%); } }
.card__inner[dir="rtl"] .card__date { margin-top: 2.6cqw; gap: 0.4cqw; }
.card__inner[dir="rtl"] .d-month, .card__inner[dir="rtl"] .d-year { font-family: "Amiri", serif; font-size: 4cqw; line-height: 1.3; }
.card__inner[dir="rtl"] .d-row { font-family: "Amiri", serif; font-size: 3.8cqw; }
.card__inner[dir="rtl"] .d-row > span:first-child { text-align: left; }
.card__inner[dir="rtl"] .d-row > span:last-child { text-align: right; }
.card__inner[dir="rtl"] .d-day { font-family: "Amiri", serif; font-size: 9.5cqw; line-height: 1.2; }
.card__inner[dir="rtl"] .card__venue { margin-top: 2.6cqw; font-family: "Amiri", serif; font-size: 3.9cqw; line-height: 1.55; }
.card__inner[dir="rtl"] .card__venue strong { font-family: "Amiri", serif; font-weight: 700; font-size: 4.2cqw; color: var(--plum); }
.card__inner[dir="rtl"] .ayah__ar { font-family: "Amiri Quran", "Amiri", serif; }

/* Arabic initials, set above the Bismillah in the same plum */
.card__mono { position: absolute; z-index: 1; top: 10.4%; left: 0; right: 0; margin: 0; display: flex; justify-content: center; align-items: baseline; gap: 1.6cqw; font-family: "Aref Ruqaa", serif; font-weight: 700; font-size: 6.4cqw; line-height: 1; color: var(--plum); direction: rtl; }
.card__mono-and { font-weight: 400; font-size: 3.6cqw; color: var(--plum-2); }

/* the Bismillah sits a little lower in the Arabic art (card-art-040-ar.png), leaving the
   initials their own line beneath the frame's top rule */
.card__mono { top: 12.2%; gap: 2cqw; font-size: 8cqw; }
.card__mono-and { font-size: 4.4cqw; }
.card__inner[dir="rtl"] { top: 27.6%; bottom: 16.5%; }
.card__inner[dir="rtl"] .card__hosts-and { font-size: 4.6cqw; line-height: 1; }
.card__inner[dir="rtl"] .card__intro { margin-top: 1.8cqw; line-height: 1.65; }
.card__inner[dir="rtl"] .card__names { margin-top: 2.2cqw; }
.card__inner[dir="rtl"] .card__names .nm { font-size: 10.6cqw; line-height: 1.3; }
.card__inner[dir="rtl"] .card__date { margin-top: 1.8cqw; }
.card__inner[dir="rtl"] .card__venue { margin-top: 2cqw; }

/* the two families side by side, as Arabic cards set them */
.card__inner[dir="rtl"] .card__hosts { flex-direction: row; justify-content: center; align-items: flex-start; gap: 8cqw; width: 100%; }
.card__inner[dir="rtl"] .card__hosts p { display: flex; flex-direction: column; align-items: center; font-size: 4cqw; line-height: 1.45; }
.card__inner[dir="rtl"] .card__hosts p span:first-child { font-weight: 400; font-size: 3.5cqw; color: var(--muted); }
.card__inner[dir="rtl"] { top: 27%; bottom: 13.5%; }

/* the Arabic monogram, designed in Canva (card art page 7), sits between the frame's top rule
   and the Bismillah, which is set lower in card-art-040-ar.png to make room */
.card__mono { position: absolute; z-index: 1; top: 11.8%; left: 50%; width: 21%; height: auto; transform: translateX(-50%); display: block; font-size: 0; }
.card__inner[dir="rtl"] { top: 29.8%; bottom: 12.8%; }
.card__inner[dir="rtl"] .card__intro { margin-top: 1.6cqw; line-height: 1.5; }
.card__inner[dir="rtl"] .card__names { margin-top: 1.4cqw; }
/* calligraphic monogram (Nastaliq, alif through the ta's sweep): taller than wide */
.card__mono { top: 12.3%; width: 13%; }
.card__mono { top: 11.9%; width: 11.6%; }

/* =========================================================
   ARABIC CARD LAYOUT. One vertical axis, three groups:
   crest (monogram + Bismillah, in the art)  ->  who invites  ->  the couple  ->  when & where.
   The groups are spread evenly (space-between) so the card breathes the same at every size;
   inside each group the lines sit close, because they belong together.
   ========================================================= */
.card__mono { top: 12.4%; left: 50%; width: 6.3%; transform: translateX(-50%); }
.card__inner[dir="rtl"] { top: 34%; bottom: 13%; left: 15%; right: 15%; justify-content: space-between; }
.card__group { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* who invites: the two families side by side, then the invitation line */
.card__inner[dir="rtl"] .card__hosts { gap: 9cqw; }
.card__inner[dir="rtl"] .card__hosts p { font-size: 3.7cqw; line-height: 1.45; }
.card__inner[dir="rtl"] .card__hosts p span:first-child { font-size: 3.2cqw; }
.card__inner[dir="rtl"] .card__intro { margin: 2.2cqw 0 0; font-size: 3.9cqw; line-height: 1.6; }

/* the couple: the largest thing on the card */
.card__inner[dir="rtl"] .card__names { margin: 0; }
.card__inner[dir="rtl"] .card__names .nm { font-size: 10.4cqw; line-height: 1.25; }
.card__inner[dir="rtl"] .card__names .amp { font-size: 6cqw; margin: 0 2.2cqw; }

/* when & where: a hairline above, the date block, then the venue */
.card__group--when::before { content: ""; display: block; width: 34%; height: 1px; margin: 0 0 3cqw; background: linear-gradient(90deg, transparent, rgba(90,45,82,0.45), transparent); }
.card__inner[dir="rtl"] .card__date { margin: 0; gap: 0.2cqw; }
.card__inner[dir="rtl"] .d-month, .card__inner[dir="rtl"] .d-year { font-size: 3.6cqw; line-height: 1.3; }
.card__inner[dir="rtl"] .d-row { font-size: 3.4cqw; gap: 3cqw; }
.card__inner[dir="rtl"] .d-day { font-size: 8.6cqw; line-height: 1.15; padding: 0 3cqw; }
.card__inner[dir="rtl"] .card__venue { margin: 2.6cqw 0 0; font-size: 3.6cqw; line-height: 1.5; }
.card__inner[dir="rtl"] .card__venue strong { font-size: 3.9cqw; }
/* tuned so the three groups get real air between them on a phone */
.card__mono { width: 6.8%; top: 12.2%; }
.card__inner[dir="rtl"] { top: 33.6%; bottom: 12.4%; }
.card__inner[dir="rtl"] .card__hosts p { font-size: 3.5cqw; line-height: 1.4; }
.card__inner[dir="rtl"] .card__hosts p span:first-child { font-size: 3cqw; }
.card__inner[dir="rtl"] .card__intro { margin-top: 1.6cqw; font-size: 3.7cqw; line-height: 1.5; }
.card__inner[dir="rtl"] .card__names .nm { font-size: 9.8cqw; line-height: 1.2; }
.card__group--when::before { margin-bottom: 2.4cqw; }
.card__inner[dir="rtl"] .d-month, .card__inner[dir="rtl"] .d-year { font-size: 3.3cqw; line-height: 1.25; }
.card__inner[dir="rtl"] .d-row { font-size: 3.2cqw; }
.card__inner[dir="rtl"] .d-day { font-size: 7.8cqw; line-height: 1.1; }
.card__inner[dir="rtl"] .card__venue { margin-top: 2.2cqw; font-size: 3.4cqw; line-height: 1.45; }
.card__inner[dir="rtl"] .card__venue strong { font-size: 3.7cqw; }

/* =========================================================
   SLIDE 11 CARD (assets/canva/card-art-s11.png): a lavender arched panel framed by daisies.
   The panel sits slightly right of the image centre (x 187-1073 of 1200), so the text column
   is centred on the panel, not the image. Monogram and Bismillah head the arch; the text
   runs in four groups down the panel; the house notes close it.
   ========================================================= */
.card__mono { top: 9.6%; left: 53%; width: 15.4%; transform: translateX(-50%); }
.card__inner[dir="rtl"] { top: 40.5%; bottom: 8.5%; left: 24.5%; right: 18.5%; justify-content: space-between; }
.card__inner[dir="rtl"] .card__hosts { gap: 12cqw; }
.card__inner[dir="rtl"] .card__hosts p span:first-child { font-size: 3.2cqw; }
.card__inner[dir="rtl"] .card__hosts p { font-size: 4.2cqw; }
.card__inner[dir="rtl"] .card__venue { margin-top: 2.4cqw; font-family: "Cormorant Garamond", serif !important; font-size: 4.3cqw; font-weight: 600; letter-spacing: 0.04em !important; color: var(--plum); }
.card__notes { display: flex; flex-direction: column; align-items: center; gap: 0.4cqw; margin: 0; font-family: "Amiri", serif; font-size: 3.3cqw; line-height: 1.5; color: var(--plum-2); }
.card__notes span + span::before { content: none; }
/* slide 11: a little tighter so the four groups and the notes all get air */
.card__inner[dir="rtl"] { top: 40%; bottom: 7.6%; }
.card__inner[dir="rtl"] .card__hosts p { font-size: 3.9cqw; line-height: 1.35; }
.card__inner[dir="rtl"] .card__hosts p span:first-child { font-size: 3cqw; }
.card__inner[dir="rtl"] .card__intro { margin-top: 1.2cqw; font-size: 3.5cqw; line-height: 1.45; }
.card__inner[dir="rtl"] .card__names .nm { font-size: 9cqw; line-height: 1.15; }
.card__inner[dir="rtl"] .card__group--when::before { margin-bottom: 1.8cqw; }
.card__inner[dir="rtl"] .d-month, .card__inner[dir="rtl"] .d-year { font-size: 3.1cqw; line-height: 1.2; }
.card__inner[dir="rtl"] .d-row { font-size: 3.1cqw; }
.card__inner[dir="rtl"] .d-day { font-size: 6.8cqw; line-height: 1.05; }
.card__inner[dir="rtl"] .card__venue { margin-top: 1.6cqw; font-size: 4cqw; line-height: 1.2; }
.card__notes { font-size: 3.05cqw; line-height: 1.4; gap: 0; }
.card__notes::before { content: ""; display: block; width: 6px; height: 6px; margin: 0 auto 1.4cqw; background: var(--plum-2); opacity: 0.5; transform: rotate(45deg); }

.opening__hint[lang="ar"] { font-family: "Amiri", serif; font-style: normal; font-size: 1.15rem; letter-spacing: 0; }

/* the evening, condensed: drawings a little smaller, moments closer together */
.timeline { margin-top: 1rem; }
.timeline__list { gap: 0.2rem; }
.stop { grid-template-columns: minmax(88px, 31%) 1fr; gap: 0.9rem; }
.stop--flip { grid-template-columns: 1fr minmax(88px, 31%); }
.stop__art { margin: -0.4rem 0; }

/* the evening's drawings are always shown, never revealed on scroll */
.stop__art, .stop.is-active .stop__art { opacity: 1 !important; clip-path: none !important; transition: none !important; }
/* the evening's descriptions, set smaller under the titles */
.stop__note { font-size: 0.86rem; line-height: 1.3; }
.stop__note { text-wrap: balance; }

/* page background: the envelope's cotton paper in the page lavender, with its acanthus ornament
   blind-embossed as a quiet repeat (assets/paper/page-bg.jpg, a seamless 1024px tile) */
html, body, .bg, .opening {
  background-color: #ECE8EF;
  background-image: url("assets/paper/page-bg.jpg?v=2");
  background-repeat: repeat;
  background-size: 480px 480px;
}
@media (min-aspect-ratio: 1/1) { .bg, .opening { background-image: url("assets/paper/page-bg.jpg?v=2"); background-size: 560px 560px; } }

/* background (Canva AI, from the envelope): lavender cotton paper, embossed baroque corners joined
   by fine embossed side rules; fixed behind everything so the frame stays put while you scroll */
html, body { background: #ECE8EF; }
.bg, .opening {
  background-color: #ECE8EF;
  background-image: url("assets/paper/bg-phone.jpg?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (min-aspect-ratio: 1/1) {
  .bg, .opening { background-image: url("assets/paper/bg-desktop.jpg?v=1"); background-size: cover; }
}
/* the body must stay transparent, or its colour paints over the fixed background layer */
html { background: #ECE8EF; }
body { background: transparent !important; }

/* phones: their own frame (Canva AI, same paper and embossing as the laptop frame). One wide
   baroque ornament fixed across the top and one across the bottom, no corners or side rules
   (the cards would hide them). Built from three layers so the ornaments always span the full
   width, whatever the phone's shape: top strip, bottom strip, plain paper repeating behind. */
@media (max-aspect-ratio: 1/1) {
  .bg, .opening {
    background-color: #ECE8EF;
    background-image:
      url("assets/paper/orn-top.webp?v=1"),
      url("assets/paper/orn-bottom.webp?v=1"),
      url("assets/paper/paper-plain.jpg?v=1");
    background-position: top center, bottom center, top center;
    background-size: 100% auto, 100% auto, 100% auto;
    background-repeat: no-repeat, no-repeat, repeat-y;
  }
}
/* keep the hint clear of the bottom ornament (the strip is ~27% of the screen width tall) */
@media (max-aspect-ratio: 1/1) { .opening__hint { bottom: calc(27vw + 14px); } }

/* ---- phones, after opening: the ornaments belong to the page, not the screen ----
   Fixed ornaments moved whenever Safari's toolbar showed or hid, and the bottom one sat behind
   the card's links. Now the fixed layer is plain paper only; the top ornament crowns the start
   of the page and the bottom ornament closes it under the footer, both scrolling with it.
   The envelope screen (.opening) keeps its top and bottom ornaments. */
@media (max-aspect-ratio: 1/1) {
  .bg {
    background: #ECE8EF url("assets/paper/paper-plain.jpg?v=1") top center / 100% auto repeat-y;
  }
  #main { position: relative; }
  #main::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 28vw; z-index: -1; pointer-events: none;
    background: url("assets/paper/orn-top.webp?v=1") top center / 100% auto no-repeat;
  }
  .footer {
    padding-bottom: calc(31vw + 1rem);
    background: url("assets/paper/orn-bottom.webp?v=1") bottom center / 100% auto no-repeat;
  }
}

/* ---- touch screens: cheaper motion while scrolling ----
   blur filters and frosted glass are re-painted every frame on a phone; fades keep only
   opacity and movement, the bar uses a solid tint */
@media (pointer: coarse) {
  .fade, .h-in { filter: none !important; }
  .fade { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
  .nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,253,250,0.95); }
}
/* the card's two links read clearly on the paper */
.card__links a { color: var(--plum); font-weight: 600; }

/* phone: no blue press/selection highlight on the card */
html { -webkit-tap-highlight-color: transparent; }
@media (pointer: coarse) {
  .card, .card img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}

/* ---- after opening: plain paper only, no ornaments (on every screen) ----
   the envelope screen (.opening) keeps its embossed ornaments */
.bg { background: #ECE8EF url("assets/paper/paper-plain.jpg?v=1") top center / 1080px auto repeat; }
@media (max-aspect-ratio: 1/1) {
  .bg { background-size: 100% auto; background-repeat: repeat-y; }
  #main::before { content: none; }
  .footer { background: none; padding-bottom: 3.5rem; }
}

/* countdown: nothing below the numbers any more, so no closing rule or empty strip */
.insert--count .count { border-bottom: 0; padding-bottom: 0; }

