/* ============================================================
   Abbé Simon-Xavier Danielsson — ordination fundraiser
   Traditional Catholic / missal aesthetic
   Palette: parchment cream · liturgical gold · oxblood red
   ============================================================ */

:root {
  --parchment:    #f4ecd9;
  --parchment-2:  #efe4ca;
  --ink:          #2c2622;
  --ink-soft:     #5a5046;
  --burgundy:     #6e1f2a;
  --burgundy-dk:  #531621;
  --gold:         #a9842f;
  --gold-soft:    #c4a35a;
  --hairline:     rgba(110, 31, 42, 0.22);

  --serif-body:   'EB Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --serif-disp:   'Cormorant Garamond', 'EB Garamond', Georgia, serif;

  --maxw: 46rem;

  /* Vertical rhythm — single source of truth for section spacing (mobile) */
  --gap-hero:  2.75rem;     /* transition from the hero image into text */
  --gap-tight: 1.6rem;   /* between closely-related blocks (scripture → body) */
  --gap:       2.0rem;   /* standard space between sections */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--parchment);
  /* very subtle paper grain */
  background-image:
    radial-gradient(rgba(110, 31, 42, 0.025) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 1.15rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Language switcher ---------- */
.lang-switch {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.85rem;
  background: rgba(28, 22, 18, 0.62);
  backdrop-filter: blur(4px);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.lang-switch button {
  font-family: var(--serif-body);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: #f3ead6;
  background: none;
  border: none;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s, color 0.2s;
}
.lang-switch button:hover { opacity: 1; }
.lang-switch button.active {
  opacity: 1;
  color: var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
}
.lang-sep { color: rgba(243, 234, 214, 0.45); font-size: 0.8rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 82vh;
  min-height: 30rem;
  max-height: 52rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
}
.hero-carousel { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 28%;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}
.slide.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(20, 14, 10, 0.40) 0%,
      rgba(20, 14, 10, 0.12) 32%,
      rgba(20, 14, 10, 0.30) 62%,
      rgba(20, 14, 10, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.4rem 3.2rem;
  color: #f7efdd;
}
.kicker {
  font-family: var(--serif-body);
  font-size: 0.92rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 0.7rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.hero-title {
  font-family: var(--serif-disp);
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 1.04;
  margin: 0 0 1.7rem;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}

/* ---------- Donation button ---------- */
.btn-donate {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif-body);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #fbf4e2;
  background: var(--burgundy);
  border: 1px solid var(--gold);
  padding: 0.85rem 1.9rem;
  border-radius: 2px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}
.btn-donate:hover {
  background: var(--burgundy-dk);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.32);
}
.btn-donate:active { transform: translateY(0); }
.btn-donate--lg { font-size: 1.25rem; padding: 1rem 2.4rem; }

/* ---------- Cross of St James icon (img/cross.png, recoloured via mask) ---------- */
.cross {
  display: inline-block;
  background-color: currentColor;        /* the cross takes the element's text colour */
  -webkit-mask: url('img/cross.png') no-repeat center / contain;
          mask: url('img/cross.png') no-repeat center / contain;
}
.btn-cross {                              /* aspect ratio ≈ 0.736 (w/h) */
  flex: none;
  color: var(--gold-soft);
  height: 1.2em;
  width: 0.88em;
}

/* ---------- Hero dots ---------- */
.hero-dots {
  position: absolute;
  z-index: 2;
  bottom: 1.1rem;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.hero-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(247, 239, 221, 0.8);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
}
.hero-dots button.active { background: var(--gold-soft); border-color: var(--gold-soft); }

/* ---------- Main / shared section frame ---------- */
main { display: block; }
section.epigraph, section.text, section.details, section.cta {
  max-width: var(--maxw);
  margin: 0 auto;
  /* only the horizontal padding here — vertical spacing is owned by each
     section's own padding-top (do NOT use the `padding` shorthand: it would
     reset padding-top and override the section rules below, which are less
     specific than this `section.x` selector). */
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}

/* ---------- Scripture epigraph ---------- */
.epigraph {
  text-align: center;
  padding-top: var(--gap-hero);
  padding-bottom: 0;
}
.latin {
  font-family: var(--serif-disp);
  font-style: italic;
  font-size: clamp(1.32rem, 4.3vw, 1.95rem);
  line-height: 1.34;
  color: var(--burgundy);
  margin: 0 0 0.85rem;
}
.latin-trans {
  font-family: var(--serif-disp);
  font-style: italic;
  font-size: clamp(1.05rem, 3vw, 1.32rem);
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}
.latin-ref {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin: 0;
}

/* ---------- Body text ---------- */
.text { padding-top: var(--gap-tight); padding-bottom: 0; }
.text p { margin: 0 0 1.4rem; }
.text p:last-child { margin-bottom: 0; }
.text .lead::first-letter {
  font-family: var(--serif-disp);
  float: left;
  font-size: 3.6rem;
  line-height: 0.78;
  padding: 0.3rem 0.5rem 0 0;
  color: var(--burgundy);
}

/* ---------- Details ---------- */
.details { padding-top: var(--gap); padding-bottom: 0; }
.rule {
  position: relative;
  height: 1.7rem;
  margin: 0 0 2rem;
}
.rule::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--hairline);
}
.rule-knot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--parchment);
  padding: 0 0.95rem;
  line-height: 0;
}
.rule-knot .cross {
  display: block;
  color: var(--gold);
  height: 1.6rem;
  width: 1.18rem;
  /* the St James cross has a long lower blade, so nudge it down
     a touch so the horizontal line crosses through the arms */
  transform: translateY(0.24rem);
}
.details dl { margin: 0; }
.detail-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.4rem 0.9rem;
  padding: 0.45rem 0;
  text-align: center;
}
.details dt {
  font-family: var(--serif-body);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.details dd { margin: 0; font-size: 1.12rem; color: var(--ink); }
.details dd a { color: var(--burgundy); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.details dd a:hover { color: var(--burgundy-dk); }

/* date → add to calendar */
.cal-link {
  font: inherit;
  color: var(--burgundy);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
  border-bottom: 1px solid var(--hairline);
  transition: color 0.2s, border-color 0.2s;
}
.cal-link:hover { color: var(--burgundy-dk); border-color: var(--gold); }

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding-top: var(--gap);
  padding-bottom: var(--gap);
}
.cta-heading {
  font-family: var(--serif-disp);
  font-weight: 500;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  color: var(--burgundy);
  margin: 0 0 1.5rem;
}
.cta-note {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 1.1rem 0 0;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2rem 1.4rem;
  background: var(--parchment-2);
  border-top: 1px solid var(--hairline);
}
.footer-cross {
  color: var(--gold);
  height: 1.9rem;
  width: 1.4rem;
}

/* ---------- Larger screens ---------- */
@media (min-width: 48rem) {
  :root {
    --gap-hero:  3.5rem;
    --gap-tight: 2.2rem;
    --gap:       2.6rem;
  }
  body { font-size: 1.22rem; }
  .hero { background-position: center 25%; }
  section.epigraph, section.text, section.details, section.cta {
    padding-left: 0; padding-right: 0;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: opacity 0.4s ease; }
}
