/* IFPA Diwali Knowledge Meet: festive maroon and gold, white type, cream programme card.
   Structure: tokens -> living background -> base -> controls -> cover -> hero -> sections -> footer -> music -> motion -> breakpoints.
   Colours and lettering follow the printed card: purple glitter-floral paper, white Times-style serif, flowing script names. */

:root {
  color-scheme: dark;
  --bg: #7a1428;        /* deep festive maroon */
  --bg-mid: #6a0f22;
  --bg-deep: #4e0a19;   /* leaves, button text */
  --bg-ink: #2e0510;    /* darkest shadow */
  --gold: #f3c969; --gold-deep: #c9922e; --cream: #fff6e3; --navy: #1d2a5b; --crimson: #b0123f;
  --display: "Playfair Display", "Tinos", "Times New Roman", Georgia, serif;
  --white: #ffffff;         /* all main type, like the card */
  --lilac: #fff3e0;         /* secondary type: 4.7:1+ even over the lightest blossoms */
  --r-sm: 14px; --r-md: 18px; --r-lg: 30px; /* radius scale */
  --fs-label: 0.8rem;       /* smallest allowed text (12.8px) */
  --line: rgba(255, 255, 255, 0.6);
  --line-soft: rgba(255, 255, 255, 0.28);
  --glass: rgba(255, 255, 255, 0.09);
  --serif: "Tinos", "Noto Serif Tamil", "Noto Serif Kannada", "Times New Roman", "Liberation Serif", Times, serif;
  --script: "Playball", "Great Vibes", "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --glow: 0 0 22px rgba(255, 255, 255, 0.32), 0 2px 16px rgba(46, 5, 16, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-variant-numeric: lining-nums;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--white);
  background: var(--bg);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  text-shadow: 0 1px 14px rgba(46, 5, 16, 0.35);
  -webkit-tap-highlight-color: transparent;
}

body:not(.is-ready) .site { visibility: hidden; }
html.is-locked, html.is-locked body { overflow: hidden; }
h1, h2, h3, p, figure { margin: 0; }
img { max-width: 100%; }

/* ---------- Living background: floral paper, glitter, drifting light ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(46, 5, 16, 0.42) 100%); }
.bg-floral {
  position: absolute;
  inset: -6%;
  background: url("../assets/bg-diwali.jpg") center / cover no-repeat;
  transform: scale(1.12);
  will-change: transform;
  animation: drift 46s ease-in-out infinite alternate;
}
.bg-glow { --mx: 50%; --my: 18%; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.2), transparent 42%); transition: background 0.4s ease-out; }
.bg-grain { position: absolute; inset: 0; background: url("../assets/grain.png") 0 0 / 320px repeat; opacity: 0.9; }
.sparkles { position: absolute; inset: 0; }
.spark {
  position: absolute;
  width: var(--s);
  height: var(--s);
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: twinkle 4s ease-in-out infinite;
}

.progress { position: fixed; z-index: 45; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), #fff); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 10px rgba(255, 255, 255, 0.7); }

/* ---------- Shared type ---------- */
.eyebrow {
  margin: 1.8rem 0 0.4rem;
  font-size: 0.92rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  padding-left: 0.34em; /* optical centring of tracked caps */
}
.script-title, .cover-script { font-family: var(--script); font-weight: 400; line-height: 1.1; text-shadow: var(--glow); }
.script-title { font-size: clamp(3.1rem, 11vw, 4.8rem); }
.caps-title { font-size: clamp(1.15rem, 3.6vw, 1.5rem); font-weight: 400; letter-spacing: 0.24em; text-transform: uppercase; padding-left: 0.24em; }

.flourish { width: min(300px, 72%); height: 26px; margin: 0.9rem auto 1.4rem; background: url("../assets/flourish.svg") center / contain no-repeat; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35)); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  min-height: 2.9rem;
  padding: 0.8rem 1.7rem;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: var(--bg-deep);
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 14px 30px -14px rgba(30, 3, 10, 0.7);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease);
}

