:root {
  --bg: #f7f4ea;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #111111;
  --muted: #3f3f3f;
  --line: rgba(17, 17, 17, 0.1);
  --shadow: 0 24px 60px rgba(17, 17, 17, 0.1);
  --accent: #ead792;
  --accent-strong: #d4b955;
  --accent-rgb: 234, 215, 146;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.42), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 22%),
    linear-gradient(180deg, #fdfcf8 0%, var(--bg) 100%);
}

body.theme-home {
  --accent: #e6d7a7;
  --accent-strong: #c6ae57;
  --accent-rgb: 230, 215, 167;
}

body.theme-management {
  --accent: #f0df91;
  --accent-strong: #caab2a;
  --accent-rgb: 240, 223, 145;
}

body.theme-education {
  --accent: #b8dbf1;
  --accent-strong: #579dc8;
  --accent-rgb: 184, 219, 241;
}

body.theme-pilgrimage {
  --accent: #c5e6bd;
  --accent-strong: #6ca35d;
  --accent-rgb: 197, 230, 189;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  min-height: 100vh;
  position: relative;
  overflow: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.topbar__inner,
.section,
.site-footer__inner {
  width: min(var(--content-width), calc(100% - 24px));
  margin: 0 auto;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.topbar__inner--stack {
  flex-direction: column;
  align-items: stretch;
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.14);
}

.brand-lockup__text {
  min-width: 0;
}

.brand-lockup__eyebrow,
.section-tag {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.62);
}

.brand-lockup__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-lockup__sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.tabbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.tabbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tabbar a:hover,
.tabbar a.is-active {
  background: rgba(var(--accent-rgb), 0.4);
  border-color: rgba(var(--accent-rgb), 0.9);
  transform: translateY(-1px);
}

.site-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.site-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(17, 17, 17, 0.72);
}

.site-links a:hover,
.site-links a.is-active {
  background: rgba(var(--accent-rgb), 0.28);
  color: #111111;
  border-color: rgba(var(--accent-rgb), 0.78);
}

.section {
  padding: 24px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: stretch;
  padding-top: 20px;
}

.card,
.hero-copy,
.hero-visual,
.mini-card,
.pdf-card,
.contact-card,
.footer-panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-copy {
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.42), rgba(255, 255, 255, 0.78)),
    var(--surface);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.3rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 16px 0 0;
  max-width: 42ch;
  font-size: 1rem;
  color: var(--muted);
}

.hero-actions,
.pill-row,
.pdf-grid,
.summary-grid,
.services-grid,
.gallery-grid,
.contact-grid,
.footer-links {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(2, minmax(0, max-content));
  margin-top: 24px;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
}

.button {
  background: #111111;
  color: #ffffff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.75);
  color: #111111;
  border-color: rgba(17, 17, 17, 0.12);
}

.pill-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.pill {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(17, 17, 17, 0.07);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.hero-visual__badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(17, 17, 17, 0.08);
  font-weight: 800;
}

.logo-gateway {
  width: 110px;
  aspect-ratio: 1;
  border-radius: 30px;
  margin-bottom: 18px;
  animation: float-mark 3.4s ease-in-out infinite;
}

.section--gateway {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 170px);
}

.gateway-panel {
  width: min(980px, 100%);
  padding: 36px 28px;
  border-radius: 34px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at top, rgba(var(--accent-rgb), 0.24), transparent 30%),
    rgba(255, 255, 255, 0.9);
  text-align: center;
}

.gateway-logo {
  width: clamp(180px, 28vw, 280px);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 38px;
  box-shadow: 0 24px 56px rgba(17, 17, 17, 0.14);
}

.gateway-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.gateway-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  min-height: 120px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 32px rgba(17, 17, 17, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
  text-align: center;
}

.gateway-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(17, 17, 17, 0.12);
}

.gateway-card strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.gateway-card--management {
  background: linear-gradient(180deg, rgba(240, 223, 145, 0.46), rgba(255, 255, 255, 0.92));
}

.gateway-card--education {
  background: linear-gradient(180deg, rgba(184, 219, 241, 0.48), rgba(255, 255, 255, 0.92));
}

.gateway-card--pilgrimage {
  background: linear-gradient(180deg, rgba(197, 230, 189, 0.48), rgba(255, 255, 255, 0.92));
}

@keyframes float-mark {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.section-block {
  margin-top: 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.section-head p,
.body-copy {
  margin: 8px 0 0;
  max-width: 56ch;
  color: var(--muted);
}

.summary-grid,
.services-grid,
.pdf-grid,
.gallery-grid,
.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-card,
.pdf-card,
.contact-card,
.footer-panel {
  padding: 22px;
}

.mini-card h3,
.pdf-card h3,
.contact-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.mini-card p,
.pdf-card p,
.contact-card p,
.mini-card ul,
.footer-panel p {
  margin: 0;
  color: var(--muted);
}

.mini-card--feature {
  display: grid;
  align-content: center;
  gap: 14px;
}

.mini-card--feature h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.mini-card ul {
  padding-left: 18px;
}

.mini-card li + li {
  margin-top: 6px;
}

.section-banner {
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(var(--accent-rgb), 0.3), rgba(255, 255, 255, 0.78)),
    var(--surface-strong);
  box-shadow: var(--shadow);
}

.section-banner h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.section-banner p {
  margin: 12px 0 0;
  max-width: 52ch;
  color: var(--muted);
}

.section-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.contact-grid {
  align-items: stretch;
}

.contact-card pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  color: var(--muted);
}

