/* =========================================================
   Mar Severios Sleeba Orthodox Valiya Pally — site styles
   Colours and fonts are set once here in :root.
   ========================================================= */

/* ---------- Fonts (stored in /fonts, no external requests) ---------- */
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif Malayalam"; src: url("../fonts/noto-serif-malayalam-malayalam-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif Malayalam"; src: url("../fonts/noto-serif-malayalam-malayalam-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --maroon: #7a1f2b;
  --maroon-dark: #5a1520;
  --gold: #b8892d;
  --gold-text: #8a6416;
  --gold-light: #e9d7ae;
  --ivory: #fbf7f0;
  --parchment: #f3ebdd;
  --ink: #2b2522;
  --muted: #5e544e;
  --line: #e3d6bf;
  --white: #fff;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ml: "Noto Serif Malayalam", "Nirmala UI", "Kartika", serif;

  --wrap: 68rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(43, 37, 34, .06), 0 4px 16px rgba(43, 37, 34, .06);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-underline-offset: 2px; }
a:hover { color: var(--maroon-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--maroon); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
[lang="ml"] { font-family: var(--ml); line-height: 1.9; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 46rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--maroon); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header & navigation ---------- */
.site-header { background: var(--maroon); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--gold); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.brand-text { font-family: var(--serif); font-size: 1.1rem; line-height: 1.15; }
.brand-text small { display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light); }
.nav-toggle { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 6px; padding: .45rem .7rem; font: inherit; font-size: .95rem; cursor: pointer; display: flex; align-items: center; gap: .4rem; }
.nav-toggle svg { width: 1.2rem; height: 1.2rem; }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--maroon-dark); border-bottom: 3px solid var(--gold); }
.site-nav ul { list-style: none; margin: 0; padding: .5rem 1rem 1rem; }
.site-nav a { display: block; color: #fff; text-decoration: none; padding: .7rem .25rem; border-bottom: 1px solid rgba(255,255,255,.12); font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold-light); }
@media (min-width: 64em) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; background: none; border: 0; }
  .site-nav ul { display: flex; flex-wrap: wrap; gap: .1rem .9rem; padding: 0; justify-content: flex-end; }
  .site-nav a { border: 0; padding: .3rem 0; font-size: .95rem; border-bottom: 2px solid transparent; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 3.5rem 0 3rem;
  background-color: var(--maroon-dark);
  background-image:
    linear-gradient(180deg, rgba(90,21,32,.82), rgba(60,14,22,.9)),
    var(--hero-img, none);
  background-size: cover;
  background-position: center;
}
.hero .ml-name { font-size: clamp(1.1rem, 4.2vw, 1.5rem); color: var(--gold-light); margin-bottom: .6rem; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 6.5vw, 3.1rem); margin-bottom: .4rem; }
.hero .est { font-family: var(--serif); letter-spacing: .25em; text-transform: uppercase; color: var(--gold-light); font-size: .95rem; }
.hero .tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 3.5vw, 1.35rem); max-width: 38rem; margin: 1rem auto 1.6rem; }
.hero-cross { width: 3rem; height: 3rem; margin: 0 auto 1rem; color: var(--gold); }
.page-hero { padding: 2.4rem 0 2rem; }
.page-hero h1 { margin: 0; }
.page-hero p { margin: .5rem auto 0; max-width: 40rem; color: var(--gold-light); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: .75rem 1.3rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--gold); background: var(--gold); color: #2b1a05; min-height: 44px; }
.btn:hover { background: var(--gold-light); color: #2b1a05; }
.btn-outline { background: transparent; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 3rem 0; }
.section-alt { background: var(--parchment); }
.section-title { text-align: center; margin-bottom: 1.8rem; }
.section-title p { color: var(--muted); margin: 0; }
.ornament { display: flex; align-items: center; justify-content: center; gap: .75rem; color: var(--gold); margin: 0 auto .6rem; max-width: 14rem; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: var(--gold); }
.ornament svg { width: 1.1rem; height: 1.1rem; }
.prose p, .prose li { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.lead { font-size: 1.15rem; }
.source { font-size: .95rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2rem; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 36em) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56em) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .25rem; }
.card .role { color: var(--gold-text); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .35rem; }
.card .meta { color: var(--muted); margin: 0; }
.card .phone { display: inline-block; margin-top: .5rem; font-weight: 600; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover h3 { text-decoration: underline; }
.placeholder { color: var(--muted); font-style: italic; }
.empty-note { text-align: center; color: var(--muted); padding: 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--white); }

