/* Invitation microsite stylesheet.
   Structure: tokens -> base -> controls -> hero -> sections -> footer -> cover/music (ADDED) -> motion -> breakpoints.
   Colours, fonts, sizes and spacing follow the reference site's stylesheet (checked against the live CSS).
   Marked "ADDED" below: cover page, music button, footer enquiry button, safe-area padding, touch-target sizes.
   To re-theme, change only the variables in :root (see references/design-reference.md). */

:root {
  color-scheme: light;
  --paper: #fffaf0;        /* page background */
  --paper-deep: #fff2d9;   /* countdown band, alt sections */
  --jasmine: #fffefb;      /* cards, ticks, frames */
  --gold: #f0a30a;         /* hairlines, italics, accents */
  --gold-soft: #f8d388;    /* borders on controls */
  --gold-pale: #fce9c2;    /* quiet borders */
  --flame: #f26a1b;        /* lamp glow, warm highlights */
  --maroon: #022157;       /* primary: headings, buttons */
  --maroon-deep: #021941;  /* button hover */
  --ink: #1c273b;          /* body text */
  --ink-soft: #606671;     /* secondary text */
  --gold-text: #906206;    /* ADDED: darker gold for tiny uppercase labels (keeps them readable in sunlight) */
  --serif: "Poppins", Georgia, serif;
  --tamil: "Cormorant Garamond", serif;
  --ui: "Outfit", sans-serif;
  --display: "Montserrat", var(--serif);  /* names, headings, countdown digits; set to a script/display font to match a sample invitation */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(242, 106, 27, 0.12), transparent 55%),
    var(--paper);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}

html[lang="ta"] body { font-family: var(--tamil); line-height: 1.75; }

/* Faint repeating motif behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../assets/motif.svg") 0 0 / 220px repeat;
  opacity: 0.06;
}

/* Hidden until JS has rendered the text, so nobody sees raw placeholders */
body:not(.is-ready) .site { visibility: hidden; }

/* ADDED: no scrolling behind the cover page */
html.is-locked, html.is-locked body { overflow: hidden; }

h1, h2, h3, p, figure { margin: 0; }

/* Display font: couple's names, section headings, venue name, countdown digits. Same as the body serif unless
   --display is changed (prepare_assets.py apply-fonts does this). Latin-only display fonts fall back per glyph
   to --serif, which lists the Tamil font, so Tamil text still renders. */
h1, h2, .cover-names, .venue-name, .tick-num { font-family: var(--display); }
img { max-width: 100%; }

/* ---------- Language switch ---------- */
.lang-switch {
  position: fixed;
  top: calc(0.85rem + env(safe-area-inset-top, 0px));
  right: calc(0.85rem + env(safe-area-inset-right, 0px));
  z-index: 40;
  display: flex;
  padding: 3px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px -10px rgba(2, 33, 87, 0.35);
}
.lang-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--maroon);
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  min-height: 2.5rem; /* ADDED: comfortable thumb target */
  padding: 0 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.25s ease, color 0.25s ease;
}
.lang-switch button[aria-pressed="true"] { background: var(--maroon); color: var(--jasmine); }

/* ---------- Garland, lamps, deity ---------- */
.garland {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: url("../assets/garland.svg") 0 0 / 180px 72px repeat-x;
  pointer-events: none;
  transform-origin: top center;
  clip-path: inset(0 100% 0 0);
}
body.is-open .garland { animation: unfurl 1.8s var(--ease) 0.1s forwards, sway 7s ease-in-out 2s infinite; }

.lamp { width: 34px; height: auto; animation: glow 3.2s ease-in-out infinite; }

