/* CATHEDRA — obsidian, blood, aged gold, bone */
:root {
  --obsidian: #0b0908;
  --ash: #141110;
  --blood: #8a1b1b;
  --blood-bright: #c43b3b;
  --gold: #a98243;
  --bone: #e8e0d0;
  --shadow-text: #6f665a;
  --black-letter: "Pirata One", cursive;
  --carved: "Cinzel", serif;
  --scripture: "EB Garamond", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--obsidian);
  color: var(--bone);
  font-family: var(--scripture);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.75;
  overflow-x: hidden;
  cursor: default;
}

::selection { background: var(--blood); color: var(--bone); }

a { color: inherit; text-decoration: none; }
a:focus-visible, [tabindex]:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* ---------- candle cursor glow ---------- */
.candlelight {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    circle 340px at var(--cx, 50%) var(--cy, 38%),
    rgba(255, 176, 92, 0.13),
    rgba(255, 150, 70, 0.05) 45%,
    transparent 70%
  );
  mix-blend-mode: screen;
  animation: candle-breathe 3.2s ease-in-out infinite;
}
@keyframes candle-breathe {
  0%, 100% { opacity: 0.95; }
  38% { opacity: 0.75; }
  52% { opacity: 1; }
  70% { opacity: 0.85; }
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.6rem;
  background: linear-gradient(to bottom, rgba(11,9,8,0.94), transparent);
}
.nav__brand {
  font-family: var(--black-letter);
  font-size: 1.7rem;
  color: var(--bone);
  letter-spacing: 0.04em;
}
.nav__links {
  display: flex;
  gap: 1.9rem;
  align-items: center;
  font-family: var(--carved);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--shadow-text);
}
.nav__links a { transition: color .3s, text-shadow .3s; }
.nav__links a:hover { color: var(--gold); text-shadow: 0 0 14px rgba(169,130,67,0.5); }
.nav__cta {
  border: 1px solid rgba(169,130,67,0.45);
  padding: 0.55em 1.2em;
  color: var(--gold) !important;
}
.nav__cta:hover { background: var(--gold); color: var(--obsidian) !important; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
}
.hero__image {
  position: absolute;
  inset: 0;
  background: url("assets/hero.png") center 40% / cover no-repeat;
  filter: brightness(0.85);
}
.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center 45%, transparent 4%, rgba(11,9,8,0.87) 82%),
    linear-gradient(to top, var(--obsidian) 3%, transparent 34%);
  animation: vignette-flicker 5.5s ease-in-out infinite;
}
@keyframes vignette-flicker {
  0%, 100% { opacity: 1; }
  43% { opacity: 0.93; }
  47% { opacity: 1; }
  74% { opacity: 0.96; }
  78% { opacity: 1; }
}
.hero__embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__content { position: relative; padding: 0 1.4rem; }
.hero__latin {
  font-family: var(--carved);
  font-size: 0.78rem;
  letter-spacing: 0.5em;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--black-letter);
  font-weight: 400;
  font-size: clamp(4.5rem, 15vw, 11rem);
  line-height: 0.95;
  color: var(--bone);
  text-shadow: 0 0 60px rgba(196,59,59,0.25), 0 4px 30px rgba(0,0,0,0.8);
}
.hero__sub {
  margin-top: 1.4rem;
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: rgba(232,224,208,0.85);
}
.hero__cta {
  display: inline-block;
  margin-top: 2.2rem;
  font-family: var(--carved);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(169,130,67,0.5);
  padding: 0.9em 1.9em;
  transition: background .35s, color .35s, box-shadow .35s;
}
.hero__cta:hover {
  background: var(--blood);
  border-color: var(--blood);
  color: var(--bone);
  box-shadow: 0 0 34px rgba(138,27,27,0.5);
}
.hero__hours {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--carved);
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  color: var(--shadow-text);
}

/* ---------- shared ---------- */
.eyebrow {
  font-family: var(--carved);
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-bottom: 1rem;
}
.eyebrow--gold { color: var(--gold); }
.section-title {
  font-family: var(--black-letter);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1.02;
  color: var(--bone);
}
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s cubic-bezier(.25,.6,.25,1), transform 1.1s cubic-bezier(.25,.6,.25,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- rites ---------- */
.rites {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 2rem;
}
.rites__head { text-align: center; margin-bottom: 4rem; }
.rites__note {
  max-width: 34rem;
  margin: 1.4rem auto 0;
  font-style: italic;
  color: rgba(232,224,208,0.65);
}
.cuts { list-style: none; }
.cut {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 1.8rem;
  align-items: center;
  padding: 1.9rem 0.6rem;
  border-bottom: 1px solid rgba(169,130,67,0.18);
  transition: background .4s;
}
.cut:first-child { border-top: 1px solid rgba(169,130,67,0.18); }
.cut:hover, .cut:focus-visible { background: rgba(138,27,27,0.08); }
.cut__numeral {
  font-family: var(--carved);
  font-size: 1.5rem;
  color: var(--gold);
  text-align: center;
}
.cut__name {
  font-family: var(--black-letter);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--bone);
  transition: color .35s, text-shadow .35s;
}
.cut:hover .cut__name {
  color: var(--blood-bright);
  text-shadow: 0 0 22px rgba(196,59,59,0.4);
}
.cut__detail {
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(232,224,208,0.6);
  margin-top: 0.25rem;
}
.cut__price {
  font-family: var(--carved);
  font-size: 1.25rem;
  color: var(--gold);
}

