/* ==========================================================
   முனியப்பன் கோவில் — "பொன் காவல்" (Golden Guardian) theme
   Same layout as Night Guardian, in yellow / turmeric shades
   Backups: theme-night-guardian.css, theme-village-green.css
   ========================================================== */

:root {
  --bg: #fff8dc;
  --bg-2: #ffefb0;
  --bg-3: #ffe07a;
  --card: #fffdf2;
  --card-2: #fff6d0;
  --ink: #3b2a08;
  --ink-soft: #6e5520;
  --head: #4a2400;
  --line: rgba(160, 110, 10, .28);

  --gold: #f5b700;
  --gold-soft: #ffe27a;
  --gold-deep: #d99100;
  --amber: #b45309;
  --maroon: #8b1a1a;
  --maroon-deep: #5e0f0f;
  --bronze: #8a5a12;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(90, 60, 0, .08), 0 12px 32px rgba(120, 80, 0, .14);
  --glow: 0 0 0 1px rgba(217, 145, 0, .5), 0 0 28px rgba(245, 183, 0, .45);
  --max: 1140px;

  --f-head: "Arima", "Noto Serif Tamil", serif;
  --f-body: "Hind Madurai", "Mukta Malar", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--bg);
  background-image: none; /* dots are animated layers: body::before / ::after */
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--maroon); color: var(--gold-soft); }
img { max-width: 100%; display: block; }
a { color: var(--maroon); }
a:hover { color: var(--amber); }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; line-height: 1.35; margin: 0 0 .5em; color: var(--head); }
p { margin: 0 0 1em; }
code { background: rgba(139, 90, 18, .1); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* ---------- Bell garland ---------- */
.thoranam {
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='40' viewBox='0 0 64 40'%3E%3Cpath d='M0 2 Q32 9 64 2' stroke='%23a06a00' stroke-width='1.5' fill='none'/%3E%3Cpath d='M16 6 L16 12' stroke='%23a06a00' stroke-width='1.2'/%3E%3Cpath d='M10 26 C10 17 12 12 16 12 C20 12 22 17 22 26 Z' fill='%23d99100'/%3E%3Crect x='8.5' y='25' width='15' height='2.6' rx='1.3' fill='%23a06a00'/%3E%3Ccircle cx='16' cy='30' r='2' fill='%238b1a1a'/%3E%3Cpath d='M48 8 l1.4 3 3 .4 -2.2 2.1 .6 3 -2.8 -1.5 -2.8 1.5 .6 -3 -2.2 -2.1 3 -.4z' fill='%23b45309'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center top;
  position: relative;
  z-index: 3;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 220, .92);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .thoranam { position: absolute; left: 0; right: 0; top: 100%; height: 34px; background-size: 54px 34px; pointer-events: none; }
.nav-bar { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.nav-bar .brand { margin-right: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--head); }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 2px 8px rgba(217, 145, 0, .45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.brand-name { font-family: var(--f-head); font-weight: 700; font-size: 1.2rem; color: var(--head); }
.brand-sub { font-size: .74rem; color: var(--bronze); letter-spacing: .03em; }
.brand:hover .brand-name { color: var(--maroon); }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a, .nav-links button {
  display: block; padding: 8px 12px; border-radius: 10px;
  font: inherit; font-size: .93rem; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; position: relative;
}
.nav-links a:hover, .nav-links button:hover { color: var(--head); background: rgba(245, 183, 0, .18); }
.nav-links a.active { color: var(--maroon); }
.nav-links > li > a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--maroon);
}
.nav-links .has-sub { position: relative; }
.nav-links .has-sub > button::after { content: " ▾"; font-size: .8em; }
.nav-links .has-sub.open > button, .nav-links .has-sub.active-parent > button { color: var(--maroon); }
.submenu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .18s ease;
}
.has-sub.open .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { border-radius: 8px; padding: 9px 12px; }
.submenu a.active { background: rgba(245, 183, 0, .25); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--head); border-radius: 2px; position: relative; transition: .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1220px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 70px 0 auto 0; max-height: calc(100vh - 70px); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 24px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s ease;
  }
  .nav-open .nav-links { transform: none; opacity: 1; visibility: visible; }
  .nav-links a, .nav-links button { border-radius: 10px; padding: 12px 14px; font-size: 1rem; width: 100%; text-align: left; }
  .nav-links > li > a.active { background: rgba(245, 183, 0, .25); }
  .nav-links > li > a.active::after { display: none; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; display: none; }
  .has-sub.open .submenu, .has-sub.active-parent .submenu { display: block; }
  .site-header .thoranam { display: none; }
}
@media (max-width: 420px) {
  .site-header .brand-sub { display: none; }
  .brand-name { font-size: 1.08rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; font-weight: 700; font-size: .98rem; font-family: var(--f-body);
  text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--maroon), var(--maroon-deep)); color: var(--gold-soft); box-shadow: 0 6px 20px rgba(94, 15, 15, .3); }
