:root {
  --tt-ink: #132238;
  --tt-ink-soft: #4b5f79;
  --tt-bg: #f5f1e8;
  --tt-surface: #ffffff;
  --tt-surface-soft: #fbf7ef;
  --tt-line: #d9e0ea;
  --tt-navy: #0f2747;
  --tt-navy-strong: #0b1e36;
  --tt-saffron: #d97706;
  --tt-saffron-strong: #b45309;
  --tt-shadow: 0 16px 34px rgba(11, 30, 54, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--tt-ink);
  background:
    radial-gradient(1300px 540px at 15% -20%, rgba(217, 119, 6, 0.12), rgba(217, 119, 6, 0)),
    radial-gradient(980px 420px at 100% 0%, rgba(15, 39, 71, 0.12), rgba(15, 39, 71, 0)),
    var(--tt-bg);
  line-height: 1.6;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: -42px;
  left: 0.85rem;
  z-index: 1200;
  padding: 0.48rem 0.68rem;
  border-radius: 8px;
  color: #fff;
  background: #000;
}

.skip-link:focus {
  top: 8px;
}

.temple-page {
  padding-bottom: 2.4rem;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(15, 39, 71, 0.08);
  background: rgba(255, 254, 250, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(11, 30, 54, 0.08);
}

.section-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.58rem 0;
}

.section-nav-header {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.section-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(217, 119, 6, 0.32);
  background: #fff;
  padding: 0.34rem 0.56rem;
}

.section-nav-brand:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.section-nav-brand-icon {
  width: 1.82rem;
  height: 1.82rem;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 119, 6, 0.25);
  background: #fff9ee;
}

.section-nav-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-nav-brand-text {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--tt-saffron-strong);
}

.section-nav-toggle {
  display: none;
  align-items: center;
  gap: 0.36rem;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 10px;
  background: #fff;
  color: var(--tt-saffron-strong);
  padding: 0.42rem 0.58rem;
  font-weight: 700;
}

.section-nav-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.section-nav-toggle-label {
  font-size: 0.82rem;
  line-height: 1;
}

.section-nav-toggle-icon {
  position: relative;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}

.section-nav-toggle-icon::before,
.section-nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.section-nav-toggle-icon::before {
  top: -5px;
}

.section-nav-toggle-icon::after {
  top: 5px;
}

.section-nav.is-open .section-nav-toggle-icon {
  background: transparent;
}

.section-nav.is-open .section-nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.section-nav.is-open .section-nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.temple-page .section-nav ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}

.section-nav li {
  margin: 0;
  padding: 0;
}

.section-nav ul a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.42rem 0.84rem;
  border-radius: 11px;
  text-decoration: none;
  color: var(--tt-navy);
  background: #fff;
  border: 1px solid rgba(15, 39, 71, 0.17);
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.section-nav ul a:hover,
.section-nav ul a:focus-visible,
.section-nav ul a.is-active {
  color: #fff;
  border-color: var(--tt-saffron);
  background: linear-gradient(135deg, var(--tt-saffron) 0%, #f59e0b 100%);
  transform: translateY(-1px);
}

section {
  padding: clamp(2rem, 4vw, 3.2rem) 0;
}

section[id] {
  scroll-margin-top: 92px;
}

.hero {
  padding-top: clamp(1.8rem, 5vw, 3rem);
}

.hero .container {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  grid-template-areas:
    "brand slider"
    "eyebrow slider"
    "title slider"
    "lead slider"
    "progress slider";
  align-items: center;
  gap: 0.8rem 1.25rem;
  background: linear-gradient(160deg, #fffdfa 0%, #f7ebd7 100%);
  border: 1px solid #dfd4c1;
  border-radius: 26px;
  box-shadow: var(--tt-shadow);
  padding: clamp(1.2rem, 2.8vw, 2.35rem);
}

.hero .container::before {
  content: "";
  position: absolute;
  right: -140px;
  top: -130px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.16) 0%, rgba(217, 119, 6, 0) 72%);
  pointer-events: none;
}

.hero-brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  margin: 0;
}

.hero-logo-wrap {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  border: 1px solid rgba(217, 119, 6, 0.3);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(11, 30, 54, 0.09);
}

.hero-logo-wrap .custom-logo-link,
.hero-logo-wrap .custom-logo {
  display: block;
  width: 68px;
  height: 68px;
}

.hero-logo-wrap .custom-logo {
  object-fit: contain;
}

.hero-logo-fallback {
  width: 68px;
  height: 68px;
}

.hero-brand-name {
  margin: 0;
  color: var(--tt-saffron-strong);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.eyebrow {
  grid-area: eyebrow;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  margin: 0;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: rgba(217, 119, 6, 0.12);
  color: var(--tt-saffron-strong);
  font-weight: 700;
  font-size: 0.84rem;
}

.hero h1 {
  grid-area: title;
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.2rem, 3.8vw, 3.35rem);
  line-height: 1.07;
  letter-spacing: -0.015em;
  color: var(--tt-navy-strong);
}

.hero-lead {
  grid-area: lead;
  max-width: 560px;
  margin: 0;
  color: var(--tt-ink-soft);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.hero-progress {
  grid-area: progress;
  max-width: 460px;
}

.hero-slider-wrap {
  grid-area: slider;
  width: 100%;
}

section:not(.hero) > .container {
  position: relative;
  background: var(--tt-surface);
  border: 1px solid var(--tt-line);
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(11, 30, 54, 0.08);
  padding: clamp(1rem, 2.6vw, 2rem);
}

section:not(.hero) > .container::before {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tt-saffron) 0%, #f59e0b 38%, #2563eb 100%);
  opacity: 0.5;
}

