/* 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: #f3f7fd;        /* page background */
  --paper-deep: #dfeafa;   /* countdown band, alt sections */
  --jasmine: #fcfdfe;      /* cards, ticks, frames */
  --gold: #e8541e;         /* hairlines, italics, accents */
  --gold-soft: #eeae99;    /* borders on controls */
  --gold-pale: #f1d6d0;    /* quiet borders */
  --flame: #e8a33d;        /* lamp glow, warm highlights */
  --maroon: #12275a;       /* primary: headings, buttons */
  --maroon-deep: #0e1d44;  /* button hover */
  --ink: #1c253b;          /* body text */
  --ink-soft: #5d6475;     /* secondary text */
  --gold-text: #b44117;    /* ADDED: darker gold for tiny uppercase labels (keeps them readable in sunlight) */
  --serif: "Poppins", Georgia, serif;
  --tamil: "Cormorant Garamond", serif;
  --ui: "Poppins", sans-serif;
  --display: "Poppins", 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(70, 120, 210, 0.14), 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 / 240px repeat;
  opacity: 0.11;
}

/* 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(252, 253, 254, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px -10px rgba(18, 39, 90, 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(232, 84, 30, 0.55);
}
.deity::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(232, 163, 61, 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(232, 163, 61, 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(232, 84, 30, 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(223, 234, 250, 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(18, 39, 90, 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(18, 39, 90, 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(255, 255, 255, 0.7), transparent 62%),
    repeating-linear-gradient(45deg, rgba(232, 84, 30, 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(232, 163, 61, 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(18, 39, 90, 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(18, 39, 90, 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(232, 163, 61, 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 / 240px repeat; opacity: 0.11; }
.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(252, 253, 254, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--maroon);
  box-shadow: 0 10px 22px -12px rgba(18, 39, 90, 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(18, 39, 90, 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(232, 163, 61, 0.35)); } 50% { filter: drop-shadow(0 0 10px rgba(232, 163, 61, 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(18, 39, 90, 0.35); } 70%, 100% { box-shadow: 0 0 0 16px rgba(18, 39, 90, 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); }
}

/* ---------- Business meeting additions ---------- */
.logo-row { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 5vw, 2rem); margin: 0 auto; }
.logo-row img { height: auto; width: auto; max-height: 64px; max-width: 42vw; object-fit: contain; }
.cover .logo-row img { max-height: 54px; }
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 1.5rem calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
.hero .hero-names h1 { font-family: var(--display); font-size: clamp(2rem, 9vw, 3.6rem); line-height: 1.1; color: var(--maroon); font-weight: 700; text-wrap: balance; }
.hero .eyebrow { margin-top: 1.6rem; }
.cover-title { margin: 0.9rem auto 0; color: var(--maroon); font-weight: 600; font-size: 1.05rem; text-wrap: balance; }
.host-name { white-space: normal !important; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.btn-ghost { background: transparent; color: var(--maroon); }
.btn-wa { background: #147a3d; border-color: #147a3d; color: #fff; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; padding: 0; margin: 1.6rem auto 0; max-width: 34rem; }
.chips li { padding: 0.45rem 0.95rem; border: 1px solid var(--gold-soft); border-radius: 999px; background: var(--jasmine); color: var(--maroon); font-family: var(--ui); font-size: 0.8rem; font-weight: 500; }
.events { grid-template-columns: 1fr; }
.form-frame { max-width: 640px; margin: 1.6rem auto 0; border: 1px solid var(--gold-pale); border-radius: 18px; overflow: hidden; background: var(--jasmine); }
.form-frame iframe { display: block; width: 100%; height: 820px; border: 0; }
.homes.is-single { grid-template-columns: 1fr; max-width: 24rem; }
.contact { text-align: center; }
.contact .phone { font-weight: 600; letter-spacing: 0.04em; }
.pill-row { display: flex; gap: 0.6rem; justify-content: center; margin: 1rem 0 0; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; min-width: 7rem; padding: 0.5rem 1.2rem; border-radius: 999px; font-family: var(--ui); font-size: 0.9rem; font-weight: 500; text-decoration: none; touch-action: manipulation; }
.pill-call { background: var(--maroon); color: var(--jasmine); border: 1px solid var(--maroon); }
.pill-wa { background: #147a3d; color: #fff; border: 1px solid #147a3d; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.6rem; }
.copied { min-height: 1.4rem; margin: 0.8rem 0 0; color: var(--gold-text); font-size: 0.9rem; }
.counter-row { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; margin-top: 1rem; }
.counter-row p { margin: 0; display: grid; gap: 0.2rem; }
.counter-num { font-family: var(--display); font-size: 2.2rem; font-weight: 700; color: var(--maroon); }
.scroll-cue { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 0.1rem; min-height: 2.75rem; color: var(--maroon); font-family: var(--ui); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; transition: opacity 0.4s ease; }
.scroll-cue svg { width: 26px; height: 26px; animation: cue-bounce 1.6s ease-in-out infinite; }
.scroll-cue.is-gone { opacity: 0; pointer-events: none; }
@keyframes cue-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }
@media (min-width: 720px) { .events { grid-template-columns: repeat(3, 1fr); } }
@media (max-height: 680px) {
  .hero { padding-top: 2rem; padding-bottom: 4.5rem; }
  .hero .logo-row img { max-height: 44px; }
  .hero .eyebrow { margin-top: 0.9rem; }
  .hero-meta { margin-top: 0.7rem; }
  .hero-actions { margin-top: 1rem; }
}
.hero .hero-place { font-size: 1.05rem; line-height: 1.45; }
.hero .hero-meta { font-size: 1.2rem; }
@media (max-width: 400px) { .hero .hero-meta { flex-direction: column; } }
.btn-big { min-height: 3.25rem; padding-inline: 2.2rem; font-size: 0.9rem; }
#register .note { max-width: 30rem; margin-inline: auto; }
.all-cal { max-width: 780px; margin: 1.6rem auto 0; padding: 1.2rem 1rem; border: 1px dashed var(--gold-soft); border-radius: 14px; text-align: center; }
.all-cal-title { margin: 0; color: var(--maroon); font-weight: 600; }
.all-cal .event-actions { justify-content: center; margin: 0.6rem 0 0; gap: 0.4rem 1.4rem; }
.event { padding-bottom: 1.6rem; }
