/* ==========================================================================
   Infant Jesus Shrine, Kovaipudur
   Warm editorial type on paper, with the grid discipline of an institutional
   layout for anything schedule-shaped, and a full dark variant.

   Typography is Tamil-first: Tamil is the default language, so under
   html[lang="ta"] the Tamil face leads the stack instead of inheriting
   Latin metrics from a fallback.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Paper */
  --page: #faf6f0;
  --surface: #f1e9de;
  --surface-warm: #f4e8d8;
  --page-veil: rgba(250, 246, 240, 0.82);
  --page-veil-solid: rgba(250, 246, 240, 0.95);

  /* Ink */
  --ink: #241f1b;
  --muted: #6b5f55;

  /* Garnet leads, brass ornaments — aligned with Sacred Reverence */
  --accent: #841c2b;
  --accent-hover: #6e1522;
  --accent-2: #b57b2f;
  --on-accent: #faf6f0;

  --line: rgba(36, 31, 27, 0.14);
  --line-strong: rgba(36, 31, 27, 0.28);

  /* The one dark moment inside the light theme */
  --band: #241f1b;
  --band-fg: #faf6f0;
  --band-muted: rgba(250, 246, 240, 0.64);

  --cta: var(--accent);
  --cta-fg: #faf6f0;
  --cta-muted: rgba(250, 246, 240, 0.82);
  --cta-btn: #faf6f0;
  --cta-btn-fg: var(--accent);

  --photo-dim: none;
  --photo-vignette: none;
  --band-wash: none;
  --photo-elevate: 0 8px 24px -4px rgba(33, 29, 26, 0.08), 0 2px 6px -1px rgba(33, 29, 26, 0.04);

  --radius: 3px;
  --radius-photo: 2px;
  --radius-card: 0.5rem;
  --header-h: 76px;

  --font-display-ta: "Noto Serif Tamil", Georgia, serif;
  --font-display-en: "Newsreader", Georgia, serif;
  --font-ui-ta: "Mukta Malar", "Nirmala UI", sans-serif;
  --font-ui-en: "Instrument Sans", "Segoe UI", sans-serif;

  /* Resolved per language further down. Latin leads by default. */
  --font-display: var(--font-display-en), var(--font-display-ta);
  --font-ui: var(--font-ui-en), var(--font-ui-ta);

  /* Always Latin-first: times and proper names are never Tamil, but the
     Tamil fallback keeps mixed strings such as the weekday summary intact. */
  --font-data: "Instrument Sans", "Mukta Malar", "Segoe UI", sans-serif;
  --font-name: "Newsreader", "Noto Serif Tamil", Georgia, serif;

  --section-y: clamp(3.5rem, 6.5vw, 5.5rem);
}

