/* =====================================================
   Ameer Suhail & Shahla P — Wedding Invitation
   Theme: candlelit mihrab — deep rose, antique gold, pearl
   ===================================================== */
:root {
  --oud: #2a0a11;
  --wine: #4a1019;
  --wine-2: #6b1a28;
  --ivory: #fbf6ec;
  --pearl: #f3eadb;
  --white: #fffdf8;
  --gold: #c8a25a;
  --gold-hi: #ecd49c;
  --gold-dp: #7d5c22;
  --ink: #2b1a17;
  --muted: #65534b;
  --line: #d9c7a3;
  --f-script: "Pinyon Script", "Brush Script MT", cursive;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-ui: "Jost", system-ui, sans-serif;
  --f-ar: "Amiri", "Times New Roman", serif;
  --ease: cubic-bezier(.77, 0, .18, 1);
  --star: url("../assets/patterns/pattern-star.svg");
  /* edge of pointed arches between sections */
  --arches-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath fill='%23fbf6ec' d='M0 24C0 13 24 13 36 0 48 13 72 13 72 24Z'/%3E%3C/svg%3E");
  --arches-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath fill='%23fbf6ec' d='M0 0C0 11 24 11 36 24 48 11 72 11 72 0Z'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--oud); color: var(--ink); font-family: var(--f-ui); font-size: 1.0625rem; line-height: 1.7; overflow-x: clip; font-variant-numeric: lining-nums; }
body.opening-active { overflow: hidden; }
img, svg, iframe { max-width: 100%; }
a { color: inherit; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: 1rem; top: -70px; z-index: 5000; background: var(--wine); color: var(--ivory); padding: .7rem 1rem; }
.skip-link:focus { top: 1rem; }
.progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--gold), var(--gold-hi)); z-index: 2500; }
/* eight-pointed star (khatam), the recurring ornament */
.st { display: inline-block; width: .8em; height: .8em; background: var(--gold); vertical-align: -.02em; clip-path: polygon(50% 0, 64.6% 14.6%, 85.4% 14.6%, 85.4% 35.4%, 100% 50%, 85.4% 64.6%, 85.4% 85.4%, 64.6% 85.4%, 50% 100%, 35.4% 85.4%, 14.6% 85.4%, 14.6% 64.6%, 0 50%, 14.6% 35.4%, 14.6% 14.6%, 35.4% 14.6%); }

