/* ============================================================
   Written in the Stars — emerald night & champagne
   ============================================================ */
:root {
  --night: #06140f;
  --sky: #0b221c;
  --emerald: #0f2a24;
  --ink: #f1e6cf;          /* champagne text */
  --muted: #a3b3a8;
  --line: rgba(241, 230, 207, .14);
  --accent: #c9a96a;       /* gold */
  --gold-light: #ecd9a8;

  --display: "Cormorant", Georgia, serif;
  --serif: "EB Garamond", Georgia, serif;
  --script: "Marcellus", Georgia, serif;   /* soft, graceful, easy to read */
  --arabic: "Amiri", serif;
  --calli: "Aref Ruqaa", "Amiri", serif;
  --ml: "Noto Serif Malayalam", serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --expo: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #133a31 0%, var(--sky) 45%, var(--night) 100%) fixed var(--night);
  text-align: center;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
h1, h2, h3, .label, .section-title { text-wrap: balance; overflow-wrap: break-word; }
body.locked { overflow: hidden; height: 100vh; }
/* keep the page hidden behind the opening screen until "Open the invitation" is tapped */
body:not(.ready) main, body:not(.ready) footer { visibility: hidden; }
::selection { background: var(--accent); color: var(--night); }
[lang="ar"] { direction: rtl; }
em { font-style: normal; }
.script { font-family: var(--script); font-weight: 400; font-style: normal; letter-spacing: .02em; }

/* ----- fixed sky layers ----- */
#sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.dawn {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% 110%, rgba(236, 217, 168, .55), rgba(201, 169, 106, .22) 40%, transparent 75%),
    linear-gradient(to top, rgba(40, 90, 72, .45), transparent 70%);
}
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* The moon: gold disc + a sky-coloured shade that slides away as you scroll (waxing) */
.moon {
  position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none;
  width: clamp(46px, 7vw, 84px); height: clamp(46px, 7vw, 84px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff6dc, var(--gold-light) 45%, var(--accent));
  box-shadow: 0 0 40px rgba(236, 217, 168, .45), 0 0 120px rgba(201, 169, 106, .25);
  overflow: hidden;
  opacity: 0; transition: opacity 2s var(--ease);
  will-change: transform;
}
.moon span {
  position: absolute; inset: -2%; border-radius: 50%;
  background: #0c241e;
  transform: translateX(var(--shade, -24%));
}
body.ready .moon { opacity: 1; }

/* ----- shared ----- */
main, footer { position: relative; z-index: 2; }
main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { padding: 130px 0; }

.label { font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }
.label em { font-family: var(--display); font-size: 1.35em; letter-spacing: .04em; text-transform: none; color: var(--accent); }
.sec-head { display: flex; justify-content: center; align-items: baseline; gap: 14px; margin-bottom: 28px; }
.sec-no { font-family: var(--display); font-style: normal; font-size: 1.1rem; color: var(--accent); }
.section-title {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.8rem, 9vw, 5.6rem); line-height: 1; letter-spacing: -.01em;
  margin-bottom: 72px;
}
.section-title em { font-family: var(--script); font-style: normal; color: var(--accent); font-size: 1em; padding: 0 .04em; }

.glass {
  background: linear-gradient(150deg, rgba(24, 64, 55, .55), rgba(10, 33, 27, .35));
  border: 1px solid var(--line);
  border-radius: 26px;
  -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 17px 36px;
  font-family: var(--serif); font-size: .78rem; font-weight: 500;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--night);
  background: linear-gradient(120deg, var(--accent), var(--gold-light) 50%, var(--accent));
  background-size: 200% 100%;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(236, 217, 168, .4), 0 10px 40px rgba(201, 169, 106, .25);
  transition: background-position .8s var(--expo), box-shadow .5s, transform .4s var(--expo);
}
.btn:hover { background-position: 100% 0; box-shadow: 0 0 0 1px rgba(236, 217, 168, .6), 0 10px 60px rgba(201, 169, 106, .45); transform: translateY(-2px); }
.btn i { font-style: normal; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--gold-light); outline-offset: 4px; }

.link {
  position: relative; font: inherit; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 4px 0;
}
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform-origin: right; transition: transform .5s var(--expo); }
.link:hover::after { transform: scaleX(0); }

.reveal { opacity: 0; transform: translateY(40px); filter: blur(8px); transition: opacity 1.4s var(--ease), transform 1.4s var(--expo), filter 1.4s var(--ease); }
.reveal.shown { opacity: 1; transform: none; filter: none; }

/* ===== Intro ===== */
#intro {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px;
  transition: opacity 1.4s var(--ease), visibility 1.4s;
}
#intro.leaving { opacity: 0; visibility: hidden; }
.intro-bismillah { font-family: var(--calli); font-size: clamp(1.2rem, 4.5vw, 1.7rem); color: var(--accent); opacity: 0; animation: fadeUp 1.6s var(--ease) .4s forwards; }
.intro-space { width: 100%; height: clamp(170px, 30vh, 300px); }
.intro-monogram-fallback { display: none; font-size: clamp(3.6rem, 16vw, 8rem); line-height: 1; color: var(--gold-light); }
body.no-sky .intro-space { display: none; }
body.no-sky .intro-monogram-fallback { display: block; margin: 20px 0; }
.intro-names { font-family: var(--display); font-size: 1.1rem; letter-spacing: .4em; text-transform: uppercase; opacity: 0; animation: fadeUp 1.4s var(--ease) 3s forwards; }
.intro-names em { font-family: var(--script); text-transform: none; letter-spacing: 0; color: var(--accent); font-size: 1.1em; }
.intro-line { font-family: var(--display); font-style: normal; font-size: 1.15rem; color: var(--muted); margin-top: 8px; opacity: 0; animation: fadeUp 1.4s var(--ease) 3.4s forwards; }
#enter { margin-top: 36px; opacity: 0; animation: fadeUp 1.4s var(--ease) 3.8s forwards; }
.intro-hint { margin-top: 16px; font-size: .72rem; letter-spacing: .2em; color: var(--muted); opacity: 0; animation: fadeUp 1.4s var(--ease) 4.1s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ===== Top bar ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  /* black fading into the sky */
  background: linear-gradient(to bottom, rgba(2, 6, 5, .95) 0%, rgba(2, 6, 5, .75) 40%, rgba(2, 6, 5, .35) 72%, rgba(2, 6, 5, 0) 100%);
  padding-bottom: 28px;
  opacity: 0; transform: translateY(-100%);
  transition: opacity 1s var(--expo), transform 1s var(--expo);
}
body.ready .topbar { opacity: 1; transform: none; transition-delay: 1.6s; }
.topbar a { color: var(--ink); text-decoration: none; }
.mono { font-size: 1.25rem; line-height: 1; letter-spacing: .06em; color: var(--accent) !important; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.phase {
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden; position: relative;
  background: var(--gold-light); box-shadow: 0 0 14px rgba(236, 217, 168, .5);
}
.phase i { position: absolute; inset: -1px; border-radius: 50%; background: #0a1f19; transform: translateX(var(--p, 0%)); }
.topbar-link { font-size: .68rem; letter-spacing: .3em; padding: 8px 16px; border: 1px solid rgba(201, 169, 106, .6); border-radius: 999px; transition: background .3s, color .3s; }
.topbar-link:hover { background: var(--accent); color: var(--night); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 90px 16px 110px;
  position: relative;
  overflow-x: clip;
}
.hero-bismillah { font-family: var(--calli); font-size: clamp(1.3rem, 4.6vw, 1.8rem); color: var(--accent); }
.hero-names-wrap { position: relative; display: grid; place-items: center; margin: 10px 0; }
.orbit { position: absolute; width: min(118vw, 900px); overflow: visible; transform: rotate(-10deg); opacity: 0; transition: opacity 2s var(--ease) 1.4s; }
body.ready .orbit { opacity: 1; }
.orbit path { fill: none; stroke: rgba(201, 169, 106, .35); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 6; }
.planet { fill: var(--gold-light); filter: drop-shadow(0 0 6px #ecd9a8); }
.planet2 { fill: var(--ink); opacity: .8; }
.hero-names {
  position: relative;
  font-weight: 400; font-size: clamp(3.4rem, 16vw, 7rem); line-height: 1.1;
  display: grid; justify-items: center;
}
.hero-names .script {
  color: var(--ink);
  text-shadow: 0 0 40px rgba(236, 217, 168, .35);
  display: inline-block; padding: .1em .35em; margin: -.1em -.35em;
  clip-path: inset(-20% 100% -20% 0);
}
.hero-names em { font-family: var(--script); font-style: normal; font-size: .5em; color: var(--accent); line-height: 1; margin: .56em 0 .09em;   /* extra room above clears the descender of letters like "j" */ opacity: 0; transition: opacity 1.2s var(--ease) 1.2s; }
body.ready .hero-names .w1 { animation: write 1.9s var(--ease) .5s forwards; }
body.ready .hero-names .w2 { animation: write 1.9s var(--ease) 1.3s forwards; }
body.ready .hero-names em { opacity: 1; }
@keyframes write { to { clip-path: inset(-20% -5% -20% 0); } }
.hero-ar { font-family: var(--calli); font-size: clamp(1.4rem, 5vw, 2rem); color: var(--accent); }
.hero-line { font-family: var(--display); font-size: clamp(1.1rem, 3.8vw, 1.45rem); color: var(--muted); letter-spacing: .02em; line-height: 1.35; }
.hero-date { font-family: var(--display); font-weight: 500; font-variant-numeric: lining-nums; font-size: clamp(1.2rem, 4.6vw, 1.7rem); letter-spacing: .04em; display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.hero-date::before, .hero-date::after { content: "✦"; font-size: .6em; color: var(--accent); letter-spacing: 0; }
.hero-bismillah, .hero-fade { opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
body.ready .hero-bismillah { opacity: 1; transform: none; transition-delay: .3s; }
body.ready .hero-fade { opacity: 1; transform: none; transition-delay: 1.9s; }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; width: 1px; height: 54px; background: var(--line); overflow: hidden; }
.scroll-cue span { display: block; height: 50%; background: var(--accent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(200%); } }

/* ===== 01 Verse: binary stars ===== */
.verse { height: 260vh; padding: 0; }
.verse-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.binary { position: relative; width: 100%; height: 70px; }
.bstar {
  position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fffaf0;
  box-shadow: 0 0 12px 3px rgba(236, 217, 168, .9), 0 0 40px 10px rgba(201, 169, 106, .35);
  transform: translateX(var(--off, 0px));
}
.bstar.b { transform: translateX(calc(var(--off, 0px) * -1)); }
.bflash {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  border: 1px solid var(--gold-light); opacity: 0;
}
.verse.merged .bflash { animation: ring 2.4s var(--ease) infinite; }
.verse.merged .bstar { box-shadow: 0 0 18px 6px rgba(255, 246, 220, .95), 0 0 90px 30px rgba(201, 169, 106, .45); }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(22); } }
.verse-ar { font-family: var(--arabic); font-size: clamp(2.8rem, 11vw, 5.2rem); line-height: 1.5; color: var(--gold-light); text-shadow: 0 0 30px rgba(201, 169, 106, .3); }
.verse-en { font-family: var(--display); font-style: normal; font-weight: 300; font-size: clamp(2rem, 7vw, 3.8rem); line-height: 1.15; max-width: 15ch; }
.verse-en .w { opacity: .12; transition: opacity .6s var(--ease), text-shadow .6s; }
.verse-en .w.lit { opacity: 1; text-shadow: 0 0 24px rgba(236, 217, 168, .35); }

/* ===== 02 Couple ===== */
.couple-grid { display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; gap: 0; }
.person { padding: 48px 28px 40px; display: grid; gap: 10px; justify-items: center; position: relative; }
.person-star { color: var(--gold-light); font-size: 1.4rem; text-shadow: 0 0 16px var(--accent); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.85); } }
.person h2 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; color: var(--ink); text-shadow: 0 0 30px rgba(236, 217, 168, .25); }
.parents { color: var(--muted); }
.couple-link { width: 100%; height: 40px; overflow: visible; }
.couple-link path { fill: none; stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease) .6s; }
.couple-link.shown path { stroke-dashoffset: 0; }
.couple-link.reveal { filter: none; transform: none; }
@media (max-width: 760px) {
  .couple-grid { grid-template-columns: 1fr; gap: 0; }
  .couple-link { height: 90px; width: 40px; justify-self: center; transform: rotate(90deg) !important; }
}

