/* Mor Sabore Afroth Cathedral Valiyapally — site styles
   Palette from the church itself: lime-washed walls, mural green and sindoor red
   of the saints' robes and altar, carved teak ceiling, gilt of the thronos. */

:root {
  --lime: #FAFAF7;       /* whitewash: page background */
  --wash: #EEF2EE;       /* pale mural wash: alternate bands */
  --mural: #1F4D3B;      /* primary: headings, header, links */
  --mural-deep: #143428;
  --sindoor: #A4231B;    /* accent: active states, key dates */
  --teak: #6B4426;       /* warm secondary text, rules */
  --gilt: #8F6B12;       /* sparing highlights */
  --ink: #2B2622;        /* body text */
  --muted: #5F5A54;
  --line: #D9DED8;

  --display: "Marcellus", "Noto Serif Malayalam", Georgia, serif;
  --body: "Literata", "Noto Serif Malayalam", Georgia, serif;
  --ml: "Noto Serif Malayalam", "Literata", serif;

  --wrap: 1180px;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--lime); color: var(--ink);
  font: 400 1.0625rem/1.7 var(--body);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mural); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--sindoor); }
:focus-visible { outline: 3px solid var(--gilt); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--mural); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Bilingual ---------- */
html[data-lang="en"] [lang="ml"]:not(html),
html[data-lang="ml"] [lang="en"]:not(html) { display: none !important; }
[lang="ml"] { font-family: var(--ml); line-height: 1.85; }
h1 [lang="ml"], h2 [lang="ml"], h3 [lang="ml"], h1[lang="ml"], h2[lang="ml"], h3[lang="ml"] { font-weight: 600; letter-spacing: 0; }