/* ---------- Opening ---------- */
.opening-screen { position: fixed; inset: 0; z-index: 3000; background: #170507; overflow: hidden; transition: visibility 0s linear 1.9s; }
.opening-screen.is-hidden { visibility: hidden; pointer-events: none; }
.gate { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none; color: var(--ivory); cursor: pointer; touch-action: manipulation; font-family: var(--f-ui); }
.door { position: absolute; top: 0; width: 50%; height: 100%; overflow: hidden; transition: transform 1.7s var(--ease); will-change: transform; }
.door-l { left: 0; }
.door-r { right: 0; }
.door::before { content: ""; position: absolute; top: 0; width: 200%; height: 100%; background: url("../assets/images/opening-scene.jpg") center / cover no-repeat; }
.door-l::before { left: 0; }
.door-r::before { left: -100%; }
.gate-center { position: absolute; left: 50%; bottom: calc(5% + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .7rem; width: 90%; text-align: center; transition: opacity .6s ease, transform .6s ease; }
.gate-center::before { content: ""; position: absolute; left: -10%; right: -10%; top: -40%; bottom: -30%; z-index: -1; background: radial-gradient(ellipse at 50% 60%, rgba(23,5,7,.85), transparent 70%); }
.gate-bismillah, .gate-names { display: none; }
.gate-bismillah { font-family: var(--f-ar); font-size: clamp(1.8rem, 4vw, 3rem); color: var(--gold-hi); text-shadow: 0 2px 18px rgba(0,0,0,.7); }
.gate-names { font-family: var(--f-script); font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.1; text-shadow: 0 3px 20px rgba(0,0,0,.7); }
.gate-guest { font-family: var(--f-serif); font-style: italic; font-size: 1.3rem; color: var(--gold-hi); text-shadow: 0 1px 10px rgba(0,0,0,.9); }
.gate-hint { font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: .88rem; color: var(--white); text-shadow: 0 1px 10px #000, 0 0 3px rgba(0,0,0,.8); animation: breathe 2.6s ease-in-out infinite; }
.seal { position: relative; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8e2b3e, var(--wine-2) 60%, var(--wine)); box-shadow: 0 6px 22px rgba(0,0,0,.55), inset 0 0 0 3px rgba(200,162,90,.6); display: grid; place-items: center; }
.seal-ring { position: absolute; inset: -10px; border-radius: 50%; border: 1px solid var(--gold); opacity: 0; animation: ping 2.6s ease-out infinite; }
.seal-star { width: 34px; height: 34px; background: var(--gold-hi); clip-path: polygon(50% 0, 64.6% 14.6%, 85.4% 14.6%, 85.4% 35.4%, 100% 50%, 85.4% 64.6%, 85.4% 85.4%, 64.6% 85.4%, 50% 100%, 35.4% 85.4%, 14.6% 85.4%, 14.6% 64.6%, 0 50%, 14.6% 35.4%, 14.6% 14.6%, 35.4% 14.6%); }
.opening-screen.is-opening .door-l { transform: translateX(-102%); }
.opening-screen.is-opening .door-r { transform: translateX(102%); }
.opening-screen.is-opening .gate-center { opacity: 0; transform: translateX(-50%) scale(.9); }
.opening-screen.is-opening { background: transparent; }
@media (min-aspect-ratio: 626/1000) {
  .door::before { background-image: url("../assets/images/opening-desktop.jpg"); }
  .gate-center { bottom: auto; top: 50%; transform: translate(-50%, -50%); gap: 1rem; }
  .gate-center::before { top: -30%; bottom: -30%; }
  .gate-bismillah, .gate-names { display: block; }
  .opening-screen.is-opening .gate-center { transform: translate(-50%, -50%) scale(.9); }
}
@media (max-aspect-ratio: 625/1000) {
  /* the photo is sized so its emblem (53.4% across, 60.4% down) lands on the seam at screen centre */
  .door::before { --h: max(128vh, 192vw); --w: calc(var(--h) * .5625); width: var(--w); height: var(--h); top: calc(50% - var(--h) * .604); background-size: 100% 100%; }
  .door-l::before { left: calc(100% - var(--w) * .534); }
  .door-r::before { left: calc(var(--w) * -.534); }
  .gate-center { bottom: auto; top: 50%; transform: translate(-50%, -35px); }
  .opening-screen.is-opening .gate-center { transform: translate(-50%, -35px) scale(.9); }
  .gate-center::before { display: none; }
  .gate-guest { position: absolute; bottom: calc(100% + .7rem); left: 50%; transform: translateX(-50%); width: max-content; max-width: 100%; padding: .1rem 1rem; border-radius: 999px; background: rgba(42,10,17,.88); text-shadow: none; }
  .gate-hint { padding: .35rem 1rem; border-radius: 999px; background: rgba(42,10,17,.88); text-shadow: none; }
}
@keyframes breathe { 50% { opacity: .78; } }
@keyframes ping { 0% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Music controls ---------- */
.floating { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 2000; display: flex; flex-direction: column; gap: .45rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(42,10,17,.92); color: var(--gold-hi); font-size: 1.1rem; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: background .2s; }
.icon-btn:hover { background: var(--wine-2); }
.icon-btn.playing { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 5px rgba(200,162,90,.25), 0 4px 14px rgba(0,0,0,.35); } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; color: var(--ivory); overflow: hidden; background: var(--oud); }
.hero-bg { position: absolute; inset: 0; background: url("../assets/images/opening-mobile.jpg") center / cover no-repeat; transform: scale(1.08); }
body.invitation-ready .hero-bg { animation: settle 7s ease-out forwards; }
@keyframes settle { to { transform: scale(1); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse 62% 62% at 50% 48%, rgba(23,5,7,.86), rgba(23,5,7,.58) 68%, rgba(23,5,7,.3)), linear-gradient(to bottom, rgba(23,5,7,.45), transparent 26%, rgba(23,5,7,.6)); }
@media (orientation: landscape) { .hero-bg { background-image: url("../assets/images/opening-desktop.jpg"); } }
.sparks { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; padding: 2.5rem 1.25rem 3.5rem; max-width: 720px; width: 100%; }
.hero-bismillah { font-family: var(--f-ar); color: var(--gold-hi); font-size: clamp(1.6rem, 4.6vw, 2.5rem); line-height: 1.6; margin: 0 0 .5rem; text-shadow: 0 2px 16px rgba(0,0,0,.6); }
.hero-small { font-family: var(--f-serif); font-style: italic; font-size: 1.3rem; margin: 0 0 .1rem; }
.names { margin: 0; font-family: var(--f-script); font-weight: 400; line-height: 1.05; font-size: clamp(3.4rem, min(13vw, 11vh), 6.6rem); color: var(--white); text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.names span { display: block; }
.names .amp { font-family: var(--f-serif); font-style: italic; font-size: .38em; color: var(--gold-hi); line-height: 1.25; }
.hero-guest { margin: .9rem auto 0; font-family: var(--f-serif); font-style: italic; font-size: 1.3rem; color: var(--gold-hi); border-block: 1px solid rgba(200,162,90,.5); padding: .15rem 1.4rem; width: fit-content; }
.when { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .9rem; max-width: 480px; margin: 1rem auto 0; color: var(--gold-hi); }
.when-side { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; padding-block: .3rem; border-block: 1px solid rgba(200,162,90,.6); line-height: 1.35; }
.when-day { font-family: var(--f-serif); font-weight: 500; font-size: clamp(3rem, 9vh, 4rem); line-height: 1; color: var(--white); }
.hero-time { margin: .5rem 0 0; font-size: 1.05rem; }
.hero-place { margin: .1rem 0 0; font-size: 1.05rem; line-height: 1.45; }
.hero-place i { color: var(--gold-hi); }
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; margin-top: 1.1rem; }
/* single orchestrated entrance, after the doors open */
.hero [data-hero], .hero-bismillah { opacity: 0; transform: translateY(10px); }
body.invitation-ready .hero [data-hero], body.invitation-ready .hero-bismillah { animation: unveil 1.1s ease forwards; }
body.invitation-ready .hero-small { animation-delay: .3s; }
body.invitation-ready .names { animation-delay: .55s; }
body.invitation-ready .hero-guest { animation-delay: .85s; }
body.invitation-ready .when { animation-delay: 1s; }
body.invitation-ready .hero-time, body.invitation-ready .hero-place { animation-delay: 1.2s; }
body.invitation-ready .hero-cta { animation-delay: 1.4s; }
@keyframes unveil { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.sec { position: relative; padding: clamp(4.5rem, 10vw, 7.5rem) 0; }
.sec > .wrap, .foot > .wrap { position: relative; }
.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { max-width: 700px; }
.center { text-align: center; }
.ivory { z-index: 1; background: var(--ivory); color: var(--ink); }
.ivory::before, .ivory::after { content: ""; position: absolute; left: 0; right: 0; height: 24px; background-repeat: repeat-x; background-position: center; pointer-events: none; }
.ivory::before { top: -23px; background-image: var(--arches-up); }
.ivory::after { bottom: -23px; background-image: var(--arches-down); }
.dark { background: linear-gradient(165deg, var(--wine-2) -20%, var(--wine) 35%, var(--oud)); color: var(--ivory); }
.pattern { position: absolute; inset: 0; background: var(--star) center / 96px; opacity: .14; pointer-events: none; }
.ivory .pattern { opacity: .2; -webkit-mask-image: radial-gradient(ellipse at center, transparent 35%, #000 100%); mask-image: radial-gradient(ellipse at center, transparent 35%, #000 100%); }
.photo-bg { background: var(--oud) url("../assets/images/opening-mobile.jpg") center / cover fixed no-repeat; }
@media (orientation: landscape) { .photo-bg { background-image: url("../assets/images/opening-desktop.jpg"); } }
@media (hover: none) { .photo-bg { background-attachment: scroll; } }
.photo-bg::before { content: ""; position: absolute; inset: 0; background: rgba(23,5,7,.8); }
.eyebrow { margin: 0 0 .25rem; font-size: .85rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dp); }
.dark .eyebrow { color: var(--gold-hi); }
.sec-h { font-family: var(--f-serif); font-weight: 500; font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1.12; margin: 0 0 1.4rem; color: var(--wine); }
.dark .sec-h { color: var(--white); }
.lead { margin: 0 0 1rem; font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.35rem, 3.4vw, 1.55rem); line-height: 1.5; }
.lead strong { font-weight: 600; color: var(--wine-2); }
.salam { font-family: var(--f-ar); font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.7; color: var(--wine-2); margin: 0 0 .3rem; }
.dear { font-family: var(--f-serif); font-style: italic; font-size: 1.5rem; color: var(--wine-2); margin: .8rem 0 0; }
.divider { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.8rem 0 1.1rem; font-size: 1.1rem; }
.divider i { height: 1px; width: min(110px, 24vw); background: linear-gradient(90deg, transparent, var(--gold)); }
.divider i:last-child { transform: scaleX(-1); }
.sign { font-family: var(--f-serif); font-style: italic; font-size: 1.35rem; color: var(--muted); margin: 0; }

/* Reveal: a gentle rise */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform .9s ease; }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Verse ---------- */
.verse-ar { font-family: var(--f-ar); font-size: clamp(1.7rem, 5vw, 2.5rem); line-height: 2; color: var(--gold-hi); margin: 0 0 1.2rem; }
#verse blockquote { margin: 0; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.3rem, 3.4vw, 1.5rem); line-height: 1.5; }
#verse blockquote p { margin: 0 0 .8rem; }
#verse cite { font-family: var(--f-ui); font-style: normal; letter-spacing: .12em; font-size: .9rem; color: var(--gold-hi); }

/* ---------- Families ---------- */
.families { display: grid; grid-template-columns: minmax(0, 380px) auto minmax(0, 380px); justify-content: center; align-items: center; gap: 1.5rem; }
.fam { position: relative; padding: 8.2rem 1.5rem 3rem; color: var(--ivory); }
.ogee { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 16px 26px rgba(74,16,25,.28)); }
.ogee-fill { fill: var(--wine); }
.ogee-line { fill: none; stroke: var(--gold); stroke-width: 1.25px; vector-effect: non-scaling-stroke; }
.fam > p, .fam > h3 { position: relative; }
.fam-role { margin: 0; font-size: .85rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-hi); }
.fam h3 { font-family: var(--f-script); font-weight: 400; font-size: clamp(2.8rem, 7vw, 3.4rem); line-height: 1.2; margin: .1rem 0 .7rem; color: var(--white); }
.fam-of { margin: 0; font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; color: var(--gold-hi); }
.fam-par { margin: 0 0 .7rem; font-family: var(--f-serif); font-weight: 500; font-size: 1.55rem; line-height: 1.3; }
.fam-loc { margin: 0; font-size: .95rem; color: var(--gold-hi); }
.fam-join { display: flex; flex-direction: column; align-items: center; gap: .6rem; font-size: 1.4rem; }
.fam-join i { width: 1px; height: 60px; background: linear-gradient(transparent, var(--gold)); }
.fam-join i:last-child { transform: scaleY(-1); }
@media (max-width: 760px) {
  .families { grid-template-columns: minmax(0, 380px); gap: 1rem; }
  .fam-join { flex-direction: row; justify-content: center; }
  .fam-join i { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
  .fam-join i:last-child { transform: scaleX(-1); }
}

/* ---------- The day ---------- */
.day-grid { display: grid; grid-template-columns: minmax(280px, 390px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 4.5rem); align-items: center; text-align: left; }
.cal { position: relative; padding: 2rem 1.5rem 1.6rem; background: var(--ivory); color: var(--ink); border-radius: 14px; box-shadow: 0 24px 50px rgba(0,0,0,.35); }
.cal::after { content: ""; position: absolute; inset: 7px; border: 1px solid var(--gold); border-radius: 9px; pointer-events: none; }
.cal-month { font-family: var(--f-serif); font-weight: 600; font-size: 2rem; line-height: 1.1; text-align: center; margin: 0 0 1rem; color: var(--wine); }
.cal-month span { font-weight: 400; color: var(--gold-dp); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 0; text-align: center; font-size: .98rem; }
.cal-grid .wd { font-size: .78rem; font-weight: 500; color: var(--gold-dp); padding-bottom: .25rem; }
.cal-grid .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.cal-grid .d.hit { background: var(--wine-2); color: var(--white); font-weight: 500; box-shadow: 0 0 0 2px var(--gold); transform: scale(1.12); }
.cal.in .d.hit { animation: pop 1.1s ease .4s both; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1.12); } }
.facts { margin: 0; display: grid; gap: 1.2rem; }
.facts > div { border-left: 2px solid var(--gold); padding-left: 1.1rem; }
.facts dt { font-size: .85rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-hi); }
.facts dd { margin: 0; font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.5rem, 4vw, 1.85rem); line-height: 1.25; color: var(--white); }
.facts dd span { display: block; margin-top: .2rem; font-family: var(--f-ui); font-weight: 400; font-size: 1rem; line-height: 1.45; color: var(--ivory); }
.facts-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
@media (max-width: 800px) {
  .day-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .cal { width: min(390px, 100%); }
  .day-side { width: 100%; }
  .facts-actions .btn { flex: 1 1 100%; }
}