/* ===== 03 Countdown: orbits ===== */
.countdown-wrap { overflow: hidden; }
.orbits { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 3vw, 36px); max-width: 860px; margin: 0 auto; }
.orbit-unit { position: relative; aspect-ratio: 1; }
.orbit-unit svg { display: block; width: 100%; height: auto; overflow: visible; }   /* square from its viewBox, even without aspect-ratio support */
.o-track { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.o-arc { fill: none; stroke: var(--accent); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 1; transform: rotate(-90deg); transform-origin: 60px 60px; }
.o-dot { transform-origin: 60px 60px; transition: transform .9s var(--expo); }
.o-dot circle { fill: var(--gold-light); filter: drop-shadow(0 0 5px #ecd9a8); }
.o-val { position: absolute; inset: 0; display: grid; place-content: center; gap: 2px; }
.o-val .num { font-family: var(--display); font-weight: 300; font-size: clamp(1.8rem, 7vw, 3.6rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.o-val small { font-size: clamp(.5rem, 1.6vw, .66rem); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.countdown-done { font-family: var(--script); font-size: 2.2rem; color: var(--gold-light); }
@media (max-width: 520px) { .orbits { grid-template-columns: repeat(2, 1fr); max-width: 330px; gap: 22px; } }

/* ===== 04 Stories: constellation ===== */
.constellation { position: relative; display: grid; gap: 16vh; padding: 40px 0; }
.const-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.const-track { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 7; }
.const-line { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px rgba(201, 169, 106, .8)); }

.chapter { position: relative; display: grid; grid-template-columns: 1fr 90px 1fr; align-items: center; }
.node { grid-column: 2; grid-row: 1; justify-self: center; width: 18px; height: 18px; position: relative; z-index: 1; }
.node::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--muted); opacity: .5;
  transition: background .6s, box-shadow .6s, opacity .6s, inset .6s;
}
.node::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; transform: scale(.4);
  transition: opacity .8s, transform 1.2s var(--expo);
}
.chapter.lit .node::before { inset: 3px; background: #fffaf0; opacity: 1; box-shadow: 0 0 14px 4px rgba(236, 217, 168, .9), 0 0 50px 12px rgba(201, 169, 106, .35); }
.chapter.lit .node::after { opacity: .6; transform: none; }
.chapter-card {
  grid-row: 1; padding: 26px; text-align: left;
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
  opacity: .08; transform: translateY(40px) scale(.96); filter: blur(4px);
  transition: opacity 1.2s var(--ease), transform 1.4s var(--expo), filter 1.2s var(--ease);
}
.chapter:nth-child(odd) .chapter-card { grid-column: 1; }
.chapter:nth-child(even) .chapter-card { grid-column: 3; }
.chapter.lit .chapter-card { opacity: 1; transform: none; filter: none; }

.moon-photo {
  position: relative; width: clamp(150px, 17vw, 230px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(201, 169, 106, .6), 0 0 0 7px rgba(201, 169, 106, .08), 0 0 50px rgba(201, 169, 106, .25);
}
.moon-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); transform: scale(1.15); transition: transform 2.4s var(--expo); }
.moon-photo .shade { position: absolute; inset: -2px; border-radius: 50%; background: #0a1f19; transform: translateX(-12%); transition: transform 2.4s var(--expo) .2s; }
.chapter.lit .moon-photo .shade { transform: translateX(-104%); }
.chapter.lit .moon-photo img { transform: none; }
.chapter-body { display: grid; gap: 8px; }
.chapter-top { display: flex; align-items: center; gap: 12px; }
.chapter-icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(201, 169, 106, .6); display: grid; place-items: center; flex: 0 0 auto; }
.chapter-icon svg { width: 18px; height: 18px; overflow: visible; }
.chapter-icon path { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.chapter-meta { display: grid; line-height: 1.3; }
.chapter-no { font-family: var(--display); font-style: normal; color: var(--accent); }
.chapter-date { font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.chapter-body h3 { font-family: var(--display); font-weight: 300; font-size: clamp(1.9rem, 3.2vw, 2.9rem); line-height: 1.05; }
.chapter-body p { color: var(--muted); font-size: 1.05rem; }

@media (max-width: 860px) {
  .chapter { grid-template-columns: 36px 1fr; }
  .node { grid-column: 1; }
  .chapter:nth-child(odd) .chapter-card, .chapter:nth-child(even) .chapter-card { grid-column: 2; }
  .chapter-card { grid-template-columns: 1fr; justify-items: start; padding: 18px; }
  .moon-photo { width: min(58vw, 220px); justify-self: center; }
  .constellation { gap: 10vh; }
}

/* ===== 05 Events ===== */
.event-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); perspective: 1200px; }
.event {
  position: relative; padding: 38px 28px 30px; text-align: left; overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .6s var(--expo), opacity 1.4s var(--ease), filter 1.4s var(--ease);
}
.event::before {   /* glare following the pointer */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(236, 217, 168, .12), transparent 45%);
}
.event-sym { width: 54px; height: 54px; margin-bottom: 18px; }
.event-sym path, .event-sym circle { fill: none; stroke: var(--gold-light); stroke-width: 1.2; filter: drop-shadow(0 0 6px rgba(236, 217, 168, .7)); }
.event-ar { font-family: var(--calli); font-size: 1.5rem; color: var(--accent); }
.event h3 { font-family: var(--script); font-weight: 400; font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1.05; margin-bottom: 16px; color: var(--ink); }
.event dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; margin-bottom: 22px; }
.event dt { font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); padding-top: .35em; }
.event dd strong { font-weight: 500; display: block; }
.event-map { height: 190px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 22px; }
.event-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.9) sepia(.35) hue-rotate(110deg) contrast(.9) brightness(.85); }
.event-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; }