/* ---------- Cover: the card, with two doors that part ---------- */
.cover { position: fixed; inset: 0; z-index: 30; display: flex; overflow: hidden auto; overscroll-behavior: contain; padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.6rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.cover[hidden] { display: none; }
.door {
  position: fixed;
  inset: 0;
  background:
    url("../assets/grain.png") 0 0 / 320px repeat,
    radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(46, 5, 16, 0.42) 100%),
    url("../assets/bg-diwali.jpg") center / cover no-repeat,
    var(--bg);
  transition: transform 1.5s cubic-bezier(0.7, 0, 0.2, 1) 0.35s;
  will-change: transform;
}
.door-l { clip-path: inset(0 50% 0 0); }
.door-r { clip-path: inset(0 0 0 50%); }
/* the card's double frame, split across the two doors */
.door::before { content: ""; position: absolute; inset: 14px; border: 1px solid var(--line); box-shadow: inset 0 0 0 6px transparent, 0 0 0 5px transparent; }
.door-l::before { border-right: 0; border-radius: 26px 0 0 26px; }
.door-r::before { border-left: 0; border-radius: 0 26px 26px 0; }
.door::after { content: ""; position: absolute; inset: 22px; border: 1px solid var(--line-soft); }
.door-l::after { border-right: 0; border-radius: 20px 0 0 20px; }
.door-r::after { border-left: 0; border-radius: 0 20px 20px 0; }
.cover-seam { position: fixed; top: 14px; bottom: 14px; left: 50%; width: 1px; background: linear-gradient(transparent, rgba(255, 255, 255, 0.75), transparent); transition: opacity 0.4s ease; }

body:not(.fonts-ready) .cover-inner { opacity: 0; }
.cover-inner { position: relative; z-index: 2; width: 100%; max-width: 27rem; margin: auto; padding: 2.4rem 0 1.4rem; text-align: center; transition: opacity 0.55s ease, transform 0.8s var(--ease); }
.cover .deity-hero { width: min(118px, 34vw); }
.cover .eyebrow { margin-top: 1.1rem; }
.cover-script { margin-top: 0.1rem; font-size: clamp(2.6rem, 11.5vw, 3.5rem); }
.cover .flourish { margin: 0.35rem auto 0.7rem; }
.cover-names { font-family: var(--script); font-size: clamp(3.1rem, 15vw, 4.3rem); line-height: 1.02; text-shadow: var(--glow); }
.cover-names .person { display: block; }
.cover-names .union { display: block; font-size: 0.55em; line-height: 1; opacity: 0.9; }
.cover-date { margin-top: 0.8rem; font-size: 1.1rem; letter-spacing: 0.3em; padding-left: 0.3em; }
.cover-open { margin-top: 1.4rem; animation: pulse 2.6s ease-out infinite; }
.cover-hint { margin-top: 0.9rem; color: var(--lilac); font-size: 0.98rem; font-style: italic; }

.cover.is-leaving { pointer-events: none; }
.cover.is-leaving .cover-inner { opacity: 0; transform: scale(1.06) translateY(-12px); }
.cover.is-leaving .cover-seam { opacity: 0; }
.cover.is-leaving .door-l { transform: translateX(-102%); }
.cover.is-leaving .door-r { transform: translateX(102%); }

/* ---------- Deity (line art lifted from the card, white on purple) ---------- */
.deity { position: relative; margin: 0 auto; width: min(230px, 62vw); aspect-ratio: 650 / 466; }
.deity img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35)); }
.deity figcaption { display: none; }
.deity.is-empty { display: none; }
.deity::before { content: ""; position: absolute; inset: -22% -12%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.22), transparent); animation: halo 5s ease-in-out infinite; z-index: -1; }

