/* Mobile first. Comfortable, not oversized, type for devotees of every age. */
:root {
  --page: #f6ecdb;
  --card: #fffdf8;
  --cream: #fbf3e4;
  --line: #eadbbf;
  --maroon-900: #3b0f0d;
  --maroon: #5a1714;
  --maroon-500: #7d2420;
  --gold: #d99a1e;
  --gold-deep: #9a6408;
  --gold-soft: #f3d9a0;
  --ink: #2b1b14;
  --ink-soft: #5b483d;
  --display: "Faculty Glyphic", "Noto Serif Malayalam", Georgia, serif;
  --sans: "Inter", "Noto Sans Malayalam", system-ui, sans-serif;
  --r: 18px;
  --max: 1180px;
  --gutter: 16px;
  --pad: 22px;
  --head-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
html[lang="ml"] body { line-height: 1.75; }
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.18; margin: 0 0 .45em; color: var(--maroon); }
html[lang="ml"] h1, html[lang="ml"] h2, html[lang="ml"] h3 { font-weight: 600; line-height: 1.38; }
h1 { font-size: clamp(1.75rem, 6vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 4.4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.3rem); }
html[lang="ml"] h1 { font-size: clamp(1.5rem, 5.2vw, 2.2rem); }
html[lang="ml"] h2 { font-size: clamp(1.25rem, 3.8vw, 1.7rem); }
p { margin: 0 0 .9em; }
.wrap { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1.25 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-500); }
.btn-gold { background: var(--gold); color: var(--maroon-900); }
.btn-gold:hover { background: #e8ab32; }
.btn-outline { border-color: var(--maroon); color: var(--maroon); background: transparent; }
.btn-outline:hover { background: var(--maroon); color: #fff; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card);
  color: var(--maroon); display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover:not(:disabled) { border-color: var(--maroon); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* Header: spacer | emblem centred | menu button (mobile). Menu | emblem | offering (desktop). */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--page); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -14px rgba(59,15,13,.5); }
.bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; height: var(--head-h); width: min(1320px, 100% - 24px); margin-inline: auto; }
.brand { grid-column: 2; justify-self: center; display: block; min-width: 0; }
.brand img { width: min(250px, 100%); height: auto; }
.bar-right { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; }
.header-cta { display: none; }
.menu-btn { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; color: var(--maroon); }
.menu-btn span { display: block; height: 2px; border-radius: 2px; background: currentColor; margin: 5px 0; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: fixed; inset: var(--head-h) 0 0 0; background: var(--page); padding: 8px 20px 32px;
  display: none; flex-direction: column; overflow-y: auto; border-top: 1px solid var(--line);
}
.nav.open { display: flex; }
.nav > a:not(.btn), .sub-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; flex: none;
  padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  font: 400 1.15rem/1.3 var(--display); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