.site-footer {
  padding: 0 0 12px;
}

.site-footer__inner {
  padding-bottom: 0;
}

.footer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.footer-panel strong {
  display: block;
  margin-bottom: 6px;
}

.footer-links {
  grid-auto-flow: column;
  align-items: center;
}

.floating-actions {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: grid;
  gap: 12px;
}

.float-button {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.2);
  cursor: pointer;
  background: #111111;
  color: #ffffff;
}

.float-button svg {
  width: 24px;
  height: 24px;
}

.float-button--whatsapp {
  background: #1b9c5a;
}

.float-button--top {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.float-button--top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.float-button__label {
  position: absolute;
  right: 70px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.88);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.float-button:hover .float-button__label,
.float-button:focus-visible .float-button__label {
  opacity: 1;
  transform: translateX(0);
}

.pilgrimage-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
}

.service-photo {
  display: grid;
  align-items: stretch;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.service-photo img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.service-photo__panel {
  display: grid;
  gap: 14px;
  align-content: center;
  min-height: 320px;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.28), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.84);
}

.service-photo__panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.service-photo__panel p {
  margin: 0;
  color: var(--muted);
}

.service-photo__panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.service-photo__panel li + li {
  margin-top: 8px;
}

.chant-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.34), rgba(255, 255, 255, 0.82)),
    var(--surface);
}

.chant-card strong {
  display: block;
  margin-bottom: 10px;
}

.chant-line {
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
}

.chant-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chant-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chant-audio {
  width: 100%;
  margin-top: 14px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.devotional-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.devotional-particle {
  position: absolute;
  top: -10vh;
  color: rgba(123, 164, 92, 0.82);
  filter: drop-shadow(0 8px 20px rgba(17, 17, 17, 0.12));
  animation: fall-particle linear forwards;
  user-select: none;
  will-change: transform, opacity;
}

.devotional-particle.is-bell {
  color: rgba(198, 174, 87, 0.94);
}

.devotional-particle.is-flower {
  color: rgba(214, 148, 116, 0.88);
}

.devotional-particle.is-leaf {
  color: rgba(111, 156, 87, 0.88);
}

@keyframes fall-particle {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(-10vw, 112vh, 0) rotate(250deg);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .hero,
  .service-hero,
  .pilgrimage-hero,
  .summary-grid,
  .services-grid,
  .pdf-grid,
  .gallery-grid,
  .contact-grid,
  .pill-row,
  .gateway-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    grid-auto-flow: row;
  }
}

@media (max-width: 760px) {
  .topbar__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__row {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .site-links,
  .tabbar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 2px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .site-links::-webkit-scrollbar,
  .tabbar::-webkit-scrollbar {
    display: none;
  }

  .site-links a,
  .tabbar a {
    width: auto;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.88rem;
    text-align: center;
    white-space: nowrap;
  }

  .tabbar {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
  }

  .site-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    gap: 6px;
    padding-bottom: 0;
  }

  .site-links a {
    min-height: 34px;
    padding: 6px 6px;
    font-size: 0.76rem;
    letter-spacing: 0;
  }

  .tabbar a {
    flex: 0 1 auto;
  }

  .hero-copy,
  .mini-card,
  .pdf-card,
  .contact-card,
  .chant-card,
  .footer-panel,
  .section-banner {
    padding: 20px;
  }

  .hero-visual img {
    min-height: 300px;
  }

  .site-footer {
    padding-bottom: 10px;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 16px 0 28px;
  }

  .topbar__inner,
  .section,
  .site-footer__inner {
    width: min(var(--content-width), calc(100% - 16px));
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .brand-lockup img {
    width: 46px;
    height: 46px;
  }

  .floating-actions {
    right: 12px;
    bottom: 12px;
    gap: 10px;
  }

  .float-button {
    width: 54px;
    height: 54px;
  }

  .float-button__label {
    display: none;
  }

  .topbar__inner {
    gap: 10px;
    padding: 10px 0;
  }

  .topbar__row {
    gap: 10px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-lockup__title {
    font-size: 0.84rem;
  }

  .brand-lockup__sub {
    font-size: 0.74rem;
  }

  .site-links a,
  .tabbar a {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.84rem;
  }

  .site-links a {
    min-height: 32px;
    padding: 6px 4px;
    font-size: 0.72rem;
  }

  .footer-panel {
    padding: 14px 16px;
  }
}