.btn-primary:hover { color: #fff3c4; box-shadow: 0 8px 28px rgba(94, 15, 15, .45); }
.btn-ghost { border-color: rgba(74, 36, 0, .5); color: var(--head); background: rgba(255, 255, 255, .3); }
.btn-ghost:hover { border-color: var(--maroon); color: var(--maroon); background: rgba(255, 255, 255, .55); }
.btn-leaf { background: transparent; border-color: var(--maroon); color: var(--maroon); }
.btn-leaf:hover { background: var(--maroon); color: var(--gold-soft); }

/* ---------- Golden sky pattern (class kept as kolam-bg) ---------- */
.kolam-bg {
  background-color: var(--gold);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .45), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(217, 120, 0, .35), transparent 55%),
    linear-gradient(160deg, #ffd84d 0%, #ffc233 45%, #f5a300 100%);
}
.kolam-bg h1, .kolam-bg h2 { color: #3b1d00; }

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 32px;
  padding: 80px 0 110px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bronze);
}
.kolam-bg .eyebrow { color: #6b3a00; }
.eyebrow::before, .eyebrow::after { content: "✦"; font-size: .7em; color: var(--maroon); }
.hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.5rem); margin: 12px 0 10px; }
.hero h1 em, .page-hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #b91c1c, var(--maroon-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 1.12rem; color: #5a3d05; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(400px, 100%); height: auto; }
.hero-art .twinkle { animation: twinkle 3.2s ease-in-out infinite; }
.hero-art .twinkle:nth-child(2n) { animation-delay: 1.1s; }
.hero-art .twinkle:nth-child(3n) { animation-delay: 2s; }
.hero-art .flicker { transform-origin: center bottom; transform-box: fill-box; animation: flicker 1.6s ease-in-out infinite alternate; }
@keyframes twinkle { 50% { opacity: .2; } }
@keyframes flicker { 0% { transform: scaleY(1); } 50% { transform: scaleY(1.15) scaleX(.92); } 100% { transform: scaleY(.95); } }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; z-index: 2; color: var(--bg); }
.hero-wave svg { width: 100%; height: 100%; display: block; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 48px 0 84px; }
  .hero-art { order: -1; }
  .hero-art svg { width: min(270px, 80%); }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .eyebrow { justify-content: center; }
}