/* ---------- Countdown ---------- */
.count-h { margin: 0 0 1.1rem; font-family: var(--f-serif); font-weight: 400; font-style: italic; font-size: clamp(1.5rem, 4vw, 1.9rem); color: var(--gold-hi); }
.count { display: grid; grid-template-columns: repeat(4, minmax(0, 150px)); justify-content: center; }
.cbox { padding: .2rem .3rem; }
.cbox + .cbox { border-left: 1px solid rgba(200,162,90,.4); }
.cbox b { display: block; font-family: var(--f-serif); font-weight: 500; font-size: clamp(2.3rem, 9vw, 4rem); line-height: 1.1; color: var(--white); font-variant-numeric: tabular-nums lining-nums; }
.cbox span { font-size: .85rem; color: var(--gold-hi); }
.cbox b.tick { animation: tick .45s ease; }
@keyframes tick { 0% { opacity: .35; } 100% { opacity: 1; } }
.done { font-family: var(--f-serif); font-style: italic; font-size: 1.8rem; color: var(--gold-hi); margin: 1.2rem 0 0; }

/* ---------- Venue ---------- */
.venue-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 2.5rem); align-items: stretch; text-align: left; }
.venue-card { display: flex; flex-direction: column; justify-content: center; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.4rem, 3vw, 2rem); box-shadow: 0 16px 36px rgba(74,16,25,.08); }
.venue-name { font-family: var(--f-serif); font-weight: 600; font-size: clamp(1.8rem, 5vw, 2.2rem); line-height: 1.15; color: var(--wine); margin: 0; }
.venue-sub { margin: 0 0 1.1rem; color: var(--muted); }
.steps { list-style: none; counter-reset: s; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .8rem; }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; line-height: 1.5; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; background: var(--wine); color: var(--gold-hi); font-size: .92rem; }
.steps b { font-weight: 500; color: var(--wine); }
.venue-actions { display: grid; gap: .6rem; }
.map-frame { margin: 0; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 16px 36px rgba(74,16,25,.08); }
.map-frame iframe { display: block; width: 100%; flex: 1 1 auto; min-height: clamp(280px, 50vw, 400px); border: 0; border-radius: 8px; }
.map-frame figcaption { padding: .5rem .5rem .2rem; font-size: .9rem; color: var(--muted); text-align: center; }
.map-frame figcaption a { color: var(--wine); font-weight: 500; }
@media (max-width: 800px) { .venue-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .6rem 1.4rem; font-family: var(--f-ui); font-size: 1rem; line-height: 1.25; border-radius: 999px; border: 1px solid var(--gold); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.22); }
.btn:disabled { opacity: .6; cursor: progress; }
.gold-fill { background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #2a1a05; border-color: transparent; font-weight: 500; }
.gold-line { background: transparent; color: var(--wine); border-color: var(--gold-dp); }
.gold-line:hover { background: rgba(200,162,90,.16); }
.dark .gold-line { color: var(--gold-hi); border-color: var(--gold); }
.glass { background: rgba(23,5,7,.55); color: var(--ivory); }
.glass:hover { background: rgba(23,5,7,.8); }
.btn.wide { width: 100%; }

/* ---------- Keepsake ---------- */
.keep-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); justify-content: center; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }
.tilt-wrap { perspective: 900px; display: flex; justify-content: center; }
.card { position: relative; width: min(340px, 100%); aspect-ratio: 5 / 7; padding: 8%; background: linear-gradient(165deg, var(--wine-2), var(--wine) 40%, var(--oud)); border-radius: 6px; box-shadow: 0 30px 56px rgba(74,16,25,.42); text-align: center; color: var(--ivory); display: flex; flex-direction: column; justify-content: center; align-items: center; transition: transform .15s ease-out; transform-style: preserve-3d; }
.card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--gold); pointer-events: none; }
.card::after { content: ""; position: absolute; inset: 0; background: var(--star) center / 56px; opacity: .13; pointer-events: none; }
.card .c { position: absolute; width: 18px; height: 18px; border: 1.5px solid var(--gold); }
.card .tl { top: 17px; left: 17px; border-right: 0; border-bottom: 0; } .card .tr { top: 17px; right: 17px; border-left: 0; border-bottom: 0; }
.card .bl { bottom: 17px; left: 17px; border-right: 0; border-top: 0; } .card .br { bottom: 17px; right: 17px; border-left: 0; border-top: 0; }
.card p { margin: 0; position: relative; z-index: 1; }
.card-bis { font-family: var(--f-ar); color: var(--gold-hi); font-size: 1.3rem; margin-bottom: .4rem !important; }
.card-top { color: var(--gold-hi); letter-spacing: .16em; text-transform: uppercase; font-size: .68rem; margin-bottom: .5rem !important; }
.card-name { font-family: var(--f-script); font-size: 2.5rem; line-height: 1.12; color: var(--white); }
.card-star { font-size: .9rem; margin: .1rem 0 .35rem; flex: none; }
.card-rule { display: block; width: 70px; height: 1px; margin: .6rem auto; background: var(--gold); }
.card-date { font-family: var(--f-serif); font-weight: 500; font-size: 1.4rem; letter-spacing: .1em; line-height: 1.3; color: var(--gold-hi); }
.card-time { font-family: var(--f-serif); font-size: 1.05rem; line-height: 1.3; }
.card-venue { margin-top: .5rem !important; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); line-height: 1.4; }
.card-near { font-family: var(--f-serif); font-size: .95rem; line-height: 1.25; }
.keep-side { display: grid; gap: 2rem; text-align: left; }
.keep-group h3 { font-family: var(--f-serif); font-weight: 600; font-size: 1.8rem; line-height: 1.2; margin: 0; color: var(--wine); }
.keep-group p { margin: .2rem 0 .9rem; color: var(--muted); }
.keep-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 800px) {
  .keep-grid { grid-template-columns: minmax(0, 1fr); }
  .keep-side { text-align: center; }
  .keep-actions { justify-content: center; }
}

