/* Domus Dei — Saints Francis & Therese Church */

:root {
  --bg: #F7F3EC;
  --surface: #FFFCF7;
  --text: #2C2419;
  --text-secondary: #5C4F3F;
  --accent: #8B6914;
  --accent-light: #C4A882;
  --brick: #A67C52;
  --border: rgba(166, 124, 82, 0.25);
  --shadow: 0 4px 24px rgba(44, 36, 25, 0.08);
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --max-width: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Welcome page — church drawing watermark behind all content */
body.page-welcome {
  position: relative;
}

body.page-welcome::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/images/church-drawing.jpeg") center center / min(90%, 900px) no-repeat;
  opacity: 0.17;
  pointer-events: none;
  z-index: 0;
}

body.page-welcome > * {
  position: relative;
  z-index: 1;
}

body.page-welcome .site-header,
body.page-welcome .site-footer {
  background: rgba(255, 252, 247, 0.94);
}

body.page-welcome .quick-link-card,
body.page-welcome .saint-card,
body.page-welcome .callout,
body.page-welcome .mass-table {
  background: rgba(255, 252, 247, 0.9);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--brick);
}

/* ── Header & Navigation ── */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin: 0;
  letter-spacing: 0.02em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--accent);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent-light);
}

/* ── Triptych (Home) ── */

.triptych {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(320px, 560px) minmax(140px, 1fr);
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 520px;
}

.triptych-column {
  position: relative;
  overflow: hidden;
}

.triptych-column img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.triptych-column a {
  display: block;
  height: 100%;
}

.triptych-column a:hover img {
  filter: brightness(1.05);
}

.triptych-center {
  background: rgba(255, 252, 247, 0.88);
  box-shadow: var(--shadow);
  position: relative;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.welcome-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.church-name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text);
}

.motto {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  letter-spacing: 0.04em;
}

.contact-block {
  font-size: 0.98rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.contact-block strong {
  color: var(--text);
}

/* ── Page sections ── */

.page-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.section {
  margin-bottom: 3rem;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.25rem;
  text-align: center;
}

.section-heading::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent-light);
  margin: 0.5rem auto 0;
}

/* ── Quick links ── */

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.quick-link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.quick-link-card:hover,
.quick-link-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-light);
  box-shadow: 0 6px 28px rgba(44, 36, 25, 0.12);
  color: var(--accent);
}

.quick-link-card .card-label {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  display: block;
}

.quick-link-card .card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  display: block;
}

/* ── Patron saints cards ── */

.saint-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.saint-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.saint-card:hover,
.saint-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(44, 36, 25, 0.14);
}

.saint-card img {
  width: 140px;
  height: 140px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
  margin: 1.25rem auto 0;
  border-radius: 4px;
}

.saint-card-body {
  padding: 1.25rem;
}

.saint-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.saint-card-body p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ── Callout boxes ── */

.callout {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.callout-mission {
  border-left-color: var(--brick);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.7;
}

.callout-hospital {
  border-left-color: var(--accent-light);
  text-align: center;
  color: var(--text-secondary);
}

.callout-hospital strong {
  color: var(--text);
}

/* ── Mass schedule ── */

.liturgical-heading {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.liturgy-loading,
.liturgy-unavailable {
  text-align: center;
  color: var(--text-secondary);
}

.liturgy-livestream {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
}

.mass-table-wrapper {
  overflow-x: auto;
  margin: 0 auto;
  max-width: 800px;
}

.mass-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 4px;
  overflow: hidden;
}

.mass-table th,
.mass-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.mass-table th {
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
}

.mass-table tr:last-child td {
  border-bottom: none;
}

.mass-table tr:nth-child(even) td {
  background: rgba(247, 243, 236, 0.5);
}

.mass-table td:first-child {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.mass-table .mass-notes {
  font-size: 0.95rem;
}

.mass-table .mass-notes strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--text);
}

/* ── Inner pages ── */

.page-hero {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-hero-full img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.page-hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding-top: 2rem;
}

.page-hero-split.hero-left img {
  border-radius: 4px;
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
  object-fit: contain;
}

.page-hero-split.hero-right {
  direction: rtl;
}

.page-hero-split.hero-right > * {
  direction: ltr;
}

.page-hero-split.hero-right img {
  border-radius: 4px;
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
  object-fit: contain;
}

.page-hero-split .hero-intro h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  color: var(--text);
}

.page-hero-split .hero-intro .lead {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.content-card p {
  margin: 0 0 1.15rem;
  color: var(--text-secondary);
}

.content-card p:last-child {
  margin-bottom: 0;
}

.content-card h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent);
  margin: 2rem 0 1rem;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-image {
  margin: 2rem auto;
  max-width: 800px;
}

.content-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.content-image figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  font-style: italic;
}

.cross-link {
  background: rgba(196, 168, 130, 0.2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

.cross-link p {
  margin: 0;
  color: var(--text-secondary);
}

/* ── Footer ── */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.footer-address {
  margin: 0.5rem 0 0;
  line-height: 1.6;
}

/* ── Responsive ── */

@media (max-width: 960px) {
  .triptych {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    min-height: auto;
  }

  .triptych-saints-left {
    grid-column: 1;
    grid-row: 1;
    max-height: 280px;
  }

  .triptych-saints-right {
    grid-column: 2;
    grid-row: 1;
    max-height: 280px;
  }

  .triptych-center {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 2rem 1.5rem;
  }

  .page-hero-split {
    grid-template-columns: 1fr;
  }

  .page-hero-split.hero-right {
    direction: ltr;
  }

  .page-hero-split.hero-right .hero-intro {
    order: -1;
  }
}

@media (max-width: 600px) {
  .triptych-saints-left,
  .triptych-saints-right {
    max-height: 220px;
  }

  .quick-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-card {
    padding: 1.5rem;
  }

  .mass-table th,
  .mass-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
  }
}