/* Candlelight on a dark ground. Applied when the visitor's system asks for
   dark and they have not explicitly chosen light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --page: #14100e;
    --surface: #1e1815;
    --surface-warm: #2a221c;
    --page-veil: rgba(20, 16, 14, 0.82);
    --page-veil-solid: rgba(20, 16, 14, 0.95);

    --ink: #f2eae0;
    --muted: #a99a8c;

    /* Brass is promoted to lead: garnet cannot carry contrast on this ground. */
    --accent: #c9a227;
    --accent-hover: #ddb63a;
    --accent-2: #c07a72;
    --on-accent: #14100e;

    --line: rgba(242, 234, 224, 0.14);
    --line-strong: rgba(242, 234, 224, 0.3);

    --band: #1e1815;
    --band-fg: #f2eae0;
    --band-muted: rgba(242, 234, 224, 0.62);

    --cta: #1e1815;
    --cta-fg: #f2eae0;
    --cta-muted: rgba(242, 234, 224, 0.72);
    --cta-btn: #c9a227;
    --cta-btn-fg: #14100e;

    --photo-dim: brightness(0.84) saturate(0.88) contrast(1.05);
    --photo-vignette: radial-gradient(78% 68% at 50% 45%, rgba(20, 16, 14, 0) 38%, rgba(20, 16, 14, 0.8) 100%);
    --band-wash: radial-gradient(90% 120% at 50% 108%, rgba(201, 162, 39, 0.16), rgba(201, 162, 39, 0) 62%);
    --photo-elevate: 0 8px 24px -4px rgba(0, 0, 0, 0.35), 0 2px 6px -1px rgba(0, 0, 0, 0.2);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --page: #14100e;
  --surface: #1e1815;
  --surface-warm: #2a221c;
  --page-veil: rgba(20, 16, 14, 0.82);
  --page-veil-solid: rgba(20, 16, 14, 0.95);

  --ink: #f2eae0;
  --muted: #a99a8c;

  --accent: #c9a227;
  --accent-hover: #ddb63a;
  --accent-2: #c07a72;
  --on-accent: #14100e;

  --line: rgba(242, 234, 224, 0.14);
  --line-strong: rgba(242, 234, 224, 0.3);

  --band: #1e1815;
  --band-fg: #f2eae0;
  --band-muted: rgba(242, 234, 224, 0.62);

  --cta: #1e1815;
  --cta-fg: #f2eae0;
  --cta-muted: rgba(242, 234, 224, 0.72);
  --cta-btn: #c9a227;
  --cta-btn-fg: #14100e;

  --photo-dim: brightness(0.84) saturate(0.88) contrast(1.05);
  --photo-vignette: radial-gradient(78% 68% at 50% 45%, rgba(20, 16, 14, 0) 38%, rgba(20, 16, 14, 0.8) 100%);
  --band-wash: radial-gradient(90% 120% at 50% 108%, rgba(201, 162, 39, 0.16), rgba(201, 162, 39, 0) 62%);
  --photo-elevate: 0 8px 24px -4px rgba(0, 0, 0, 0.35), 0 2px 6px -1px rgba(0, 0, 0, 0.2);
}


/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font-display);
  font-size: 1.06rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

html[lang="ta"] {
  --font-display: var(--font-display-ta), var(--font-display-en);
  --font-ui: var(--font-ui-ta), var(--font-ui-en);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--ink);
}

html[lang="ta"] h1,
html[lang="ta"] h2,
html[lang="ta"] h3 {
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.34;
}

.wrap {
  width: min(1160px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.section {
  padding: var(--section-y) 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 2.9vw, 2.4rem);
}

.section-head h2::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin: 0.75rem 0 0;
  background: var(--accent-2);
  opacity: 0.55;
  border-radius: 1px;
}

.kicker {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}

html[lang="en"] .kicker {
  text-transform: uppercase;
}

/* Tamil clusters lose their shape when tracked out like Latin small caps. */
html[lang="ta"] .kicker {
  letter-spacing: 0.02em;
}

.kicker::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  margin-bottom: 0.9rem;
  background: var(--accent-2);
}

.meta,
.tag {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

html[lang="en"] .tag {
  text-transform: uppercase;
}

html[lang="ta"] .meta,
html[lang="ta"] .tag {
  letter-spacing: 0.02em;
}


/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--page-veil);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.site-header.is-compact {
  background: var(--page-veil-solid);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: min-height 0.2s ease;
}