/* ===== 06 RSVP ===== */
.rsvp .section-title { margin-bottom: 16px; }
.rsvp-by { color: var(--muted); margin-bottom: 48px; font-style: normal; }
.rsvp-card { max-width: 560px; margin: 0 auto; padding: clamp(28px, 6vw, 52px); }
#rsvp-form { display: grid; gap: 32px; text-align: left; }
.field { border: 0; min-width: 0; }
.float { position: relative; display: block; }
.float input, .float textarea {
  font: inherit; font-size: 1.12rem; color: var(--ink);
  width: 100%; padding: 22px 0 10px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; resize: none;
}
.float > span { position: absolute; left: 0; top: 22px; font-size: 1.08rem; color: var(--muted); transform-origin: left top; pointer-events: none; transition: transform .45s var(--expo), color .3s, letter-spacing .45s; }
.float input:focus + span, .float input:not(:placeholder-shown) + span,
.float textarea:focus + span, .float textarea:not(:placeholder-shown) + span { transform: translateY(-24px) scale(.64); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.float::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--expo); box-shadow: 0 0 10px var(--accent); }
.float:focus-within::after { transform: none; }
.float input:focus, .float textarea:focus { outline: none; }
legend, .stepper-label { font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 540px) { .choices { grid-template-columns: repeat(4, 1fr); } }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choices span { display: block; text-align: center; padding: 11px 4px; font-size: .92rem; border: 1px solid var(--line); border-radius: 999px; transition: all .4s var(--expo); }
.choices label:hover span { border-color: var(--accent); }
.choices input:checked + span { background: var(--accent); color: var(--night); border-color: var(--accent); box-shadow: 0 0 24px rgba(201, 169, 106, .4); }
.choices input:focus-visible + span { outline: 1px solid var(--gold-light); outline-offset: 3px; }
.stepper { display: flex; justify-content: space-between; align-items: center; }
.stepper-label { margin: 0; }
.stepper-ctrl { display: flex; align-items: center; gap: 18px; }
.stepper-ctrl button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 1.2rem; cursor: pointer; transition: all .3s; }
.stepper-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.stepper-ctrl output { font-family: var(--display); font-size: 2rem; min-width: 1.4em; text-align: center; }
#rsvp-form .btn { justify-self: center; }
.form-error { color: #eaa58f; text-align: center; }
.rsvp-thanks { display: grid; justify-items: center; gap: 8px; padding: 12px 0; }
.thanks-ar { font-family: var(--calli); font-size: 2rem; color: var(--accent); }
.rsvp-thanks h3 { font-size: 2.4rem; line-height: 1.1; color: var(--gold-light); }
.rsvp-thanks p:not(.thanks-ar) { color: var(--muted); margin-bottom: 12px; }

/* ===== Footer: dawn ===== */
footer { padding: 120px 16px 90px; overflow: hidden; min-height: 90vh; display: grid; align-content: end; }
.horizon {
  position: absolute; left: 50%; bottom: -55vw; width: 140vw; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 240, 205, .35), rgba(201, 169, 106, .15) 45%, transparent 70%);
  pointer-events: none;
}
.footer-inner { position: relative; display: grid; gap: 14px; justify-items: center; }
.dua { font-family: var(--arabic); font-size: clamp(1.6rem, 5.5vw, 2.4rem); line-height: 1.9; color: var(--gold-light); }
.dua-en { color: var(--muted); max-width: 460px; }
.footer-names { font-size: clamp(2.4rem, 10vw, 4.4rem); line-height: 1.2; margin: 12px 0 4px; text-shadow: 0 0 40px rgba(236, 217, 168, .35); }

/* ===== Music ===== */
#music-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 55;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(10, 33, 27, .7); border: 1px solid rgba(201, 169, 106, .5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
}
#music-toggle span { width: 2px; height: 5px; background: var(--gold-light); border-radius: 2px; }
#music-toggle.playing span { animation: bars 1s ease-in-out infinite; }
#music-toggle.playing span:nth-child(2) { animation-delay: .25s; }
#music-toggle.playing span:nth-child(3) { animation-delay: .5s; }
#music-toggle.playing span:nth-child(4) { animation-delay: .15s; }
@keyframes bars { 50% { height: 17px; } }

@media (max-width: 420px) {
  section { padding: 100px 0; }
  .hero .label { letter-spacing: .22em; font-size: .64rem; }
}

/* ===== At a glance ===== */
.glance { padding: 0 0 40px; }
.glance-card { max-width: 640px; margin: 0 auto; padding: 10px 22px 24px; text-align: left; }
.glance-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.glance-sym { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(201, 169, 106, .55); display: grid; place-items: center; }
.glance-sym svg { width: 22px; height: 22px; }
.glance-sym path, .glance-sym circle { fill: none; stroke: var(--gold-light); stroke-width: 1.3; }
.glance-info { display: grid; gap: 1px; min-width: 0; }
.glance-title { font-family: var(--script); font-weight: 400; font-size: 1.45rem; line-height: 1.1; color: var(--ink); }
.glance-when { font-size: 1rem; color: var(--ink); }
.glance-where { font-size: .95rem; color: var(--muted); overflow-wrap: anywhere; }
.glance-dir {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(201, 169, 106, .6); color: var(--gold-light);
}
.glance-dir svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.glance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: 0 0 0 1px rgba(201, 169, 106, .6); }
.btn-ghost:hover { color: var(--night); background: var(--accent); }
.glance-actions .btn { padding: 15px 10px; letter-spacing: .2em; font-size: .74rem; }

/* ===== Couple ampersand (phones) ===== */
.couple-amp { display: none; }

@keyframes fadeIn { from { opacity: 0; } }

@media (max-width: 860px) {
  .topbar-link { display: none; }
  .topbar { padding: 10px 16px 26px; }
  .moon { width: 40px; height: 40px; }
  #music-toggle { bottom: calc(18px + env(safe-area-inset-bottom)); right: 14px; width: 44px; height: 44px; }
  footer { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* ===== Phones: tighter, clearer, nothing off-screen ===== */
@media (max-width: 760px) {
  :root { --muted: #b8c5bb; }
  main { padding: 0 14px; }
  section { padding: 72px 0; }
  .label { letter-spacing: .2em; font-size: .72rem; color: #b8c5bb; }
  .sec-head { margin-bottom: 16px; flex-wrap: wrap; }
  .section-title { font-size: clamp(2.3rem, 11vw, 3.2rem); margin-bottom: 40px; }
  .parents, .chapter-body p, .rsvp-by, .dua-en { color: #c3cec6; }

  .hero { gap: 12px; padding: 70px 16px 104px; }
  .hero-names { font-size: min(18vw, 10.5svh); }
  .hero-bismillah { font-size: min(6vw, 3.4svh); }
  .scroll-cue { display: none; }
  .orbit { width: 94vw; }

  .verse { height: 190vh; }
  .verse-sticky { padding: 0 16px; }

  .couple-grid { gap: 0; }
  .couple-link { display: none; }
  .couple-amp { display: block; font-size: 2.4rem; line-height: 1; color: var(--accent); margin: 10px 0; }
  .person { padding: 32px 20px 28px; }
  .person h2 { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }

  .orbits { gap: 18px; }

  /* Story: one centred card per chapter, photo sitting on the card edge */
  .constellation { gap: 56px; padding: 10px 0 0; }
  .chapter { grid-template-columns: 1fr; justify-items: center; }
  .node { grid-column: 1; grid-row: 1; margin-bottom: 18px; }
  .chapter:nth-child(odd) .chapter-card, .chapter:nth-child(even) .chapter-card { grid-column: 1; grid-row: 2; }
  .chapter-card {
    width: 100%; grid-template-columns: 1fr; justify-items: center; text-align: center;
    padding: 0 20px 26px; margin-top: 90px; gap: 14px;
    opacity: .35; filter: none; transform: translateY(24px);
  }
  .moon-photo { width: 180px; margin-top: -90px; }
  .chapter-top { flex-direction: column; gap: 8px; }
  .chapter-meta { justify-items: center; }
  .chapter-body { justify-items: center; }
  .chapter-body h3 { font-size: 2.1rem; }
  .chapter-body p { max-width: 34ch; }

  .event-grid { grid-template-columns: 1fr; gap: 20px; }
  .event { padding: 28px 20px 22px; }
  .event h3 { font-size: 2.4rem; }
  .event-map { height: 170px; }
  .event-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .event-actions .link {
    display: grid; place-items: center; min-height: 46px; padding: 8px;
    border: 1px solid rgba(201, 169, 106, .5); border-radius: 999px;
    font-size: .68rem; letter-spacing: .14em;
  }
  .event-actions .link::after { display: none; }
  .event-actions .dir { grid-column: 1 / -1; background: var(--accent); color: var(--night); border-color: var(--accent); }

  .rsvp-card { padding: 26px 20px; }
  .rsvp-by { margin-bottom: 28px; }
  .choices span { padding: 13px 4px; }
  footer { min-height: 70vh; padding-top: 80px; }
}

/* ===== Phones: compact pass (smaller cards, tighter spacing) ===== */
@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .sec-head { margin-bottom: 10px; }
  .section-title { font-size: clamp(1.9rem, 8.5vw, 2.4rem); margin-bottom: 28px; }
  .glass { border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .05); }
  .btn { padding: 13px 22px; font-size: .72rem; letter-spacing: .2em; }

  .hero-names { font-size: min(16vw, 9.5svh); }

  .glance { padding-bottom: 24px; }
  .glance-card { padding: 4px 16px 16px; }
  .glance-row { grid-template-columns: 36px 1fr auto; gap: 12px; padding: 12px 0; }
  .glance-sym { width: 36px; height: 36px; }
  .glance-sym svg { width: 18px; height: 18px; }
  .glance-title { font-size: 1.2rem; }
  .glance-when { font-size: .95rem; }
  .glance-where { font-size: .88rem; }
  .glance-dir { width: 40px; height: 40px; }
  .glance-actions { margin-top: 14px; gap: 8px; }
  .glance-actions .btn { padding: 12px 8px; }

  .verse-ar { font-size: 2.5rem; }
  .verse-en { font-size: 1.8rem; }
  .binary { height: 50px; }

  .person { padding: 20px 16px 18px; gap: 6px; }
  .person-star { font-size: 1rem; }
  .person h2 { font-size: clamp(1.6rem, 7.5vw, 2rem); }
  .couple-amp { font-size: 1.8rem; margin: 6px 0; }

  .orbits { max-width: 290px; gap: 14px; }

  .constellation { gap: 36px; }
  .node { margin-bottom: 10px; }
  .chapter-card { padding: 0 16px 18px; margin-top: 66px; gap: 8px; }
  .moon-photo { width: 132px; margin-top: -66px; }
  .chapter-icon { width: 30px; height: 30px; }
  .chapter-icon svg { width: 15px; height: 15px; }
  .chapter-top { gap: 4px; }
  .chapter-body { gap: 4px; }
  .chapter-body h3 { font-size: 1.6rem; }
  .chapter-body p { font-size: .98rem; }

  .event { padding: 20px 16px 16px; }
  .event-sym { width: 38px; height: 38px; margin-bottom: 6px; }
  .event-ar { font-size: 1.15rem; }
  .event h3 { font-size: 1.9rem; margin-bottom: 10px; }
  .event dl { gap: 6px 14px; margin-bottom: 14px; }
  .event dd { font-size: .98rem; }
  .event-map { height: 140px; border-radius: 12px; margin-bottom: 14px; }
  .event-actions { gap: 8px; }
  .event-actions .link { min-height: 42px; }

  .rsvp .section-title { margin-bottom: 8px; }
  .rsvp-card { padding: 18px 16px; }
  #rsvp-form { gap: 20px; }
  .float input, .float textarea { font-size: 1.05rem; padding: 18px 0 8px; }
  .float > span { top: 18px; font-size: 1rem; }
  .choices span { padding: 10px 4px; font-size: .9rem; }
  .stepper-ctrl button { width: 36px; height: 36px; }
  .stepper-ctrl output { font-size: 1.6rem; }
  .rsvp-thanks h3 { font-size: 1.9rem; }


  footer { min-height: 60vh; padding-top: 56px; }
  .dua { font-size: 1.5rem; }
  .footer-names { font-size: clamp(2rem, 9vw, 2.6rem); }
}

/* ============================================================
   Wow layer: shimmer, word reveals, petals,
   lanterns, glowing borders, entrance choreography
   ============================================================ */

/* gold light sweeping across the names */
.hero-names .script, .footer-names {
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, #fff8e2 47%, var(--gold-light) 50%, var(--ink) 60%, var(--ink) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: none; filter: drop-shadow(0 0 18px rgba(236, 217, 168, .3));
  animation: shimmer 5s ease-in-out 3.2s infinite;
}
body.ready .hero-names .w1 { animation: write 1.9s var(--ease) .5s forwards, shimmer 5s ease-in-out 3.2s infinite; }
body.ready .hero-names .w2 { animation: write 1.9s var(--ease) 1.3s forwards, shimmer 5s ease-in-out 3.6s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0% 0; } }

/* headings rise in word by word */
.words .wd { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 .02em .12em; margin-bottom: -.12em; }
.words .wd > span { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; transition: transform 1s var(--expo); transition-delay: calc(var(--i) * 70ms); }
.words.in .wd > span { transform: none; }


/* petals and lanterns live in a clipped full-screen layer so they never widen the page */
.fx-layer { position: fixed; inset: 0; z-index: 66; overflow: hidden; pointer-events: none; }

/* petal shower */
.petal {
  position: absolute; top: -6vh; left: var(--x); pointer-events: none;
  width: var(--s); height: calc(var(--s) * 1.35);
  border-radius: 100% 0 100% 0;
  background: radial-gradient(circle at 30% 30%, #fff4d6, var(--gold-light) 45%, var(--accent));
  opacity: .9; box-shadow: 0 0 10px rgba(236, 217, 168, .5);
  animation: petalFall var(--d) cubic-bezier(.35, .1, .6, 1) var(--delay) forwards;
}
@keyframes petalFall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: .95; }
  50% { transform: translate3d(var(--sway), 55vh, 0) rotate(calc(var(--rot) * .5)); }
  100% { transform: translate3d(calc(var(--sway) * -.6), 115vh, 0) rotate(var(--rot)); opacity: .2; }
}

/* glowing gold border that travels around key cards */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.glow-border { position: relative; }
.glow-border::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 62%, rgba(236, 217, 168, .9) 76%, #fff6dc 80%, rgba(236, 217, 168, .9) 84%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: orbitBorder 6s linear infinite;
}
@keyframes orbitBorder { to { --ang: 360deg; } }