.deity {
  position: relative;
  width: 128px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  padding: 5px;
  isolation: isolate;
  border-radius: 50%;
  background: linear-gradient(160deg, #e3c98f, var(--gold) 55%, #d8b977);
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--gold-soft), 0 14px 34px -12px rgba(240, 163, 10, 0.55);
}
.deity::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(242, 106, 27, 0.22), transparent);
  z-index: -1;
  animation: halo 4s ease-in-out infinite;
}
.deity img, .deity figcaption { width: 100%; height: 100%; border-radius: inherit; }
.deity img { display: block; object-fit: cover; }
/* The caption is only the fallback label, shown if the image file is missing */
.deity figcaption {
  display: none;
  place-items: center;
  padding: 0.6rem;
  text-align: center;
  color: var(--maroon);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.25;
  background: radial-gradient(circle at 50% 40%, rgba(242, 106, 27, 0.2), transparent 60%), var(--jasmine);
}
html[lang="ta"] .deity figcaption { padding: 0.9rem; font-style: normal; font-size: 0.72rem; }
.deity.is-empty img { display: none; }
.deity.is-empty figcaption { display: grid; }
.deity-hero { width: min(210px, 58vw); aspect-ratio: 735 / 698; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.deity-hero::after { inset: -14%; border-radius: 50%; }
.deity-hero img { object-fit: contain; border-radius: 0; }

/* ---------- Falling 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-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.petal {
  display: block;
  width: var(--size);
  height: var(--size);
  opacity: 0.85;
  animation-name: flutter;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.petal-jasmine { background: url("../assets/jasmine.svg") center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(240, 163, 10, 0.35)); }
.petal-marigold, .petal-rose { border-radius: 0 100% 0 100%; height: calc(var(--size) * 0.75); }
.petal-marigold { background: linear-gradient(135deg, #f7c04a, #e8892b); }
.petal-rose { background: linear-gradient(135deg, #f1a3b0, #c94a63); }

/* ---------- Reveal on scroll ---------- */
.hero .reveal { transform: translateY(22px) scale(0.94); transition-duration: 1.1s; transition-delay: calc(var(--i, 0) * 220ms); }
.hero .reveal.is-visible { transform: none; }
.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; }
.stagger:not(.is-visible) > * { opacity: 0; }
.stagger.is-visible > * { animation: rise 0.85s var(--ease) both; }
.stagger.is-visible > :nth-child(2) { animation-delay: 0.12s; }
.stagger.is-visible > :nth-child(3) { animation-delay: 0.24s; }
.stagger.is-visible > :nth-child(4) { animation-delay: 0.36s; }

/* ---------- Hero ---------- */
.site { position: relative; z-index: 1; outline: none; }
.hero { position: relative; padding: 6.5rem 1.5rem 0; text-align: center; }
.invocation { color: var(--maroon); font-size: 1.15rem; font-style: italic; font-weight: 500; }
.invocation + .invocation { margin-top: 0.1rem; }
.hero .invocation:first-of-type { margin-top: 1.8rem; }
html[lang="ta"] .invocation { font-style: normal; font-size: 1rem; }

