/* Sree Nadarajaswami Temple — site styles
   Palette: ivory & sandal (light), kumkum maroon, brass-lamp gold, flame. */
:root {
  --bg: #fbf7ef;
  --bg-2: #f5ecdc;
  --bg-3: #ecdfc8;
  --card: #fffcf6;
  --ink: #2a1b14;
  --ink-2: #5b4636;
  --ink-3: #8c7765;
  --maroon: #7a1f1f;
  --maroon-2: #94291f;
  --maroon-deep: #4a1212;
  --gold: #a87a22;
  --gold-2: #d4a24a;
  --gold-soft: #ead3a0;
  --flame: #e9822f;
  --line: rgba(122, 31, 31, 0.14);
  --line-gold: rgba(168, 122, 34, 0.35);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 40px -26px rgba(74, 18, 18, 0.35);
  --radius: 8px;
  --serif: 'Cormorant Garamond', 'Noto Serif Malayalam', Georgia, serif;
  --display: 'Marcellus', 'Noto Serif Malayalam', Georgia, serif;
  --sans: 'Mulish', 'Manjari', system-ui, sans-serif;
  --ml-serif: 'Noto Serif Malayalam', 'Cormorant Garamond', serif;
  --ml-sans: 'Manjari', 'Mulish', sans-serif;
}
/* night mode (device setting or the moon button) */
html.dark {
    --bg: #15100c;
    --bg-2: #1d1610;
    --bg-3: #271d15;
    --card: #1e1711;
    --ink: #f3e7d4;
    --ink-2: #cdb99f;
    --ink-3: #8f7c66;
    --maroon: #e0a07a;
    --maroon-2: #eab08a;
    --maroon-deep: #0e0907;
    --gold: #e0b45e;
    --gold-2: #f0c877;
    --gold-soft: #5e4a24;
    --line: rgba(240, 200, 119, 0.12);
    --line-gold: rgba(240, 200, 119, 0.28);
    --shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.8);
  }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  font-variant-numeric: lining-nums;
  background-image:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.4px);
  background-size: 28px 28px;
}
html[lang='ml'] body { font-family: var(--ml-sans); font-size: 17.5px; line-height: 1.85; }
img { max-width: 100%; display: block; }
a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--gold); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-soft); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.container { width: min(1180px, 100%); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.12; letter-spacing: -0.005em; }
html[lang='ml'] h1, html[lang='ml'] h2, html[lang='ml'] h3, html[lang='ml'] h4 { font-family: var(--ml-serif); line-height: 1.35; letter-spacing: 0; }
h2 { font-size: clamp(32px, 4.4vw, 52px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); }
html[lang='ml'] h2 { font-size: clamp(26px, 3.4vw, 40px); }
html[lang='ml'] h3 { font-size: clamp(19px, 1.8vw, 23px); }
.eyebrow {
  font: 400 13px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.eyebrow::before, .eyebrow::after { content: ''; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
html[lang='ml'] .eyebrow { font-family: var(--ml-sans); letter-spacing: 0.04em; font-size: 15px; text-transform: none; }
.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- ornaments ---------- */
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); margin: 22px auto; }
.divider::before, .divider::after { content: ''; height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, currentColor); }
.divider::after { background: linear-gradient(270deg, transparent, currentColor); }
.divider svg { width: 34px; height: 34px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: 0.02em; transition: transform 0.3s, background 0.3s, box-shadow 0.3s, color 0.3s;
}
html[lang='ml'] .btn { font-family: var(--ml-sans); font-size: 16px; }
.btn-primary { background: var(--maroon); color: #fbeed4; box-shadow: 0 10px 24px -14px var(--maroon); }
.btn-primary:hover { background: var(--maroon-2); color: #fff6e3; transform: translateY(-2px); }
/* night mode (device setting or the moon button) */
html.dark .btn-primary { background: var(--gold); color: #1a120c; }
html.dark .btn-primary:hover { background: var(--gold-2); color: #1a120c; }
.btn-ghost { border: 1px solid var(--line-gold); color: var(--ink); background: color-mix(in srgb, var(--card) 60%, transparent); }
.btn-ghost:hover { border-color: var(--gold); color: var(--maroon); transform: translateY(-2px); }

/* ---------- notice ticker ---------- */
.ticker { background: var(--maroon-deep); color: #f1dcb0; font-size: 14px; overflow: hidden; position: relative; z-index: 60; }
.ticker-inner { display: flex; gap: 60px; width: max-content; padding: 9px 0; animation: ticker 38s linear infinite; }
.ticker:hover .ticker-inner { animation-play-state: paused; }
.ticker a { color: #f5d892; }
.ticker span { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.ticker span::before { content: '✦'; color: var(--gold-2); font-size: 11px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background 0.4s, box-shadow 0.4s; }
/* blur lives on a pseudo-element: a filter on the header itself would trap the fixed mobile menu */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0; transition: opacity 0.4s; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.site-header.scrolled::before, .site-header.nav-open::before { opacity: 1; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font: 600 20px/1.1 var(--serif); }
.brand-text small { font: 400 13px/1.3 var(--ml-sans); color: var(--gold); }
html[lang='ml'] .brand-text b { font-family: var(--ml-serif); font-size: 17px; }
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a { display: block; padding: 8px 13px; border-radius: 999px; color: var(--ink-2); font-size: 15px; font-weight: 500; transition: 0.25s; }
.nav-links a:hover { color: var(--maroon); background: var(--bg-2); }
.nav-links a[aria-current='page'] { color: var(--maroon); }
.nav-links a[aria-current='page']::after { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 3px auto 0; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.lang-btn { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-gold); font-size: 14px; font-weight: 600; color: var(--maroon); transition: 0.25s; }
.lang-btn:hover { background: var(--bg-2); }
.lang-btn .ml { font-family: var(--ml-sans); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-gold); place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: 0.3s; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.nav-open .menu-btn span { background: transparent; }
.nav-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); flex-direction: column; gap: 4px; padding: 96px 24px 24px;
    background: var(--bg); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, 0.4); transform: translateX(105%); visibility: hidden; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.45s; z-index: -1;
  }
  .nav-open .nav-links { transform: none; visibility: visible; }
  .nav-links a { font-size: 19px; padding: 12px 16px; }
  .nav-links a[aria-current='page']::after { display: none; }
  .brand-text small { display: none; }
}
@media (max-width: 380px) { .brand-text b { font-size: 17px; } .lang-btn { padding: 7px 10px; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); margin-top: -76px; padding: 120px 0 90px;
  display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; padding-bottom: 150px;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(233, 130, 47, 0.18), transparent 70%),
    radial-gradient(90% 70% at 50% 100%, var(--bg-3), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
/* night mode (device setting or the moon button) */
html.dark .hero { background: radial-gradient(55% 50% at 50% 42%, rgba(233, 130, 47, 0.22), transparent 70%), radial-gradient(90% 70% at 50% 100%, #2a1a10, transparent 70%), linear-gradient(180deg, #110c09, #1b130d); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-mandala { position: absolute; width: min(1100px, 150vw); aspect-ratio: 1; left: 50%; top: 42%; translate: -50% -50%; z-index: -2; color: var(--gold); opacity: 0.12; animation: spin 240s linear infinite; }
.prabha { position: relative; width: clamp(200px, 30vw, 300px); aspect-ratio: 1; margin: 0 auto 26px; }
.prabha .ring { position: absolute; inset: 0; color: var(--gold-2); animation: spin 120s linear infinite; filter: drop-shadow(0 0 12px rgba(233, 130, 47, 0.45)); }
.prabha .glow { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 140, 0.55), rgba(233, 130, 47, 0.12) 60%, transparent 72%); animation: breathe 6s ease-in-out infinite; }
.prabha .om { position: absolute; inset: 0; display: grid; place-items: center; font: 500 clamp(64px, 9vw, 96px)/1 var(--ml-serif); color: var(--maroon); text-shadow: 0 0 30px rgba(233, 130, 47, 0.45); padding-bottom: 6%; }
/* night mode (device setting or the moon button) */
html.dark .prabha .om { color: #ffd98f; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes breathe { 50% { opacity: 0.65; scale: 0.94; } }
.hero-ml { font: 500 clamp(19px, 2.4vw, 26px)/1.4 var(--ml-serif); color: var(--gold); margin-bottom: 6px; }
.hero h1 { font-size: clamp(42px, 7vw, 86px); font-weight: 500; letter-spacing: -0.01em; }
html[lang='ml'] .hero h1 { font-size: clamp(32px, 5.4vw, 62px); }
.hero-place { font: 400 14px/1 var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 22px; }
html[lang='ml'] .hero-place { font-family: var(--ml-sans); letter-spacing: 0.05em; font-size: 16px; }
.hero-tag { max-width: 54ch; margin: 0 auto 28px; color: var(--ink-2); font-size: clamp(16px, 1.5vw, 19px); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.nada {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; margin-bottom: 26px;
  border: 1px solid var(--line-gold); background: color-mix(in srgb, var(--card) 70%, transparent); font-size: 14px; color: var(--ink-2);
}
.nada i { width: 9px; height: 9px; border-radius: 50%; background: #9a8a78; }
.nada.open i { background: #3aa76d; box-shadow: 0 0 0 4px rgba(58, 167, 109, 0.18); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(58, 167, 109, 0); } }
.hero-chant { position: absolute; bottom: 26px; left: 0; right: 0; font: 400 15px/1 var(--ml-serif); color: var(--gold); letter-spacing: 0.08em; opacity: 0.85; }
.hero-chant::after { content: ''; display: block; width: 1px; height: 30px; background: linear-gradient(var(--gold), transparent); margin: 12px auto 0; animation: drip 2.4s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* page header (inner pages) */
.page-head { position: relative; margin-top: -76px; padding: 150px 0 70px; text-align: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(50% 80% at 50% 0%, rgba(233, 130, 47, 0.14), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg)); }
.page-head .hero-mandala { top: 0; opacity: 0.08; width: min(900px, 140vw); }
.page-head h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 500; }
html[lang='ml'] .page-head h1 { font-size: clamp(30px, 4.2vw, 48px); }
.page-head .sub { font: 500 18px/1.5 var(--ml-serif); color: var(--gold); margin-top: 8px; }
html[lang='ml'] .page-head .sub { font-family: var(--serif); font-style: italic; }

/* ---------- sections ---------- */
.section { padding: clamp(70px, 10vw, 120px) 0; position: relative; }
.section.tint { background: linear-gradient(180deg, transparent, var(--bg-2) 18%, var(--bg-2) 82%, transparent); }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { text-align: center; }
.section-head p { margin-top: 14px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* card */
.card {
  background: var(--card); border: 1px solid var(--line-gold); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow); position: relative;
}
.card.framed::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--line); border-radius: 5px; pointer-events: none; }

/* arch photo frame — the shape of a Kerala temple doorway */
.arch { border-radius: 999px 999px 10px 10px; overflow: hidden; border: 1px solid var(--line-gold); padding: 8px; background: var(--card); box-shadow: var(--shadow); }
.arch img { border-radius: 999px 999px 6px 6px; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; filter: sepia(0.12) saturate(0.95); object-position: 50% 75%; }

/* welcome */
.welcome { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.welcome .text p + p { margin-top: 16px; }
.welcome .actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
/* landscape photo with a gentle arched top (keeps the whole Sreekovil in view) */
.welcome .arch { max-width: 560px; justify-self: center; width: 100%; border-radius: 200px 200px 12px 12px; }
.welcome .arch img { aspect-ratio: 4 / 3; border-radius: 192px 192px 8px 8px; object-position: 50% 50%; }
@media (max-width: 860px) { .welcome { grid-template-columns: 1fr; } .welcome .arch { max-width: 520px; border-radius: 120px 120px 10px 10px; } .welcome .arch img { border-radius: 112px 112px 6px 6px; } }

/* next festival band */
.next-band { margin-top: -50px; position: relative; z-index: 2; }
.next-card { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(16px, 3vw, 36px); align-items: center; }
.next-card .label { font: 400 12px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
html[lang='ml'] .next-card .label { font-family: var(--ml-sans); letter-spacing: 0; font-size: 14px; }
.next-card h3 { margin-bottom: 4px; }
.countdown { display: flex; gap: 10px; }
.countdown div { min-width: 64px; text-align: center; padding: 10px 8px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); }
.countdown b { display: block; font: 600 28px/1 var(--serif); color: var(--maroon); }
.countdown small { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
@media (max-width: 760px) { .next-card { grid-template-columns: 1fr; text-align: center; } .countdown { justify-content: center; } .next-card .datetile { margin: 0 auto; } }

/* date tile */
.datetile { width: 74px; flex: none; text-align: center; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-gold); background: var(--card); }
.datetile .m { display: block; background: var(--maroon); color: #f6dfae; font: 600 12px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 4px; }
/* night mode (device setting or the moon button) */
html.dark .datetile .m { background: #5a2418; }
html[lang='ml'] .datetile .m { font-family: var(--ml-sans); letter-spacing: 0; font-size: 13px; text-transform: none; }
.datetile .d { display: block; font: 600 32px/1 var(--serif); padding: 8px 0 2px; color: var(--ink); }
.datetile .y { display: block; font-size: 11px; color: var(--ink-3); padding-bottom: 7px; }

/* events grid */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.event { display: flex; flex-direction: column; overflow: hidden; padding: 0; transition: transform 0.4s, box-shadow 0.4s; }
.event:hover { transform: translateY(-4px); }
.event .img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); position: relative; overflow: hidden; }
.event .img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.1); transition: transform 1.2s; }
.event:hover .img img { transform: scale(1.04); }
.event .img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); opacity: 0.55; }
.event .img .ph svg { width: 90px; }
.event .body { padding: 22px 24px 24px; display: flex; gap: 16px; align-items: flex-start; flex: 1; }
.event .body > div { min-width: 0; }
.event h3 { font-size: 23px; margin-bottom: 6px; }
html[lang='ml'] .event h3 { font-size: 19px; }
.event p { font-size: 15px; color: var(--ink-2); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }
html[lang='ml'] .tag { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; }
.tag.festival { color: var(--maroon); border-color: var(--line-gold); }
.tag.special_pooja { color: var(--gold); border-color: var(--line-gold); }
.tag.tentative { font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 500; }
.cal-link { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; margin-top: 12px; }

/* timings */
.timings { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .timings { grid-template-columns: 1fr; } }
.sessions { display: grid; gap: 14px; }
.session { display: flex; align-items: center; gap: 18px; }
.session .ic { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--gold); border: 1px solid var(--line-gold); }
.session .ic svg { width: 26px; }
.session b { font: 600 24px/1.2 var(--serif); display: block; }
.session small { color: var(--ink-3); font-size: 14px; }
.schedule { list-style: none; position: relative; }
.schedule::before { content: ''; position: absolute; left: 76px; top: 8px; bottom: 8px; width: 1px; background: var(--line-gold); }
.schedule li { display: grid; grid-template-columns: 64px 1fr; gap: 26px; padding: 9px 0; align-items: center; position: relative; }
.schedule li::before { content: ''; position: absolute; left: 72px; width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--gold); }
.schedule li.now::before { background: var(--flame); border-color: var(--flame); box-shadow: 0 0 0 5px rgba(233, 130, 47, 0.18); }
.schedule time { font: 600 16px/1 var(--serif); color: var(--maroon); text-align: right; }
.schedule span { font-size: 16px; }
.note { font-size: 14px; color: var(--ink-3); margin-top: 18px; display: flex; gap: 8px; }

