/* PAIX Parish Platform — EVE Glyph Design canon
   Design founder: Donat Omer Thériault, EVE Glyph Design
   Extended from paroisse-sainte-anne-des-pays-bas */

:root {
  --marine: #0b3b5c;
  --marine-deep: #072a44;
  --marine-light: #1a5578;
  --parchment: #f5efe1;
  --parchment-warm: #ebe1ca;
  --stella-gold: #b8892b;
  --stella-gold-light: #d4a94a;
  --ink: #1c1a15;
  --ink-soft: #3b352a;
  --rule: #d9cfb8;
  --white: #fffdf7;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-weight: 500;
  color: var(--marine-deep);
  letter-spacing: 0.005em;
  margin-top: 0;
}

h1 { font-size: 2.6rem; line-height: 1.15; margin-bottom: 0.4em; }
h2 { font-size: 1.9rem; line-height: 1.2; margin: 2rem 0 0.6em; }
h3 { font-size: 1.35rem; line-height: 1.3; margin: 1.5rem 0 0.4em; color: var(--marine); }
h4 { font-size: 1.1rem; margin: 1.2rem 0 0.3em; color: var(--marine); }

p { margin: 0 0 1rem; }
a { color: var(--marine); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--stella-gold); }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  background: var(--marine-deep);
  color: var(--white);
  border-bottom: 3px solid var(--stella-gold);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}
.crest {
  width: 62px; height: 62px; flex-shrink: 0;
}
.site-title { flex: 1; }
.site-title h1 {
  color: var(--white);
  font-size: 1.7rem;
  margin: 0 0 0.15em;
  font-weight: 500;
}
.site-title .sub {
  font-size: 0.95rem;
  color: var(--parchment-warm);
  font-style: italic;
  letter-spacing: 0.02em;
}

/* Nav */
.site-nav {
  background: var(--marine);
  border-bottom: 1px solid var(--marine-deep);
}
.site-nav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 1.5rem;
}
.site-nav a {
  color: var(--parchment);
  text-decoration: none;
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s;
}
.site-nav a:hover { background: var(--marine-light); color: var(--white); }
.site-nav a.active { background: var(--stella-gold); color: var(--marine-deep); font-weight: 600; }

/* Main */
main {
  background: var(--white);
  padding: 2.5rem 0 3.5rem;
  min-height: 60vh;
}
main .container { max-width: 780px; }

.updated {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin-bottom: 1.5rem;
}

/* Info card */
.card {
  background: var(--parchment);
  border-left: 3px solid var(--stella-gold);
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
}
.card h3 { margin-top: 0; color: var(--marine-deep); }

/* Mass schedule */
.schedule {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.schedule th, .schedule td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.schedule th {
  background: var(--marine);
  color: var(--white);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.schedule tr:nth-child(even) td { background: var(--parchment); }

/* Contact block */
.contact-block {
  background: var(--parchment);
  padding: 1.5rem 1.7rem;
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
}
.contact-block dt {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--marine-deep);
  font-size: 1.05rem;
  margin-top: 0.8rem;
}
.contact-block dt:first-child { margin-top: 0; }
.contact-block dd { margin: 0.15rem 0 0.4rem; padding-left: 0; }

/* Announcement blocks */
.announce {
  border-top: 1px solid var(--rule);
  padding: 1rem 0;
}
.announce h4 {
  color: var(--stella-gold);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
}

/* Groups list */
.groups {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}
.groups li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
  break-inside: avoid;
}
@media (max-width: 600px) { .groups { columns: 1; } }

/* Footer */
.site-footer {
  background: var(--marine-deep);
  color: var(--parchment-warm);
  padding: 2rem 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.site-footer .container { max-width: 960px; }
.site-footer a { color: var(--stella-gold-light); }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) { .footer-cols { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: var(--white);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  margin: 0 0 0.6rem;
  font-weight: 500;
}
.tribute {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.2rem;
  font-size: 0.82rem;
  color: var(--parchment-warm);
  line-height: 1.7;
}
.tribute em { color: var(--stella-gold-light); font-style: italic; }
.tribute .name { color: var(--white); font-weight: 500; }

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .site-header .container { flex-direction: column; text-align: center; }
}

