:root {
  /* Keep the heritage pages aligned with the shared ONECAINTA interface. */
  --blue: var(--oc-primary-700, #155b9d);
  --blue-dark: var(--oc-primary-900, #0b315f);
  --red: var(--oc-danger, #c53b47);
  --red-dark: var(--oc-danger-dark, #9f2532);
  --ink: var(--oc-ink, #14263a);
  --clay: var(--oc-primary-600, #1971c2);
  --clay-dark: var(--oc-primary-800, #10477f);
  --leaf: var(--oc-accent, #0f9f8f);
  --leaf-dark: #08776d;
  --gold: #79ddd2;
  --gold-dark: #08776d;
  --rice: #f7fbff;
  --molasses: #0b315f;
  --ember: #2ca899;
  --devotion: var(--oc-primary-700, #155b9d);
  --devotion-dark: var(--oc-primary-900, #0b315f);
  --wax: #dff8f5;
  --shadow: rgba(15, 47, 82, 0.14);
  --mint: #79ddd2;
  --mint-dark: #08776d;
  --azure: #5aa8e8;
  --azure-dark: #155b9d;
  --deep-navy: #0b315f;
  --frost: #e7f2ff;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--oc-page, #eef4fa);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
}

p { margin: 0; }
a { color: inherit; }

.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: normal;
  text-decoration: none;
}

.logout-btn:hover { background: var(--red-dark); }

.eyebrow {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

:focus-visible {
  outline: 3px solid rgba(37, 132, 216, 0.42);
  outline-offset: 3px;
}

section { padding: clamp(4.5rem, 8vw, 7rem) 6vw; }
.section-inner { width: min(100%, 1120px); margin: 0 auto; }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head h2 {
  margin-top: 0.6rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
}
.section-head p { margin-top: 1rem; color: var(--oc-text, #34475c); }

.reveal.reveal-ready {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.25s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
span.reveal { display: inline-block; }

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: min(82vh, 780px);
  align-items: center;
  overflow: hidden;
  padding-top: clamp(4.5rem, 8vw, 7rem);
  background:
    linear-gradient(115deg, rgba(7, 38, 74, 0.96) 0%, rgba(16, 71, 127, 0.88) 55%, rgba(21, 91, 157, 0.73) 100%),
    url("../images/tourism/diocesan-shrine-parish.jpg") center 52% / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -42% 42%;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: rgba(121, 221, 210, 0.12);
  filter: blur(4px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 1180px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.78fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  max-width: 780px;
  color: #fff;
  font-size: clamp(2.65rem, 6vw, 4.7rem);
  line-height: 1.02;
}

.hero h1 em { color: var(--gold); font-style: normal; }
.hero .eyebrow { display: block; margin-bottom: 1rem; color: var(--gold); }
.hero .lede {
  max-width: 58ch;
  margin-top: 1.4rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2.2rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue .line {
  position: relative;
  width: 36px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gold);
  animation: run 2.2s ease-in-out infinite;
}
@keyframes run { 0% { left: -100%; } 50% { left: 0; } 100% { left: 100%; } }

/* Hero photo collage */
.collage-wrap {
  position: relative;
  display: flex;
  height: 420px;
  align-items: center;
  justify-content: center;
}
.collage { position: relative; width: 330px; height: 390px; }
.photo {
  position: absolute;
  overflow: hidden;
  margin: 0;
  padding: 8px 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 54px rgba(2, 21, 43, 0.38);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  transition: filter 0.3s ease, transform 0.4s ease;
}
.photo:hover img { filter: brightness(0.94); transform: scale(1.035); }
.photo figcaption {
  padding: 8px 2px 10px;
  color: var(--blue-dark);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.photo-main {
  z-index: 1;
  top: 0;
  left: 18px;
  width: 255px;
  height: 305px;
  transform: rotate(-2deg);
}
.photo-main img { height: 255px; }
.photo-main:hover { z-index: 3; transform: rotate(-2deg) translateY(-6px); }
.photo-accent {
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 180px;
  height: 195px;
  border: 3px solid var(--gold);
  transform: rotate(3deg);
}
.photo-accent img { height: 143px; }
.photo-accent:hover { z-index: 3; transform: rotate(3deg) translateY(-6px); }

/* History */
.history { background: var(--oc-page, #eef4fa); }
.history .section-inner {
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--oc-line, #dce5ef);
  border-radius: var(--oc-radius-lg, 24px);
  background: #fff;
  box-shadow: var(--oc-shadow-md, 0 16px 42px rgba(15, 47, 82, 0.13));
}
.timeline { position: relative; padding-left: 2.6rem; }
.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--leaf));
}
.tl-item { position: relative; padding-bottom: 2.8rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  top: 4px;
  left: -2.6rem;
  width: 17px;
  height: 17px;
  border: 4px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #e7f2ff;
}
.tl-year {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.tl-item h3 { margin-bottom: 0.45rem; font-size: 1.45rem; }
.tl-item p { max-width: 66ch; color: var(--oc-text, #34475c); }
.tl-item .tag {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--oc-primary-100, #e7f2ff);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Heritage sections */
.legacy-wrap { position: relative; background: #fff; }
.legacy-bg { display: none; }

.food {
  position: relative;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11, 49, 95, 0.98), rgba(21, 91, 157, 0.94)),
    radial-gradient(circle at 85% 15%, rgba(121, 221, 210, 0.22), transparent 34%);
}
.food .eyebrow, .food .fest-banner { color: var(--gold); }
.food .section-head h2 { color: #fff; }
.food .section-head p { color: rgba(255, 255, 255, 0.8); }
.fest-banner {
  max-width: 820px;
  margin: 0 0 2.6rem;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.07);
  font-size: 1.04rem;
  font-weight: 650;
}
.plate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.plate-card {
  padding: 1.8rem 1.6rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 34px rgba(3, 26, 53, 0.16);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.plate-card:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 38px rgba(3, 26, 53, 0.24);
  transform: translateY(-5px);
}
.plate-icon {
  display: flex;
  width: 78px;
  height: 78px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1.15rem;
  border: 3px solid var(--gold);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(3, 26, 53, 0.24);
}
.plate-icon img { width: 100%; height: 100%; object-fit: cover; }
.plate-letter {
  display: grid;
  width: 100%;
  height: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--leaf));
  font-size: 2rem;
  font-weight: 850;
  place-items: center;
}
.plate-card h3 { margin-bottom: 0.55rem; color: #fff; font-size: 1.3rem; }
.plate-card p { color: rgba(255, 255, 255, 0.78); font-size: 0.96rem; }
.plate-card .serve {
  display: block;
  margin-top: 1rem;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.festival, .culture { position: relative; overflow: hidden; color: var(--ink); }
.festival { background: #fff; }
.culture { background: var(--oc-primary-50, #f3f8ff); }
.festival .section-inner, .culture .section-inner { text-align: center; }
.festival .eyebrow, .culture .eyebrow { color: var(--blue); }
.festival h2, .culture h2 {
  margin-top: 0.65rem;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
}
.festival-copy, .culture-copy {
  max-width: 70ch;
  margin: 1.25rem auto 2.7rem;
  color: var(--oc-text, #34475c);
}

.banner-rotator {
  position: relative;
  width: min(100%, 820px);
  height: 380px;
  overflow: hidden;
  margin: 0 auto 3rem;
  border: 5px solid #fff;
  border-radius: 20px;
  background: #d9e6f2;
  box-shadow: var(--oc-shadow-lg, 0 28px 70px rgba(9, 37, 68, 0.2));
}
.festival .banner-rotator, .culture .banner-rotator { border-color: #fff; }
.banner-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transform: scale(1.04);
  transition: opacity 0.9s ease, transform 6s ease;
}
.banner-slide.is-active { z-index: 1; opacity: 1; transform: scale(1); }
.banner-dots {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.banner-dots .dot {
  width: 9px;
  height: 9px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  transition: background 0.25s ease, transform 0.25s ease;
}
.banner-dots .dot.is-active { background: var(--gold); transform: scale(1.25); }
.banner-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: flex;
  width: 42px;
  height: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 38, 74, 0.72);
  box-shadow: none;
  font-size: 1rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}
.banner-arrow:hover { background: var(--blue); transform: translateY(-50%) scale(1.06); }
.banner-arrow-prev { left: 14px; }
.banner-arrow-next { right: 14px; }

.stat-row {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 7vw, 5rem);
  flex-wrap: wrap;
  padding-top: 2.2rem;
  border-top: 1px solid var(--oc-line, #dce5ef);
}
.stat { min-width: 150px; text-align: center; }
.stat .num { color: var(--blue); font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 850; letter-spacing: -0.04em; }
.stat .lbl {
  margin-top: 0.2rem;
  color: var(--oc-muted, #40566f);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-grid > :first-child { text-align: center; }
  .hero .lede { margin-right: auto; margin-left: auto; }
  .collage-wrap { height: 360px; }
  .plate-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  section { padding: 4rem 5vw; }
  .hero { padding-top: 4.5rem; }
  .hero h1 br { display: none; }
  .collage { width: 270px; height: 340px; }
  .photo-main { left: 8px; width: 215px; height: 265px; }
  .photo-main img { height: 215px; }
  .photo-accent { width: 150px; height: 165px; }
  .photo-accent img { height: 113px; }
  .history .section-inner { padding: 1.6rem 1.2rem; border-radius: 18px; }
  .timeline { padding-left: 2.25rem; }
  .tl-item::before { left: -2.25rem; }
  .banner-rotator { height: 250px; border-width: 4px; border-radius: 16px; }
  .banner-arrow { width: 36px; height: 36px; min-height: 36px; }
  .banner-arrow-prev { left: 8px; }
  .banner-arrow-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal.reveal-ready { opacity: 1; transform: none; transition: none; }
  .banner-slide { transition: opacity 0.35s ease; transform: none !important; }
  .scroll-cue .line::after { animation: none; }
}