/* deity */
.deity { display: grid; grid-template-columns: auto 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.deity-emblem { width: clamp(220px, 26vw, 320px); aspect-ratio: 1; position: relative; color: var(--gold); }
.deity-emblem svg { position: absolute; inset: 0; }
.deity-emblem .ring { animation: spin 180s linear infinite reverse; }
.deity-emblem .name { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 500 26px/1.25 var(--ml-serif); color: var(--maroon); padding: 28%; }
@media (max-width: 760px) { .deity { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.deity-list { display: grid; gap: 14px; margin-top: 22px; }
.deity-list .sub { display: flex; gap: 14px; align-items: center; }

/* priests */
.priests { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); gap: 26px; justify-content: center; }
.priest { text-align: center; }
.priest .arch { max-width: 230px; margin: 0 auto 18px; }
.priest .arch img { aspect-ratio: 4 / 5; object-position: 50% 25%; }
.priest .role { font: 400 12px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
html[lang='ml'] .priest .role { font-family: var(--ml-sans); letter-spacing: 0; font-size: 14px; text-transform: none; }
.priest h3 { font-size: 26px; }
.priest p { color: var(--ink-3); font-size: 15px; }

/* gallery */
.gallery-teaser { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 210px; gap: 12px; }
.gallery-teaser a { border-radius: var(--radius); overflow: hidden; position: relative; display: block; border: 1px solid var(--line-gold); }
.gallery-teaser a:first-child { grid-row: span 2; }
.gallery-teaser img, .albums img, .photos img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s; filter: sepia(0.12); }
.gallery-teaser a:hover img, .albums a:hover img, .photos button:hover img { transform: scale(1.05); filter: none; }
@media (max-width: 760px) { .gallery-teaser { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; } }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.album { display: block; color: var(--ink); }
.album .cover { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-gold); position: relative; box-shadow: var(--shadow); }
.album .count { position: absolute; right: 10px; bottom: 10px; background: rgba(26, 14, 8, 0.7); color: #f6e2b8; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.album h3 { font-size: 22px; margin-top: 14px; }
html[lang='ml'] .album h3 { font-size: 18px; }
.album small { color: var(--ink-3); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.photos button { aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.back-link { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 22px; font-weight: 600; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(14, 8, 5, 0.94); display: none; place-items: center; padding: 60px 16px 90px; }
.lightbox.open { display: grid; animation: fade 0.35s; }
@keyframes fade { from { opacity: 0; } }
.lightbox img { max-height: calc(100svh - 160px); max-width: min(1400px, 100%); object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox .cap { position: absolute; bottom: 26px; left: 16px; right: 16px; text-align: center; color: #eadbc2; font-size: 15px; }
.lightbox .lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #f1dcb0; background: rgba(255, 255, 255, 0.08); font-size: 22px; transition: 0.2s; }
.lightbox .lb-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox .close { top: 14px; right: 14px; }
.lightbox .prev { left: 14px; top: 50%; translate: 0 -50%; }
.lightbox .next { right: 14px; top: 50%; translate: 0 -50%; }

/* visit */
.visit { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-gold); box-shadow: var(--shadow); background: var(--card); }
.visit-photo { height: clamp(200px, 32vw, 340px); background-size: cover; background-position: center; position: relative; }
.visit-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--card)); }
.visit-body { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 50px); padding: 0 clamp(22px, 4vw, 48px) clamp(22px, 4vw, 48px); margin-top: -40px; position: relative; }
.visit-body iframe { width: 100%; height: 100%; min-height: 280px; border: 0; border-radius: 10px; filter: sepia(0.2) saturate(0.85); }
@media (max-width: 860px) { .visit-body { grid-template-columns: 1fr; } }
.contact-list { list-style: none; display: grid; gap: 16px; margin-top: 20px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ic { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line-gold); }
.contact-list .ic svg { width: 18px; }
.contact-list small { display: block; color: var(--ink-3); font-size: 13px; }

/* history */
.prose p { margin-bottom: 18px; color: var(--ink-2); font-size: 18px; }
.prose p:first-child::first-letter { font: 600 4.2em/0.8 var(--serif); float: left; margin: 8px 12px 0 0; color: var(--maroon); }
html[lang='ml'] .prose p:first-child::first-letter { font: inherit; float: none; margin: 0; color: inherit; }
.history-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .history-grid { grid-template-columns: 1fr; } }
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--gold), var(--line-gold), var(--gold)); }
.timeline li { position: relative; padding-bottom: 28px; }
.timeline li::before { content: ''; position: absolute; left: -31px; top: 5px; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle, var(--flame) 30%, var(--gold-2) 70%); box-shadow: 0 0 14px rgba(233, 130, 47, 0.55); }
.timeline .yr { font: 600 15px/1 var(--display); color: var(--gold); letter-spacing: 0.08em; }
.timeline h4 { font-size: 22px; margin: 6px 0 4px; }
html[lang='ml'] .timeline h4 { font-size: 18px; }
.timeline p { color: var(--ink-2); font-size: 15.5px; }