.eyebrow {
  margin: 2rem 0 0.5rem;
  color: var(--gold-text);
  font-family: var(--ui);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
html[lang="ta"] .eyebrow { font-family: var(--tamil); font-size: 0.98rem; letter-spacing: 0.06em; text-transform: none; }

h1 { color: var(--maroon); font-weight: 500; font-size: clamp(3rem, 8vw, 5.2rem); line-height: 0.98; }
html[lang="ta"] h1 { font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.3; }
h1 .person, .cover-names .person { display: block; overflow-wrap: anywhere; }
.hero-names { display: grid; grid-template-columns: auto auto auto; justify-content: center; align-items: center; gap: clamp(0.75rem, 4vw, 2.5rem); }
.hero-names .lamp { width: 40px; }
.aka, .union { display: block; color: var(--gold); font-style: italic; font-weight: 500; }
.aka { margin-top: 0.35rem; font-size: 0.34em; letter-spacing: 0.06em; }
.union { margin: 0.45rem 0; font-size: 0.28em; letter-spacing: 0.16em; }
html[lang="ta"] .aka, html[lang="ta"] .union { font-style: normal; letter-spacing: 0; font-size: 0.4em; }

.hero-meta, .hero-place { margin: 0.4rem 0 0; color: var(--ink); font-size: 1.35rem; }
.hero-meta { margin-top: 1.3rem; }
.sep { display: inline-block; width: 0.4rem; height: 0.4rem; margin: 0 0.7rem 0.12rem; border: 1px solid var(--gold); transform: rotate(45deg); }
.hero-actions { margin: 1.5rem 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.5rem;
  min-height: 2.75rem; /* ADDED: 44px tap target */
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--maroon);
  border-radius: 999px;
  background: var(--maroon);
  color: var(--jasmine);
  font-family: var(--ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
html[lang="ta"] .btn { font-family: var(--tamil); font-size: 0.95rem; letter-spacing: 0; text-transform: none; }

.temple-border { height: 34px; max-width: 900px; margin: 3rem auto 0; background: url("../assets/border.svg") center bottom / 120px 34px repeat-x; }

/* ---------- Sections ---------- */
.section { position: relative; padding: 4.5rem 1.25rem; text-align: center; }
.section.alt { background: rgba(255, 242, 217, 0.7); border-top: 1px solid var(--gold-pale); border-bottom: 1px solid var(--gold-pale); }
.wrap { max-width: 860px; margin: 0 auto; }

h2 { margin: 0 0 0.8rem; color: var(--maroon); font-size: clamp(2rem, 4.5vw, 2.85rem); font-weight: 500; line-height: 1.2; }
h2::before {
  content: "";
  display: block;
  width: 170px;
  height: 22px;
  margin: 0 auto 0.85rem;
  background: url("../assets/divider.svg") center / contain no-repeat;
  transform: scaleX(0.3);
  opacity: 0;
  transition: transform 1.1s var(--ease) 0.15s, opacity 0.8s ease 0.15s;
}
h2.is-visible::before { transform: none; opacity: 1; }

.hosts { max-width: 38rem; margin: 0 auto 0.9rem; }
.hosts-line { margin: 0.3rem 0 0; font-size: 1.4rem; line-height: 1.5; }
.hosts-line strong { color: var(--maroon); font-weight: 700; }
.host-name { white-space: nowrap; }
.hosts-between { margin: 0.25rem 0 0; color: var(--gold); font-size: 1.15rem; font-style: italic; }
html[lang="ta"] .hosts-line { font-size: 1.15rem; line-height: 1.9; }
html[lang="ta"] .hosts-line strong { font-weight: 600; }
.lede, .note { max-width: 38rem; margin: 0 auto; font-size: 1.3rem; line-height: 1.6; }
html[lang="ta"] .lede, html[lang="ta"] .note { font-size: 1.1rem; line-height: 1.95; }
.note { color: var(--ink-soft); }

.couple, .events, .homes, .love { display: grid; gap: 1.25rem; max-width: 780px; margin: 2.2rem auto 0; text-align: left; align-items: start; }
.person-card, .event, .home, .family {
  padding: 1.35rem 1.25rem 1.45rem;
  border: 1px solid var(--gold-pale);
  border-top: 2px solid var(--gold);
  background: var(--jasmine);
  box-shadow: 0 16px 34px -24px rgba(2, 33, 87, 0.4);
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
}
.couple { align-items: stretch; }
.person-card { text-align: center; }
.person-name, .event-name, .home-name, .family h3 { color: var(--maroon); font-size: 1.45rem; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.person-role, .parent, .shop, .kin-text, .family li, .venue-address { margin: 0.4rem 0 0; color: var(--ink-soft); font-size: 1.12rem; }
html[lang="ta"] .person-role, html[lang="ta"] .parent, html[lang="ta"] .shop, html[lang="ta"] .kin-text, html[lang="ta"] .family li { font-size: 1rem; line-height: 1.8; }

/* Portrait frame with a garland draped over the top edge */
.photo-section { padding-top: 0.5rem; }
.portrait {
  position: relative;
  width: min(340px, 82vw);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  background: var(--jasmine);
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--gold-pale), 0 30px 50px -30px rgba(2, 33, 87, 0.45);
}
.portrait::before {
  content: "";
  position: absolute;
  top: -10px; left: -14px; right: -14px;
  height: 58px;
  background: url("../assets/garland.svg") 0 0 / 120px 48px repeat-x;
  z-index: 2;
  pointer-events: none;
}
.portrait img, .portrait figcaption { width: 100%; aspect-ratio: 4 / 5; }
.portrait img { display: block; height: auto; object-fit: cover; object-position: 50% 40%; }
.portrait figcaption {
  display: none;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  font-style: italic;
  background:
    radial-gradient(circle at 50% 45%, rgba(252, 233, 194, 0.9), transparent 62%),
    repeating-linear-gradient(45deg, rgba(240, 163, 10, 0.07) 0 1px, transparent 1px 10px),
    var(--paper);
}
html[lang="ta"] .portrait figcaption { font-style: normal; font-size: 1rem; }
.portrait.is-empty img { display: none; }
.portrait.is-empty figcaption { display: grid; }

/* Countdown band */
.band {
  position: relative;
  padding: 4rem 1rem 4.2rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 106, 27, 0.16), transparent 60%), var(--paper-deep);
  border-top: 1px solid var(--gold-pale);
  border-bottom: 1px solid var(--gold-pale);
}
.ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; max-width: 640px; margin: 1.6rem auto 0; }
.tick { padding: 1rem 0.3rem 0.85rem; border: 1px solid var(--gold-soft); border-radius: 6px; background: var(--jasmine); box-shadow: 0 12px 26px -20px rgba(2, 33, 87, 0.45); }
.tick-num { display: block; color: var(--maroon); font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; 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.45rem; color: var(--gold-text); font-family: var(--ui); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
html[lang="ta"] .tick-label { font-family: var(--tamil); font-size: 0.85rem; letter-spacing: 0; text-transform: none; }
.arrived { margin: 1rem 0 0; color: var(--maroon); font-style: italic; }
html[lang="ta"] .arrived { font-style: normal; }

/* Schedule */
.event-day, .event-time { color: var(--gold-text); font-family: var(--ui); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; text-wrap: balance; /* long labels break evenly, never leaving one orphan word */ }
.event-day + .event-time { margin-top: 0.2rem; }
html[lang="ta"] .event-day, html[lang="ta"] .event-time { font-family: var(--tamil); font-size: 0.95rem; letter-spacing: 0; text-transform: none; }
.event-actions { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin: 0.5rem 0 -0.5rem; }
.textlink {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* ADDED: 44px tap target */
  padding: 0;
  border: 0;
  background: none;
  color: var(--maroon);
  font-family: var(--ui);
  font-size: 0.82rem;
  text-decoration: underline;
  text-decoration-color: var(--gold-soft);
  text-underline-offset: 0.25em;
  cursor: pointer;
  touch-action: manipulation;
}
html[lang="ta"] .textlink { font-family: var(--tamil); font-size: 0.95rem; }

/* Homes & family */
.home-relation, .family-place { margin: 0.15rem 0 0.7rem; color: var(--gold); font-style: italic; }
html[lang="ta"] .home-relation, html[lang="ta"] .family-place { font-style: normal; }
.shop { padding-top: 0.35rem; }
.kin { margin: 0.9rem 0 0; }
.kin-label { display: block; margin-bottom: 0.15rem; color: var(--maroon); font-family: var(--ui); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; }
html[lang="ta"] .kin-label { font-family: var(--tamil); font-size: 0.92rem; letter-spacing: 0; text-transform: none; }
.placeholder { color: var(--gold); font-style: italic; }
html[lang="ta"] .placeholder { font-style: normal; }
.family ul { margin: 0.4rem 0 0; padding: 0; list-style: none; }
.family li { position: relative; margin-top: 0.55rem; padding-left: 1.05rem; }
.overline { text-decoration: overline; text-decoration-thickness: 1.25px; text-decoration-skip-ink: none; }
.family li.pair { margin-top: 0.9rem; }
.pair-name { display: block; }
.pair-join { display: block; margin: 0.05rem 0; color: var(--gold); font-style: italic; line-height: 1.1; }
.family li::before { content: ""; position: absolute; top: 0.55em; left: 0; width: 0.42rem; height: 0.42rem; border: 1px solid var(--gold); background: var(--jasmine); transform: rotate(45deg); }

/* Venue */
.venue-name { margin: 0.4rem 0 0; color: var(--maroon); font-size: clamp(1.9rem, 4vw, 2.5rem); }
.map-frame { max-width: 760px; margin: 1.8rem auto 0; padding: 7px; border: 1px solid var(--gold-soft); border-radius: 10px; background: var(--jasmine); box-shadow: 0 24px 44px -30px rgba(2, 33, 87, 0.5); }
.map-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; filter: sepia(0.12) saturate(0.92); }