/* ---------- Footer ---------- */
.foot { position: relative; padding: clamp(4.5rem, 9vw, 6rem) 0 calc(2.5rem + env(safe-area-inset-bottom)); background: var(--oud); color: var(--ivory); }
.foot p { margin: 0; }
.foot-ar { font-family: var(--f-ar); font-size: clamp(1.5rem, 4.6vw, 2.1rem); line-height: 1.8; color: var(--gold-hi); }
.foot-tr { font-family: var(--f-serif); font-style: italic; font-size: 1.3rem; line-height: 1.45; margin-top: .4rem !important; }
.foot-names { font-family: var(--f-script); font-size: clamp(1.9rem, 8vw, 3rem); line-height: 1.2; margin-top: 1.8rem !important; color: var(--white); }
.foot-names .st { width: .36em; height: .36em; vertical-align: .14em; }
.foot-date { color: var(--gold-hi); letter-spacing: .12em; }

.lead, .sign, .salam, .verse-ar, #verse blockquote p, .foot-ar, .foot-tr, .hero-place { text-wrap: balance; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; background: var(--wine); color: var(--ivory); border: 1px solid var(--gold); border-radius: 999px; padding: .6rem 1.3rem; font-size: .95rem; line-height: 1.35; z-index: 4000; transition: .35s; pointer-events: none; width: max-content; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* phones held sideways: keep the essentials on one short screen */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-inner { padding: 1rem 4.5rem 1.8rem; max-width: 820px; }
  .hero-bismillah { font-size: 1.35rem; margin: 0; }
  .hero-small { font-size: 1.05rem; }
  .names { font-size: 2.9rem; }
  .names span { display: inline; }
  .names .amp { font-size: .5em; margin: 0 .35em; }
  .hero-guest { margin-top: .2rem; padding-block: 0; font-size: 1.05rem; }
  .when { margin-top: .35rem; max-width: 440px; }
  .when-day { font-size: 2.2rem; }
  .when-side { padding-block: .1rem; }
  .hero-time, .hero-place { display: inline; margin: 0 .3rem; font-size: .95rem; }
  .hero-cta { margin-top: .5rem; }
  .hero-cta .btn { min-height: 44px; padding-block: .3rem; }
}
@media (max-width: 820px) {
  #music-next { display: none; } /* songs still follow on by themselves */
}
@media (max-width: 400px) {
  .when { gap: .6rem; }
  .when-side { font-size: .76rem; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .hero-bg { transform: none; }
  .hero [data-hero], .hero-bismillah { opacity: 1; transform: none; }
}