/* vazhipadu */
.vz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vz { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.vz h4 { font-size: 21px; }
html[lang='ml'] .vz h4 { font-size: 17px; }
.vz p { font-size: 14px; color: var(--ink-3); }
.vz .price { white-space: nowrap; font: 600 18px/1.2 var(--serif); color: var(--maroon); }
.vz .price.ask { display: block; font: 500 12.5px/1.3 var(--sans); color: var(--ink-3); text-align: right; max-width: 92px; }
.vz .alt { display: block; font: 400 15px/1.4 var(--ml-sans); color: var(--gold); }
html[lang="ml"] .vz .alt { font-family: var(--serif); font-style: italic; }

/* calendar */
.cal-wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .cal-wrap { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.cal-head h3 { font-size: 28px; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-gold); display: grid; place-items: center; transition: 0.2s; }
.cal-nav button:hover { background: var(--bg-2); }
.cal-nav .today-btn { width: auto; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { font-size: 12px; text-align: center; color: var(--ink-3); padding: 6px 0; text-transform: uppercase; letter-spacing: 0.06em; }
html[lang='ml'] .cal-grid .dow { text-transform: none; letter-spacing: 0; }
.cal-grid .day { aspect-ratio: 1; border-radius: 8px; padding: 6px; font-size: 14px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; border: 1px solid transparent; color: var(--ink-2); }
.cal-grid .day.other { opacity: 0.3; }
.cal-grid .day.today { border-color: var(--gold); color: var(--maroon); font-weight: 700; }
.cal-grid .day.has { background: var(--bg-2); cursor: pointer; color: var(--ink); font-weight: 600; }
.cal-grid .day.has:hover, .cal-grid .day.sel { background: var(--gold-soft); }
/* night mode (device setting or the moon button) */
html.dark .cal-grid .day.has:hover, html.dark .cal-grid .day.sel { background: #4a3a1c; }
.cal-grid .dots { display: flex; gap: 3px; }
.cal-grid .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.cal-grid .dots i.festival { background: var(--maroon); }
.cal-grid .dots i.special_pooja { background: var(--flame); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.legend i.festival { background: var(--maroon); }
.legend i.special_pooja { background: var(--flame); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-gold); font-size: 14px; font-weight: 600; color: var(--ink-2); transition: 0.2s; }
.chip:hover { color: var(--maroon); }
.chip.on { background: var(--maroon); color: #f8e6c0; border-color: var(--maroon); }
/* night mode (device setting or the moon button) */
html.dark .chip.on { background: var(--gold); color: #1a120c; border-color: var(--gold); }
.agenda { list-style: none; display: grid; gap: 12px; }
.agenda li { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.agenda h4 { font-size: 21px; }
html[lang='ml'] .agenda h4 { font-size: 17px; }
.agenda p { font-size: 14.5px; color: var(--ink-2); }
.agenda .when { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.year-list h3 { font-size: 24px; margin: 30px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-gold); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty svg { width: 56px; margin: 0 auto 10px; color: var(--gold); opacity: 0.6; }
details.archive summary { cursor: pointer; font-weight: 600; color: var(--maroon); padding: 10px 0; }

/* footer */
.site-footer { margin-top: 40px; background: var(--maroon-deep); color: #e9d5b2; position: relative; overflow: hidden; }
.site-footer::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(240, 200, 119, 0.12) 1px, transparent 1.4px); background-size: 26px 26px; pointer-events: none; }
.footer-top { text-align: center; padding: 60px 0 10px; position: relative; }
.footer-top .brand-mark { width: 64px; height: 64px; margin: 0 auto 14px; color: #e6b866; }
.footer-top h2 { color: #fbefd6; font-size: clamp(28px, 3.6vw, 40px); font-weight: 500; }
.footer-top p { color: #d9b878; font-family: var(--ml-serif); margin-top: 6px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 40px 0; border-bottom: 1px solid rgba(240, 200, 119, 0.15); position: relative; }
.footer-grid h4 { font: 400 13px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: #e6b866; margin-bottom: 16px; }
html[lang='ml'] .footer-grid h4 { font-family: var(--ml-sans); letter-spacing: 0; font-size: 15px; text-transform: none; }
.footer-grid p, .footer-grid li { font-size: 15px; color: #e3cfae; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a { color: #f2dcb1; }
.footer-grid a:hover { color: #fff; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; text-align: center; } }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 28px; font-size: 13.5px; color: #c9a873; position: relative; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(240, 200, 119, 0.3); color: #f2dcb1; }
.socials a:hover { background: rgba(240, 200, 119, 0.12); }
.socials svg { width: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Numerals: Cormorant only ships old-style figures, so numbers use Marcellus. */
.datetile .d, .countdown b, .session b, .schedule time, .vz .price, .cal-head h3, .num { font-family: var(--display); font-weight: 400; }
.datetile .d { font-size: 28px; }
.countdown b { font-size: 24px; }
.session b { font-size: 21px; }
.schedule time { font-size: 15px; }
.event .img.noimg { aspect-ratio: 16 / 5; }
.event .img.noimg .ph svg { width: 64px; }
.divider.left { justify-content: flex-start; margin-left: 0; }
@media (max-width: 760px) { .deity .divider.left { justify-content: center; margin-left: auto; } }
.deity-emblem .name { font-size: clamp(17px, 2.1vw, 23px); padding: 26%; line-height: 1.5; }
html[lang='ml'] .hero h1[lang='en'] { font-family: var(--serif); font-size: clamp(40px, 6.4vw, 80px); line-height: 1.12; }
.schedule { --tcol: 80px; }
html[lang='ml'] .schedule { --tcol: 116px; }
.schedule::before { left: calc(var(--tcol) + 12px); }
.schedule li { grid-template-columns: var(--tcol) 1fr; }
.schedule li::before { left: calc(var(--tcol) + 8px); }

/* day / night switch */
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-gold); display: grid; place-items: center; color: var(--maroon); transition: 0.25s; }
.theme-btn:hover { background: var(--bg-2); }
.theme-btn svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity 0.3s, transform 0.4s; }
.theme-btn svg:last-child { opacity: 0; transform: rotate(-60deg) scale(0.6); }
html.dark .theme-btn { color: var(--gold-2); }
html.dark .theme-btn svg:first-child { opacity: 0; transform: rotate(60deg) scale(0.6); }
html.dark .theme-btn svg:last-child { opacity: 1; transform: none; }
html.dark .lang-btn { color: var(--gold-2); }
body, .card, .site-header::before { transition: background-color 0.5s, color 0.5s, border-color 0.5s; }
@media (max-width: 380px) { .theme-btn { width: 36px; height: 36px; } }

/* Shiva family picture inside the ring of flames (replaces the Om) */
.prabha { width: clamp(270px, 36vw, 400px); }
.prabha .deity-img { position: absolute; inset: 16.5%; border-radius: 50%; overflow: hidden; z-index: 1;
  box-shadow: 0 0 0 2px var(--gold-2), 0 0 0 6px color-mix(in srgb, var(--gold-2) 25%, transparent), 0 0 46px rgba(233, 130, 47, 0.55); }
.prabha .deity-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prabha .ring { z-index: 0; pointer-events: none; }
.session small.special { display: block; margin-top: 4px; color: var(--maroon); font-weight: 600; }
html.dark .session small.special { color: var(--gold-2); }