/* ---------- Footer (ADDED: credit + WhatsApp enquiry) ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 2.4rem 1rem calc(2.8rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.footer-line { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.footer-line p { color: var(--maroon); font-family: var(--ui); font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; }
html[lang="ta"] .footer-line p { font-family: var(--tamil); font-size: 0.98rem; letter-spacing: 0.04em; text-transform: none; }
.lamp-small { width: 20px; }

/* Credit and button share a row; on a very narrow phone the button drops to the next line */
.credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.2rem 0.9rem; }
.credit-text { color: var(--ink-soft); font-family: var(--ui); font-size: 0.74rem; letter-spacing: 0.08em; }
.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; /* green, dark enough for white text to pass contrast */
  color: #fff;
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  touch-action: manipulation;
  transition: background 0.25s ease, transform 0.3s var(--ease);
}
.enquire svg { width: 1.15rem; height: 1.15rem; flex: none; }
html[lang="ta"] .enquire, html[lang="ta"] .credit-text { font-family: var(--tamil); }

.noscript { position: relative; z-index: 50; max-width: 36rem; margin: 2rem auto; text-align: center; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Cover page (ADDED) ---------- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(ellipse at 50% -10%, rgba(242, 106, 27, 0.2), transparent 58%), var(--paper);
  transition: opacity 0.9s ease, transform 1.1s var(--ease), visibility 0s linear 1.1s;
}
.cover[hidden] { display: none; }
.cover::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: url("../assets/motif.svg") 0 0 / 220px repeat; opacity: 0.06; }
.cover::after { content: ""; position: fixed; inset: 0.7rem; pointer-events: none; border: 1px solid var(--gold-soft); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--gold-pale); }
.cover.is-leaving { opacity: 0; transform: translateY(-5%) scale(1.02); visibility: hidden; pointer-events: none; }
.cover .garland { position: absolute; clip-path: none; animation: sway 7s ease-in-out infinite; }
/* margin:auto centres the content when it fits and lets it scroll from the top when it doesn't (short landscape phones) */
.cover-inner { position: relative; width: 100%; max-width: 26rem; margin: auto; padding: 4.8rem 0 1.5rem; text-align: center; }
.cover .deity-hero { width: min(150px, 40vw); }
.cover .eyebrow { margin-top: 1.4rem; }
.cover-names { margin-top: 0.4rem; color: var(--maroon); font-weight: 500; font-size: clamp(2.7rem, 13vw, 3.8rem); line-height: 0.98; }
html[lang="ta"] .cover-names { font-size: clamp(2.2rem, 10vw, 3.2rem); line-height: 1.3; }
.cover .hero-meta { margin-top: 1.1rem; font-size: 1.2rem; }
.cover-open { margin-top: 1.7rem; min-width: 12rem; animation: pulse 2.6s ease-out infinite; }
.cover-hint { margin-top: 1rem; color: var(--ink-soft); font-size: 1rem; font-style: italic; }
html[lang="ta"] .cover-hint { font-style: normal; font-size: 0.95rem; }