/* lanterns */
.lanterns .section-title { margin-bottom: 28px; }
.lantern-card { max-width: 520px; margin: 0 auto; padding: 24px 20px; display: grid; gap: 14px; }
.lantern-intro { color: var(--muted); }
#lantern-form { display: grid; gap: 18px; text-align: left; }
#lantern-form .btn { justify-self: center; }
.lantern-note { font-size: .85rem; color: var(--muted); }
.lantern {
  position: absolute; left: 0; top: 0; pointer-events: none;
  display: grid; justify-items: center; gap: 8px;
}
.lantern-body {
  width: 42px; height: 56px;
  border-radius: 42% 42% 30% 30% / 48% 48% 26% 26%;
  background: radial-gradient(circle at 50% 72%, #fff6d0 0%, #ffd27a 26%, #e89a45 60%, #a4521c 100%);
  box-shadow: 0 0 26px 8px rgba(255, 190, 90, .5), 0 0 80px 30px rgba(255, 160, 60, .22);
  position: relative;
  animation: lanternSway 3.2s ease-in-out infinite, flicker 1.6s ease-in-out infinite;
}
.lantern-body::before { content: ""; position: absolute; left: 18%; right: 18%; top: -4px; height: 6px; border-radius: 3px; background: #6d3a16; }
.lantern-body::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -3px; height: 5px; border-radius: 3px; background: #6d3a16; }
.lantern-text { max-width: 220px; font-family: var(--display); font-size: 1.05rem; color: var(--gold-light); text-shadow: 0 0 12px rgba(255, 200, 110, .6); animation: fadeLate 7s ease forwards; }
@keyframes lanternSway { 50% { transform: rotate(4deg) translateX(3px); } }
@keyframes flicker { 50% { filter: brightness(1.15); } }
@keyframes fadeLate { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }

/* entrance choreography */
.orbits .orbit-unit { opacity: 0; transform: scale(.55) rotate(-120deg); transition: opacity 1s var(--ease), transform 1.4s var(--expo); transition-delay: calc(var(--i) * 140ms); }
.orbits.shown .orbit-unit { opacity: 1; transform: none; }
.event.reveal { transform: perspective(1400px) rotateX(12deg) translateY(50px) scale(.96); transform-origin: 50% 100%; }
.event.reveal.shown { transform: none; }
/* fly-in offsets must not widen the page */
main > section:not(.verse) { overflow-x: clip; }
.couple-grid article:first-of-type.reveal { transform: translateX(-70px) rotate(-5deg); }
.couple-grid article:last-of-type.reveal { transform: translateX(70px) rotate(5deg); }
.couple-grid article.reveal.shown { transform: none; }

/* ===== Scroll transitions ===== */
/* home screen sinks back as you leave it */
.hero { transform: translateY(calc(var(--leave, 0) * -50px)) scale(calc(1 - var(--leave, 0) * .07)); opacity: calc(1 - var(--leave, 0) * .85); }

/* gold divider drawn between sections */
main > section.divided { position: relative; }
main > section.divided::before {
  content: ""; position: absolute; top: 0; left: 50%; width: min(60vw, 280px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--gold-light), var(--accent), transparent);
  transform: translateX(-50%) scaleX(0); transition: transform 1.8s var(--expo);
}
main > section.divided.in-view::before { transform: translateX(-50%) scaleX(1); }

/* at-a-glance rows slide in one after another */
.glance-row, .glance-actions { opacity: 0; transform: translateX(34px); transition: opacity .9s var(--ease), transform 1.1s var(--expo); }
.glance-card.shown .glance-row, .glance-card.shown .glance-actions { opacity: 1; transform: none; }
.glance-card .glance-row:nth-child(1) { transition-delay: .25s; }
.glance-card .glance-row:nth-child(2) { transition-delay: .42s; }
.glance-card .glance-actions { transition-delay: .6s; }

/* story: photo rolls in like a rising moon, cards slide from alternating sides */
.moon-photo { transform: rotate(-35deg) scale(.7); transition: transform 1.6s var(--expo) .15s; }
.chapter.lit .moon-photo { transform: none; }
@media (max-width: 760px) {
  .chapter:nth-child(odd) .chapter-card { transform: translateX(-44px); }
  .chapter:nth-child(even) .chapter-card { transform: translateX(44px); }
  .chapter.lit .chapter-card { transform: none; }
}

/* maps wipe open inside event cards */
.event-map { clip-path: inset(0 0 100% 0 round 14px); transition: clip-path 1.4s var(--expo) .55s; }
.event.shown .event-map { clip-path: inset(0 0 0 0 round 14px); }

/* RSVP and lantern cards grow in, then their fields rise one by one */
.rsvp-card.reveal, .lantern-card.reveal { transform: scale(.9) translateY(30px); }
.rsvp-card.reveal.shown, .lantern-card.reveal.shown { transform: none; }
#rsvp-form > *, .lantern-card > * { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform 1s var(--expo); }
.rsvp-card.shown #rsvp-form > *, .lantern-card.shown > * { opacity: 1; transform: none; }
#rsvp-form > :nth-child(2), .lantern-card > :nth-child(2) { transition-delay: .12s; }
#rsvp-form > :nth-child(3), .lantern-card > :nth-child(3) { transition-delay: .24s; }
#rsvp-form > :nth-child(4) { transition-delay: .36s; }
#rsvp-form > :nth-child(5), #rsvp-form > :nth-child(6) { transition-delay: .48s; }

/* ===== RSVP extras + effect switches (set in the admin portal) ===== */
.counts { display: grid; gap: 14px; }
.form-error { min-height: 0; }
body.no-shimmer .hero-names .script, body.no-shimmer .footer-names { background: none; color: var(--ink); filter: none; }
body.ready.no-shimmer .hero-names .w1 { animation: write 1.9s var(--ease) .5s forwards; }
body.ready.no-shimmer .hero-names .w2 { animation: write 1.9s var(--ease) 1.3s forwards; }

/* ===== Malayalam toggle (one section at a time) ===== */
.ml-toggle {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 4px 12px;
  border-radius: 999px; border: 1px solid rgba(201, 169, 106, .55); background: rgba(10, 33, 27, .6);
  color: var(--gold-light); font: 500 .76rem/1.5 var(--ml); letter-spacing: 0; text-transform: none;
  cursor: pointer; vertical-align: middle; transition: background .3s, color .3s;
}
.ml-toggle:hover { border-color: var(--gold-light); }
.lang-ml .ml-toggle { background: var(--accent); color: var(--night); border-color: var(--accent); }
#intro .ml-toggle { margin: 18px 0 0; opacity: 0; animation: fadeUp 1.4s var(--ease) 4.3s forwards; }
.hero .ml-toggle { margin: 0; }
.glance-ml { position: absolute; top: 12px; right: 12px; margin: 0; z-index: 2; }
footer .ml-toggle { justify-self: center; margin: 0 0 6px; }

/* Malayalam typography, sized to keep the same footprint as the English layout
   (Malayalam glyphs look larger at the same font-size, and tiny English capitals are too small in Malayalam) */
.lang-ml :where(h1, h2, h3, p, span, a, button, label, legend, small, dt, dd, em, output):not([lang="ar"]):not([lang="ar"] *):not(.sec-no):not(.num) { font-family: var(--ml); }
/* big text: scaled down so it takes the same space */
.lang-ml .hero-names { font-size: min(13.5vw, 8.2svh); line-height: 1.3; }
.lang-ml .hero-line { font-size: clamp(.82rem, 3.3vw, 1.15rem); line-height: 1.35; }
.lang-ml .hero-date { font-size: clamp(.84rem, 3.8vw, 1.3rem); gap: 8px; }
.lang-ml .section-title { font-size: clamp(1.3rem, 5.6vw, 2.4rem); line-height: 1.4; font-weight: 400; }
.lang-ml .verse-en { font-size: clamp(1.1rem, 4.5vw, 2.1rem); line-height: 1.5; max-width: 24ch; }
.lang-ml .person h2 { font-size: clamp(1.25rem, 5.4vw, 1.9rem); line-height: 1.35; }
.lang-ml .chapter-body h3 { font-size: clamp(1.15rem, 4.8vw, 1.8rem); line-height: 1.35; }
.lang-ml .event h3 { font-size: clamp(1.35rem, 5.4vw, 2.1rem); line-height: 1.35; }
.lang-ml .glance-title { font-size: 1rem; }
.lang-ml .footer-names { font-size: clamp(1.7rem, 7vw, 3.2rem); }
.lang-ml .rsvp-thanks h3 { font-size: 1.6rem; }
/* body text: slightly smaller than English to wrap the same way */
.lang-ml .chapter-body p { font-size: .84rem; line-height: 1.65; }
.lang-ml .event dd, .lang-ml .parents, .lang-ml .dua-en,
.lang-ml .lantern-intro, .lang-ml .lantern-note, .lang-ml .thanks-note, .lang-ml .rsvp-by, .lang-ml .intro-line { font-size: .9rem; line-height: 1.7; }
.lang-ml .glance-when { font-size: .8rem; }
.lang-ml .glance-info > * { line-height: 1.45; }
.lang-ml .float > span { font-size: .9rem; }
.lang-ml .choices span { font-size: .8rem; }
.lang-ml .intro-names { font-size: .95rem; }
.lang-ml .btn { font-size: .72rem; }
.lang-ml .event-actions .link { font-size: .7rem; }
/* small labels: a little larger than the tiny English capitals so they stay readable */
.lang-ml .label, .lang-ml legend, .lang-ml .stepper-label, .lang-ml .event dt, .lang-ml .chapter-date, .lang-ml .chapter-no { font-size: .74rem; }
.lang-ml .o-val small { font-size: clamp(.55rem, 2.1vw, .7rem); }
/* Malayalam letters must never be spaced apart (that is only for English capitals) */
.lang-ml, .lang-ml *:not([lang="ar"]) { letter-spacing: 0 !important; text-transform: none !important; }


/* older phones without aspect-ratio: give round photos an explicit height */
@supports not (aspect-ratio: 1) {
  .moon-photo { height: clamp(150px, 17vw, 230px); }
  .moon { height: 46px; }
}
@media (max-width: 760px) { @supports not (aspect-ratio: 1) { .moon-photo { height: 132px; } .moon { height: 40px; } } }

/* ============================================================
   Phones: events shown one at a time with tabs, maps on request
   ============================================================ */
.event-tabs, .map-toggle { display: none; }

@media (max-width: 760px) {
  /* events: one card at a time, map on request */
  .event-tabs {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; margin-bottom: 14px;
    border: 1px solid rgba(201, 169, 106, .35); border-radius: 999px; background: rgba(10, 33, 27, .55);
  }
  .event-tabs button {
    padding: 10px 6px; border: 0; border-radius: 999px; background: none; color: var(--muted);
    font: 500 .95rem var(--display); cursor: pointer; transition: background .3s, color .3s;
  }
  .event-tabs button.active { background: var(--accent); color: var(--night); }
  .event-grid .event.off { display: none; }
  .event-map { display: none; }
  .event.map-open .event-map { display: block; }
  .map-toggle { display: block; width: 100%; margin: 0 0 10px; }

}
@media (max-width: 760px) {
  .map-toggle { min-height: 42px; border: 1px solid rgba(201, 169, 106, .5); border-radius: 999px; text-align: center; }
  .map-toggle::after { display: none; }
}

/* ============================================================
   Slower, softer motion: reveals and transitions ease in gently
   ============================================================ */
.reveal { transform: translateY(28px); transition: opacity 2s var(--ease), transform 2.2s var(--expo), filter 2s var(--ease); }
.words .wd > span { transition: transform 1.6s var(--expo); transition-delay: calc(var(--i) * 110ms); }
.hero-bismillah, .hero-fade { transition: opacity 2s var(--ease), transform 2s var(--ease); }
body.ready .hero-fade { transition-delay: 2.2s; }
body.ready .hero-names .w1 { animation: write 2.6s var(--ease) .6s forwards, shimmer 6s ease-in-out 3.8s infinite; }
body.ready .hero-names .w2 { animation: write 2.6s var(--ease) 1.5s forwards, shimmer 6s ease-in-out 4.2s infinite; }
.glance-row, .glance-actions { transition: opacity 1.4s var(--ease), transform 1.7s var(--expo); }
.glance-card .glance-row:nth-child(1) { transition-delay: .35s; }
.glance-card .glance-row:nth-child(2) { transition-delay: .65s; }
.glance-card .glance-actions { transition-delay: .95s; }
.orbits .orbit-unit { transition: opacity 1.6s var(--ease), transform 2.2s var(--expo); transition-delay: calc(var(--i) * 220ms); }
.chapter-card { transition: opacity 1.8s var(--ease), transform 2s var(--expo), filter 1.8s var(--ease); }
.moon-photo { transition: transform 2.4s var(--expo) .25s; }
.moon-photo .shade { transition: transform 3s var(--expo) .35s; }
.event-map { transition: clip-path 2s var(--expo) .7s; }
#rsvp-form > * { transition: opacity 1.2s var(--ease), transform 1.5s var(--expo); }
main > section.divided::before { transition: transform 2.6s var(--expo); }
.couple-grid article.reveal { transition-duration: 2.2s; }

/* ============================================================
   04 With best compliments: two family constellations around the couple
   ============================================================ */
.families .section-title { margin-bottom: 10px; }
.fam-intro { color: var(--muted); margin-bottom: 44px; }
.fam-sky { display: grid; grid-template-columns: 1fr 170px 1fr; align-items: center; max-width: 920px; margin: 0 auto; }
.fam-group {
  padding: 26px 24px; border-radius: 24px;
  background: linear-gradient(150deg, rgba(24, 64, 55, .45), rgba(10, 33, 27, .25));
  border: 1px solid var(--line);
  opacity: 0; transform: translateY(30px); transition: opacity 1.8s var(--ease), transform 2s var(--expo);
}
.fam-group.lit { opacity: 1; transform: none; }
.fam-title { font-family: var(--script); font-weight: 400; font-size: 1.45rem; color: var(--gold-light); margin-bottom: 18px; }
.fam-list { list-style: none; position: relative; display: grid; gap: 16px; padding-left: 28px; text-align: left; }
.fam-list::before {                           /* the thread that joins the stars */
  content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(201, 169, 106, .15));
  transform-origin: top; transform: scaleY(0); transition: transform 2.6s var(--expo) .3s;
}
.fam-group.lit .fam-list::before { transform: scaleY(1); }
.fam-star { position: relative; opacity: .12; transform: translateX(-12px); transition: opacity 1.4s var(--ease), transform 1.8s var(--expo); transition-delay: calc(.5s + var(--i) * 260ms); }
.fam-group.lit .fam-star { opacity: 1; transform: none; }
.fam-star i {
  position: absolute; left: -26px; top: .6em; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(163, 179, 168, .5); transition: background 1.2s, box-shadow 1.2s; transition-delay: inherit;
}
.fam-group.lit .fam-star i { background: #fffaf0; box-shadow: 0 0 10px 3px rgba(236, 217, 168, .8), 0 0 30px 8px rgba(201, 169, 106, .3); }
.fam-name { font-family: var(--display); font-size: 1.15rem; line-height: 1.45; }
/* bride's side mirrors the groom's */
.fam-bride .fam-list { padding-left: 0; padding-right: 28px; text-align: right; }
.fam-bride .fam-list::before { left: auto; right: 6px; }
.fam-bride .fam-star { transform: translateX(12px); }
.fam-bride .fam-star i { left: auto; right: -26px; }
.fam-bride.lit .fam-star { transform: none; }

/* the couple at the centre, joined to both families */
.fam-centre { position: relative; height: 170px; display: grid; place-items: center; align-content: center; gap: 10px; }
.fam-centre::before, .fam-centre::after {
  content: ""; position: absolute; top: 50%; height: 1px; width: 44px;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform: scaleX(0); transition: transform 1.6s var(--expo) .9s;
}
.fam-centre::before { right: calc(50% + 22px); transform-origin: right; }
.fam-centre::after { left: calc(50% + 22px); transform-origin: left; background: linear-gradient(270deg, transparent, var(--accent)); }
.fam-centre.lit::before, .fam-centre.lit::after { transform: scaleX(1); }
.fam-core {
  width: 18px; height: 18px; border-radius: 50%; background: #fffaf0;
  box-shadow: 0 0 16px 6px rgba(255, 246, 220, .85), 0 0 60px 20px rgba(201, 169, 106, .4);
  transform: scale(0); transition: transform 1.4s var(--expo) .4s;
  animation: pulse 3.4s ease-in-out infinite;
}
.fam-centre.lit .fam-core { transform: none; }
.fam-mono { font-family: var(--script); color: var(--accent); font-size: 1.2rem; opacity: 0; transition: opacity 1.4s var(--ease) 1.1s; }
.fam-centre.lit .fam-mono { opacity: 1; }

@media (max-width: 760px) {
  .fam-intro { margin-bottom: 28px; }
  .fam-sky { grid-template-columns: 1fr; }
  .fam-group { padding: 22px 20px; }
  .fam-title { text-align: center; }
  .fam-bride .fam-list { padding-right: 0; padding-left: 28px; text-align: left; }
  .fam-bride .fam-list::before { right: auto; left: 6px; }
  .fam-bride .fam-star { transform: translateX(-12px); }
  .fam-bride .fam-star i { right: auto; left: -26px; }
  .fam-centre { height: 110px; }
  .fam-centre::before, .fam-centre::after { left: 50%; right: auto; width: 1px; height: 28px; top: auto; background: linear-gradient(to bottom, transparent, var(--accent)); }
  .fam-centre::before { top: 0; transform-origin: top; transform: scaleY(0); }
  .fam-centre::after { bottom: 0; transform-origin: bottom; transform: scaleY(0); background: linear-gradient(to top, transparent, var(--accent)); }
  .fam-centre.lit::before, .fam-centre.lit::after { transform: scaleY(1); }
}
.lang-ml .fam-name { font-size: 1rem; }
.lang-ml .fam-title { font-size: 1.15rem; }

/* ============================================================
   Scroll-linked motion everywhere (follows the scroll both ways, like the verse)
   ============================================================ */
/* headings & lines: each word lights up and rises as you scroll */
.words .wd > span, .words.in .wd > span { transform: translateY(55%); opacity: .14; transition: transform 1s var(--expo), opacity 1s var(--ease), text-shadow 1s; transition-delay: 0s; }
.words .wd.lit > span { transform: none; opacity: 1; }
.section-title .wd.lit > span { text-shadow: 0 0 22px rgba(236, 217, 168, .25); }

/* at-a-glance rows slide in one by one */
.glance-card .glance-row, .glance-card .glance-actions,
.glance-card.shown .glance-row:not(.on), .glance-card.shown .glance-actions:not(.on) { opacity: .08; transform: translateX(44px); transition: opacity 1s var(--ease), transform 1.2s var(--expo); transition-delay: 0s; }
.glance-card .glance-row.on, .glance-card .glance-actions.on { opacity: 1; transform: none; }

/* couple: cards sweep in from both sides and meet; the & spins in; the line draws */
/* couple cards rise and zoom gently into place with the scroll */
.couple .couple-grid article:first-of-type.reveal, .couple .couple-grid article:last-of-type.reveal {
  transform: translateY(calc((1 - var(--p, 1)) * 60px)) scale(calc(.8 + var(--p, 1) * .2));
  transition: opacity 1.6s var(--ease), filter 1.6s var(--ease), transform .35s linear;
}
.couple-amp { transform: scale(calc(.3 + var(--p, 1) * .7)) rotate(calc((1 - var(--p, 1)) * -200deg)); opacity: var(--p, 1); transition: transform .35s linear, opacity .35s linear; }
.couple .couple-grid .couple-link path, .couple .couple-grid .couple-link.shown path { stroke-dashoffset: calc(1 - var(--p, 1)); transition: none; }

/* countdown rings turn and grow into place one after another */
.orbits .orbit-unit, .orbits.shown .orbit-unit:not(.on) { opacity: .1; transform: scale(.55) rotate(-140deg); transition: opacity 1.2s var(--ease), transform 1.6s var(--expo); transition-delay: 0s; }
.orbits .orbit-unit.on, .orbits.shown .orbit-unit.on { opacity: 1; transform: none; }

/* families: the thread draws with the scroll and each name lights up star by star */
.fam-group .fam-list::before, .fam-group.lit .fam-list::before { transform: scaleY(var(--p, 0)); transition: transform .35s linear; }
.fam-group .fam-star, .fam-group.lit .fam-star:not(.on) { opacity: .12; transform: translateX(-14px); transition: opacity 1s var(--ease), transform 1.2s var(--expo); transition-delay: 0s; }
.fam-bride .fam-star:not(.on), .fam-bride.lit .fam-star:not(.on) { transform: translateX(14px); }
.fam-group .fam-star.on { opacity: 1; transform: none; }
.fam-group.lit .fam-star:not(.on) i { background: rgba(163, 179, 168, .5); box-shadow: none; }
.fam-group .fam-star.on i { background: #fffaf0; box-shadow: 0 0 10px 3px rgba(236, 217, 168, .8), 0 0 30px 8px rgba(201, 169, 106, .3); }
.fam-centre.lit .fam-core { transform: scale(calc(.2 + var(--p, 1) * .8)); transition: transform .35s linear; }
@media (max-width: 760px) { .fam-group .fam-star:not(.on), .fam-bride.lit .fam-star:not(.on) { transform: translateX(-14px); } }

/* events: date, time and venue light up line by line */
.event dt, .event dd { opacity: .12; transform: translateY(10px); transition: opacity 1s var(--ease), transform 1.2s var(--expo); }
.event dt.on, .event dd.on { opacity: 1; transform: none; }

/* wishes form: fields rise one by one */
#rsvp-form > *, .rsvp-card.shown #rsvp-form > :not(.on) { opacity: .1; transform: translateY(20px); transition: opacity 1s var(--ease), transform 1.2s var(--expo); transition-delay: 0s; }
#rsvp-form > .on, .rsvp-card.shown #rsvp-form > .on { opacity: 1; transform: none; }

/* closing: the names grow into place */
.footer-names { transform: scale(calc(.82 + var(--p, 1) * .18)); transition: transform .35s linear; }

/* ============================================================
   Zoom moments
   ============================================================ */
/* opening: the camera zooms in onto the names */
body.ready .hero-names-wrap { animation: zoomToNames 2.8s var(--expo) .2s both; }
@keyframes zoomToNames { from { transform: scale(1.6); filter: blur(10px); opacity: 0; } to { transform: none; filter: none; opacity: 1; } }
/* verse: the Arabic grows as the two stars merge */
.verse-ar { transform: scale(calc(.78 + var(--vp, 1) * .3)); transition: transform .35s linear; }
/* headings zoom gently into place with the scroll */
.section-title { transform: scale(calc(.84 + var(--p, 1) * .16)); transition: transform .35s linear; }
/* countdown: the seconds pulse with every tick */
.o-val .num.tick { animation: tickZoom .7s var(--expo); }
@keyframes tickZoom { from { transform: scale(1.35); color: var(--gold-light); text-shadow: 0 0 18px rgba(236, 217, 168, .7); } to { transform: none; } }
/* maps zoom into focus when opened */
.event.map-open .event-map iframe { animation: mapZoom 1.4s var(--expo); }
@keyframes mapZoom { from { transform: scale(1.35); filter: blur(6px) grayscale(1) invert(.9) sepia(.35) hue-rotate(110deg) contrast(.9) brightness(.85); } }

/* ============================================================
   Content fades softly as it scrolls up towards the top of the screen
   ============================================================ */
.fade-out { opacity: var(--out, 1); transition: opacity .45s linear; }
.fade-out.reveal:not(.shown) { opacity: 0; }
.reveal.shown.fade-out { opacity: var(--out, 1); transition: opacity .45s linear, transform 2.2s var(--expo), filter 2s var(--ease); }
.fam-group.fade-out:not(.lit) { opacity: 0; }
.fam-group.lit.fade-out { opacity: var(--out, 1); transition: opacity .45s linear, transform 2s var(--expo); }
.couple-amp.fade-out { opacity: calc(var(--p, 1) * var(--out, 1)); }

/* ============================================================
   02 Couple: two stars glide together, burst, and the couple appears from the light
   (scroll-driven; only transform/opacity so it stays smooth on phones)
   --a approach 0→1 · --f flash · --b couple appears 0→1 · --c parents 0→1
   ============================================================ */
.couple { height: 230vh; padding: 0; }
.couple-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 70px 16px 30px;
}
.couple-sticky .sec-head { margin: 0; }
.cstage { position: relative; width: 100%; max-width: 980px; height: min(64vh, 520px); }
.cstage > * { position: absolute; left: 50%; top: 50%; will-change: transform, opacity; }

.cside { top: 40%; width: min(44vw, 320px); display: grid; justify-items: center; gap: 6px; text-align: center; }
.cside.groom { transform: translate3d(calc(-50% - (1 - var(--a, 0)) * min(27vw, 300px)), -50%, 0); }
.cside.bride { transform: translate3d(calc(-50% + (1 - var(--a, 0)) * min(27vw, 300px)), -50%, 0); }
.cside .label, .cside .cname { opacity: calc((1 - var(--a, 0) * 1.35)); }
.cname { font-size: clamp(1.3rem, 4.8vw, 2rem); line-height: 1.2; color: var(--ink); }

.cstar {
  width: 16px; height: 16px; border-radius: 50%; background: #fffaf0; margin-bottom: 8px;
  box-shadow: 0 0 14px 5px rgba(255, 246, 220, .9), 0 0 46px 14px rgba(201, 169, 106, .4);
}
.cside .cstar { transform: scale(calc(1 + var(--a, 0) * .5)); opacity: calc(1 - var(--b, 0) * 3); }

.cglow {
  top: 40%; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(236, 217, 168, .26), rgba(201, 169, 106, .07) 45%, transparent 70%);
  transform: scale(calc(.3 + var(--a, 0) * .9)); opacity: var(--a, 0);
}
.cflash {
  top: 40%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 252, 240, .95), rgba(236, 217, 168, .45) 28%, transparent 66%);
  transform: scale(calc(.2 + var(--f, 0) * 1.3)); opacity: var(--f, 0);
}
.cring { top: 40%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 1px solid var(--gold-light); opacity: 0; pointer-events: none; }
.couple.merging .cring { animation: ring 1.8s var(--ease) infinite; }