section h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.54rem, 2.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--tt-navy-strong);
}

.financial-summary .container > h2,
.financial-summary .container > .section-intro,
.construction-progress .container > h2,
.construction-progress .container > .section-intro {
  text-align: center;
}

.section-intro {
  margin: 0.55rem 0 1.15rem;
  color: var(--tt-ink-soft);
}

.section-note {
  margin: 0.95rem 0 0;
  border: 1px solid #9ec5ff;
  border-radius: 10px;
  background: #eaf2ff;
  color: #334155;
  padding: 0.72rem 0.85rem;
  font-size: 0.92rem;
}

.temple-fallback {
  margin: 0;
  border: 1px dashed #c7d2e2;
  border-radius: 12px;
  background: #fffcf6;
  color: var(--tt-ink-soft);
  padding: 1rem;
}

.temple-widget {
  margin-bottom: 1rem;
}

.temple-widget:last-child {
  margin-bottom: 0;
}

.temple-widget .widgettitle,
.temple-widget-table h3,
.temple-widget-progress h3 {
  margin: 0 0 0.65rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  color: var(--tt-navy);
}

#donations-title::before {
  content: "\2661";
  color: #ef4444;
  margin-right: 0.45rem;
}

#expenses-title::before {
  content: "\20B9";
  color: #ea580c;
  margin-right: 0.45rem;
}

.temple-hero-slider {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 39, 71, 0.22);
  background: #fff;
  box-shadow: 0 14px 28px rgba(11, 30, 54, 0.14);
}

.temple-hero-slider-track {
  position: relative;
  height: clamp(250px, 34vw, 370px);
}

.temple-hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
}

.temple-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.temple-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.temple-hero-slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.68rem 0.9rem;
  background: linear-gradient(180deg, rgba(7, 20, 37, 0) 0%, rgba(7, 20, 37, 0.74) 100%);
  color: #fff;
}

.temple-hero-slide .slide-title {
  font-size: 0.94rem;
  font-weight: 600;
}

.temple-hero-slider-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  background: #f8fbff;
  padding: 0.45rem 0.6rem;
}

.temple-slider-prev,
.temple-slider-next {
  appearance: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15, 39, 71, 0.24);
  border-radius: 999px;
  background: #fff;
  color: var(--tt-navy);
  line-height: 1;
  cursor: pointer;
}

.temple-slider-prev:focus-visible,
.temple-slider-next:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.temple-slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.38rem;
}

.temple-slider-dot {
  appearance: none;
  border: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8dfeb;
  padding: 0;
  cursor: pointer;
}

.temple-slider-dot.is-active {
  background: var(--tt-saffron);
}

.site-footer {
  margin-top: 1rem;
  padding: 2.4rem 0 1.55rem;
  background: linear-gradient(130deg, #0f2747 0%, #0b1e36 100%);
  color: rgba(236, 243, 255, 0.92);
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-col h3 {
  margin: 0 0 0.55rem;
  color: #fff;
  font-size: 1.05rem;
}

.site-footer .footer-col:first-child h3::before {
  content: "\1F6D5";
  margin-right: 0.42rem;
  color: #f59e0b;
  font-size: 0.95rem;
}

.site-footer .footer-col p {
  margin: 0.2rem 0;
  color: rgba(232, 239, 251, 0.86);
}

.site-footer a {
  color: rgba(236, 243, 255, 0.96);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.site-footer .footer-bottom {
  text-align: center;
  padding-top: 1rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.reveal-up {
  opacity: 0;
  transform: translateY(18px);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.44s ease, transform 0.44s ease;
}

@media (max-width: 1020px) {
  .hero .container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "eyebrow"
      "title"
      "lead"
      "slider"
      "progress";
    text-align: center;
  }

  .hero-brand {
    justify-content: center;
  }

  .eyebrow {
    justify-self: center;
  }

  .hero-lead,
  .hero-progress {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 900px) {
  .section-nav .container {
    width: calc(100% - 1rem);
    display: block;
    padding: 0.46rem 0;
  }

  .section-nav-header {
    justify-content: space-between;
  }

  .section-nav-brand {
    flex: 1;
    min-width: 0;
  }

  .section-nav-toggle {
    display: inline-flex;
  }

  .temple-page .section-nav ul {
    display: none;
    grid-template-columns: 1fr;
    gap: 0.42rem;
    margin-top: 0.38rem !important;
  }

  .section-nav.is-open ul {
    display: grid;
  }

  .section-nav ul a {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  section:not(.hero) > .container {
    border-radius: 16px;
    padding: 0.95rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8.1vw, 2.35rem);
  }

  .hero-logo-wrap {
    width: 76px;
    height: 76px;
    border-radius: 14px;
  }

  .hero-logo-wrap .custom-logo-link,
  .hero-logo-wrap .custom-logo,
  .hero-logo-fallback {
    width: 62px;
    height: 62px;
  }

  .section-intro {
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
  }

  .section-note {
    margin-top: 0.72rem;
    font-size: 0.88rem;
  }

  .temple-hero-slider-track {
    height: 220px;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .section-nav ul a {
    transition: none;
  }

  .reveal-up,
  .reveal-up.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