/* ---------- Type scale (1.25) ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--mural); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink); max-width: var(--measure); }
.small { font-size: .9rem; color: var(--muted); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.band { background: var(--wash); }
.band-green { background: var(--mural); color: #EAF1EC; }
.band-green h2, .band-green h3 { color: #fff; }
.band-green a { color: #F3DFA6; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .6em; }
.split { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1.1fr .9fr; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.section-head { max-width: var(--measure); margin-bottom: 32px; }
.section-head p { color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar { background: var(--mural-deep); color: #D6E3DA; font-size: .85rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar .social { display: flex; gap: 14px; }
@media (max-width: 640px) { .topbar .times { display: none; } }
@media (max-width: 420px) { .topbar .social a[href*="youtube"], .topbar .social a[href*="facebook"] { display: none; } }
.priests .person h3 { overflow-wrap: normal; word-break: normal; hyphens: auto; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--mural); margin-right: auto; min-width: 0; }
.brand svg { width: 33px; height: 46px; flex: none; color: var(--sindoor); }
.brand-name { font-family: var(--display); font-size: 1.15rem; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--body); font-size: .78rem; color: var(--muted); }
.brand-name [lang="ml"] { font-size: 1rem; line-height: 1.35; }

.nav { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.nav > li { list-style: none; position: relative; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a, .nav button.navgroup { white-space: nowrap; display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font: inherit; font-size: .95rem; background: none; border: 0; cursor: pointer; border-radius: 4px; }
.nav a:hover, .nav button.navgroup:hover { color: var(--sindoor); }
.nav a[aria-current="page"], .nav li.active > button.navgroup { color: var(--sindoor); box-shadow: inset 0 -2px 0 var(--sindoor); border-radius: 0; }
.nav button.navgroup::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav .menu { position: absolute; left: 0; top: 100%; min-width: 230px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--mural); padding: 6px 0; display: none; box-shadow: 0 14px 30px rgba(20,52,40,.12); }
.nav .menu a { padding: 9px 16px; border-radius: 0; }
.nav .menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--sindoor); }
.nav li.open > .menu { display: block; }
@media (hover: hover) and (min-width: 1241px) { .nav li:hover > .menu { display: block; } }

.lang-switch { display: flex; border: 1px solid var(--mural); border-radius: 999px; overflow: hidden; flex: none; }
.lang-switch button { background: transparent; color: var(--mural); border: 0; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--mural); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; cursor: pointer; color: var(--mural); }
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 1240px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: fixed; inset: 0; background: #fff; z-index: 60; flex-direction: column; align-items: stretch; padding: 80px var(--gutter) 40px; overflow-y: auto; gap: 0; }
  .nav.open { display: flex; }
  .nav > li { border-bottom: 1px solid var(--line); }
  .nav a, .nav button.navgroup { font-size: 1.1rem; padding: 14px 4px; width: 100%; text-align: left; }
  .nav .menu { position: static; box-shadow: none; border: 0; padding: 0 0 10px 14px; min-width: 0; }
  .nav .menu a { font-size: 1rem; padding: 10px 4px; }
  .nav a[aria-current="page"], .nav li.active > button.navgroup { box-shadow: none; }
  .nav > li.nav-close { border: 0; position: absolute; top: 18px; right: var(--gutter); }
  .brand-name small { display: none; }
}
@media (min-width: 1241px) { .nav > li.nav-close { display: none; } }
.nav-close button { background: none; border: 1px solid var(--line); border-radius: 6px; width: 44px; height: 44px; font-size: 1.4rem; color: var(--mural); cursor: pointer; }
body.menu-open { overflow: hidden; }

/* ---------- Signature: scalloped fan-arch edge, from the cathedral front ---------- */
.scallop { display: block; width: 100%; height: 26px; color: var(--lime); }
.scallop.on-band { color: var(--wash); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(82vh, 760px); display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--mural-deep); }
.hero .slides { position: absolute; inset: 0; }
.hero .slide { position: absolute; inset: 0; background-size: cover; background-position: center 40%; opacity: 0; transition: opacity 1.4s ease; }
.hero .slide.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,36,28,.78) 0%, rgba(14,36,28,.5) 45%, rgba(14,36,28,.05) 75%), linear-gradient(180deg, rgba(20,52,40,.1) 0%, rgba(20,52,40,.15) 50%, rgba(14,36,28,.7) 100%); }
@media (max-width: 760px) { .hero::after { background: linear-gradient(180deg, rgba(14,36,28,.35) 0%, rgba(14,36,28,.55) 40%, rgba(14,36,28,.88) 100%); } }
.hero-content { position: relative; z-index: 2; padding-bottom: clamp(64px, 9vw, 110px); padding-top: 120px; }
.hero h1 { color: #fff; max-width: 17ch; margin-bottom: .3em; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero h1 [lang="ml"] { font-size: .78em; }
.hero p { max-width: 54ch; font-size: 1.15rem; color: #EEF4F0; }
.hero .years { font-family: var(--display); font-size: clamp(1rem, 1.6vw, 1.15rem); color: #F3DFA6; margin-bottom: 14px; letter-spacing: .04em; }
.hero .scallop { position: absolute; bottom: -1px; left: 0; z-index: 3; }
.hero-controls { position: absolute; right: var(--gutter); bottom: 48px; z-index: 4; display: flex; gap: 8px; }
.hero-controls button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); background: rgba(20,52,40,.35); color: #fff; cursor: pointer; font-size: 1.1rem; }
.hero-controls button:hover { background: rgba(20,52,40,.7); }
@media (max-width: 640px) { .hero-controls { display: none; } }

.page-hero { position: relative; color: #fff; background: var(--mural-deep) center 40% / cover no-repeat; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,52,40,.55), rgba(14,36,28,.86)); }
.page-hero .wrap { position: relative; padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(64px, 8vw, 104px); }
.page-hero h1 { color: #fff; margin-bottom: .2em; }
.page-hero p { color: #E2ECE5; max-width: 60ch; margin: 0; font-size: 1.1rem; }
.page-hero .scallop { position: absolute; bottom: -1px; left: 0; z-index: 2; }
/* Slow zoom on the header photo, title fades up */
.page-hero { overflow: hidden; isolation: isolate; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: inherit; background-position: inherit; background-size: cover; background-repeat: no-repeat; transform-origin: 50% 40%; animation: hero-zoom 18s cubic-bezier(.25,.1,.25,1) forwards; will-change: transform; }
.page-hero::before { z-index: 0; }
.page-hero .wrap { z-index: 1; }
.page-hero h1, .page-hero .wrap > p { animation: hero-rise .9s ease-out both; }
.page-hero .wrap > p:not(.crumbs) { animation-delay: .15s; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page-hero::after, .page-hero h1, .page-hero .wrap > p { animation: none; } }
.crumbs { font-size: .9rem; color: #CFE0D5; margin-bottom: 10px; }
.crumbs a { color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 22px; border-radius: 2px; background: var(--sindoor); color: #fff; text-decoration: none; font-size: .98rem; border: 1px solid var(--sindoor); }
.btn:hover { background: #861B15; color: #fff; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn.line { background: transparent; color: var(--mural); border-color: var(--mural); }
.btn.line:hover { background: var(--mural); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Home: at-a-glance strip ---------- */
.glance { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: #fff; }
.glance > div { padding: 22px 24px; }
.glance > div + div { border-left: 1px solid var(--line); }
.glance h2 { font: 600 1rem/1.4 var(--body); margin-bottom: .4em; color: var(--teak); }
.glance .big { font-family: var(--display); font-size: 1.45rem; color: var(--mural); line-height: 1.3; }
.glance p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .glance { grid-template-columns: 1fr; } .glance > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Discover: image tiles ---------- */
.tiles { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; color: #fff; text-decoration: none; background: var(--mural); border-radius: 2px; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(14,36,28,.9)); }
.tile .t { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; }
.tile b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1.2; }
.tile em { font-style: normal; font-size: .92rem; color: #DCE8E0; }
.tile:hover { color: #fff; }
.tile:hover img { transform: scale(1.04); }
.tile.plain::after { display: none; }
.tile.plain.red { background: var(--sindoor); }
.tile.plain.teak { background: var(--teak); }
.tile .glyph { position: absolute; top: 18px; left: 18px; width: 44px; height: 44px; color: rgba(255,255,255,.85); }

/* ---------- Figures ---------- */
.frame { margin: 0; }
.frame img { width: 100%; border-radius: 2px; }
.frame figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.icon-frame { margin: 0 auto; max-width: 440px; padding: 12px; background: #fff; border: 1px solid var(--line); }

/* ---------- Timeline (real sequence) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); max-width: var(--measure); }
.timeline li { position: relative; padding: 0 0 26px 30px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); border: 2px solid var(--sindoor); }
.timeline .yr { display: block; font-family: var(--display); font-size: 1.35rem; color: var(--sindoor); line-height: 1.3; }
.timeline.compact li { padding-bottom: 16px; }
.band .timeline li::before { background: var(--wash); }
.band-green .timeline { border-color: rgba(255,255,255,.25); }
.band-green .timeline li::before { background: var(--mural); border-color: #F3DFA6; }
.band-green .timeline .yr { color: #F3DFA6; }

/* ---------- People (vicars, office-bearers) ---------- */
.people { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.people.lead { grid-template-columns: repeat(auto-fill, minmax(240px, 300px)); }
.person { background: #fff; border: 1px solid var(--line); }
.person img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--wash); }
.person .info { padding: 16px 18px 18px; }
.person h3 { font-size: 1.2rem; margin-bottom: .2em; }
.person .role { color: var(--sindoor); font-size: .95rem; margin-bottom: 8px; }
.person p { margin: 0; font-size: .95rem; }
.namelist { columns: 2 260px; column-gap: 40px; padding: 0; margin: 0; list-style: none; }
.namelist li { break-inside: avoid; padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.namelist li span:last-child { color: var(--muted); font-size: .92rem; }

/* ---------- Feasts ---------- */
.feast-list { border-top: 1px solid var(--line); }
.feast { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.feast .date { font-family: var(--display); color: var(--sindoor); font-size: 1.3rem; line-height: 1.3; }
.feast h3 { margin-bottom: .25em; }
.feast p { margin: 0; color: var(--muted); }
.feast .more { display: inline-block; margin-top: 8px; }
@media (max-width: 560px) { .feast { grid-template-columns: 1fr; gap: 4px; } }
.months { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.month { background: #fff; border: 1px solid var(--line); padding: 16px 18px; }
.month h3 { font-size: 1.15rem; color: var(--teak); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.month ul { list-style: none; padding: 0; margin: 0; font-size: .94rem; }
.month li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 4px 0; }
.month li b { color: var(--sindoor); font-weight: 600; font-variant-numeric: lining-nums; }

/* ---------- Schedule table ---------- */
.schedule { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.schedule th, .schedule td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.schedule th { font-weight: 600; color: var(--teak); width: 45%; }
.schedule td { font-family: var(--display); font-size: 1.3rem; color: var(--mural); }
.schedule tr:last-child th, .schedule tr:last-child td { border-bottom: 0; }

/* ---------- Clergy numbers ---------- */
.counts { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); background: var(--line); border: 1px solid var(--line); }
.counts div { background: #fff; padding: 18px 14px; text-align: center; }
.counts b { display: block; font: 600 2rem/1.1 var(--body); font-variant-numeric: lining-nums; color: var(--mural); }
@media (max-width: 560px) { .counts { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Heritage strip ---------- */
.heritage { display: grid; gap: 32px; grid-template-columns: repeat(4, 1fr); }
.heritage h3 { font-size: 1.2rem; }
.heritage p { font-size: .96rem; color: var(--muted); margin: 0; }
.heritage .mark { width: 36px; height: 36px; color: var(--sindoor); margin-bottom: 12px; }
@media (max-width: 900px) { .heritage { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .heritage { grid-template-columns: 1fr; } }

/* ---------- Verse ---------- */
.verse { text-align: center; max-width: 760px; margin: 0 auto; }
.verse blockquote { margin: 0; font-family: var(--display); font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.45; color: #fff; }
.verse blockquote [lang="ml"] { font-size: .82em; }
.verse cite { display: block; margin-top: 16px; font-style: normal; color: #F3DFA6; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; }
.gallery a { display: block; overflow: hidden; position: relative; background: var(--wash); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery .w2 { grid-column: span 2; }
.gallery .h2 { grid-row: span 2; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; } }
.lightbox { position: fixed; inset: 0; background: rgba(10,22,17,.94); z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; width: auto; max-width: 100%; }
.lightbox p { color: #E2ECE5; margin-top: 12px; text-align: center; }
.lightbox button { position: absolute; top: 14px; right: 14px; background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 50%; width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer; }

/* ---------- News ---------- */
.news { border-top: 1px solid var(--line); }
.news article { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.news time { color: var(--sindoor); font-family: var(--display); font-size: 1.05rem; }
.news h3 { margin-bottom: .3em; }
.news p { margin: 0; }
@media (max-width: 560px) { .news article { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Info rows / contact ---------- */
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; color: var(--teak); }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }
.map { width: 100%; height: 420px; border: 0; display: block; }

/* ---------- Fathers page ---------- */
.portrait { margin: 18px 0 8px; max-width: 240px; }
.portrait img { width: 100%; border: 1px solid var(--line); padding: 6px; background: #fff; }
.portrait figcaption { font-size: .75rem; color: var(--muted); margin-top: 6px; }
.father { scroll-margin-top: 100px; border-top: 1px solid var(--line); padding-top: 48px; margin-top: 48px; }
.father:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.father-sub { color: var(--teak); margin: -.2em 0 .6em; }
.father-title { font-family: var(--display); color: var(--sindoor); font-size: 1.3rem; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.jump a { border: 1px solid var(--mural); border-radius: 2px; padding: 6px 14px; text-decoration: none; font-size: .92rem; }
.jump a:hover { background: var(--mural); color: #fff; }
.source { font-size: .85rem; color: var(--muted); }

/* ---------- Placeholders: obvious on purpose ---------- */
.placeholder { background: #FFF3B0; color: #6B4B00; border: 1px dashed #C9A400; padding: 0 4px; border-radius: 3px; font-size: .92em; font-family: var(--body); overflow-wrap: anywhere; }
.todo-box { border: 1px dashed #C9A400; background: #FFFBE6; padding: 16px 18px; color: #6B4B00; font-size: .95rem; max-width: var(--measure); }

/* ---------- Footer ---------- */
.site-footer { background: var(--mural-deep); color: #C9D8CF; font-size: .95rem; }
.site-footer .scallop { color: var(--mural-deep); background: var(--lime); }
.site-footer .cols { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr 1fr; padding-top: 48px; padding-bottom: 40px; }
.site-footer h2 { font-size: 1.1rem; color: #fff; margin-bottom: .8em; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.site-footer .fname { font-family: var(--display); font-size: 1.3rem; color: #fff; line-height: 1.25; margin-bottom: 8px; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.12); }
.site-footer .bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 16px; padding-bottom: 20px; font-size: .85rem; }
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- Motion: one orchestrated hero entrance only ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-content > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-content > *:nth-child(n+2) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.brand-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split > *, .glance > div, .tiles > *, .people > * { min-width: 0; }
.counts div { min-width: 0; overflow-wrap: anywhere; font-size: .95rem; }

/* Long names on small screens */
.brand-name .short { display: none; }
/* Malayalam nav labels are wider: keep the header to the short name and tighter items */
html[data-lang="ml"] .brand-name .full { display: none; }
html[data-lang="ml"] .brand-name .short { display: block; }
.site-header nav { flex: none; }
@media (min-width: 1241px) { html[data-lang="ml"] .nav a, html[data-lang="ml"] .nav button.navgroup { padding: 10px 8px; font-size: .9rem; } }
.facts dd, .person h3 { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 640px) {
  .brand-name .full { display: none; }
  .brand-name .short { display: block; }
  .site-header .wrap { gap: 8px; }
  .brand { gap: 8px; }
  .brand svg { width: 30px; height: 30px; }
  .brand-name { font-size: 1.05rem; }
  .brand-name [lang="ml"] { font-size: .85rem; line-height: 1.35; }
  .lang-switch button { padding: 5px 8px; font-size: .78rem; }
  .nav-toggle { padding: 6px 8px; }
  .schedule { table-layout: fixed; }
  .schedule th, .schedule td { padding: 12px; overflow-wrap: anywhere; }
  .schedule th { width: auto; }
  .schedule td { font-size: 1.1rem; }
}

/* ---------- Phone polish ---------- */
h1 [lang="ml"], h2 [lang="ml"], h3 [lang="ml"], h1[lang="ml"], h2[lang="ml"], h3[lang="ml"] { line-height: 1.45; }
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 22px; }
  .lede { font-size: 1.08rem; }
  .hero { min-height: auto; }
  .hero-content { padding-top: 96px; padding-bottom: 64px; }
  .hero p { font-size: 1.02rem; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
  .page-hero .wrap { padding-top: 48px; padding-bottom: 56px; }
  .page-hero p { font-size: 1rem; }
  .tile { aspect-ratio: 16 / 10; }
  .tile.plain { aspect-ratio: auto; min-height: 150px; }
  .tile b { font-size: 1.2rem; }
  .people, .people.lead { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .person .info { padding: 10px 12px 12px; }
  .person h3 { font-size: 1rem; }
  .person .role, .person p { font-size: .85rem; }
  .glance > div { padding: 18px; }
  .gallery { gap: 8px; grid-auto-rows: 140px; }
  .map { height: 300px; }
  .timeline li { padding-left: 22px; }
  .split .frame img { max-height: 62vh; object-fit: cover; }
}

/* Homepage section spacing */
.section.quick { padding-top: 28px; padding-bottom: 0; }
.section.band.after-quick { padding-top: 64px; }
.band-green :focus-visible, .hero :focus-visible, .lightbox :focus-visible { outline-color: #E2C36A; }

/* Cut-out church front on the home page */
.facade { margin: 0; }
.facade img { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(43,38,34,.14)); }

/* ---------- Wide screens: keep the top of the facade in the header ---------- */
@media (min-width: 1100px) { .page-hero:not([style*="background-position"]) { background-position: center 22%; } }

/* ---------- Home slideshow: slow zoom on the showing photo ---------- */
.hero .slide { transform: scale(1); transition: opacity 1.4s ease, transform 9s cubic-bezier(.25,.1,.25,1); }
.hero .slide.on { transform: scale(1.06); }

/* ---------- Fade up on scroll (only when JS has marked the page) ---------- */
.reveal-on .reveal { opacity: 0; transform: translateY(22px); }
.reveal-on .reveal.in { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }

/* ---------- Cards lift on hover (mouse only) ---------- */
@media (hover: hover) {
  .person, .tile, .heritage > *, .news > *, .months > * { transition: transform .35s ease, box-shadow .35s ease; }
  .person:hover, .heritage > *:hover, .news > *:hover, .months > *:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(20,52,40,.12); }
}
@media (prefers-reduced-motion: reduce) { .hero .slide, .hero .slide.on { transform: none; } .reveal-on .reveal { opacity: 1; transform: none; } }

/* Short column beside a long one stays in view */
@media (min-width: 900px) { .split:has(> .sticky-col) { align-items: start; } .sticky-col { position: sticky; top: 100px; } }

/* ---------- Sources page ---------- */
.refs { list-style: none; padding: 0; margin: 0; }
.refs .ref { padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 110px; }
.refs .ref:last-child { border-bottom: 1px solid var(--line); }
.ref-title { font-size: 1.08rem; margin: 0 0 4px; color: var(--ink, inherit); }
.ref-detail { margin: 0 0 6px; }
.ref-used { margin: 0; font-size: .88rem; color: var(--muted); }
.ref:target { background: rgba(196,151,59,.12); outline: 8px solid rgba(196,151,59,.12); }
.table-wrap { overflow-x: auto; }
.schedule.disagree td, .schedule.disagree th { vertical-align: top; }
.schedule.disagree td { font-family: var(--body); font-size: .95rem; }
.schedule.disagree td b { font-weight: 600; }

/* ---- Design review pass (Nov 2026) ---- */
/* Running text in full ink: the soft grey was hard to read, especially for older readers */
.feast p, .heritage p, .glance p, .section-head p, .namelist li span:last-child { color: var(--ink, #2b2724); }
/* Phone header: keep the church name to two lines */
@media (max-width: 640px) {
  .brand-name { font-size: .95rem; line-height: 1.2; text-wrap: balance; }
  /* Fathers page: jump links as one swipeable row instead of a tall stack */
  .jump { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 36px; padding: 0 16px 6px; scrollbar-width: none; }
  .jump::-webkit-scrollbar { display: none; }
  .jump a { flex: none; white-space: nowrap; }
  /* Portraits large enough to see on a phone */
  .portrait { max-width: none; }
  .portrait img { padding: 0; border: 0; }
}
/* Lists with a photo beside them */
.with-aside { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.aside-photo { margin: 0; position: sticky; top: 110px; }
.aside-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.aside-photo figcaption { font-size: .9rem; margin-top: 10px; }
@media (max-width: 860px) {
  .with-aside { grid-template-columns: 1fr; }
  .aside-photo { position: static; order: -1; }
  .aside-photo img { aspect-ratio: 3 / 2; }
}
/* Month calendar: shaded panels instead of outlined boxes */
.month { border: 0; background: #fff; }
.month h3 { border-bottom: 0; padding-bottom: 0; margin-bottom: 10px; }

/* Hidden for launch (2 Dec 2026); remove this line to show the notes again */
.todo-box { display: none; }

/* Patriarchal emblem above the Spiritual hierarchy heading */
.section-head .emblem { display: block; width: 140px; height: auto; margin: 0 0 12px; }
@media (max-width: 600px) { .section-head .emblem { width: 110px; } }