.cunion {
  width: min(92vw, 620px); display: grid; justify-items: center; gap: 8px; text-align: center;
  transform: translate3d(-50%, calc(-50% + (1 - var(--b, 0)) * 40px), 0) scale(calc(.72 + var(--b, 0) * .28));
  opacity: var(--b, 0);
}
.cunion .cstar { width: 18px; height: 18px; }
.cnames { font-weight: 400; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.2; display: grid; justify-items: center; margin: 2px 0 8px; }
.cnames .script { color: var(--ink); text-shadow: 0 0 30px rgba(236, 217, 168, .3); }
.cnames em { font-family: var(--script); font-style: normal; color: var(--accent); font-size: .6em; line-height: 1.4; }
.cunion .parents { font-size: .95rem; transform: translateY(calc((1 - var(--c, 0)) * 12px)); }
.cunion .p1 { opacity: calc(var(--c, 0) * 2); }
.cunion .p2 { opacity: calc(var(--c, 0) * 2 - 1); }

@media (max-width: 760px) {
  .cstage { height: min(70vh, 580px); }
  .cside { top: 36%; width: 46vw; }
  .cside.groom { transform: translate3d(calc(-50% - (1 - var(--a, 0)) * 25vw), -50%, 0); }
  .cside.bride { transform: translate3d(calc(-50% + (1 - var(--a, 0)) * 25vw), -50%, 0); }
  .cname { font-size: clamp(1.05rem, 5vw, 1.3rem); }
  .cglow, .cflash, .cring { top: 36%; }
  .cunion .parents { font-size: .86rem; max-width: 34ch; text-wrap: balance; }
}
.lang-ml .cname { font-size: clamp(.95rem, 4.4vw, 1.5rem); }
.lang-ml .cnames { font-size: clamp(1.5rem, 6vw, 2.6rem); }