/* Cover style "bands" (meta.coverStyle): temple-border strips along the top and bottom edges and a warm spotlight
   behind the blessing image, instead of the default double gold frame. A lighter, more traditional look. */
.cover--bands { background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--flame) 14%, var(--jasmine)), var(--paper) 60%, var(--paper-deep)); }
.cover--bands::before, .cover--bands::after { /* the default cover uses these two pseudo-elements for its motif and frame; reuse them as the strips */
  inset: auto 0 auto 0;
  height: 28px;
  border: 0;
  box-shadow: none;
  opacity: 1;
  background: url("../assets/border.svg") 0 0 / auto 100% repeat-x;
}
.cover--bands::before { top: 0; transform: scaleY(-1); }
.cover--bands::after { bottom: 0; }
.cover--bands .cover-inner { padding-block: 4.2rem; }

/* One family card (compact layout): centred and a comfortable width, not stuck in the left half of the grid */
.love.is-single { grid-template-columns: 1fr; max-width: 32rem; margin-inline: auto; }
.love.is-single .family { text-align: center; }
.love.is-single .family li { padding-left: 0; }
.love.is-single .family li::before { display: none; }

/* With background music there is a fixed button in the bottom-right corner: leave room so it never covers the footer */
body.has-music .footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }

/* ---------- Music button (ADDED) ---------- */
.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(--gold-soft);
  border-radius: 50%;
  background: rgba(255, 254, 251, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--maroon);
  box-shadow: 0 10px 22px -12px rgba(2, 33, 87, 0.55);
  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: 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; }

/* Hover effects only where a real pointer exists, so taps never leave a stuck hover state */
@media (hover: hover) {
  .btn:hover { background: var(--maroon-deep); transform: translateY(-2px); }
  .enquire:hover { background: #0f6431; transform: translateY(-2px); }
  .person-card:hover, .event:hover, .home:hover, .family:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(2, 33, 87, 0.5); }
  .textlink:hover { text-decoration-color: var(--maroon); }
}

/* ---------- Keyframes ---------- */
@keyframes sway { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 3px rgba(242, 106, 27, 0.35)); } 50% { filter: drop-shadow(0 0 10px rgba(242, 106, 27, 0.75)); } }
@keyframes halo { 0%, 100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }
@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 unfurl { to { clip-path: inset(0 0 0 0); } }
@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(2, 33, 87, 0.35); } 70%, 100% { box-shadow: 0 0 0 16px rgba(2, 33, 87, 0); } }
@keyframes eq { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }

/* ---------- Breakpoints ---------- */
@media (min-width: 740px) {
  .couple, .events, .homes, .love { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .deity { width: 140px; }
  .deity-hero { width: 240px; }
  .cover .deity-hero { width: 170px; }
}

@media (max-width: 520px) {
  .garland { height: 56px; background-size: 140px 56px; }
  .lamp { width: 22px; }
  .hero-names { gap: 0.4rem; }
  .hero { padding-top: 5.5rem; }
  .hero-meta { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
  .sep { display: none; }
  .ticks { grid-template-columns: 1fr 1fr; gap: 0.6rem; max-width: 18rem; }
  .map-frame iframe { aspect-ratio: 4 / 3; }
  .cover .garland { height: 56px; background-size: 140px 56px; }
  .cover-inner { padding-top: 4rem; }
}

/* Very narrow phones (320-380px): slightly smaller type and padding so long names never overflow */
@media (max-width: 380px) {
  body { font-size: 1.1rem; }
  h1 { font-size: 2.7rem; }
  html[lang="ta"] h1 { font-size: 2.2rem; }
  .section { padding: 3.5rem 1rem; }
  .hosts-line { font-size: 1.25rem; }
  .host-name { white-space: normal; }
  .person-card, .event, .home, .family { padding-inline: 1rem; }
}

/* Short landscape phones: keep the cover compact */
@media (max-height: 480px) and (orientation: landscape) {
  .cover-inner { padding-top: 3.5rem; }
  .cover .deity-hero { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .garland, body.is-open .garland, .lamp, .deity::after, .tick-num.bump, .cover-open, .cover .garland { animation: none; }
  .garland { clip-path: none; }
  .petals { display: none; }
  .reveal, .hero .reveal { opacity: 1; transform: none; transition: none; }
  .stagger > *, .stagger.is-visible > * { animation: none; opacity: 1; }
  h2::before { transform: none; opacity: 1; transition: none; }
  .cover, .music-btn { transition: none; }
  .music-btn[aria-pressed="true"] .bar { animation: none; transform: scaleY(0.8); }
}

/* ADDED: business-event blocks (pillars, chips, facts, contacts) */
.btn-ghost { background: transparent; color: var(--maroon); margin-left: 0.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.hero-actions .btn-ghost { margin-left: 0; }
.sub { margin: 2.2rem 0 1rem; color: var(--gold-text); font-family: var(--ui); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; }
.pillars { display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin-top: 1.4rem; }
.pillar { padding: 1rem 1.1rem; border: 1px solid var(--gold-pale); border-radius: 14px; background: var(--jasmine); text-align: center; }
.pillar h3 { margin: 0; color: var(--maroon); font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; }
.pillar p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--maroon); color: var(--jasmine); font-family: var(--ui); font-size: 0.85rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 1.4rem 0 0.4rem; }
.fact { padding: 1rem; border: 1px solid var(--gold-pale); border-radius: 14px; background: var(--jasmine); text-align: center; }
.fact-label { display: block; color: var(--gold-text); font-family: var(--ui); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; }
.fact-value { display: block; margin-top: 0.3rem; color: var(--maroon); font-family: var(--display); font-size: 1.25rem; font-weight: 800; }
.contacts { display: grid; gap: 0.8rem; }
.contact { padding: 1rem; border: 1px solid var(--gold-pale); border-radius: 14px; background: var(--jasmine); text-align: center; }
.contact-role { margin: 0; color: var(--gold-text); font-family: var(--ui); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; }
.contact-name { margin: 0.2rem 0 0.1rem; color: var(--maroon); font-family: var(--display); font-size: 1.1rem; font-weight: 700; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0.7rem 0 0; }
.contact-actions .btn { min-width: 7.5rem; padding: 0.7rem 1rem; }
.contact-actions .btn-wa { background: #147a3d; border-color: #147a3d; color: #fff; }
@media (min-width: 740px) { .pillars { grid-template-columns: repeat(3, 1fr); } .contacts { grid-template-columns: 1fr 1fr; } }

/* Logos */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.deity.logo-bship { width: min(280px, 72vw); aspect-ratio: 1002 / 254; }
.deity.logo-bship::after { display: none; }
.deity.logo-bship img { object-fit: contain; border-radius: 0; filter: drop-shadow(0 4px 12px rgba(2, 33, 87, 0.15)); }
.synergy-logo { display: block; width: min(330px, 82vw); height: auto; margin: 0 auto; }

.deity.logo-bship { aspect-ratio: 900 / 306; width: min(300px, 76vw); }
.deity.logo-bship img { filter: none; }
.visitors { padding-block: 1.6rem; }
.counts { display: flex; gap: 1rem; justify-content: center; }
.count { flex: 1 1 0; max-width: 11rem; margin: 0; padding: 0.9rem 0.6rem; border: 1px solid var(--gold-pale); border-radius: 14px; background: var(--jasmine); text-align: center; }
.count-num { display: block; color: var(--maroon); font-family: var(--display); font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.count-label { display: block; margin-top: 0.2rem; color: var(--gold-text); font-family: var(--ui); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* =====================================================================
   DESIGN PASS: "Together We Rise". Sunrise over Chennai, interlocking-ring
   lattice (communities overlapping = synergy), orbit rings, timeline.
   ===================================================================== */
:root { --sky: clamp(88px, 24vw, 150px); }

/* Background symbol: interlocking rings with orange and gold community nodes */
body::before, .cover::before { background: url("../assets/motif.svg") 0 0 / 176px auto repeat; opacity: 0.1; }
body { background: radial-gradient(ellipse at 50% -10%, rgba(242, 106, 27, 0.14), transparent 55%), radial-gradient(ellipse at 100% 60%, rgba(2, 33, 87, 0.05), transparent 50%), var(--paper); }

/* ---- Hero ---- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.2rem 1.25rem calc(var(--sky) + 4.4rem); isolation: isolate; overflow: hidden; }
.hero > * { max-width: 100%; }
.orbit { position: absolute; z-index: -1; left: 50%; top: 4%; width: min(620px, 160vw); aspect-ratio: 1; margin-left: calc(min(620px, 160vw) / -2); background: url("../assets/orbit.svg") center / contain no-repeat; opacity: 0.55; animation: orbit-spin 120s linear infinite; pointer-events: none; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.hero .deity.logo-bship { width: min(210px, 56vw); }
.hero .invocation { margin-top: 0.5rem; font-family: var(--ui); font-style: normal; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold-text); }
.hero .invocation:first-of-type { margin-top: 0.7rem; }
.hero .eyebrow { margin: 1rem 0 0.35rem; }
.synergy-logo { width: min(300px, 78vw); filter: drop-shadow(0 14px 22px rgba(2, 33, 87, 0.18)); }
.hero .hero-names { display: block; }
.hero h1 .aka { margin: 0.7rem auto 0; max-width: 20rem; color: var(--maroon); font-family: var(--ui); font-style: normal; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; line-height: 1.6; text-transform: uppercase; }
.hero .hero-meta { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.1rem 0; margin-top: 1rem; font-size: 1.02rem; font-weight: 500; }
.hero .sep { display: inline-block; }
.hero .hero-place { margin-top: 0.2rem; font-size: 0.95rem; color: var(--ink-soft); }
.hero .hero-actions { margin-top: 1.1rem; }

/* CTA: warm sunrise gradient */
.btn-cta { border-color: transparent; background: linear-gradient(135deg, #f26a1b, #f0a30a); color: #022157; font-weight: 500; box-shadow: 0 12px 26px -12px rgba(242, 106, 27, 0.8); }
.btn-cta:hover { background: linear-gradient(135deg, #e05a0e, #e89a00); }

/* ---- Sunrise horizon ---- */
.horizon { position: absolute; left: 0; right: 0; bottom: 0; height: var(--sky); pointer-events: none; z-index: 0; }
.skyline { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 100%; }
.sun { position: absolute; left: 46%; bottom: 7%; width: calc(var(--sky) * 1.5); aspect-ratio: 1; margin-left: calc(var(--sky) * -0.75); border-radius: 50%; background: radial-gradient(circle at 50% 45%, #ffe27a 0%, #f0a30a 42%, #f26a1b 100%); box-shadow: 0 0 60px 24px rgba(242, 106, 27, 0.28), 0 0 140px 60px rgba(240, 163, 10, 0.22); transform: translateY(70%); opacity: 0; }
.cover .sun, body.is-open .hero .sun { animation: sunrise 2.8s var(--ease) 0.2s forwards; }
@keyframes sunrise { from { transform: translateY(70%); opacity: 0; } to { transform: translateY(-14%); opacity: 1; } }
.cover .horizon { position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; --sky: clamp(70px, 20vw, 120px); }

/* ---- Scroll cue ---- */
.scroll-cue { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--sky) + 0.7rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 44px; padding: 0.35rem 1rem 0.2rem; border-radius: 999px; background: rgba(255, 250, 240, 0.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 8px 20px -12px rgba(2, 33, 87, 0.5); color: var(--maroon); font-family: var(--ui); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.22em; text-decoration: none; text-transform: uppercase; white-space: nowrap; opacity: 0; visibility: hidden; touch-action: manipulation; }
body.is-open .scroll-cue:not(.is-gone) { visibility: visible; animation: cue-in 0.9s ease 2.4s both; }
.scroll-cue.is-gone { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
.scroll-cue svg { width: 22px; height: 22px; fill: none; stroke: var(--flame); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: cue-bounce 1.6s ease-in-out infinite; }
@keyframes cue-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes cue-bounce { 0%, 100% { transform: translateY(-2px); opacity: 0.6; } 50% { transform: translateY(4px); opacity: 1; } }
html.is-locked .scroll-cue { display: none; }

/* ---- Rising sparks instead of falling petals ---- */
.petal-fall { top: auto; bottom: -30px; animation-name: ascend; }
@keyframes ascend { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--drift), -112vh, 0); } }
.petal { opacity: 0.8; animation-name: twinkle; }
@keyframes twinkle { from { opacity: 0.25; transform: scale(0.8) rotate(0deg); } to { opacity: 0.9; transform: scale(1.1) rotate(90deg); } }
.petal-ring { border: 1.6px solid var(--gold); border-radius: 50%; }
.petal-dot { border-radius: 50%; background: var(--flame); }
.petal-navy { border-radius: 50%; background: var(--maroon); opacity: 0.5; }
.petal-spark { background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }

/* ---- Headings, cards, timeline ---- */
h2 { font-weight: 800; letter-spacing: -0.01em; }
h2::before { width: 52px; height: 26px; margin-bottom: 0.9rem; background: url("../assets/deity.svg") center / contain no-repeat; }
.mark-small { width: 26px; height: auto; }
.footer-line .mark-small { opacity: 0.9; }
.person-card, .event, .pillar, .fact, .contact, .count { border-radius: 16px; }
.person-card, .event, .home, .family { border-top-width: 1px; border-top-color: var(--gold-pale); }
.section.alt { background: linear-gradient(180deg, rgba(255, 242, 217, 0.85), rgba(255, 250, 240, 0.4)); }
.band { background: radial-gradient(ellipse at 50% 0%, rgba(242, 106, 27, 0.16), transparent 60%), linear-gradient(180deg, var(--paper-deep), var(--paper)); }

.events { grid-template-columns: 1fr !important; max-width: 31rem; padding-left: 2.1rem; position: relative; gap: 1rem; }
.events::before { content: ""; position: absolute; left: 0.62rem; top: 1.6rem; bottom: 1.6rem; width: 2px; border-radius: 2px; background: linear-gradient(var(--maroon), var(--flame), var(--gold)); }
.event { position: relative; }
.event::before { content: ""; position: absolute; left: -2.02rem; top: 1.25rem; width: 14px; height: 14px; border-radius: 50%; background: var(--jasmine); border: 3px solid var(--flame); box-shadow: 0 0 0 4px var(--paper); }
.event-name { font-size: 1.25rem; font-weight: 700; }
.event-time { color: var(--flame); font-weight: 500; }
#calendar { margin-top: 1.6rem; }

/* Why attend: icon badges */
.pillar { position: relative; padding-top: 3.1rem; margin-top: 1.4rem; overflow: visible; }
.pillar-icon { position: absolute; left: 50%; top: -1.4rem; width: 2.8rem; height: 2.8rem; margin-left: -1.4rem; display: grid; place-items: center; border-radius: 50%; background: var(--maroon); box-shadow: 0 0 0 4px var(--paper), 0 10px 18px -8px rgba(2, 33, 87, 0.6); }
.pillar-icon svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pillars { gap: 0.4rem 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  .orbit, .scroll-cue svg { animation: none; }
  .cover .sun, body.is-open .hero .sun { animation: none; transform: translateY(-14%); opacity: 1; }
  body.is-open .scroll-cue:not(.is-gone) { animation: none; opacity: 1; }
}
@media (max-height: 640px) { .hero { padding-top: 2.4rem; } .hero .deity.logo-bship { width: 170px; } .synergy-logo { width: 240px; } }

/* tuning after first review */
.orbit { top: 9%; width: min(430px, 112vw); margin-left: calc(min(430px, 112vw) / -2); opacity: 0.3; }
.sun { width: calc(var(--sky) * 1.15); margin-left: calc(var(--sky) * -0.575); }
@keyframes sunrise { from { transform: translateY(70%); opacity: 0; } to { transform: translateY(-2%); opacity: 1; } }
.cover .sun, body.is-open .hero .sun { animation-name: sunrise; }
@media (prefers-reduced-motion: reduce) { .cover .sun, body.is-open .hero .sun { transform: translateY(-2%); } }
.petal-dot { opacity: 0.35; }
.petal-navy { opacity: 0.2; }
.petal { max-width: 14px; max-height: 14px; }
.share .lede { max-width: 26rem; margin-inline: auto; }
.share .hero-actions { margin-top: 1.2rem; }
.share-status { min-height: 1.4rem; margin: 0.8rem 0 0; color: var(--gold-text); font-family: var(--ui); font-size: 0.85rem; text-align: center; }
.share .lede { font-size: 1rem; line-height: 1.6; }