.site-header.is-compact .header-inner {
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  width: auto;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

html[lang="ta"] .brand-name {
  font-weight: 600;
}

.brand-place {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.site-nav a.is-current {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent-2);
  border-radius: 0;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch button + button {
  border-left: 1px solid var(--line-strong);
}

.lang-switch button.is-active {
  background: var(--ink);
  color: var(--page);
}

.theme-toggle {
  appearance: none;
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
  background: var(--surface);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* One button, two icons: the visible one reflects the theme you can switch to. */
.theme-toggle .icon-dark {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-dark {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-light {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-dark {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-light {
    display: none;
  }
}

.social-links {
  display: flex;
  gap: 0.2rem;
}

.social-links a {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.social-links a:hover {
  background: var(--surface);
  color: var(--accent);
}

.social-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 32px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  margin: 3.5px auto;
  background: var(--ink);
}


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.72rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.btn-on-accent {
  background: var(--cta-btn);
  color: var(--cta-btn-fg);
}

.btn-on-accent:hover {
  background: var(--cta-btn);
  color: var(--cta-btn-fg);
  opacity: 0.88;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  align-items: center;
}


/* --------------------------------------------------------------------------
   Page opener
   Replaces the old .page-hero, which was padding over a flat background and
   left five of six pages starting on nothing.
   -------------------------------------------------------------------------- */

.page-opener {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 7vw, 6rem) 0 clamp(2.5rem, 4vw, 3.5rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* Arch motif as a watermark, masked so one file serves both themes. */
.page-opener::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: max(1.2rem, calc((100% - 1160px) / 2));
  width: 190px;
  height: 238px;
  background-color: var(--accent-2);
  opacity: 0.18;
  -webkit-mask: url("../assets/patterns/arch-motif.svg") no-repeat center bottom / contain;
  mask: url("../assets/patterns/arch-motif.svg") no-repeat center bottom / contain;
  pointer-events: none;
}

.page-opener .wrap {
  position: relative;
  z-index: 1;
}

.page-opener h1 {
  margin: 0.6rem 0 0.8rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 18ch;
}

.page-opener p {
  margin: 0;
  max-width: 44ch;
  font-size: 1.16rem;
  color: var(--muted);
}

.page-opener p + p {
  margin-top: 0.35rem;
}


/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Section patterns (Hero Patterns tiles)
   Fixed map: Topography → hero only; Architecture → mass.html + Visit routes;
   Temple → About history + Announcements year. Arch motif stays on the verse
   band (not paired with a tile). Masked so one SVG tints with --accent-2.
   -------------------------------------------------------------------------- */

.pattern-field {
  position: relative;
  overflow: hidden;
}

.pattern-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--accent-2);
  opacity: 0.1;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  pointer-events: none;
}

.pattern-topo::before {
  -webkit-mask-image: url("../assets/patterns/topography.svg");
  -webkit-mask-size: 300px 300px;
  mask-image: url("../assets/patterns/topography.svg");
  mask-size: 300px 300px;
}

.pattern-architect::before {
  -webkit-mask-image: url("../assets/patterns/architect.svg");
  -webkit-mask-size: 280px 280px;
  mask-image: url("../assets/patterns/architect.svg");
  mask-size: 280px 280px;
}

.pattern-temple::before {
  -webkit-mask-image: url("../assets/patterns/temple.svg");
  -webkit-mask-size: 240px 240px;
  mask-image: url("../assets/patterns/temple.svg");
  mask-size: 240px 240px;
}

.pattern-field > .wrap,
.pattern-field > .hero-inner {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3.25rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-copy {
  max-width: 34rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  margin: 0.6rem 0 0.9rem;
  max-width: none;
}

.hero p {
  max-width: 40ch;
  font-size: 1.22rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.2rem;
  margin: 0 0 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-meta span + span::before {
  content: "·";
  margin-right: 0.7rem;
  color: var(--line-strong);
}

.hero-figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
  background: var(--page);
  aspect-ratio: 4 / 5;
  max-height: 68vh;
  border-radius: 8rem 8rem var(--radius-card) var(--radius-card);
  box-shadow: var(--photo-elevate);
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  filter: var(--photo-dim);
}

.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo-vignette);
  pointer-events: none;
}

.lead-statement {
  max-width: 46rem;
  text-align: center;
  margin-inline: auto;
}

.section:has(.lead-statement) {
  padding-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.section:has(.lead-statement) + .section {
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
}

.lead-statement .kicker {
  color: var(--accent-2);
}

.lead-statement h2 {
  margin: 0.55rem 0 0;
  font-size: clamp(1.7rem, 2.9vw, 2.4rem);
}

.lead-statement h2::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin: 0.75rem auto 0;
  background: var(--accent-2);
  opacity: 0.55;
  border-radius: 1px;
}

.lead-statement p {
  margin: 0.9rem 0 0;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.6;
  color: var(--muted);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.pillar-grid--quad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pillar-grid--flush {
  margin-top: 0;
}

.pillar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem 1.2rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.pillar-card.is-accent {
  background: var(--surface-warm);
  box-shadow: inset 3px 0 0 var(--accent);
}

.pillar-card.is-accent::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  -webkit-mask-image: url("../assets/patterns/architect.svg");
  mask-image: url("../assets/patterns/architect.svg");
  -webkit-mask-size: 220px;
  mask-size: 220px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  background: var(--accent-2);
}

.pillar-card .kicker {
  color: var(--accent-2);
}

.pillar-card h3 {
  margin: 0;
  position: relative;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

html[lang="ta"] .pillar-card h3 {
  font-weight: 600;
}

.pillar-card p {
  margin: 0;
  position: relative;
  font-size: 0.95rem;
  color: var(--muted);
  flex: 1;
}

.pillar-card .pillar-link {
  margin-top: 0.35rem;
  position: relative;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.pillar-card .pillar-link a {
  color: var(--accent);
  text-decoration: none;
}

.pillar-card .pillar-link a:hover {
  text-decoration: underline;
}


/* --------------------------------------------------------------------------
   Schedule
   One component for every Mass listing, on the home page and on mass.html.
   Hairline rows with tabular figures, not a seven-column grid of boxes.
   -------------------------------------------------------------------------- */

.schedule {
  border-top: 1px solid var(--line);
}

.schedule-row {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0.3rem 2rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.schedule-day {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}

html[lang="ta"] .schedule-day {
  font-weight: 600;
}

.schedule-flag {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.schedule-time {
  margin: 0;
  font-family: var(--font-data);
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.schedule-times {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

/* Thursday is the shrine day, so it is marked rather than merely coloured.
   The tint bleeds into the page gutter to read as a band; capping the bleed
   at half the gutter keeps it from ever pushing past the viewport. The equal
   padding cancels the negative margin, so row content stays aligned with the
   rows above and below. */
.schedule-row.is-thu {
  --thu-bleed: min(1.1rem, calc((100vw - 100%) / 2));
  background: var(--surface-warm);
  box-shadow: inset 3px 0 0 var(--accent);
  margin-inline: calc(var(--thu-bleed) * -1);
  padding-inline: var(--thu-bleed);
}

.schedule-row.is-thu .schedule-day {
  color: var(--accent);
}

.schedule-row.is-thu .schedule-flag {
  color: var(--accent-2);
}

.schedule-foot {
  margin: 1.6rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}


/* --------------------------------------------------------------------------
   Mass board (home)
   Three scannable cards: Sunday, weekdays, Thursday flow.
   -------------------------------------------------------------------------- */

.mass-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mass-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.2rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.mass-card.is-thu {
  background: var(--surface-warm);
  box-shadow: inset 3px 0 0 var(--accent);
}

.mass-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.mass-card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}

html[lang="ta"] .mass-card-head h3 {
  font-weight: 600;
}

.mass-card.is-thu .mass-card-head h3 {
  color: var(--accent);
}

.mass-card-flag {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.mass-card.is-thu .mass-card-flag {
  color: var(--accent-2);
}

.mass-slots,
.thu-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mass-slots li,
.thu-flow li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.mass-slots li:last-child,
.thu-flow li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mass-slot-time,
.thu-clock {
  font-family: var(--font-data);
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink);
}

.mass-slot-place,
.thu-venue {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--muted);
}

.thu-period {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

html[lang="ta"] .thu-period {
  letter-spacing: 0;
  text-transform: none;
}

.mass-card-note {
  margin: auto 0 0;
  padding-top: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
}


/* --------------------------------------------------------------------------
   Registry
   A label paired with one or more lines. Serves the parish year on
   announcements.html and distances / cab on visit.html.
   -------------------------------------------------------------------------- */

.registry {
  border-top: 1px solid var(--line);
}

.registry-row {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0.35rem 2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.registry-label {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  padding-top: 0.25rem;
}

html[lang="en"] .registry-label {
  text-transform: uppercase;
}

html[lang="ta"] .registry-label {
  letter-spacing: 0.02em;
}

.registry-body {
  margin: 0;
}

.registry-body p {
  margin: 0.15rem 0;
}

.registry-body .registry-time {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

.registry-note {
  margin: 1.5rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
}

.registry-note + .registry-note {
  margin-top: 0.35rem;
}


/* --------------------------------------------------------------------------
   Bus routes (Visit)
   Separate from distances: corridor heading + multi-column route list.
   -------------------------------------------------------------------------- */

.bus-routes {
  display: grid;
  gap: 1.75rem;
  border-top: 1px solid var(--line);
  padding-top: 1.35rem;
}

.bus-group h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

html[lang="en"] .bus-group h3 {
  text-transform: uppercase;
}

html[lang="ta"] .bus-group h3 {
  letter-spacing: 0.02em;
}

.bus-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.45rem 1.75rem;
}

.bus-list li {
  margin: 0;
  font-family: var(--font-data);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}


/* --------------------------------------------------------------------------
   Clergy
   -------------------------------------------------------------------------- */

.clergy-list {
  border-top: 1px solid var(--line);
}

.clergy-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.9rem 1.25rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.clergy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.clergy-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clergy-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.clergy-photo {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.clergy-card .clergy-photo {
  width: 5.5rem;
  height: 5.5rem;
}

.clergy-copy {
  min-width: 0;
}

.clergy-role {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
}

.clergy-name {
  margin: 0.2rem 0 0;
  font-family: var(--font-name);
  font-size: 1.2rem;
  font-weight: 500;
}

.clergy-note {
  margin: 0.55rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
}


/* --------------------------------------------------------------------------
   Feature block and time cells
   -------------------------------------------------------------------------- */

.feature {
  background: var(--surface);
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  border-block: 1px solid var(--line);
}

.feature-inner {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.feature h2 {
  margin: 0.6rem 0 0.7rem;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
}

.feature p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}

.feature-link {
  margin: 1.3rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.time-cell {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 0.5rem 1rem 0.85rem;
  border-left: 2px solid var(--accent-2);
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.time-period {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

html[lang="ta"] .time-period {
  letter-spacing: 0;
  text-transform: none;
}

.time-clock {
  font-size: 1.05rem;
  font-weight: 500;
}

.time-venue {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
}


/* --------------------------------------------------------------------------
   Verse band
   The page's dark moment in the light theme; a raised panel in the dark one.
   -------------------------------------------------------------------------- */

.verse-band {
  position: relative;
  overflow: hidden;
  background: var(--band);
  background-image: var(--band-wash);
  padding: clamp(3.5rem, 7.5vw, 5.5rem) 0;
  border-block: 1px solid var(--line-strong);
  text-align: center;
}

.verse-band::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 2px;
  margin: 0 auto 1.35rem;
  background: var(--accent-2);
}

.verse-band::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: max(1.2rem, calc((100% - 1160px) / 2));
  width: 240px;
  height: 300px;
  background-color: var(--band-fg);
  opacity: 0.14;
  -webkit-mask: url("../assets/patterns/arch-motif.svg") no-repeat center bottom / contain;
  mask: url("../assets/patterns/arch-motif.svg") no-repeat center bottom / contain;
  pointer-events: none;
}

.verse-band .wrap {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin-inline: auto;
}

.verse {
  margin: 0 auto;
  max-width: 42rem;
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 4.2vw, 3.35rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* Tamil has no italic; a synthesised slant is worse than none. */
html[lang="ta"] .verse {
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.45;
}

.verse-band .verse {
  color: var(--band-fg);
}


/* --------------------------------------------------------------------------
   Call to action band
   -------------------------------------------------------------------------- */

.cta-band {
  background: var(--cta);
  border-block: 1px solid var(--line);
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.cta-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.cta-band h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  color: var(--cta-fg);
}

.cta-band p {
  margin: 0;
  max-width: 42ch;
  color: var(--cta-muted);
}

.cta-inner > .btn {
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   Cards and notes
   One quiet card. Emphasis is a marked note, not a second card colour.
   -------------------------------------------------------------------------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}

.card.is-accent {
  background: var(--surface-warm);
  box-shadow: inset 3px 0 0 var(--accent);
}

.card h2,
.card h3 {
  margin: 0.5rem 0 0.6rem;
  font-size: 1.3rem;
}

.card p {
  margin: 0.5rem 0 0;
}

.card p:first-child {
  margin-top: 0;
}

.note {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 1.35rem 1.5rem;
}

.note h2,
.note h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--accent);
}

.note p {
  margin: 0;
}

.stall {
  margin: 0;
  max-width: 36rem;
}

.stall h2,
.stall h3 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 500;
  color: var(--ink);
}

.stall p {
  margin: 0;
}

.stall-intent {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
}


/* --------------------------------------------------------------------------
   Timeline, photos, contact list, map
   -------------------------------------------------------------------------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--line-strong);
}

.timeline li {
  position: relative;
  padding: 0 0 1.3rem 1.3rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

.timeline strong {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--photo-elevate);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo-vignette);
  pointer-events: none;
  z-index: 1;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  filter: var(--photo-dim);
  display: block;
  transition: transform 0.45s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .photo-frame:hover img {
    transform: scale(1.03);
  }
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.photo-cell {
  margin: 0;
}

.photo-strip img,
.photo-cell img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  filter: var(--photo-dim);
  box-shadow: var(--photo-elevate);
  transition: transform 0.45s ease;
  display: block;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .photo-cell:hover img {
    transform: scale(1.03);
  }
}

.photo-cell figcaption {
  margin-top: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.3rem;
}

.contact-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-list li:first-child {
  border-top: 1px solid var(--line);
}

.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  width: 100%;
  min-height: 340px;
}


/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */

.form {
  position: relative;
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.form-intro {
  margin: 0;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.form label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

html[lang="en"] .form label {
  text-transform: uppercase;
}

html[lang="ta"] .form label {
  letter-spacing: 0.02em;
  text-transform: none;
}

.form input,
.form textarea {
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--page);
  color: var(--ink);
  letter-spacing: normal;
  text-transform: none;
}

.form input:focus-visible,
.form textarea:focus-visible {
  border-color: var(--accent);
}

.form textarea {
  min-height: 150px;
  resize: vertical;
}

.form button {
  justify-self: start;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0.85rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

.form-status.is-pending {
  color: var(--muted);
}

.form-status.is-success {
  color: var(--ink);
}

.form-status.is-error {
  color: var(--accent);
}


/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--surface);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: clamp(2.75rem, 5vw, 4rem) 0 1.5rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem 1.5rem;
}

.site-footer h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.site-footer p {
  margin: 0.35rem 0;
}

.footer-contacts {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.footer-contacts p {
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

.footer-nav {
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.footer-base {
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.82rem;
}


/* --------------------------------------------------------------------------
   Narrow screens
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .site-header .social-links {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --section-y: clamp(2.25rem, 5vw, 3rem);
    --header-h: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .brand-mark {
    height: 36px;
  }

  .brand-name {
    font-size: 0.92rem;
  }

  .brand-place {
    font-size: 0.68rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.6rem 0 0.9rem;
    background: var(--page-veil-solid);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0.35rem;
    font-size: 0.98rem;
  }

  .site-nav a.is-current {
    box-shadow: inset 2px 0 0 var(--accent-2);
    padding-left: 0.7rem;
  }

  .header-tools {
    margin-left: auto;
  }

  .lang-switch button {
    padding: 0.42rem 0.55rem;
    min-height: 2.5rem;
  }

  .theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
  }

  .page-opener {
    padding: clamp(2.25rem, 5vw, 3.25rem) 0 clamp(1.75rem, 3.5vw, 2.4rem);
  }

  .page-opener h1 {
    font-size: clamp(1.85rem, 7vw, 2.6rem);
  }

  .section-head {
    margin-bottom: 1.35rem;
  }

  .grid-2,
  .footer-grid,
  .photo-strip,
  .hero-inner,
  .feature-inner,
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 1.35rem;
    padding: clamp(1.75rem, 5vw, 2.75rem) 0;
  }

  .hero-figure {
    aspect-ratio: 16 / 10;
    order: -1;
    border-radius: 4rem 4rem var(--radius-card) var(--radius-card);
    max-height: none;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 7.5vw, 2.6rem);
  }

  .hero p {
    font-size: 1.05rem;
    margin-bottom: 1.15rem;
  }

  .verse-band {
    padding: clamp(2.75rem, 6vw, 4rem) 0;
  }

  .cta-band,
  .feature {
    padding: clamp(2.25rem, 5vw, 3.25rem) 0;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .section:has(.lead-statement) {
    padding-bottom: 1rem;
  }

  .section:has(.lead-statement) + .section {
    padding-top: 1rem;
  }

  .schedule-row,
  .registry-row {
    grid-template-columns: 1fr;
  }

  .mass-board,
  .clergy-grid,
  .clergy-grid--two,
  .pillar-grid,
  .pillar-grid--quad {
    grid-template-columns: 1fr;
  }

  .clergy-item {
    grid-template-columns: 3.75rem 1fr;
  }

  .clergy-photo {
    width: 3.75rem;
    height: 3.75rem;
  }

  .clergy-card .clergy-photo {
    width: 5rem;
    height: 5rem;
  }

  .registry-label {
    padding-top: 0;
  }

  .time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-embed {
    min-height: 240px;
  }

  .page-opener::after {
    display: none;
  }

  .verse-band {
    padding: clamp(2.75rem, 6vw, 3.75rem) 0;
  }

  .verse-band::before {
    margin-bottom: 1.1rem;
  }

  .verse-band::after {
    width: 140px;
    height: 175px;
    opacity: 0.1;
  }

  .verse {
    font-size: clamp(1.55rem, 5.8vw, 2.15rem);
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(1160px, calc(100% - 1.5rem));
  }

  :root {
    --section-y: clamp(1.85rem, 6vw, 2.5rem);
  }

  .brand-place {
    display: none;
  }

  .bus-list {
    grid-template-columns: 1fr;
  }
}

@media print {
  :root,
  :root[data-theme="dark"] {
    --page: #ffffff;
    --surface: #ffffff;
    --ink: #000000;
    --muted: #333333;
    --accent: #000000;
    --accent-2: #333333;
    --line: rgba(0, 0, 0, 0.3);
    --line-strong: rgba(0, 0, 0, 0.5);
    --band: #ffffff;
    --band-fg: #000000;
    --band-muted: #333333;
    --cta: #ffffff;
    --cta-fg: #000000;
    --cta-muted: #333333;
    --photo-dim: none;
  }

  .site-header,
  .site-footer,
  .nav-toggle,
  .lang-switch,
  .theme-toggle,
  .social-links,
  .cta-band,
  .btn,
  .no-print {
    display: none !important;
  }

  .page-opener {
    padding: 0 0 1.5rem;
  }

  .page-opener::after,
  .verse-band::after,
  .pattern-field::before {
    display: none;
  }

  .schedule-row.is-thu {
    box-shadow: none;
    border-left: 3px solid #000;
  }
}