/* ============================================================
   Comments: a plain, minimal comment box
   ============================================================ */
.comment-form { max-width: 560px; margin: 0 auto; display: grid; gap: 12px; text-align: left; }
.comment-form input, .comment-form textarea {
  font: inherit; font-size: 1.05rem; color: var(--ink); width: 100%;
  background: rgba(10, 33, 27, .55); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px;
  resize: vertical; transition: border-color .3s, box-shadow .3s;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 169, 106, .15); }
.comment-form ::placeholder { color: var(--muted); opacity: .8; }
.comment-form .btn { justify-self: end; padding: 12px 26px; }
.comments .rsvp-thanks { max-width: 560px; margin: 0 auto; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10, 33, 27, .45); }
.comments .thanks-note { color: var(--ink); margin: 0; }

/* ===== Short version: the verse on the opening screen, the couple on one card ===== */
.hero-verse { display: grid; gap: 2px; margin-top: 6px; color: var(--muted); font-family: var(--display); font-style: italic; font-size: 1.05rem; }
.hero-verse-ar { font-family: var(--arabic); font-style: normal; font-size: 1.5rem; color: var(--gold-light); }
.pair-card { max-width: 860px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 44px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.pair-side { display: grid; gap: 8px; justify-items: center; }
.pair-name { font-size: clamp(2rem, 4.4vw, 2.8rem); line-height: 1.1; color: var(--ink); }
.pair-amp { font-size: clamp(2.6rem, 6vw, 3.6rem); color: var(--accent); line-height: 1; }
.pair .parents { font-size: .98rem; max-width: 30ch; text-wrap: balance; }
@media (max-width: 760px) {
  .pair-card { grid-template-columns: 1fr; gap: 14px; padding: 28px 20px; }
  .pair-amp { font-size: 2.4rem; }
  .hero-verse { font-size: .95rem; }
  .hero-verse-ar { font-size: 1.3rem; }
}

/* ===== Moments: animations that play once as each part arrives (js: data-moment → .play) ===== */
@property --trace { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes trace { 0% { opacity: 0; --trace: 0deg; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; --trace: 360deg; } }
@keyframes ampIn { 0% { opacity: 0; transform: scale(.3) rotate(-35deg); } 60% { opacity: 1; transform: scale(1.18) rotate(6deg); } 100% { opacity: 1; transform: none; } }
@keyframes ampGlow { 50% { text-shadow: 0 0 26px rgba(236, 217, 168, .75), 0 0 60px rgba(201, 169, 106, .35); } }
@keyframes sweep { from { transform: translateX(-120%) skewX(-12deg); } to { transform: translateX(220%) skewX(-12deg); } }
@keyframes verseGlow { 50% { text-shadow: 0 0 22px rgba(236, 217, 168, .55); } }

.pair-card { position: relative; overflow: hidden; }
.pair-card::before {   /* a line of light runs once around the card's border */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--trace), transparent 0 72%, rgba(236, 217, 168, .95) 88%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.pair-card.play::before { animation: trace 3.4s var(--ease) .2s forwards; }
.pair-amp { animation: ampGlow 3.6s ease-in-out 2.4s infinite; }

.event::after {        /* soft light sweeping across each event card */
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(236, 217, 168, .1), transparent);
}
.event.play::after { animation: sweep 1.8s var(--ease) .5s; }
.hero-verse-ar { animation: verseGlow 5s ease-in-out 3s infinite; }

@media (prefers-reduced-motion: no-preference) {
  .pair-side > *, .pair-amp { opacity: 0; }
  .pair-side > * { transform: translateY(18px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1.2s var(--expo), filter 1s var(--ease); }
  .pair-card.play .pair-side > * { opacity: 1; transform: none; filter: none; }
  .pair-card.play .pair-side:first-child > :nth-child(1) { transition-delay: .3s; }
  .pair-card.play .pair-side:first-child > :nth-child(2) { transition-delay: .5s; }
  .pair-card.play .pair-side:first-child > :nth-child(3) { transition-delay: .75s; }
  .pair-card.play .pair-side:last-child > :nth-child(1) { transition-delay: 1.3s; }
  .pair-card.play .pair-side:last-child > :nth-child(2) { transition-delay: 1.5s; }
  .pair-card.play .pair-side:last-child > :nth-child(3) { transition-delay: 1.75s; }
  .pair-card.play .pair-amp { animation: ampIn 1.2s var(--expo) .9s forwards, ampGlow 3.6s ease-in-out 2.4s infinite; }

  .event[data-moment] .event-sym path, .event[data-moment] .event-sym circle { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) .35s; }
  .event.play .event-sym path, .event.play .event-sym circle { stroke-dashoffset: 0; }
}

/* ===== Countdown: one simple row (numbers and labels, thin gold dividers) ===== */
.orbits { grid-template-columns: repeat(4, 1fr); gap: 0; max-width: 640px; }
.orbit-unit { aspect-ratio: auto; padding: 8px 0; }
.orbit-unit + .orbit-unit { border-left: 1px solid rgba(201, 169, 106, .35); }
.orbit-unit svg { display: none; }
.o-val { position: static; gap: 6px; }
.o-val .num { font-size: clamp(2.1rem, 9vw, 3.6rem); color: var(--gold-light); }
.orbits .orbit-unit { transform: translateY(24px); }
.orbits.shown .orbit-unit { transform: none; }
@media (max-width: 520px) { .orbits { grid-template-columns: repeat(4, 1fr); max-width: none; gap: 0; } .o-val small { font-size: .56rem; letter-spacing: .18em; } }

/* ===== Phones: Nikah and Reception together, as one joined card (no tabs) ===== */
@media (max-width: 760px) {
  .event-tabs, .map-toggle, .event-actions .gcal { display: none !important; }
  .event-grid { gap: 0; }
  .event-grid .event.off { display: block; }
  .event-grid .event { padding: 20px 18px 18px; }
  .event-grid .event:first-child { border-radius: 22px 22px 0 0; border-bottom: 0; }
  .event-grid .event:last-child { border-radius: 0 0 22px 22px; border-top: 1px dashed rgba(201, 169, 106, .4); }
  .event-sym { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; margin: 0; }
  .event-ar { font-size: 1.05rem; }
  .event h3 { font-size: 1.75rem; margin-bottom: 8px; padding-right: 44px; }
  .event dl { gap: 4px 14px; margin-bottom: 12px; }
  .event dd { font-size: .95rem; line-height: 1.45; }
  .event .address { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .84rem; color: var(--muted); }
  .event-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .event-actions .dir { grid-column: auto; }
  .event-actions .link { min-height: 40px; font-size: .66rem; }
}

/* ============================================================
   Quicker motion: everything arrives in about half the time,
   and scroll-linked parts finish within a short scroll
   ============================================================ */
.reveal { transition: opacity .8s var(--ease), transform .9s var(--expo), filter .8s var(--ease); }
.words .wd > span, .words.in .wd > span { transition: transform .5s var(--expo), opacity .5s var(--ease), text-shadow .5s; transition-delay: 0s; }
.hero-bismillah, .hero-fade { transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.ready .hero-bismillah { transition-delay: .15s; }
body.ready .hero-fade { transition-delay: 1.1s; }
body.ready .hero-names .w1 { animation: write 1.5s var(--ease) .3s forwards, shimmer 6s ease-in-out 2.4s infinite; }
body.ready .hero-names .w2 { animation: write 1.5s var(--ease) .75s forwards, shimmer 6s ease-in-out 2.8s infinite; }
body.ready .topbar { transition-delay: .9s; }
.fade-out { transition: opacity .2s linear; }
main > section.divided::before { transition: transform 1.2s var(--expo); }
.event-map { transition: clip-path 1s var(--expo) .3s; }
.event dt, .event dd { transition: opacity .45s var(--ease), transform .55s var(--expo); }
#rsvp-form > *, .rsvp-card.shown #rsvp-form > :not(.on) { transition: opacity .45s var(--ease), transform .55s var(--expo); transition-delay: 0s; }
.orbits .orbit-unit, .orbits.shown .orbit-unit:not(.on) { opacity: .1; transform: translateY(16px); transition: opacity .45s var(--ease), transform .55s var(--expo); transition-delay: 0s; }
.orbits .orbit-unit.on, .orbits.shown .orbit-unit.on { opacity: 1; transform: none; }
.event.play::after { animation: sweep 1.1s var(--ease) .2s; }
.pair-card.play::before { animation: trace 2s var(--ease) .1s forwards; }
@media (prefers-reduced-motion: no-preference) {
  .pair-side > * { transition: opacity .6s var(--ease), transform .7s var(--expo), filter .6s var(--ease); }
  .pair-card.play .pair-side:first-child > :nth-child(1) { transition-delay: .1s; }
  .pair-card.play .pair-side:first-child > :nth-child(2) { transition-delay: .2s; }
  .pair-card.play .pair-side:first-child > :nth-child(3) { transition-delay: .3s; }
  .pair-card.play .pair-side:last-child > :nth-child(1) { transition-delay: .55s; }
  .pair-card.play .pair-side:last-child > :nth-child(2) { transition-delay: .65s; }
  .pair-card.play .pair-side:last-child > :nth-child(3) { transition-delay: .75s; }
  .pair-card.play .pair-amp { animation: ampIn .8s var(--expo) .4s forwards, ampGlow 3.6s ease-in-out 1.4s infinite; }
  .event[data-moment] .event-sym path, .event[data-moment] .event-sym circle { transition: stroke-dashoffset 1s var(--ease) .15s; }
}

/* ===== Venue: the name stands out; the address is small and faded ===== */
.event dd strong.venue { font-size: 1.05rem; }
.event dd .address, .event .address { display: block; font-size: .74rem; line-height: 1.45; color: var(--muted); opacity: .55; margin-top: 2px; }

/* ===== Opening screen: every line appears in reading order, top to bottom ===== */
.hero-bismillah, .hero-fade { transition: opacity .7s var(--ease), transform .7s var(--ease); }
body.ready .hero > :nth-child(1) { transition-delay: .1s; }    /* Bismillah */
body.ready .hero > :nth-child(2) { transition-delay: .3s; }    /* Together with their families */
body.ready .hero-names .w1 { animation: write 1.3s var(--ease) .55s forwards, shimmer 6s ease-in-out 2.4s infinite; }
body.ready .hero-names .w2 { animation: write 1.3s var(--ease) .9s forwards, shimmer 6s ease-in-out 2.8s infinite; }
body.ready .hero-names em { transition-delay: .75s; }
body.ready .hero > :nth-child(4) { transition-delay: 1.25s; }  /* Arabic names */
body.ready .hero > :nth-child(5) { transition-delay: 1.4s; }   /* invite you to celebrate */
body.ready .hero > :nth-child(6) { transition-delay: 1.55s; }  /* date */
body.ready .hero > :nth-child(7) { transition-delay: 1.7s; }   /* verse */
body.ready .hero > :nth-child(8) { transition-delay: 1.85s; }  /* Malayalam button */

/* ============================================================
   Smooth motion: a little more time and a soft glide (easeOutCubic)
   instead of the snappy expo curve. Order of appearance is unchanged.
   ============================================================ */
:root { --smooth: cubic-bezier(.33, 1, .68, 1); }
.reveal { transition: opacity 1.1s var(--ease), transform 1.2s var(--smooth), filter 1.1s var(--ease); }
.words .wd > span, .words.in .wd > span { transition: transform .8s var(--smooth), opacity .8s var(--ease), text-shadow .8s; transition-delay: 0s; }
.fade-out { transition: opacity .35s var(--ease); }
main > section.divided::before { transition: transform 1.6s var(--smooth); }
.event dt, .event dd { transition: opacity .7s var(--ease), transform .8s var(--smooth); }
#rsvp-form > *, .rsvp-card.shown #rsvp-form > :not(.on) { transition: opacity .7s var(--ease), transform .8s var(--smooth); transition-delay: 0s; }
.orbits .orbit-unit, .orbits.shown .orbit-unit:not(.on) { transition: opacity .7s var(--ease), transform .8s var(--smooth); transition-delay: 0s; }
.event.reveal { transition: opacity 1.1s var(--ease), transform 1.2s var(--smooth), filter 1.1s var(--ease); }
.event.play::after { animation: sweep 1.6s var(--ease) .3s; }
.pair-card.play::before { animation: trace 2.6s var(--ease) .15s forwards; }

/* opening screen: same top-to-bottom order, a calmer pace */
.hero-bismillah, .hero-fade { transition: opacity 1s var(--ease), transform 1s var(--smooth); }
body.ready .hero > :nth-child(1) { transition-delay: .15s; }
body.ready .hero > :nth-child(2) { transition-delay: .45s; }
body.ready .hero-names .w1 { animation: write 1.7s var(--ease) .8s forwards, shimmer 6s ease-in-out 3.2s infinite; }
body.ready .hero-names .w2 { animation: write 1.7s var(--ease) 1.25s forwards, shimmer 6s ease-in-out 3.6s infinite; }
body.ready .hero-names em { transition: opacity 1s var(--ease); transition-delay: 1.05s; }
body.ready .hero > :nth-child(4) { transition-delay: 1.75s; }
body.ready .hero > :nth-child(5) { transition-delay: 1.95s; }
body.ready .hero > :nth-child(6) { transition-delay: 2.15s; }
body.ready .hero > :nth-child(7) { transition-delay: 2.35s; }
body.ready .hero > :nth-child(8) { transition-delay: 2.55s; }

@media (prefers-reduced-motion: no-preference) {
  .pair-side > * { transition: opacity .9s var(--ease), transform 1s var(--smooth), filter .9s var(--ease); }
  .pair-card.play .pair-side:first-child > :nth-child(1) { transition-delay: .15s; }
  .pair-card.play .pair-side:first-child > :nth-child(2) { transition-delay: .3s; }
  .pair-card.play .pair-side:first-child > :nth-child(3) { transition-delay: .45s; }
  .pair-card.play .pair-side:last-child > :nth-child(1) { transition-delay: .85s; }
  .pair-card.play .pair-side:last-child > :nth-child(2) { transition-delay: 1s; }
  .pair-card.play .pair-side:last-child > :nth-child(3) { transition-delay: 1.15s; }
  .pair-card.play .pair-amp { animation: ampIn 1.1s var(--smooth) .6s forwards, ampGlow 3.6s ease-in-out 2s infinite; }
  .event[data-moment] .event-sym path, .event[data-moment] .event-sym circle { transition: stroke-dashoffset 1.4s var(--ease) .2s; }
}