/* ---------- Petals (generated by main.js) ---------- */
.petals { position: fixed; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }
.petal-fall { position: absolute; top: -40px; will-change: transform; animation: fall linear infinite backwards; }
.petal { display: block; width: var(--size); height: var(--size); opacity: 0.85; animation: flutter ease-in-out infinite alternate; }
.petal-jasmine { background: url("../assets/jasmine.svg") center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(46, 5, 16, 0.45)); }
.petal-lilac, .petal-blush { border-radius: 0 100% 0 100%; height: calc(var(--size) * 0.75); box-shadow: 0 1px 3px rgba(46, 5, 16, 0.3); }
.petal-lilac { background: linear-gradient(135deg, #ffe08a, #f29a1f); }
.petal-blush { background: linear-gradient(135deg, #ffc9a3, #e8502a); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 130ms); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero .reveal { transform: translateY(22px) scale(0.95); transition-duration: 1.1s; transition-delay: calc(var(--i, 0) * 200ms); }
.hero .reveal.is-visible { transform: none; }
.flourish.reveal { transform: scaleX(0.25); }
.flourish.reveal.is-visible { transform: none; }
.stagger:not(.is-visible) > * { opacity: 0; }
.stagger.is-visible > * { animation: rise 0.9s var(--ease) both; }
.stagger.is-visible > :nth-child(2) { animation-delay: 0.15s; }
.stagger.is-visible > :nth-child(3) { animation-delay: 0.3s; }
.stagger.is-visible > :nth-child(4) { animation-delay: 0.45s; }

/* ---------- Hero ---------- */
.site { position: relative; z-index: 1; outline: none; }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 6.5rem); min-height: calc(100svh - 6.5rem); padding: 4rem 1.4rem 3.2rem; text-align: center; }
.hero .deity { width: min(200px, 54vw, 26vh); }
.hero-names { font-family: var(--script); font-weight: 400; font-size: clamp(3.4rem, min(17vw, 13.5vh), 7.6rem); line-height: 1.02; text-shadow: var(--glow); }
.hero-names .person { display: block; }
.hero-names .union { display: block; font-size: 0.5em; line-height: 1.1; margin: 0.05em 0; }
.ch { display: inline-block; opacity: 0; transform: translateY(0.35em) scale(0.9); filter: blur(10px); }
body.is-open .ch { animation: letter 1.1s var(--ease) forwards; animation-delay: calc(1.3s + var(--n) * 85ms); }
body.is-open .hero-names { animation: nameglow 6s ease-in-out 4s infinite; }

.datebox { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(26rem, 100%); margin: 0.2rem auto 0; }
.db-month, .db-year { font-size: clamp(1.25rem, 4.6vw, 1.55rem); letter-spacing: 0.04em; }
.db-month { text-align: right; padding-right: 1.2rem; }
.db-year { text-align: left; padding-left: 1.2rem; }
.db-day { display: flex; flex-direction: column; align-items: center; padding: 0.15rem 1.5rem 0.25rem; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); line-height: 1; }
.db-day b { font-size: clamp(3.6rem, 14vw, 5.2rem); font-weight: 700; line-height: 1; }
.db-day i { margin-top: 0.15rem; font-style: normal; font-size: clamp(1.1rem, 3.6vw, 1.3rem); letter-spacing: 0.1em; }
.hero-time { margin-top: 1.1rem; font-size: 1.4rem; letter-spacing: 0.05em; }
.hero-actions { margin: 1.7rem 0 0; }


/* Scroll cue: a glass pill with bouncing chevrons, floating over the first screen */
.scroll-cue {
  position: fixed;
  z-index: 34;
  left: 50%;
  bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 1.3rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(78, 10, 25, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  box-shadow: 0 12px 26px -12px rgba(25, 2, 8, 0.85);
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  touch-action: manipulation;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
body.is-open .scroll-cue:not(.is-away) { opacity: 1; visibility: visible; transition-delay: 4.2s, 4.2s; animation: cuepulse 2.4s ease-out 5s infinite; }
.sc-text { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; padding-left: 0.2em; white-space: nowrap; }
.sc-arrows { width: 20px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sc-arrows path:first-child { animation: chev 1.4s ease-in-out infinite; }
.sc-arrows path:last-child { animation: chev 1.4s ease-in-out 0.2s infinite; }

/* ---------- Sections ---------- */
.section { position: relative; padding: 4.2rem 1.1rem; text-align: center; }
.wrap { max-width: 840px; margin: 0 auto; }
.panel {
  position: relative;
  padding: 3.2rem 1.4rem 3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.12), rgba(46, 5, 16, 0.2));
  box-shadow: 0 40px 70px -40px rgba(25, 2, 8, 0.8), inset 0 0 60px rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.panel::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--line-soft); border-radius: 24px; pointer-events: none; }

.hosts { max-width: 36rem; margin: 0 auto 1.1rem; }
.hosts-line { margin: 0.3rem 0 0; font-size: 1.5rem; line-height: 1.45; }
.hosts-line strong, .couple-parents strong { font-weight: 700; }
.title { font-weight: 400; }
.host-name { white-space: nowrap; }
.amp { font-weight: 400; }
.hosts-place { margin-top: 0.2rem; color: var(--lilac); font-size: 1.12rem; }
.lede { max-width: 31rem; margin: 0 auto; font-size: 1.3rem; line-height: 1.65; }

.couple { display: grid; gap: 0.2rem; margin: 1.6rem auto 0; }
.person-card { text-align: center; }
.couple-name { font-family: var(--script); font-weight: 400; font-size: clamp(3.4rem, 12.5vw, 5rem); line-height: 1.12; text-shadow: var(--glow); }
.couple-join { font-family: var(--script); font-size: clamp(2.2rem, 8vw, 3rem); line-height: 1.1; }
.couple-lead { margin-top: 0.4rem; font-size: 1.25rem; }
.couple-parents { margin-top: 0.3rem; font-size: 1.4rem; line-height: 1.5; }
.couple-place { margin-top: 0.15rem; color: var(--lilac); font-size: 1.1rem; }

/* Countdown */
.band { position: relative; padding: 3.4rem 1rem 3.6rem; text-align: center; }
.ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; max-width: 640px; margin: 1.8rem auto 0; }
.tick { padding: 1.05rem 0.3rem 0.9rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--glass); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); box-shadow: 0 18px 30px -22px rgba(25, 2, 8, 0.8); }
.tick-num { display: block; font-size: clamp(2.1rem, 5.4vw, 3.1rem); font-weight: 700; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.tick-num.bump { animation: bump 0.45s var(--ease); }
.tick-label { display: block; margin-top: 0.5rem; font-size: var(--fs-label); letter-spacing: 0.2em; text-transform: uppercase; padding-left: 0.2em; }
.arrived { margin: 1.2rem 0 0; font-style: italic; }

/* Venue */
.venue-at { margin-top: 0.7rem; font-size: 1.5rem; line-height: 1; }
.venue-name { margin-top: 0.3rem; font-size: clamp(1.9rem, 7.4vw, 2.7rem); letter-spacing: 0.2em; padding-left: 0.2em; text-transform: uppercase; text-shadow: var(--glow); }
.venue-sub { margin-top: 0.3rem; font-size: clamp(1.4rem, 5vw, 1.7rem); }
.venue-address { max-width: 25rem; margin: 0.6rem auto 0; font-size: 1.25rem; line-height: 1.55; }
.map-frame { max-width: 720px; margin: 2rem auto 0; padding: 7px; border: 1px solid var(--line); border-radius: 22px; background: var(--glass); box-shadow: 0 30px 50px -30px rgba(25, 2, 8, 0.85); }
.map-frame { position: relative; }
.map-frame.is-locked iframe { pointer-events: none; }
.map-lock {
  position: absolute;
  z-index: 2;
  inset: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 1rem;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(transparent 55%, rgba(46, 5, 16, 0.55));
  color: #fff;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 8px rgba(25, 2, 8, 0.8);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.map-lock[hidden] { display: none; }
.map-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: var(--bg-mid); }

.events { display: grid; justify-content: center; margin: 1.6rem auto 0; }
.event { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.event-name { font-size: 0.9rem; letter-spacing: 0.26em; text-transform: uppercase; padding-left: 0.26em; }
.event-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 0; }
.textlink {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: #fff;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}

/* Closing blessing */
.closing { padding-bottom: 2.5rem; }
.closing .wrap { max-width: 34rem; }
.closing-line { margin-bottom: 1.4rem; font-size: 1.3rem; line-height: 1.7; }
.closing-regards { margin-top: 2.4rem; font-size: 1.25rem; letter-spacing: 0.04em; }
.closing-names { margin-top: 0.5rem; font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 700; letter-spacing: 0.06em; text-shadow: var(--glow); }
.closing-family { margin-top: 0.2rem; font-size: 1.4rem; }
.closing .flourish { margin-top: 2rem; }

/* ---------- Footer ---------- */
.footer { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding: 1.6rem 1rem calc(2.8rem + env(safe-area-inset-bottom, 0px)); text-align: center; }
.footer-line { font-size: 0.88rem; letter-spacing: 0.22em; text-transform: uppercase; }
.credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.3rem 0.9rem; }
.credit-text { color: var(--lilac); font-size: 0.92rem; letter-spacing: 0.06em; }
.enquire {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.15rem 0 1rem;
  border-radius: 999px;
  background: #147a3d;
  color: #fff;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-shadow: none;
  touch-action: manipulation;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.6);
  transition: background 0.25s ease, transform 0.3s var(--ease);
}
.enquire svg { width: 1.15rem; height: 1.15rem; flex: none; }
.footer { padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)); } /* room for the quick bar and the music button */

