/* Valima (v6) · a night sky you fly through, a lantern-lit arch for the names, and cards that turn over as they arrive.
   Layout: open sky title -> pinned arch (zoom through it) -> a stack of gold-framed night cards. No backdrop blur (iPhone-safe). */
body.t-valima {
  --night: #050913;
  --card: #0d1532;
  --card-2: #080d22;
  --ink: #f6eedc;
  --ink-soft: #d8cdb6;
  --gold: #e0c590;
  --gold-soft: rgba(224, 197, 144, .4);
  --btn-ink: #f6eedc; --btn-line: rgba(224, 197, 144, .6);
  --cd-line: rgba(224, 197, 144, .3); --cd-bg: transparent; --cd-ink: #f6eedc; --cd-lab: #cbbfa8;
  --map-bg: #0c1326;
  --gold-foil: linear-gradient(105deg, #b8924a 0%, #e0c590 25%, #fff3d4 42%, #f0dcab 50%, #c9a96a 65%, #f2dfb0 85%, #b8924a 100%);
  background: var(--night); color: var(--ink);
  font-size: 20px; font-weight: 500;
}
.t-valima ::selection { background: var(--gold); color: var(--night); }
.sky3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; background: radial-gradient(120% 80% at 50% 100%, #16244d, #060c22 55%, #02040b); }
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(2, 4, 11, .25), transparent 22%, transparent 78%, rgba(2, 4, 11, .35)); }
main { position: relative; z-index: 2; }
.progress { background: linear-gradient(90deg, transparent, var(--gold)); height: 1.5px; }