/* ---------- reliquary ---------- */
.reliquary {
  position: relative;
  padding: clamp(5rem, 11vw, 10rem) 2rem;
  overflow: hidden;
}
.reliquary__image {
  position: absolute;
  inset: 0;
  background: url("assets/crypt.png") center / cover no-repeat;
  opacity: 0.4;
}
.reliquary::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--obsidian) 2%, transparent 30%, transparent 70%, var(--obsidian) 98%),
    radial-gradient(ellipse at center, transparent 20%, rgba(11,9,8,0.72) 90%);
}
.reliquary__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.reliquary__body {
  max-width: 36rem;
  margin: 1.6rem auto 3rem;
  color: rgba(232,224,208,0.82);
}
.reliquary__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
}
.rstat { display: flex; flex-direction: column; gap: 0.4rem; }
.rstat__num {
  font-family: var(--black-letter);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1;
  color: var(--gold);
}
.rstat__label {
  font-family: var(--carved);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--shadow-text);
}

/* ---------- communion ---------- */
.communion { background: var(--ash); border-top: 1px solid rgba(169,130,67,0.14); border-bottom: 1px solid rgba(169,130,67,0.14); }
.communion__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) 2rem;
  text-align: center;
}
.communion__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
  text-align: left;
}
.communion__col h3 {
  font-family: var(--carved);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(169,130,67,0.25);
  padding-bottom: 0.7rem;
}
.communion__col ul { list-style: none; }
.communion__col li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  color: rgba(232,224,208,0.85);
}
.communion__col li span { color: var(--gold); font-family: var(--carved); font-size: 0.9rem; }

/* ---------- pew / footer ---------- */
.pew { text-align: center; }
.pew__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 2rem 3rem;
}
.pew__body {
  max-width: 30rem;
  margin: 1.4rem auto 2.4rem;
  font-style: italic;
  color: rgba(232,224,208,0.7);
}
/* ---------- pew request form ---------- */
.pform {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  border: 1px solid rgba(169,130,67,0.3);
  background: rgba(20,17,16,0.65);
  padding: 2.2rem 2.2rem 2rem;
}
.pform__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 2.2rem;
}
.pform__field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.pform__field label {
  font-family: var(--carved);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.pform__field input,
.pform__field select {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(169,130,67,0.4);
  color: var(--bone);
  font-family: var(--scripture);
  font-size: 1.02rem;
  padding: 0.45em 0.1em;
  border-radius: 0;
  transition: border-color .3s;
}
.pform__field select { cursor: pointer; }
.pform__field select option { background: var(--ash); color: var(--bone); }
.pform__field input:focus-visible,
.pform__field select:focus-visible {
  outline: none;
  border-bottom-color: var(--blood-bright);
}
.pform__field input[type="date"] { color-scheme: dark; }
.pform__error {
  min-height: 1.2em;
  margin-top: 1.2rem;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--blood-bright);
}
.pform__submit {
  display: block;
  margin: 0.8rem auto 0;
  font-family: var(--carved);
  font-size: 0.74rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone);
  background: var(--blood);
  border: 1px solid rgba(196,59,59,0.5);
  padding: 1em 2.4em;
  cursor: pointer;
  transition: background .35s, box-shadow .35s;
}
.pform__submit:hover {
  background: var(--blood-bright);
  box-shadow: 0 0 34px rgba(138,27,27,0.55);
}
.pform__submit:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.pform__done {
  max-width: 540px;
  margin: 0 auto;
  border: 1px solid rgba(169,130,67,0.3);
  padding: 2.6rem 2.2rem;
}
.pform__done-latin { color: var(--gold); font-size: 1.4rem; margin-bottom: 0.8rem; }
.pform__done-line {
  font-family: var(--black-letter);
  font-size: 2.2rem;
  color: var(--bone);
  margin-bottom: 0.6rem;
}
.pform__done-sub { font-style: italic; color: rgba(232,224,208,0.7); }
.pew__fine {
  margin-top: 4rem;
  font-family: var(--carved);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--shadow-text);
}

/* ---------- portal return ---------- */
.portal-return {
  position: fixed;
  bottom: 1.3rem;
  left: 1.5rem;
  z-index: 95;
  font-family: var(--carved);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--shadow-text);
  border: 1px solid rgba(111,102,90,0.35);
  padding: 0.55em 1em;
  background: rgba(11,9,8,0.75);
  transition: color .3s, border-color .3s;
}
.portal-return:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav { padding: 1rem 1.3rem; }
  .nav__links { gap: 1rem; }
  .nav__links a:not(.nav__cta) { display: none; }
  .communion__cols { grid-template-columns: 1fr; gap: 2.2rem; }
  .cut { grid-template-columns: 44px 1fr auto; gap: 1rem; }
  .pform { padding: 1.6rem 1.3rem; }
  .pform__grid { grid-template-columns: 1fr; gap: 1.3rem; }
}
@media (hover: none) {
  .candlelight { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .candlelight { animation: none; }
}