/* Print */
@media print {
  .site-nav, .site-footer { display: none; }
  body { background: white; }
  main { padding: 0; }
}

/* --------------------------------------------------------------------------
   v3 — regional grouping, photo-pending state, credits, rights footer, footnote
   -------------------------------------------------------------------------- */

.region-block { margin-top: 2.6rem; }
.region-block:first-of-type { margin-top: 1.4rem; }

.region-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #d9c99d;
}
.region-head h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: #0b3b5c;
  letter-spacing: 0.01em;
}
.region-head p {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.86rem;
  color: #6a6154;
}

/* Card state when no freely-licensed photograph of the church exists yet */
.parish-card-nophoto {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.1rem 1.4rem;
  text-align: center;
  background: linear-gradient(160deg, #12496c 0%, #0b3b5c 100%);
}
.parish-card-nophoto img {
  width: 56px;
  height: 56px;
  opacity: 0.95;
  position: static;
  transform: none;
}
.parish-card-nophoto span {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #e8ddc4;
  max-width: 22rem;
}
.parish-card:hover .parish-card-nophoto img { transform: none; }

/* Photograph attribution */
.photo-credit {
  margin-top: 1.1rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(216, 201, 157, 0.35);
}
.photo-credit p {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #9aa7b2;
}
.photo-credit a { color: #c9b98c; text-decoration: none; }
.photo-credit a:hover { text-decoration: underline; }

/* Mandatory rights footer — EVE Glyph Index L0 canon, Gate 2 */
.ark-footer {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(216, 201, 157, 0.35);
}
.ark-footer p {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.71rem;
  line-height: 1.6;
  color: #8f9aa5;
  max-width: 74ch;
}

/* The 1613 footnote at the very bottom — deliberately quiet */
.footnote-block { margin-top: 1rem; }
.footnote-rule {
  height: 1px;
  background: linear-gradient(90deg, #d9c99d 0%, rgba(217, 201, 157, 0) 70%);
  margin-bottom: 1.6rem;
}
.footnote-block h2 {
  font-size: 1.35rem;
  color: #5a5142;
  font-weight: 500;
}
.footnote-block p {
  font-size: 0.93rem;
  line-height: 1.66;
  color: #5f5749;
  max-width: 68ch;
}
.footnote-aside {
  font-style: italic;
  color: #8a8172;
  margin-top: -0.4rem;
}
.footnote-block strong { color: #4a4234; font-weight: 600; }
.footnote-more { margin-top: 1.3rem; }
.footnote-more a {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.88rem;
  color: #1a5578;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 85, 120, 0.35);
}
.footnote-more a:hover { border-bottom-color: #1a5578; }

/* Hero placeholder on a parish page with no licensed photograph */
.hero-photo {
  margin: 0 0 1.8rem;
  overflow: hidden;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 470px;
  object-fit: cover;
  object-position: center 42%;
}

.hero-photo-pending {
  background: linear-gradient(160deg, #12496c 0%, #0b3b5c 100%);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo-pending::after { display: none; }
.hero-photo-pending-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 2.6rem 1.5rem;
  text-align: center;
}
.hero-photo-pending-inner img { width: 74px; height: 74px; }
.hero-photo-pending-inner p {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.83rem;
  color: #e8ddc4;
  max-width: 34rem;
}

/* Schedule caveat where the published times could not be confirmed officially */
.schedule-note {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.83rem;
  line-height: 1.55;
  color: #6a6154;
  font-style: italic;
  margin-top: -0.4rem;
}

@media (max-width: 640px) {
  .region-head h2 { font-size: 1.3rem; }
  .hero-photo-pending { min-height: 190px; }
}

/* ---------------------------------------------------------------------------
   Language menu — a globe in the top-right corner, and nothing else, until it
   is wanted. Hover it (or click, for keyboard and touch) and one column drops
   beneath it: English, the living Romance languages, Latin as their common
   root, then Greek, then the rest. Latin is still the translation pivot and
   carries a mark of its own. The page keeps its full measure; the closed
   globe costs it nothing.
   --------------------------------------------------------------------------- */
.lang-bar {
  position: fixed;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 300;
  font-family: 'Source Sans 3', system-ui, sans-serif;
}
.lang-toggle {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.lang-globe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 0.5rem;
  margin-left: auto;
  color: #b8892b;
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid #ddd3bd;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(20, 40, 70, 0.14);
  cursor: pointer;
  user-select: none;
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s;
}
.lang-globe svg { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.lang-globe-code {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #6b6252;
}
.lang-bar:hover .lang-globe,
.lang-globe:focus-visible,
.lang-toggle:checked + .lang-globe {
  background: #fffdf7;
  border-color: var(--stella-gold);
  box-shadow: 0 3px 12px rgba(20, 40, 70, 0.18);
}

/* The panel. Closed by default, and never in the page's way. */
.lang-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  min-width: 9.5rem;
  max-height: calc(100vh - 4.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.55rem 0.55rem 0.6rem;
  background: #fffdf7;
  border: 1px solid #ddd3bd;
  border-top: 3px solid var(--stella-gold);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(20, 40, 70, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.25rem);
  transition: opacity 0.13s ease, transform 0.13s ease, visibility 0.13s;
}
/* A transparent bridge so the pointer can travel from globe to panel. */
.lang-panel::before {
  content: "";
  position: absolute;
  top: -0.5rem; right: 0; left: 0;
  height: 0.5rem;
}
.lang-bar:hover .lang-panel,
.lang-bar:focus-within .lang-panel,
.lang-toggle:checked ~ .lang-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-list { display: flex; flex-direction: column; gap: 0.14rem; }
.lang-bar-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a806e;
  margin: 0 0 0.35rem 0.15rem;
}
.lang-bar a {
  display: block;
  font-size: 0.9rem;
  line-height: 1.15;
  color: #3d3728;
  text-decoration: none;
  padding: 0.32rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.lang-bar a:hover,
.lang-bar a:focus-visible {
  color: var(--ink);
  background: #fdf6e4;
  border-color: var(--stella-gold);
}
.lang-bar a.active {
  color: #12314f;
  font-weight: 700;
  background: #fdf1d5;
  border-color: var(--stella-gold);
}
.lang-bar a[data-pivot] {
  font-variant: small-caps;
  letter-spacing: 0.03em;
  margin-top: 0.28rem;
  padding-top: 0.4rem;
  border-top: 1px solid #e7ddc7;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.lang-bar a[data-pivot]::after {
  content: "\00b7 pivot";
  font-variant: normal;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: #a3987f;
  margin-left: 0.3rem;
}

/* A phone has no hover and no corner to spare. There the globe goes away and
   the languages sit as a plain strip in the flow above the masthead, where
   they cover nothing and cost no gesture. */
@media (max-width: 900px) {
  .lang-bar {
    position: static;
    background: #fffdf7;
    border-bottom: 1px solid #ddd3bd;
  }
  .lang-globe { display: none; }
  .lang-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    margin-top: 0;
    max-height: none;
    overflow: visible;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0.5rem 1rem;
  }
  .lang-panel::before { content: none; }
  .lang-list { flex-direction: row; flex-wrap: wrap; gap: 0.3rem 0.35rem; }
  .lang-bar-label { width: 100%; margin: 0 0 0.15rem 0; }
  .lang-bar a {
    border: 1px solid #d8cdb5;
    border-radius: 999px;
    background: #fff;
  }
  .lang-bar a[data-pivot] {
    margin-top: 0;
    padding-top: 0.32rem;
    border-top: 1px solid #d8cdb5;
    border-radius: 999px;
  }
}

/* The nine-language grid in the portal's language section */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.lang-grid a {
  display: block;
  padding: 0.75rem 0.9rem;
  background: #fbf8f0;
  border: 1px solid #e2d9c4;
  border-radius: 3px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.lang-grid a:hover { border-color: var(--stella-gold); background: #fffdf7; }

@media (max-width: 640px) {
  .lang-panel { padding-left: 1rem; padding-right: 1rem; }
  .lang-bar a { font-size: 0.86rem; padding: 0.34rem 0.58rem; }
}