.caps { font-family: var(--f-caps); font-weight: 600; font-size: 10.5px; letter-spacing: .32em; padding-left: .32em; color: var(--gold); }
.wrap { width: 100%; max-width: 620px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); text-align: center; }
.wrap.narrow { max-width: 600px; }
.wrap.wide { max-width: 1000px; }
.sec { position: relative; padding-block: 56px; }
.label, .sec-label { margin-bottom: 20px; }
.rule { width: 74px; height: 1px; margin: 42px auto; background: var(--gold-soft); position: relative; }
.rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; transform: rotate(45deg); background: var(--gold); }
.gold { background-image: var(--gold-foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ---------- opening ---------- */
.open { position: relative; min-height: 100svh; display: grid; place-items: center; }
.open-in { display: grid; justify-items: center; text-align: center; padding: 0 24px; }
.bism { font-family: var(--f-quran); font-size: clamp(22px, 6vw, 30px); line-height: 1.6; color: var(--ink); }
.open-ur { font-family: var(--f-ur); font-weight: 500; font-size: clamp(50px, 13.6vw, 90px); line-height: 2.1; padding: 0 .2em; margin-top: 4px; color: var(--gold); text-shadow: 0 0 30px rgba(224, 197, 144, .35); }
.open-k { font-size: 12.5px; letter-spacing: .5em; padding-left: .5em; margin-top: -6px; }
.open-d { font-style: italic; font-size: 21px; color: var(--ink-soft); margin-top: 16px; }
.cue { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; display: grid; justify-items: center; gap: 8px; }
.cue .caps { font-size: 9px; letter-spacing: .42em; padding-left: .42em; color: var(--ink-soft); }
.cue i { display: block; width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); transform-origin: 50% 0; }

/* ---------- the arch (pinned; you fly through it) ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; }
.hero-pin { position: relative; height: 100%; display: grid; place-items: center; overflow: hidden; }
.arch-box { position: relative; width: min(560px, 92vw); height: min(94%, 900px); }
.arch-stage { position: absolute; inset: 0; will-change: transform; }
.arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arch-words { position: absolute; left: var(--cpad, 40px); right: var(--cpad, 40px); top: var(--ct, 30%); bottom: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.arch-moon { width: 44px; height: 44px; fill: #f3e2b4; overflow: visible; }
.arch-words .hero-kicker { font-size: 13px; color: var(--ink); }
/* the names arrive out of the stars once you have flown through the arch */
.hero-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); pointer-events: none; will-change: transform, opacity; }
.names { position: relative; display: grid; justify-items: center; font-weight: 400; margin: 10px 0 0; }
.names::before { content: ""; position: absolute; inset: -12% -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 226, 160, .16), rgba(255, 226, 160, 0)); }
.names .nm { position: relative; font-family: var(--f-script); font-size: clamp(74px, 21vw, 124px); line-height: 1.04; padding: 0 .22em;
  background-image: var(--gold-foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.names .sur { font-size: 11.5px; letter-spacing: .6em; padding-left: .6em; color: var(--ink); margin-top: -4px; }
.names .amp { font-style: italic; font-size: clamp(22px, 6vw, 28px); color: var(--gold); margin: 8px 0 0; }
.hero .divider { margin: 20px auto 10px; color: var(--gold); }
.hero-date { color: var(--ink); letter-spacing: .26em; padding-left: .26em; }

/* ---------- cards that turn over ---------- */
.card3d { perspective: 2600px; }
.c-inner { position: relative; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
.c-front, .c-back { -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 20px; }
.c-front { position: relative; padding: 56px 24px 46px; text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, #17224a 0%, var(--card) 45%, var(--card-2) 100%);
  box-shadow: 0 0 0 1px rgba(224, 197, 144, .42), 0 40px 70px -36px rgba(0, 0, 0, .9); }
.c-front::before { content: ""; position: absolute; inset: 9px; border-radius: 14px; border: 1px solid rgba(224, 197, 144, .18); pointer-events: none; }
.c-front .corner { color: var(--gold); width: 46px; height: 46px; }
.c-front .corner.tl { left: 9px; top: 9px; } .c-front .corner.tr { right: 9px; top: 9px; }
.c-front .corner.bl { left: 9px; bottom: 9px; } .c-front .corner.br { right: 9px; bottom: 9px; }
.c-back { position: absolute; inset: 0; transform: rotateY(180deg); overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(90% 70% at 50% 40%, #1d2c5e, #0b1230 65%, #060a1c); box-shadow: 0 0 0 1px rgba(224, 197, 144, .5); }
.c-back::before { content: ""; position: absolute; inset: 0; background: var(--gold); -webkit-mask: var(--jali) center / 52px 52px repeat; mask: var(--jali) center / 52px 52px repeat; opacity: .2; }
.c-back::after { content: ""; position: absolute; inset: 12px; border-radius: 12px; border: 1px solid rgba(224, 197, 144, .55); }

/* ---------- card contents ---------- */
[data-verse] .ar { font-family: var(--f-quran); direction: rtl; font-size: clamp(29px, 7.8vw, 42px); line-height: 2.15; color: var(--ink); }
[data-verse] .ar .w.mk { color: var(--gold); }
[data-verse] .tr { font-style: italic; font-size: clamp(20px, 5.2vw, 23px); line-height: 1.6; color: var(--ink-soft); margin-top: 22px; }
[data-verse] .ref { margin-top: 20px; }
.dua .ar { font-family: var(--f-ar); font-size: clamp(27px, 7.2vw, 36px); line-height: 2; color: var(--ink); }
.dua .src { font-size: 16px; color: var(--ink-soft); margin-top: 14px; }
.dua .src .pbuh { font-family: var(--f-ar); }
.ameen { font-family: var(--f-script); font-size: 66px; line-height: 1.2; margin-top: 16px; padding: 0 .2em; display: inline-block;
  background-image: var(--gold-foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.hosts { font-family: var(--f-serif); font-weight: 600; font-size: clamp(31px, 8.4vw, 42px); line-height: 1.2; color: var(--gold); text-wrap: balance; }
.lead { font-size: clamp(21px, 5.6vw, 24px); line-height: 1.55; color: var(--ink); max-width: 20em; margin: 16px auto 0; text-wrap: balance; }
.families { display: grid; gap: 18px; }
.fam-role { font-size: 9.5px; }
.fam-name { font-family: var(--f-serif); font-weight: 600; font-size: clamp(32px, 8.6vw, 40px); line-height: 1.15; margin-top: 4px; }
.fam-ur { font-family: var(--f-ur); font-size: 23px; line-height: 2.2; color: var(--gold); }
.fam-lines { margin-top: 4px; display: grid; gap: 3px; }
.fam-lines .of { font-size: 17.5px; line-height: 1.45; color: var(--ink-soft); font-style: italic; text-wrap: balance; }
.fam-lines .of:first-child { font-style: normal; color: var(--ink); font-weight: 600; }
@media (min-width: 860px) { .families { grid-template-columns: 1fr 1fr; gap: 24px; } }
.ev-date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 6px auto 0; max-width: 440px; }
.ev-side { font-size: clamp(10px, 2.9vw, 13px); letter-spacing: .18em; line-height: 1.9; color: var(--ink); }
.ev-side:first-child { text-align: right; padding-right: 16px; }
.ev-side:last-child { text-align: left; padding-left: 16px; }
.ev-num { font-family: var(--f-serif); font-weight: 500; font-size: clamp(84px, 24vw, 124px); line-height: .95; padding: 0 18px; color: var(--gold);
  border-left: 1px solid var(--gold-soft); border-right: 1px solid var(--gold-soft); font-variant-numeric: lining-nums tabular-nums; }
.ev-hijri { margin-top: 18px; color: var(--ink-soft); font-size: 9.5px; letter-spacing: .24em; }
.ev-time { font-style: italic; font-size: 25px; color: var(--ink); margin-top: 6px; }
.clock { display: block; width: min(48vw, 184px); height: auto; margin: 26px auto 10px; overflow: visible; }
.clock .c-ring { fill: rgba(6, 11, 30, .55); stroke: var(--gold); stroke-width: 1.3; }
.clock .c-ring.thin { fill: none; stroke-width: .5; opacity: .55; }
.clock .c-ticks line { stroke: var(--gold); stroke-linecap: round; }
.clock .c-nums text { fill: var(--ink); font-family: var(--f-serif); font-size: 15px; font-weight: 500; text-anchor: middle; dominant-baseline: central; }
.clock .c-hour line { stroke: #fff3cf; stroke-width: 4.5; stroke-linecap: round; }
.clock .c-min line { stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; }
.clock .c-sec line { stroke: #f0b77a; stroke-width: .9; stroke-linecap: round; }
.clock .c-hub { fill: var(--gold); }
/* the shooting star that writes the names */
:root { --music-ink: #e0c590; --music-bg: rgba(8, 13, 34, .72); --music-line: rgba(224, 197, 144, .45); }
.comet { position: absolute; left: 0; top: 0; width: 170px; height: 4px; margin: -2px 0 0 -164px; transform-origin: 164px 2px; pointer-events: none; opacity: 0; z-index: 2;
  border-radius: 4px; background: linear-gradient(90deg, rgba(255, 236, 190, 0), rgba(255, 230, 170, .45) 65%, #fff8e6 97%); }
.comet::after { content: ""; position: absolute; right: -9px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background: radial-gradient(circle, #fffdf6 0, rgba(255, 228, 165, .75) 28%, rgba(255, 228, 165, 0) 70%); }
.countdown { gap: 0; max-width: 420px; }
.cd-cell { border: 0; border-radius: 0; background: none; padding: 4px 0; }
.cd-cell + .cd-cell { border-left: 1px solid var(--cd-line); }
.cd-cell::before { display: none; }
.cd-num { font-weight: 500; font-size: clamp(36px, 10vw, 48px); }
.cd-lab { font-family: var(--f-caps); font-weight: 600; font-size: 8.5px; letter-spacing: .24em; }
.c-front .btns { margin-top: 32px; }
.btn { min-height: 46px; padding: 0 20px; font-weight: 600; font-size: 10.5px; letter-spacing: .18em; border-color: var(--btn-line); color: var(--btn-ink); background: rgba(5, 9, 19, .5); }
.btn::before { background: rgba(224, 197, 144, .16); }
.btn:hover, .btn:focus-visible { color: var(--ink); border-color: var(--gold); }
.btn.solid { color: #1a1408; background: var(--gold); border-color: var(--gold); }
.btn.solid::before { display: none; }
.btn.solid:hover, .btn.solid:focus-visible { color: #1a1408; background: #ecd6a7; }
.v-name { font-family: var(--f-serif); font-weight: 600; font-size: clamp(28px, 7.4vw, 36px); line-height: 1.2; text-wrap: balance; }
.v-addr { color: var(--ink-soft); margin-top: 10px; text-wrap: balance; }
.map-frame { margin: 24px auto 26px; max-width: 400px; border-color: var(--gold-soft); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.map-frame::after { border-color: rgba(224, 197, 144, .4); }
.map-frame iframe { filter: invert(.9) hue-rotate(190deg) grayscale(.5) brightness(.92) contrast(.92); }
.venue .btns { margin-top: 22px; }
.c-name { font-family: var(--f-serif); font-weight: 600; font-size: clamp(28px, 7.6vw, 36px); line-height: 1.2; text-wrap: balance; }
.c-city { margin-top: 10px; color: var(--ink-soft); }
.c-tel { margin-top: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; }
.tel { font-size: 23px; letter-spacing: .06em; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--gold-soft); padding-bottom: 2px; font-variant-numeric: lining-nums; }
.tel:hover { color: var(--gold); }
.c-comp { font-size: 23px; line-height: 1.4; text-wrap: balance; }
.contact .rule { margin: 36px auto; }

/* ---------- footer ---------- */
.foot { padding-top: 30px; padding-bottom: 110px; }
.sign { font-family: var(--f-script); font-size: 64px; line-height: 1.3; margin-top: 40px; padding: 0 .2em; display: inline-block;
  background-image: var(--gold-foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

@media (min-width: 760px) { .sec { padding-block: 76px; } .c-front { padding: 64px 52px 56px; } }