/* ---------- Service times ---------- */
.times { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 36em) { .times { grid-template-columns: repeat(2, 1fr); } }
.time-card { background: var(--white); border-top: 4px solid var(--maroon); border-radius: var(--radius); padding: 1.25rem 1.4rem; box-shadow: var(--shadow); }
.time-card h3 { margin-bottom: .6rem; }
.time-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; }
.time-card dt { font-weight: 600; }
.time-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Quote ---------- */
.quote { text-align: center; max-width: 44rem; margin: 0 auto; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 3.8vw, 1.6rem); font-style: italic; color: var(--maroon); line-height: 1.45; }
.quote blockquote[lang="ml"] { font-style: normal; font-size: 1.05rem; color: var(--ink); margin-top: 1.25rem; }
.quote figcaption { margin-top: 1rem; color: var(--gold-text); font-weight: 600; }

/* ---------- Feasts list ---------- */
.feasts { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.feasts li { background: var(--white); border-left: 4px solid var(--gold); border-radius: 6px; padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.feasts strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--maroon); }

/* ---------- Details (collapsible) ---------- */
details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem 1.1rem; margin: 1.5rem 0; }
summary { cursor: pointer; font-weight: 600; padding: .75rem 0; color: var(--maroon); }
details ol { padding-left: 1.5rem; }

/* ---------- Organisations ---------- */
.org h3 { margin-bottom: .35rem; }
.org p { color: var(--muted); font-size: .98rem; }
.org ul { list-style: none; padding: 0; margin: .5rem 0 0; border-top: 1px solid var(--line); }
.org li { padding: .4rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.org li span:first-child { color: var(--gold-text); font-weight: 600; }

/* ---------- Video (click-to-load, privacy-friendly) ---------- */
.video { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--maroon-dark); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; color: #fff; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 1rem; text-align: center;
  background: radial-gradient(circle at 50% 40%, #8c2a37, var(--maroon-dark)); }
.video-play svg { width: 4rem; height: 4rem; }
.video-play span { font-size: .85rem; color: var(--gold-light); }
.video-play:hover svg circle { fill: var(--gold); }
.video-body { padding: 1rem 1.1rem; }
.video-body h3 { font-size: 1.15rem; margin: 0 0 .25rem; }
.video-body p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Events ---------- */
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.event { display: flex; gap: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.event-date { flex: none; width: 4.2rem; text-align: center; background: var(--maroon); color: #fff; border-radius: 8px; padding: .4rem 0; line-height: 1.1; }
.event-date b { display: block; font-family: var(--serif); font-size: 1.6rem; }
.event-date small { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--gold-light); }
.event h3 { font-size: 1.2rem; margin: 0 0 .2rem; }
.event p { margin: 0; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48em) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; background: var(--white); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: .4rem .6rem; font-size: .85rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; color: var(--gold-text); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.contact-list a { font-size: 1.15rem; font-weight: 600; }
.map-box { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--parchment); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e8e1d8; padding: 2.5rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: var(--gold-light); }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.2rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: .2rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; color: #bdb3a8; }

/* Centre short lists of people on wide screens */
@media (min-width: 56em) { .grid-3[data-list] { grid-template-columns: repeat(auto-fit, minmax(15rem, 21rem)); justify-content: center; } }