html[lang="ml"] .nav > a:not(.btn), html[lang="ml"] .sub-btn { font: 500 1.02rem/1.4 var(--sans); }
.nav > a[aria-current="page"], .sub-btn[data-current] { color: var(--maroon); }
.nav > a[aria-current="page"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.sub-btn svg { width: 20px; height: 20px; transition: transform .2s; }
.sub-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub { display: none; padding: 2px 0 8px 14px; border-bottom: 1px solid var(--line); }
.sub.open { display: block; }
.sub a { display: flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; font-size: 1rem; color: var(--ink); }
.sub a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.sub a[aria-current="page"] { color: var(--maroon); font-weight: 600; }
.sub a[aria-current="page"]::before { background: var(--gold); }
.nav-cta { margin-top: 22px; flex: none; }

/* Layout */
.stack { display: grid; gap: 16px; padding: 16px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px var(--pad); box-shadow: 0 18px 40px -34px rgba(59,15,13,.45); min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.card-maroon { background: var(--maroon); border-color: var(--maroon); color: #f4e6cf; }
.card-maroon h2, .card-maroon h3 { color: #fff; }
.card-maroon .kicker { color: var(--gold-soft); }
.card-cream { background: var(--cream); }
.kicker, .eyebrow { font-weight: 600; font-size: .85rem; color: var(--gold-deep); margin-bottom: .45em; }
.lead { font-size: 1rem; color: var(--ink-soft); max-width: 62ch; }
.card-maroon .lead, .card-maroon p { color: #f4e6cf; }
.cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.notice { background: var(--cream); border-left: 3px solid var(--gold); padding: 12px 14px; border-radius: 10px; color: var(--ink-soft); font-size: .95rem; }

/* Bands: sections that run edge to edge, outside the cards */
.band { padding: 28px 0 40px; }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.row-head h2 { margin-bottom: .3em; }
.arrows { display: flex; gap: 8px; margin-bottom: .5em; }
.center-head { text-align: center; }
.center-head .lead { margin-inline: auto; }

/* Hero */
.hero { padding-top: 12px; }
.slideshow { position: relative; width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; border-radius: var(--r); overflow: hidden; background: var(--maroon-900); aspect-ratio: 1 / 1; }
.slides, .slide { position: absolute; inset: 0; }
.slide { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; opacity: 0; transition: opacity .8s ease; }
.slide.active { opacity: 1; }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,253,248,.9); color: var(--maroon); display: grid; place-items: center; cursor: pointer; }
.slide-btn[hidden], .dots[hidden] { display: none; }
.slide-btn svg { width: 20px; height: 20px; }
.slide-btn.prev { left: 10px; } .slide-btn.next { right: 10px; }
.dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.dot { width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); }
.dot[aria-current="true"]::before { background: #fff; }
.hero-copy { padding: 22px 4px 8px; text-align: center; }
.hero-copy .lead { margin-inline: auto; }

/* Pallakku */
.ph-grid { display: grid; gap: 4px; }
.pallakku-figure { margin: 4px 0; }
.pallakku-figure img { width: 100%; max-width: 440px; margin-inline: auto; filter: drop-shadow(0 16px 22px rgba(0,0,0,.35)); }
.pallakku-figure.wide img { max-width: 640px; }
.pallakku-figure figcaption { text-align: center; font-size: .8rem; color: var(--gold-soft); margin-top: 6px; }
.progress { margin: 16px 0 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); }
.card-maroon > .progress:last-child { margin-bottom: 0; }
.pg-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.card-maroon .stat-label { color: var(--gold-soft); font-size: .85rem; margin: 0 0 4px; }
.card-maroon .stat-big { font: 400 clamp(2.3rem, 10vw, 3.6rem)/1 var(--display); color: #fff; margin: 0; font-variant-numeric: tabular-nums; }
.stat-big small { font: 500 .95rem var(--sans); color: var(--gold-soft); }
.card-maroon .pg-pct { margin: 0; text-align: right; font: 400 clamp(1.6rem, 6vw, 2.3rem)/1 var(--display); color: var(--gold); }
.pg-pct small { display: block; font: 400 .8rem var(--sans); color: var(--gold-soft); margin-top: 5px; }
.meter { position: relative; height: 16px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; }
.meter-fill { height: 100%; min-width: 16px; border-radius: inherit; background: linear-gradient(90deg, #b9790f, #f0b43a 60%, #ffd77a); transition: width 1.6s cubic-bezier(.22,.8,.3,1); }
.meter-ends { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: .85rem; color: var(--gold-soft); }
.meter-ends strong { color: #fff; }
.pg-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.pg-stats p { margin: 0; }
.card-maroon .stat-mid { font: 400 clamp(1.3rem, 5vw, 1.8rem)/1.15 var(--display); color: #fff; margin: 0; }
.card-maroon .stat-mid.small { font: 500 .95rem/1.4 var(--sans); }
.card-maroon .fine { font-size: .82rem; color: var(--gold-soft); margin: 14px 0 0; }
.pallakku-home .btn { width: 100%; }

.story { display: grid; gap: 20px; }
.verse { margin: 0; padding: 20px; background: var(--cream); border-radius: 14px; border-left: 3px solid var(--gold); }
.verse-sa { font: 500 1.1rem/1.7 "Noto Serif Devanagari", serif; color: var(--maroon); margin-bottom: .5em; }
.verse-tr { font: 400 1rem/1.5 var(--display); color: var(--ink-soft); margin: 0; }
html[lang="ml"] .verse-tr { font-family: "Noto Serif Malayalam", serif; }

.give { display: grid; gap: 24px; }
.bank { margin: 14px 0 20px; }
.bank div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.bank dt { font-size: .85rem; color: var(--ink-soft); }
.bank dd { margin: 2px 0 0; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; word-break: break-word; }
.copy { min-height: 34px; border: 1.5px solid var(--line); background: var(--cream); border-radius: 999px; padding: 4px 12px; font: 500 .85rem var(--sans); color: var(--maroon); cursor: pointer; }
.copy:hover { border-color: var(--gold); }
.qr { margin: 0; text-align: center; }
.qr img { width: 100%; max-width: 230px; margin-inline: auto; border: 1px solid var(--line); border-radius: 14px; }
.qr figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }

.appeal { display: grid; gap: 16px; justify-items: center; text-align: center; }
.appeal-text p { margin: 0; color: var(--ink-soft); }
.appeal-cover { display: block; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--cream); cursor: zoom-in; width: min(300px, 100%); box-shadow: 0 18px 34px -22px rgba(59,15,13,.55); transition: transform .2s; }
.appeal-cover:hover { transform: translateY(-3px); }
.appeal-cover img { width: 100%; }

.gifts { padding-top: 32px; }
.marquee { overflow: hidden; margin-top: 18px; }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { height: 200px; width: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.marquee-track img:nth-child(3n+2) { aspect-ratio: 3 / 4; }
.marquee-track img:nth-child(3n) { aspect-ratio: 16 / 10; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 6px)); } }

/* Milestones: line fills as you scroll */
.tl-title { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.timeline { list-style: none; margin: 10px 0 22px; padding: 0; position: relative; }
.tl-rail { position: absolute; left: 8px; top: 14px; bottom: 14px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-fill { display: block; width: 100%; height: 0; background: var(--gold); border-radius: 2px; transition: height .15s linear; }
.tl-item { position: relative; padding: 4px 0 18px 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 1px; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); transition: background .3s, border-color .3s, transform .3s; }
.tl-item.on::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217,154,30,.18); }
.tl-item .yr { display: block; font: 400 1.25rem/1.2 var(--display); color: var(--ink-soft); transition: color .3s; }
.tl-item.on .yr { color: var(--maroon); }
.tl-item p { margin: 2px 0 0; color: var(--ink-soft); font-size: .95rem; opacity: .7; transition: opacity .3s; }
.tl-item.on p { opacity: 1; }

/* Events */
.event-list { list-style: none; margin: 12px 0 20px; padding: 0; border-top: 1px solid var(--line); }
.event-list li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ev-date { text-align: center; line-height: 1; background: var(--cream); border-radius: 10px; padding: 8px 2px; }
.ev-date b { display: block; font: 400 1.5rem/1 var(--display); color: var(--maroon); }
.ev-date span { display: block; font-size: .7rem; color: var(--ink-soft); margin-top: 4px; }
.ev-name { margin: 0; font-weight: 500; font-size: .95rem; }
.ev-range { margin: 4px 0 0; font-size: .88rem; color: var(--gold-deep); }
.chip { display: inline-block; margin-top: 6px; font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: #eef2e6; color: #4b5d32; }
.event-list li.past .ev-name { color: var(--ink-soft); }
.tabs { display: inline-flex; padding: 4px; background: var(--cream); border-radius: 999px; border: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { min-height: 42px; border: 0; background: transparent; padding: 0 18px; border-radius: 999px; font: 500 .92rem var(--sans); cursor: pointer; color: var(--ink-soft); }
.tabs button[aria-selected="true"] { background: var(--maroon); color: #fff; }

/* Vazhipadu */
.vz-home { display: grid; gap: 6px; }
.vz-home .btn { justify-self: start; }
.rates { width: 100%; border-collapse: collapse; }
.rates th { text-align: left; font-size: .85rem; color: var(--ink-soft); font-weight: 500; padding: 0 0 8px; border-bottom: 2px solid var(--maroon); }
.rates td { padding: 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
.rates .r { text-align: right; }
.rates td.r { font: 600 .92rem var(--sans); color: var(--maroon); white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.rates td.r.office { font-weight: 500; font-size: .85rem; color: var(--ink-soft); white-space: normal; max-width: 8.5em; }

/* News */
.news-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px var(--gutter) 18px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.news-track::-webkit-scrollbar { display: none; }
.news-track .news-card { flex: 0 0 80%; scroll-snap-align: start; }
.news-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -22px rgba(59,15,13,.5); }
.news-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.news-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.news-meta { font-size: .8rem; font-weight: 600; color: var(--gold-deep); margin: 0 0 4px; }
.news-body h3 { margin: 0 0 .35em; }
.news-sum { margin: 0 0 12px; color: var(--ink-soft); font-size: .92rem; flex: 1; }
.news-read { font-weight: 600; font-size: .9rem; color: var(--maroon); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); }
.band .wrap > .btn { margin-top: 4px; }
.news-grid { display: grid; gap: 16px; }
.sort-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: .92rem; color: var(--ink-soft); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; min-height: 44px; padding: 0 40px 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font: 500 .92rem var(--sans); color: var(--ink); cursor: pointer; }
.select svg { position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; color: var(--maroon); }

/* Article */
.article-wrap { max-width: 860px; }
.art-cover { width: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
.article p { font-size: 1rem; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.gal-item { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--cream); }
.gal-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .3s; }
.gal-item:hover img { transform: scale(1.04); }
.back-link { justify-self: start; }

/* Viewer */
.viewer { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: #1c0807; color: #fff; }
.viewer::backdrop { background: rgba(28,8,7,.6); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 0 18px; }
.viewer-count { font-size: .9rem; color: #e9d8bc; }
.viewer-close { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.viewer-close svg { width: 22px; height: 22px; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 12px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.viewer-nav[hidden] { display: none; }
.viewer-nav svg { width: 22px; height: 22px; }
.viewer-nav.prev { left: 10px; } .viewer-nav.next { right: 10px; }

/* Inner page head: breadcrumbs on the left, title and description centred */
.page-head { padding: 16px 0 4px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-soft); }
.crumbs a { color: var(--maroon); text-underline-offset: 3px; }
.crumbs > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.page-intro { text-align: center; max-width: 720px; margin: 22px auto 8px; }
.page-intro .lead { margin-inline: auto; }
.page-intro .btn { margin-top: 4px; }
.prose p { max-width: 70ch; }
.prose h2:not(:first-child) { margin-top: 1.1em; }

/* Footer */
.site-footer { background: var(--maroon-900); color: #e9d8bc; padding: 60px 0 96px; margin-top: 16px; font-size: .95rem; }
.foot-lockup { display: flex; flex-direction: column; align-items: center; text-align: center; }
.foot-lockup img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.foot-name { font: 400 clamp(1.7rem, 7vw, 2.8rem)/1.12 var(--display); color: #fff; margin: 16px 0 6px; }
html[lang="ml"] .foot-name { font-weight: 600; font-size: clamp(1.4rem, 6vw, 2.2rem); }
.foot-tag { color: var(--gold); margin: 0; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "visit visit" "left right"; gap: 32px 20px; margin-top: 44px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.14); }
.foot-visit { grid-area: visit; text-align: center; }
.foot-menu.left { grid-area: left; }
.foot-menu.right { grid-area: right; }
.foot-h { font: 400 1.1rem var(--display); color: #fff; margin: 0 0 10px; }
html[lang="ml"] .foot-h { font-weight: 600; }
.foot-menu a { display: flex; align-items: center; min-height: 40px; text-decoration: none; color: #e9d8bc; }
.foot-menu a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot-visit address { font-style: normal; line-height: 1.6; max-width: 32ch; margin: 0 auto 16px; }
.foot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 380px; margin-inline: auto; }
.foot-actions a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid rgba(243,217,160,.35); border-radius: 999px; color: #fff; text-decoration: none; font-weight: 500; font-size: .92rem; transition: background .2s, border-color .2s; }
.foot-actions a:hover { background: rgba(255,255,255,.08); border-color: var(--gold); }
.foot-actions svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.foot-row { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; color: #bfa884; }

/* Language selector: compact pill that opens the two options */
.lang { position: fixed; right: 12px; bottom: 12px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--maroon); font: 600 .9rem var(--sans); cursor: pointer; box-shadow: 0 10px 26px -10px rgba(59,15,13,.5); }
.lang-btn svg { width: 20px; height: 20px; stroke-width: 1.7; }
.lang.open .lang-btn { background: var(--maroon); color: #fff; border-color: var(--gold); }
.lang-menu { display: flex; flex-direction: column; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 36px -12px rgba(59,15,13,.5); min-width: 160px; }
.lang-menu[hidden] { display: none; }
.lang-menu button { min-height: 44px; border: 0; background: transparent; border-radius: 10px; padding: 0 12px; text-align: left; font: 500 .95rem var(--sans); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lang-menu button[lang="ml"] { font-family: "Noto Sans Malayalam", sans-serif; }
.lang-menu button:hover { background: var(--cream); }
.lang-menu button[aria-checked="true"] { color: var(--maroon); font-weight: 600; }
.lang-menu button[aria-checked="true"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* Tablet and up */
@media (min-width: 700px) {
  :root { --gutter: 24px; --pad: 36px; }
  body { font-size: 16.5px; }
  .card { padding: 36px var(--pad); }
  .stack { gap: 24px; padding: 24px 0 56px; }
  .slideshow { aspect-ratio: 16 / 9; }
  .slide { object-fit: contain; }
  .cta-row { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .pallakku-home .btn { width: auto; }
  .card-maroon .pg-pct { text-align: right; }
  .news-track { padding-inline: max(var(--gutter), (100% - var(--max)) / 2); scroll-padding-inline: max(var(--gutter), (100% - var(--max)) / 2); }
  .news-track .news-card { flex-basis: 340px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .marquee-track img { height: 240px; }
  .event-list li { grid-template-columns: 68px 1fr; gap: 18px; }
  .foot-cols { grid-template-columns: 1fr 1.5fr 1fr; grid-template-areas: "left visit right"; }
  .foot-menu.right { text-align: right; }
  .foot-menu.right a { justify-content: flex-end; }
  .foot-row { flex-direction: row; justify-content: space-between; }
  .brand img { width: 270px; }
  .bar { grid-template-columns: 48px 1fr 48px; }
}

/* Desktop */
@media (min-width: 1180px) {
  :root { --head-h: 104px; --pad: 52px; }
  body { font-size: 17px; }
  .bar { grid-template-columns: 1fr auto 1fr; gap: 24px; }
  .bar-spacer, .menu-btn, .nav-cta { display: none; }
  .brand img { width: 300px; }
  .header-cta { display: inline-flex; }
  .nav { grid-column: 1; grid-row: 1; position: static; display: flex; flex-direction: row; align-items: center; gap: 2px; padding: 0; background: none; border: 0; overflow: visible; }
  .nav > a:not(.btn), .sub-btn { width: auto; min-height: 42px; padding: 0 12px; border: 0; font: 500 .95rem var(--sans); border-radius: 999px; gap: 4px; white-space: nowrap; }
  html[lang="ml"] .nav > a:not(.btn), html[lang="ml"] .sub-btn { font: 500 .9rem var(--sans); padding: 0 10px; }
  .nav > a:not(.btn):hover, .sub-btn:hover { background: var(--cream); }
  .nav > a[aria-current="page"]::after { display: none; }
  .nav > a[aria-current="page"], .sub-btn[data-current] { color: var(--maroon); background: var(--cream); }
  .sub-btn svg { width: 16px; height: 16px; }
  .has-sub { position: relative; }
  .sub { position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px -16px rgba(59,15,13,.45); }
  .has-sub:hover .sub { display: block; }
  .has-sub:hover .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
  .sub a { padding: 0 12px; border-radius: 10px; white-space: nowrap; font-size: .95rem; }
  .sub a:hover { background: var(--cream); }

  .hero-copy { padding: 36px 0 12px; max-width: 820px; margin-inline: auto; }
  .card { padding: 48px var(--pad); }
  .ph-grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
  .pallakku-home .progress { margin-top: 28px; }
  .pg-stats { gap: 24px; }
  .story, .give { grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
  .give { align-items: center; }
  .appeal { grid-template-columns: 1fr auto; text-align: left; justify-items: start; align-items: center; column-gap: 48px; }
  .appeal-text { grid-column: 1; }
  .appeal-cover { grid-column: 2; grid-row: 1 / span 2; }
  .appeal > .btn { grid-column: 1; }
  .vz-home { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
  .vz-home .btn { justify-self: end; }
  .news-track .news-card { flex-basis: 360px; }
  .news-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .marquee-track img { height: 280px; }
  .page-head { padding: 24px 0 8px; }
  .lang { right: 22px; bottom: 22px; }
  .viewer-nav.prev { left: 24px; } .viewer-nav.next { right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .meter-fill, .tl-fill { transition: none; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}
.foot-row a { color: #e9d8bc; text-underline-offset: 3px; }
.addr-pin { white-space: nowrap; }
.foot-8lm { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #bfa884; }
.foot-8lm img { height: 15px; width: auto; display: block; }
.foot-8lm:hover { color: #fff; }
@media (max-width: 699px) { .addr-pin { display: block; } }

/* Festival card: gold */
.card-gold { background: linear-gradient(135deg, #f8dc8a 0%, #e8b544 45%, #c98a16 100%); border-color: #d9a234; color: var(--maroon-900); box-shadow: 0 22px 44px -30px rgba(154,100,8,.8); }
.card-gold h2 { color: var(--maroon-900); }
.card-gold .kicker { color: var(--maroon); }
.card-gold .lead { color: #4a2410; }
.fest-head { display: grid; gap: 10px; }
.fest-count { justify-self: start; margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(59,15,13,.88); color: var(--gold-soft); font-weight: 600; font-size: .88rem; }
.fest-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 20px; }
.fest-date { background: rgba(255,253,248,.72); border: 1px solid rgba(255,255,255,.6); border-radius: 14px; padding: 14px; }
.fest-date p { margin: 0; }
.fd-label { font: 400 1.05rem var(--display); color: var(--maroon); }
html[lang="ml"] .fd-label { font-weight: 600; }
.fd-day { font: 400 clamp(1.3rem, 5.4vw, 2rem)/1.1 var(--display); color: var(--maroon-900); margin-top: 6px !important; }
.fd-meta { font-size: .85rem; color: var(--ink-soft); margin-top: 4px !important; }
.fd-me { font-size: .82rem; color: var(--gold-deep); font-weight: 600; margin-top: 2px !important; }
.fd-sub { font-size: .82rem; color: var(--ink-soft); margin-top: 8px !important; padding-top: 8px; border-top: 1px solid rgba(90,23,20,.12); }

/* Events extras */
.ev-wd { display: block; font-size: .68rem; color: var(--gold-deep); margin-top: 3px; font-weight: 600; }
.ev-me { margin: 3px 0 0; font-size: .8rem; color: var(--ink-soft); }
.event-list li.etd .ev-date { background: linear-gradient(135deg, #f8dc8a, #e1a83a); }
.event-list li.etd .ev-name { color: var(--maroon); font-weight: 600; }
.chip-gold { background: #fbefd2; color: var(--gold-deep); font-weight: 600; }
.chip + .chip { margin-left: 6px; }

/* Vazhipadu page */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.timings { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.timings li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.timings li:last-child { border-bottom: 0; }
.t-time { font-weight: 600; color: var(--maroon); font-variant-numeric: tabular-nums; }
.vz-tools { display: grid; gap: 12px; margin-bottom: 8px; }
.vz-tools .tabs { margin: 0; justify-self: start; }
.count { font-size: .78rem; opacity: .7; margin-left: 2px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-soft); }
.search input { width: 100%; min-height: 46px; padding: 0 16px 0 42px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--cream); font: 400 .95rem var(--sans); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--gold); background: #fff; }
.notes { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-soft); }
.notes li::marker { color: var(--gold); }
.cta-row.left { justify-content: flex-start; }

/* Footer timings */
.foot-times { margin: 0 auto 18px; font-size: .9rem; }
.foot-times p { margin: 0 0 2px; }
.foot-h.small { font-size: 1rem; margin-bottom: 6px; color: var(--gold); }

@media (min-width: 700px) {
  .fest-head { grid-template-columns: 1fr auto; align-items: start; }
  .fest-date { padding: 18px 20px; }
  .vz-tools { grid-template-columns: auto 1fr; align-items: center; }
  .timings { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: 40px; }
  .timings li:nth-child(3) { border-bottom: 0; }
}
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; flex: none; padding: 0 16px; }

/* Tabs live outside cards so they can scroll to the screen edge */
.tabbar { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .tabs { overflow: visible; max-width: none; margin: 0; }
.vz-tools { display: grid; gap: 12px; }
.vz-tools .search input { background: var(--card); }

/* 300th Pratishtha Vardhanthi */
.card-pv { background: linear-gradient(160deg, #fffaf0 0%, #fbefd6 100%); border: 1.5px solid #e6c47a; position: relative; overflow: hidden; }
.card-pv::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(217,154,30,.35); border-radius: calc(var(--r) - 6px); pointer-events: none; }
.pv-grid { display: grid; gap: 14px; position: relative; z-index: 1; }
.pv-mark { display: flex; align-items: baseline; gap: 12px; }
.pv-num { font: 400 clamp(3.6rem, 16vw, 5.6rem)/0.9 var(--display); background: linear-gradient(135deg, #c98a16, #e8b544 50%, #9a6408); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-years { font-weight: 600; font-size: .9rem; color: var(--maroon); }
.pv-dates { display: grid; gap: 12px; margin: 18px 0 20px; position: relative; z-index: 1; }
.card-pv > .pv-dates:only-child { margin: 0; }
.pv-dates .fest-date { background: #fff; border: 1px solid #efd9a8; }
.pv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; position: relative; z-index: 1; }
.pv-count { margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--maroon); color: var(--gold-soft); font-weight: 600; font-size: .88rem; }
.pv-count.center { display: inline-block; margin-top: 4px; }
.pv-count[hidden] { display: none; }
.pv-appeal { display: grid; gap: 24px; }
.pv-appeal-side { display: grid; gap: 14px; justify-items: center; }
.dl-list { display: grid; gap: 10px; width: min(340px, 100%); }
.dl-btn { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 12px 18px; border-radius: 16px; }
.dl-btn svg { grid-row: 1 / span 2; width: 22px; height: 22px; align-self: center; }
.dl-btn small { font-weight: 400; font-size: .8rem; opacity: .8; }
.dl-list .btn-outline { border-radius: 16px; }
.dl-soon { margin: 0; font-size: .88rem; color: var(--ink-soft); text-align: center; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.sevas { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.sevas li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); }
.sv-name { font: 400 1.1rem var(--display); color: var(--maroon); }
html[lang="ml"] .sv-name { font-weight: 600; }
.sv-amt { font-weight: 600; color: var(--maroon); white-space: nowrap; font-variant-numeric: tabular-nums; }
.committee { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.committee li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "role call" "name call"; align-items: center; column-gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.cm-role { grid-area: role; font-size: .78rem; font-weight: 600; color: var(--gold-deep); }
.cm-name { grid-area: name; font-weight: 500; }
.cm-call { grid-area: call; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--maroon); color: var(--maroon); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cm-call:hover { background: var(--maroon); color: #fff; }

@media (min-width: 700px) {
  .vz-tools { grid-template-columns: auto 1fr; align-items: center; }
  .vz-tools .tabbar { margin: 0; padding: 0; }
  .pv-dates { grid-template-columns: 1fr 1fr; }
  .sevas { grid-template-columns: repeat(3, 1fr); }
  .sevas li { flex-direction: column; align-items: flex-start; }
  .sv-amt { font-size: 1.15rem; }
  .committee { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1180px) {
  .pv-grid { grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
  .pv-mark { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pv-num { font-size: 7rem; }
  .pv-appeal { grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
  .committee { grid-template-columns: repeat(3, 1fr); }
}
#vardhanthi .fd-sub { display: none; }
@media (max-width: 699px) { #vardhanthi .pv-dates { grid-template-columns: 1fr 1fr; } #vardhanthi .fd-day { font-size: 1.2rem; } #vardhanthi .fd-me { font-size: .74rem; } }
#evPage { margin-top: 0; border-top: 0; }
#evPage li:first-child { padding-top: 0; }
#evPage:last-child { margin-bottom: 0; }
@media (max-width: 699px) { .committee li { grid-template-columns: 1fr; grid-template-areas: "role" "name" "call"; row-gap: 2px; } .cm-call { justify-self: start; margin-top: 8px; } }

/* Countdown chips: outline pills */
.fest-count, .pv-count { background: transparent; border: 1.5px solid var(--maroon); color: var(--maroon); padding: 5px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.fest-count { border-color: rgba(59,15,13,.75); color: var(--maroon-900); }