.noscript { position: relative; z-index: 50; max-width: 36rem; margin: 2rem auto; text-align: center; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---------- Music button ---------- */
.music-btn {
  position: fixed;
  z-index: 36;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(78, 10, 25, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(25, 2, 8, 0.8);
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: opacity 0.6s ease, transform 0.6s var(--ease), visibility 0s linear 0.6s;
}
.music-btn[hidden] { display: none; }
.music-btn.is-shown { opacity: 1; visibility: visible; transform: none; transition-delay: 1.6s, 1.6s, 0s; }
.music-btn svg { width: 22px; height: 22px; }
.music-btn .bar { fill: currentColor; transform-box: fill-box; transform-origin: center bottom; transform: scaleY(0.55); }
.music-btn .slash { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.music-btn[aria-pressed="true"] .slash { display: none; }
.music-btn[aria-pressed="true"] .b1 { animation: eq 0.9s ease-in-out infinite alternate; }
.music-btn[aria-pressed="true"] .b2 { animation: eq 0.7s ease-in-out -0.3s infinite alternate; }
.music-btn[aria-pressed="true"] .b3 { animation: eq 1.1s ease-in-out -0.6s infinite alternate; }

@media (hover: hover) {
  .btn:hover { background: var(--lilac); transform: translateY(-2px); }
  .enquire:hover { background: #0f6431; transform: translateY(-2px); }
  .textlink:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
}

/* ---------- Keyframes ---------- */
@keyframes drift { from { translate: -1.5% 0; } to { translate: 1.5% -1.5%; } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 50% { opacity: 0.95; transform: scale(1) rotate(45deg); } }
@keyframes halo { 0%, 100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes fall { from { transform: translate3d(0, -6vh, 0); } to { transform: translate3d(var(--drift), 108vh, 0); } }
@keyframes flutter { from { transform: translateX(-14px) rotate(-25deg) rotateY(0deg); } to { transform: translateX(14px) rotate(35deg) rotateY(160deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes bump { from { opacity: 0.35; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); } 70%, 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }
@keyframes eq { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
@keyframes letter { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes nameglow { 0%, 100% { text-shadow: 0 0 18px rgba(255, 255, 255, 0.25), 0 2px 16px rgba(46, 5, 16, 0.45); } 50% { text-shadow: 0 0 34px rgba(255, 255, 255, 0.6), 0 2px 16px rgba(46, 5, 16, 0.45); } }
@keyframes chev { 0%, 100% { opacity: 0.25; transform: translateY(-2px); } 50% { opacity: 1; transform: translateY(3px); } }
@keyframes cuepulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); } 70%, 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Breakpoints ---------- */
@media (min-width: 740px) {
  .panel { padding: 4rem 3rem 3.4rem; }
  .section { padding: 5rem 1.25rem; }
  .cover .deity-hero { width: 150px; }
  .hero .deity { width: 220px; }
}

@media (min-width: 1024px) {
  body { font-size: 1.3rem; }
  .wrap { max-width: 900px; }
  .hosts-line { font-size: 1.75rem; }
  .hosts-place, .couple-place { font-size: 1.25rem; }
  .lede, .closing-line { font-size: 1.5rem; }
  .couple-lead { font-size: 1.4rem; }
  .couple-parents { font-size: 1.6rem; }
  .venue-address { font-size: 1.4rem; max-width: 30rem; }
  .closing .wrap { max-width: 40rem; }
  .tick-num { font-size: 3.4rem; }
  .textlink, .btn { font-size: 1rem; }
}

@media (max-width: 520px) {
  .ticks { grid-template-columns: 1fr 1fr; gap: 0.6rem; max-width: 19rem; }
  .map-frame iframe { aspect-ratio: 4 / 3; }
  .db-month { padding-right: 0.8rem; }
  .db-year { padding-left: 0.8rem; }
  .db-day { padding-inline: 1rem; }
}

@media (max-width: 400px) {
  .scroll-cue { padding-inline: 0.9rem; }
}

@media (max-width: 360px) {
  .scroll-cue { left: calc(50% - 1.6rem); } /* keeps clear of the music button */
}

@media (max-width: 400px) {
  .sc-text { font-size: 0.75rem; letter-spacing: 0.05em; }
}

@media (max-width: 380px) {
  body { font-size: 1.1rem; }
  .section { padding: 3.4rem 0.8rem; }
  .panel { padding-inline: 1rem; }
  .hosts-line { font-size: 1.3rem; }
  .couple-parents .host-name { white-space: normal; }
  .couple-parents { font-size: 1.25rem; }
}

/* Short phones: tighten the first screen so the scroll cue never covers the date */
@media (max-height: 740px), (min-width: 900px) and (max-height: 920px) {
  .hero { min-height: 0; padding: 4.2rem 1.2rem 6.4rem; }
  .hero .deity { width: min(150px, 42vw, 19vh); }
  .hero .eyebrow { margin-top: 0.7rem; }
  .hero-names { font-size: clamp(3rem, min(15vw, 10.5vh), 5.5rem); }
  .hero .flourish { margin: 0.3rem auto 0.7rem; }
  .db-day b { font-size: 3.1rem; }
  .hero-time { margin-top: 0.6rem; font-size: 1.25rem; }
  .hero-actions { display: none; }
  .hero + .section { padding-top: 2.6rem; }
  .scroll-cue { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
}

@media (max-height: 700px) {
  .cover .deity-hero { width: 88px; }
  .cover .eyebrow { margin-top: 0.6rem; }
  .cover-open { margin-top: 1rem; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .cover-inner { padding-top: 1rem; }
  .cover .deity-hero { display: none; }
  .hero { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg-floral, .deity::before, .tick-num.bump, .cover-open, .sc-arrows path { animation: none; }
  body.is-open .scroll-cue:not(.is-away) { animation: none; }
  .petals, .sparkles { display: none; }
  .ch, body.is-open .ch { opacity: 1; transform: none; filter: none; animation: none; }
  body.is-open .hero-names { animation: none; }
  .reveal, .hero .reveal, .flourish.reveal { opacity: 1; transform: none; transition: none; }
  .stagger > *, .stagger.is-visible > * { animation: none; opacity: 1; }
  .door, .cover-inner, .cover-seam, .music-btn { transition: none; }
  .music-btn[aria-pressed="true"] .bar { animation: none; transform: scaleY(0.8); }
}

/* [hidden] must win over display rules set on the same elements */
.ticks[hidden], .caps-title[hidden], .arrived[hidden] { display: none; }

/* ---------- Language switch ---------- */
.lang-switch {
  position: fixed;
  z-index: 41;
  top: calc(0.55rem + env(safe-area-inset-top, 0px));
  right: calc(0.6rem + env(safe-area-inset-right, 0px));
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(78, 10, 25, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 22px -12px rgba(25, 2, 8, 0.8);
}
.lang-switch button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: var(--serif);
  font-size: 0.88rem;
  text-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.25s ease, color 0.25s ease;
}
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--bg-deep); font-weight: 700; }

/* Tamil and Kannada: no letter-spacing (it breaks the joined letters), roomier lines, headings in the serif face */
html[lang="ta"] *, html[lang="kn"] * { letter-spacing: normal !important; }
html[lang="ta"] body, html[lang="kn"] body { line-height: 1.75; }
html[lang="ta"] .script-title, html[lang="kn"] .script-title,
html[lang="ta"] .cover-script, html[lang="kn"] .cover-script { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 8.2vw, 2.8rem); line-height: 1.4; }
html[lang="ta"] .caps-title, html[lang="kn"] .caps-title { font-weight: 700; }
html[lang="ta"] .sc-text, html[lang="kn"] .sc-text { font-size: 0.8rem; }

/* ---------- Quick bar ---------- */
.quickbar {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 2px;
  width: min(26rem, calc(100% - 1.4rem));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(78, 10, 25, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 34px -14px rgba(25, 2, 8, 0.9);
  transform: translate(-50%, 160%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.55s var(--ease), opacity 0.4s ease, visibility 0s linear 0.55s;
}
.quickbar.is-shown { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
.qb {
  flex: 1 1 0;
  min-width: 0;
  min-height: 3.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.3rem 0.2rem;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #fff;
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.qb[hidden] { display: none; }
.qb svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qb:active { background: rgba(255, 255, 255, 0.16); }
.qb + .qb { border-left: 1px solid var(--line-soft); border-radius: 0; }
.music-btn { transition: opacity 0.6s ease, transform 0.6s var(--ease), bottom 0.5s var(--ease), visibility 0s linear 0.6s; }
body.has-quickbar .music-btn { bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px)); }

.sheet {
  position: fixed;
  z-index: 36;
  left: 0;
  right: 0;
  margin-inline: auto; /* centred without transform, so the entrance animation cannot knock it sideways */
  bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 0.5rem;
  justify-items: stretch;
  width: min(19rem, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(78, 10, 25, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 44px -16px rgba(25, 2, 8, 0.95);
  text-align: center;
  animation: sheetin 0.35s var(--ease) both;
}
.sheet[hidden] { display: none; }
.sheet-title { margin-bottom: 0.2rem; font-size: 0.9rem; letter-spacing: 0.16em; text-transform: uppercase; }
.sheet .textlink { justify-content: center; }

.toast {
  position: fixed;
  z-index: 44;
  left: 50%;
  bottom: calc(6.2rem + env(safe-area-inset-bottom, 0px));
  max-width: min(22rem, calc(100% - 2rem));
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(46, 5, 16, 0.92);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  text-shadow: none;
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s var(--ease);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- RSVP / call / share and "good to know" ---------- */
.respond { padding-top: 2.6rem; padding-bottom: 1.6rem; }
.respond .lede { max-width: 28rem; margin-top: 0.8rem; font-size: 1.2rem; }
.respond-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 1.6rem; }
.respond-actions .btn { min-width: min(17rem, 100%); }
.btn-ghost { background: transparent; color: #fff; border-color: var(--line); box-shadow: none; }
.info-list { display: grid; gap: 1.1rem; max-width: 30rem; margin: 1.6rem auto 0; }
.info-row { display: grid; gap: 0.15rem; }
.info-label { margin: 0; font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lilac); }
.info-text { margin: 0; font-size: 1.25rem; }

@media (hover: hover) {
  .lang-switch button:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, 0.18); }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
  .qb:hover { background: rgba(255, 255, 255, 0.12); }
}
@media (max-width: 360px) {
  .qb { font-size: 0.72rem; }
  .lang-switch button { min-width: 2.75rem; padding: 0 0.55rem; font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .quickbar, .toast, .sheet, .lang-switch button { transition: none; animation: none; }
}

@keyframes sheetin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.qb:focus-visible { outline-offset: -4px; border-radius: 18px; }
/* The language switch tucks away while reading downwards and returns as soon as the guest scrolls up */
.lang-switch { transition: opacity 0.3s ease, transform 0.4s var(--ease); }
.lang-switch.is-away { opacity: 0; transform: translateY(-140%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .lang-switch { transition: none; } }

.privacy { max-width: 34rem; margin: 0 auto 0.9rem; padding: 0 1.25rem; font-size: 0.8rem; line-height: 1.5; text-align: center; color: rgba(255,255,255,0.82); }

/* ================= IFPA Knowledge Meet additions ================= */
.spark { background: var(--gold); }
.progress { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); box-shadow: 0 0 10px rgba(243, 201, 105, 0.7); }
.bg-glow { background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 190, 90, 0.2), transparent 42%); }
.deity img { filter: drop-shadow(0 0 14px rgba(255, 190, 80, 0.55)); }
.deity::before { background: radial-gradient(closest-side, rgba(255, 190, 80, 0.3), transparent); }
.flourish { filter: drop-shadow(0 0 6px rgba(243, 201, 105, 0.5)); }
.eyebrow { color: var(--gold); letter-spacing: 0.22em; font-size: 0.86rem; }
.btn { background: var(--gold); border-color: var(--gold); color: var(--bg-ink); }
.btn:hover, .btn:focus-visible { background: #fff; border-color: #fff; }

/* Logo badge and Diwali Special seal */
.brand { margin: 0 auto 1rem; padding: 0.45rem 0.8rem; width: min(17rem, 72vw); border-radius: 16px; background: var(--cream); box-shadow: 0 12px 30px -12px rgba(25, 2, 8, 0.8), 0 0 0 2px var(--gold); }
.brand img { display: block; width: 100%; height: auto; }
.seal { display: inline-block; margin: 0.2rem auto 0; padding: 0.35rem 1.5rem 0.45rem; border: 1.5px solid var(--gold); border-radius: 999px; background: linear-gradient(180deg, #8e1c33, var(--bg-deep)); color: var(--gold); font-family: var(--script); font-size: 1.7rem; line-height: 1.15; box-shadow: 0 0 0 4px rgba(243, 201, 105, 0.18), 0 10px 24px -10px rgba(25, 2, 8, 0.8); }
.seal::before, .seal::after { content: "✦"; font-family: var(--serif); font-size: 0.6em; margin: 0 0.5em; vertical-align: 0.18em; }
.assoc { margin: 0.9rem 0 0; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lilac); }

/* Title: big numeral + KNOWLEDGE MEET in a heavy serif, script tagline */
.hero-names, .cover-names { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
.hero-names { font-size: clamp(2.5rem, min(12.5vw, 10vh), 5.2rem); line-height: 1; text-shadow: 0 2px 18px rgba(25, 2, 8, 0.6); }
.hero-names .num, .cover-names .num { display: block; font-size: 1.55em; line-height: 0.95; color: var(--gold); }
.hero-names .num sup, .cover-names .num sup { font-size: 0.42em; vertical-align: 0.95em; margin-left: 0.04em; font-weight: 700; }
.hero-names .person, .cover-names .person { display: inline; }
.hero-names .num .person, .cover-names .num .person { display: inline; }
.hero-names .name2, .cover-names .name2 { display: block; }
body.is-open .hero-names { animation: none; }
.tagline { margin-top: 0.7rem; font-family: var(--script); font-size: clamp(1.7rem, 7.2vw, 2.5rem); line-height: 1.2; color: #fff; text-shadow: var(--glow); }
.cover-names { font-size: clamp(1.9rem, 9.6vw, 2.9rem); line-height: 1.02; }
.cover-script { font-size: clamp(1.7rem, 7.4vw, 2.3rem); color: var(--gold); }
.db-day b { color: var(--gold); }
.hero-venue { margin-top: 0.5rem; max-width: 24rem; font-size: 1.08rem; font-weight: 700; line-height: 1.35; }
.hero-venue small { display: block; margin-top: 0.15rem; font-size: 0.9rem; font-weight: 400; color: var(--lilac); }

/* Programme card (cream, like the poster's table) */
.prog-wrap { max-width: 44rem; }
.prog-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 6vw, 2.4rem); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); padding-left: 0.14em; }
.prog { margin: 1.4rem 0 0; overflow: hidden; border: 2px solid var(--gold); border-radius: 22px; background: var(--cream); color: var(--navy); text-align: left; text-shadow: none; box-shadow: 0 30px 60px -30px rgba(25, 2, 8, 0.9); }
.prog-head, .prog-row { display: grid; grid-template-columns: minmax(5.6rem, 7.6rem) 1fr; }
.prog-head { background: linear-gradient(180deg, #f8dc8c, var(--gold)); color: var(--bg-ink); font-weight: 700; font-size: 1rem; }
.prog-head span { padding: 0.75rem 0.9rem; }
.prog-row { border-top: 1px solid rgba(122, 20, 40, 0.16); }
.prog-time { display: flex; align-items: center; justify-content: center; padding: 0.7rem 0.4rem; background: var(--bg); color: #fff; font-weight: 700; font-size: 1.02rem; text-align: center; line-height: 1.2; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.prog-info { padding: 0.7rem 0.95rem; font-weight: 700; font-size: 1.05rem; line-height: 1.32; }
.prog-who { display: block; color: var(--crimson); }
.prog-topic { display: block; font-weight: 400; }
.prog-who + .prog-topic { margin-top: 0.1rem; }
.prog-row.is-break .prog-info { font-style: italic; }

/* Sponsors */
.sponsors-wrap { max-width: 44rem; }
.sponsors-title { display: inline-block; padding: 0.35rem 1.6rem; border: 1.5px solid var(--gold); border-radius: 999px; background: var(--bg-deep); color: var(--gold); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.24em; text-transform: uppercase; }
.sponsors { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.9rem; margin: 1.3rem 0 0; padding: 1.1rem; border-radius: 22px; background: var(--cream); box-shadow: 0 0 0 2px var(--gold); }
.sponsors img { display: block; height: clamp(3rem, 14vw, 4.2rem); width: auto; max-width: 100%; }

/* The countdown and venue keep white on maroon; map frame border goes gold */
.map-frame { border-color: rgba(243, 201, 105, 0.7); }
.venue-name { font-family: var(--display); font-weight: 800; }
.tick-num { font-family: var(--display); }
.footer-line { letter-spacing: 0.12em; }
.closing-line.tag { font-family: var(--script); font-size: clamp(1.9rem, 7vw, 2.6rem); line-height: 1.25; }
@media (max-width: 360px) { .prog-head, .prog-row { grid-template-columns: 5rem 1fr; } .prog-info { padding: 0.6rem 0.7rem; font-size: 1rem; } }
.hero-names .num sup, .cover-names .num sup { text-transform: lowercase; }
.bg-grain { opacity: 0.3; }
.venue-name { font-size: clamp(1.5rem, 6.4vw, 2.3rem); letter-spacing: 0.1em; padding-left: 0.1em; line-height: 1.2; }
.venue-sub { letter-spacing: 0.2em; }
.footer-line { text-transform: none; font-size: 0.95rem; letter-spacing: 0.1em; }
.sponsors img { height: clamp(2.8rem, 12.5vw, 4rem); mix-blend-mode: multiply; }
.sponsors img { height: clamp(3.2rem, 15vw, 4.6rem); }
.cover-brand { width: min(15rem, 66vw); margin-bottom: 0.4rem; animation: halo 5s ease-in-out infinite; }
.brand { padding: 0.55rem 0.9rem; }