/* ---------- Inner page hero ---------- */
.page-hero { padding: 64px 0 76px; position: relative; text-align: center; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 10px 0 8px; }
.page-hero p { color: #5a3d05; max-width: 40em; margin: 0 auto; }
.page-hero .eyebrow { justify-content: center; }
.crumbs { font-size: .85rem; color: #6b4a0a; margin-bottom: 8px; }
.crumbs a { color: var(--maroon); text-decoration: none; font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-top: 8px; }
.section-head p { color: var(--ink-soft); }
.divider {
  width: 150px; height: 20px; margin: 14px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='20' viewBox='0 0 150 20'%3E%3Cpath d='M0 10H56M94 10H150' stroke='%23b8860b' stroke-width='1.2'/%3E%3Cpath d='M66 10 a9 9 0 1 0 18 0 a7 7 0 1 1 -18 0z' fill='%23d99100'/%3E%3Ccircle cx='60' cy='10' r='2' fill='%238b1a1a'/%3E%3Ccircle cx='90' cy='10' r='2' fill='%238b1a1a'/%3E%3C/svg%3E") no-repeat center;
}

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); position: relative; color: var(--ink);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.card:hover { border-color: var(--gold-deep); box-shadow: var(--glow); transform: translateY(-3px); color: var(--ink); }
.card h3 { font-size: 1.22rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 16px; font-size: 1.5rem;
  background: radial-gradient(circle at 30% 30%, #fff3c4, var(--gold));
  border: 1px solid var(--gold-deep);
}
.card-top::before, .card.kumkum::before, .card.leaf::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 3px; border-radius: 3px;
}
.card-top::before { background: linear-gradient(90deg, transparent, var(--gold-deep), transparent); }
.card.kumkum::before { background: linear-gradient(90deg, transparent, var(--maroon), transparent); }
.card.leaf::before { background: linear-gradient(90deg, transparent, var(--amber), transparent); }

/* Prose */
.prose { max-width: 820px; margin-inline: auto; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h2::before { content: "☾ "; color: var(--gold-deep); font-size: .8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; color: var(--maroon); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { content: "✦  "; color: var(--gold-deep); font-size: .8em; }
.prose blockquote, blockquote.prose {
  margin: 1.6em auto; padding: 22px 26px; border-radius: var(--radius);
  background: rgba(245, 183, 0, .2); border: 1px solid var(--gold-deep);
  font-family: var(--f-head); font-size: 1.1rem; color: var(--head);
}
.card ul li::marker { color: var(--gold-deep); }
.note {
  font-size: .88rem; color: var(--ink-soft); background: rgba(255, 255, 255, .6); border: 1px dashed var(--gold-deep);
  border-radius: 12px; padding: 10px 14px; margin: 0 0 28px;
}

/* Reasons */
.reason { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.reason-num {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 700; font-size: 1.5rem;
  color: var(--gold-soft); background: radial-gradient(circle at 35% 30%, #b91c1c, var(--maroon-deep));
  box-shadow: 0 0 0 5px rgba(245, 183, 0, .35);
}
.reason h3 { margin-top: 4px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--head); border: 1px solid var(--line); margin-bottom: 8px; }

/* ---------- Timings ---------- */
.timings { list-style: none; margin: 0; padding: 0; }
.timings li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 6px; border-bottom: 1px dashed var(--line);
}
.timings li:last-child { border-bottom: 0; }
.timings .t-name { font-weight: 700; color: var(--head); }
.timings .t-desc { display: block; font-size: .85rem; color: var(--ink-soft); font-weight: 400; }
.timings .t-time {
  font-weight: 700; color: var(--head); background: var(--gold-soft); border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap; font-size: .9rem;
}
.timings li.now { background: linear-gradient(90deg, rgba(245, 183, 0, .3), transparent); border-radius: 12px; padding-inline: 12px; }
.timings li.now .t-time { background: var(--maroon); color: var(--gold-soft); border-color: var(--maroon); }
.timings li.now .t-name::after { content: "  • அடுத்த பூசை"; color: var(--maroon); font-size: .78rem; }

.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; padding: 6px 14px; border-radius: 999px; background: var(--gold-soft); border: 1px solid var(--line); color: var(--head); }
.status-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #888; }
.status-pill.open::before { background: #1f9d55; box-shadow: 0 0 0 4px rgba(31, 157, 85, .2); }
.status-pill.closed::before { background: var(--maroon); }

/* ---------- Info strip ---------- */
.info-strip { margin-top: -44px; position: relative; z-index: 4; }
.info-strip .grid { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.info-item { padding: 22px 24px; display: flex; gap: 14px; align-items: center; border-right: 1px solid var(--line); }
.info-item:last-child { border-right: 0; }
.info-item .ic { font-size: 1.6rem; }
.info-item b { display: block; font-family: var(--f-head); color: var(--head); }
.info-item small { color: var(--ink-soft); font-size: .88rem; }
@media (max-width: 900px) { .info-item:nth-child(2) { border-right: 0; } .info-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 620px) { .info-item { border-right: 0; border-bottom: 1px solid var(--line); } .info-item:last-child { border-bottom: 0; } }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.frame { border-radius: 200px 200px 22px 22px; padding: 10px; background: linear-gradient(180deg, var(--gold), var(--bronze)); box-shadow: var(--shadow), 0 0 50px rgba(245, 183, 0, .35); max-width: 460px; margin-inline: auto; }
.frame .ph { aspect-ratio: 4 / 4.4; border-radius: 190px 190px 14px 14px; }

/* Placeholder image tiles */
.ph {
  display: grid; place-items: center; text-align: center; color: #fff8dc;
  font-family: var(--f-head); font-size: .95rem; padding: 12px;
  background-color: var(--bronze); text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.ph .ph-ic { font-size: 2.2rem; display: block; margin-bottom: 4px; }
.ph.t1 { background: radial-gradient(circle at 50% 30%, #d99100, #7a4a00); }
.ph.t2 { background: radial-gradient(circle at 50% 70%, #b91c1c, #5a1a0a 80%); }
.ph.t3 { background: radial-gradient(circle at 50% 40%, #f5b700, #b45309 85%); }
.ph.t4 { background: radial-gradient(circle at 72% 20%, #fffaf0 0 6%, rgba(255, 250, 240, .35) 7%, #e59a00 18%, #6b3a00 90%); }

/* ---------- Festivals ---------- */
.fest { overflow: hidden; padding: 0; }
.fest .fest-date {
  display: flex; align-items: baseline; gap: 10px; padding: 18px 26px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep)); border-bottom: 1px solid var(--line); color: #4a2400;
}
.fest .fest-date b { font-family: var(--f-head); font-size: 1.45rem; color: var(--maroon-deep); }
.fest .fest-body { padding: 20px 26px 26px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 38px; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--maroon), var(--gold)); }
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -33px; top: 24px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--maroon);
}
.tl-item .card { padding: 20px 24px; }
.tl-when { font-size: .85rem; font-weight: 700; color: var(--amber); letter-spacing: .02em; }

/* ---------- Countdown ---------- */
.countdown { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.cd-box { min-width: 88px; padding: 14px 10px; border-radius: 16px; background: rgba(255, 253, 242, .7); border: 1px solid rgba(94, 15, 15, .25); text-align: center; box-shadow: 0 6px 18px rgba(120, 70, 0, .15); }
.cd-box b { display: block; font-family: var(--f-head); font-size: 2.1rem; color: var(--maroon); line-height: 1.2; }
.cd-box small { font-size: .8rem; color: #5a3d05; }

/* ---------- People ---------- */
.person { text-align: center; }
.avatar {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--f-head); font-size: 2rem; font-weight: 700;
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold)); color: var(--maroon);
  box-shadow: 0 0 0 2px var(--bronze), 0 0 0 7px rgba(245, 183, 0, .25);
}
.person .role { color: var(--maroon); font-weight: 700; font-size: .9rem; }
.person .muted { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Gallery ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters button {
  font: inherit; font-weight: 700; font-size: .9rem; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-soft);
}
.filters button:hover { color: var(--head); background: var(--gold-soft); }
.filters button.on { background: var(--maroon); border-color: var(--maroon); color: var(--gold-soft); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; transition: transform .2s, box-shadow .2s; }
.gallery figure:hover, .gallery figure:focus-visible { transform: translateY(-3px); box-shadow: var(--glow); outline: none; }
.gallery figure.hide { display: none; }
.gallery .ph, .gallery img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }
.gallery figcaption { padding: 10px 14px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(40, 22, 0, .9); display: none; place-items: center; padding: 24px; }
.lightbox.show { display: grid; }
.lightbox .lb-inner { max-width: 900px; width: 100%; }
.lightbox .ph, .lightbox img { aspect-ratio: 4 / 3; width: 100%; border-radius: 16px; object-fit: contain; font-size: 1.3rem; }
.lightbox p { color: var(--gold-soft); text-align: center; margin-top: 12px; }
.lightbox .lb-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; font-size: 1.3rem; cursor: pointer; background: var(--gold); color: var(--head); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list b { color: var(--head); }
.contact-list .ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); border: 1px solid var(--line); }
.form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; color: var(--head); }
.form input, .form textarea, .form select {
  width: 100%; font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); margin-bottom: 14px;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(245, 183, 0, .35); }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 360px; border: 0; display: block; filter: sepia(.35) saturate(1.2); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 72px 0; border-block: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.cta-band p { color: #5a3d05; max-width: 40em; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { background: #3b2204; color: #ecd9a8; font-size: .95rem; border-top: 3px solid var(--gold); }
.site-footer .thoranam { opacity: .9; filter: brightness(1.4); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; padding: 40px 0 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--gold); font-size: 1.05rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #ecd9a8; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { margin-bottom: 12px; }
.site-footer .brand-name { color: var(--gold-soft); }
.site-footer .brand-sub { color: #c9a86a; }
.footer-bottom { border-top: 1px solid rgba(255, 226, 122, .15); padding: 16px 0; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.center { text-align: center; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 40px; }

/* ==========================================================
   Animations
   ========================================================== */

/* --- Hero: gopuram rises in, moon glows, windows flicker, embers rise --- */
.hero-art .rise { opacity: 0; transform: translateY(26px); animation: riseIn 1.2s cubic-bezier(.2, .8, .2, 1) forwards; }
.hero-art .tower { animation-delay: .15s; }
.hero-art .windows { animation-delay: .45s; }
.hero-art .kalasam { animation-delay: .7s; }
@keyframes riseIn { to { opacity: 1; transform: none; } }

.hero-art .halo { transform-origin: 200px 150px; animation: haloPulse 5s ease-in-out infinite; }
@keyframes haloPulse { 50% { transform: scale(1.1); opacity: .65; } }
.hero-art .moon { animation: moonFloat 7s ease-in-out infinite; }
@keyframes moonFloat { 50% { transform: translateY(-5px); } }

.hero-art .windows rect { animation: lampLight 2.6s ease-in-out infinite alternate; }
.hero-art .windows rect:nth-child(3n)   { animation-duration: 1.9s; animation-delay: .4s; }
.hero-art .windows rect:nth-child(3n+1) { animation-duration: 3.3s; animation-delay: 1.1s; }
.hero-art .windows rect:nth-child(4n)   { animation-delay: 1.8s; }
@keyframes lampLight { 0% { opacity: .35; } 60% { opacity: .95; } 100% { opacity: .6; } }

.hero-art .door-glow { transform-origin: 200px 350px; animation: doorGlow 3s ease-in-out infinite; }
@keyframes doorGlow { 50% { transform: scale(1.15); opacity: .6; } }

.hero-art .kalasam path { animation: kalasamShine 4s ease-in-out infinite; }
.hero-art .kalasam path:nth-of-type(2) { animation-delay: .6s; }
.hero-art .kalasam path:nth-of-type(3) { animation-delay: 1.2s; }
@keyframes kalasamShine { 0%, 70%, 100% { fill: #c9a063; } 80% { fill: #fff3c4; } }

.hero-art .ember { opacity: 0; transform-box: fill-box; animation: ember 2.4s ease-out infinite; }
.hero-art .ember:nth-child(2), .hero-art .ember:nth-child(5) { animation-delay: .8s; animation-duration: 2.8s; }
.hero-art .ember:nth-child(3), .hero-art .ember:nth-child(6) { animation-delay: 1.6s; animation-duration: 2.1s; }
@keyframes ember {
  0%   { opacity: 0; transform: translate(0, 0); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(6px, -46px); }
}

/* --- Falling petals (added by site.js to .hero / .page-hero) --- */
.page-hero { overflow: hidden; }
.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.page-hero > .container, .hero-inner { position: relative; z-index: 1; }
.petal {
  position: absolute; top: -24px; width: var(--s, 12px); height: calc(var(--s, 12px) * .7);
  background: var(--c, #f08c00); border-radius: 60% 0 60% 0; opacity: .85;
  animation: petalFall var(--d, 11s) linear var(--delay, 0s) infinite;
}
@keyframes petalFall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: .9; }
  25%  { transform: translate(calc(var(--x, 40px) * .6), 25vh) rotate(120deg); }
  50%  { transform: translate(calc(var(--x, 40px) * -.4), 50vh) rotate(220deg); }
  75%  { transform: translate(var(--x, 40px), 75vh) rotate(320deg); }
  100% { transform: translate(0, 105vh) rotate(420deg); opacity: .2; }
}

/* --- Header: swinging bells, turning emblem ring --- */
.site-header .thoranam { transform-origin: top center; animation: bellSway 3.2s ease-in-out infinite alternate; }
@keyframes bellSway { from { transform: skewX(4deg); } to { transform: skewX(-4deg); } }
.brand-mark circle:nth-of-type(2) { transform-origin: 24px 24px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Headline shimmer --- */
.hero h1 em, .page-hero h1 em {
  background: linear-gradient(100deg, #8b1a1a 0%, #b91c1c 35%, #e8590c 50%, #b91c1c 65%, #8b1a1a 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: shimmer 5s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -150% 0; } }

/* --- Buttons: shine sweep --- */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: none; pointer-events: none;
}
.btn:hover::after { left: 130%; transition: left .7s ease; }
.btn-primary::after { animation: btnShine 4.5s ease-in-out 2s infinite; }
@keyframes btnShine { 0%, 80% { left: -60%; } 100% { left: 130%; } }

/* --- Floating icons, bell-ring on hover --- */
.card-icon, .ph .ph-ic, .info-item .ic { animation: floaty 4s ease-in-out infinite; }
.grid > :nth-child(2) .card-icon, .gallery figure:nth-child(2n) .ph-ic, .info-item:nth-child(2) .ic { animation-delay: .8s; }
.grid > :nth-child(3) .card-icon, .gallery figure:nth-child(3n) .ph-ic, .info-item:nth-child(3) .ic { animation-delay: 1.6s; }
.info-item:nth-child(4) .ic { animation-delay: 2.4s; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.card:hover .card-icon, .contact-list li:hover .ic { animation: bellRing .8s ease-in-out; }
@keyframes bellRing { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }

/* --- Pulses --- */
.reason-num { animation: pulseRing 2.8s ease-out infinite; }
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(245, 183, 0, .7), 0 0 0 5px rgba(245, 183, 0, .35); }
  100% { box-shadow: 0 0 0 16px rgba(245, 183, 0, 0), 0 0 0 5px rgba(245, 183, 0, .35); }
}
.tl-item::before { animation: dotPulse 2.4s ease-in-out infinite; }
.tl-item:nth-child(2n)::before { animation-delay: .6s; }
.tl-item:nth-child(3n)::before { animation-delay: 1.2s; }
@keyframes dotPulse { 50% { background: var(--maroon); transform: scale(1.2); } }
.status-pill.open::before { animation: livePulse 1.6s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, .6); } 100% { box-shadow: 0 0 0 10px rgba(31, 157, 85, 0); } }
.timings li.now .t-time { animation: nowGlow 2s ease-in-out infinite; }
@keyframes nowGlow { 50% { box-shadow: 0 0 0 5px rgba(139, 26, 26, .18); } }

/* --- Countdown tick --- */
.cd-box b.tick { animation: tick .45s ease; }
@keyframes tick { 0% { transform: translateY(-8px); opacity: .2; } 100% { transform: none; opacity: 1; } }

/* --- Divider moon glow & arch frame shimmer --- */
.divider { animation: dividerGlow 3.5s ease-in-out infinite; }
@keyframes dividerGlow { 50% { filter: drop-shadow(0 0 6px rgba(245, 183, 0, .9)); } }
.frame { background-size: 100% 200%; background-image: linear-gradient(180deg, var(--gold), #fff3c4, var(--bronze), var(--gold)); animation: frameShine 6s ease-in-out infinite; }
@keyframes frameShine { 50% { background-position: 0 100%; } }

/* --- Cards lift a little more smoothly when revealed --- */
.reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transform: translateY(26px) scale(.98); }
.reveal.in { transform: none; }

/* Reduced motion (OS setting): stop things that travel or sway,
   keep soft glows, flickers, twinkles and shimmer. */
@media (prefers-reduced-motion: reduce) {
  .petals, .hero-art .ember { display: none; }
  .hero-art .rise { opacity: 1; transform: none; animation: none; }
  .hero-art .moon, .site-header .thoranam, .brand-mark circle:nth-of-type(2),
  .card-icon, .ph .ph-ic, .info-item .ic, .card:hover .card-icon, .contact-list li:hover .ic,
  .btn::after, .btn-primary::after, .cd-box b.tick, .tl-item::before { animation: none; }
  .hero-art .halo, .hero-art .door-glow { animation-name: glowOnly; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .btn:hover, a.card:hover, .gallery figure:hover { transform: none; }
}
@keyframes glowOnly { 50% { opacity: .6; } }

/* ==========================================================
   Animated background: twinkling, drifting stars and dots
   ========================================================== */

/* Page background — dot grid + golden sparkles on fixed layers */
body::before, body::after {
  content: ""; position: fixed; inset: -220px; z-index: -1; pointer-events: none;
}
body::before {
  background-image: radial-gradient(rgba(139, 90, 18, .16) 1px, transparent 1.7px);
  background-size: 22px 22px;
  animation: twinkleSoft 4.5s ease-in-out infinite, dotsDrift 40s linear infinite;
}
body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='%23d99100'%3E%3Cpath d='M30 35 Q30 40 35 40 Q30 40 30 45 Q30 40 25 40 Q30 40 30 35Z'/%3E%3Cpath d='M140 86 Q140 90 144 90 Q140 90 140 94 Q140 90 136 90 Q140 90 140 86Z'/%3E%3Cpath d='M80 166 Q80 170 84 170 Q80 170 80 174 Q80 170 76 170 Q80 170 80 166Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: twinkle 3.2s ease-in-out 1.2s infinite, sparkleDrift 120s linear infinite;
}
@keyframes dotsDrift    { to { background-position: 44px 22px; } }
@keyframes sparkleDrift { to { background-position: -200px 200px; } }

/* Banner skies — two star layers, out of phase, drifting opposite ways */
.kolam-bg { position: relative; overflow: hidden; isolation: isolate; }
.kolam-bg::before, .kolam-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-repeat: repeat;
}
.kolam-bg::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23fffaf0'%3E%3Ccircle cx='12' cy='20' r='1.6'/%3E%3Ccircle cx='70' cy='12' r='1.2'/%3E%3Ccircle cx='130' cy='34' r='1.8'/%3E%3Ccircle cx='40' cy='76' r='1.2'/%3E%3Ccircle cx='104' cy='88' r='1.6'/%3E%3Ccircle cx='150' cy='120' r='1.2'/%3E%3Ccircle cx='20' cy='140' r='1.7'/%3E%3Ccircle cx='84' cy='146' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: twinkle 2.8s ease-in-out infinite, starsDriftA 60s linear infinite;
}
.kolam-bg::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='230'%3E%3Cg fill='%23ffffff'%3E%3Cpath d='M40 42 Q40 50 48 50 Q40 50 40 58 Q40 50 32 50 Q40 50 40 42Z'/%3E%3Cpath d='M170 115 Q170 120 175 120 Q170 120 170 125 Q170 120 165 120 Q170 120 170 115Z'/%3E%3Cpath d='M92 184 Q92 190 98 190 Q92 190 92 196 Q92 190 86 190 Q92 190 92 184Z'/%3E%3Ccircle cx='200' cy='30' r='1.4'/%3E%3Ccircle cx='120' cy='60' r='1.1'/%3E%3Ccircle cx='20' cy='200' r='1.3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 230px 230px;
  animation: twinkle 3.6s ease-in-out 1.4s infinite, starsDriftB 80s linear infinite;
}
@keyframes starsDriftA { to { background-position: 160px 160px; } }
@keyframes starsDriftB { to { background-position: -230px 0; } }
@keyframes twinkle     { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes twinkleSoft { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* keep banner content above the star layers */
.kolam-bg > .container, .kolam-bg > .hero-inner { position: relative; z-index: 1; }
.kolam-bg > .hero-wave { z-index: 2; }

/* Reduced motion: stars still twinkle, but stop drifting */
@media (prefers-reduced-motion: reduce) {
  body::before     { animation: twinkleSoft 4.5s ease-in-out infinite; }
  body::after      { animation: twinkle 3.2s ease-in-out 1.2s infinite; }
  .kolam-bg::before { animation: twinkle 2.8s ease-in-out infinite; }
  .kolam-bg::after  { animation: twinkle 3.6s ease-in-out 1.4s infinite; }
}

/* ==========================================================
   Hero deity image (replaces the gopuram drawing)
   ========================================================== */
.hero-inner { grid-template-columns: 1fr 1fr; }
.deity { position: relative; margin: 0; width: min(520px, 100%); }
.deity img {
  position: relative; z-index: 2; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  filter: drop-shadow(0 18px 22px rgba(90, 40, 0, .35));
  opacity: 0;
  animation: deityIn 1.4s cubic-bezier(.2, .8, .2, 1) .1s forwards, deityGlow 5s ease-in-out 1.6s infinite;
}
@keyframes deityIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes deityGlow {
  0%, 100% { filter: drop-shadow(0 18px 22px rgba(90, 40, 0, .35)); }
  50%      { filter: drop-shadow(0 18px 22px rgba(90, 40, 0, .35)) drop-shadow(0 0 18px rgba(255, 244, 200, .95)); }
}

/* soft divine glow behind the deities */
.deity-halo {
  position: absolute; z-index: 1; left: 50%; top: 40%; width: 92%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 235, .95) 0%, rgba(255, 240, 190, .6) 34%, rgba(255, 220, 120, 0) 68%);
  animation: haloBreath 5s ease-in-out infinite;
}
@keyframes haloBreath { 50% { transform: translate(-50%, -50%) scale(1.08); opacity: .75; } }

/* slowly turning ring of light rays */
.deity-rays {
  position: absolute; z-index: 0; left: 50%; top: 40%; width: 120%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .5) 0deg 5deg, rgba(255, 255, 255, 0) 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 22%, transparent 68%);
          mask-image: radial-gradient(circle, #000 22%, transparent 68%);
  animation: raysSpin 70s linear infinite;
}
@keyframes raysSpin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* two lamps at the deities' feet */
.hero-art .deity-lamps {
  position: absolute; z-index: 3; left: 0; bottom: -9%; width: 100%; height: auto; overflow: visible;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .deity { width: min(360px, 88%); margin-inline: auto; }
  .hero-art .deity-lamps { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .deity img { opacity: 1; animation: deityGlow 5s ease-in-out infinite; }
  .deity-rays { animation: none; }
  .deity-halo { animation: glowOnly 5s ease-in-out infinite; }
}
