/*
Theme Name: London Buddhist Vihara
Theme URI: https://londonbuddhistviharachiswick.org
Author: Ark Education / Sam Wattuhewa
Description: Custom theme for the London Buddhist Vihara, converted from the approved Eleventy prototype.
Version: 1.0.0
Text Domain: lbv
*/

:root {
  --ivory: #f6f1e7;
  --temple-white: #fffdf8;
  --saffron: #b99043;
  --ochre: #d4b36f;
  --gold: #c6a052;
  --gold-soft: #efe3c3;
  --terracotta: #8a6d4d;
  --maroon: #4f3735;
  --bodhi: #566855;
  --leaf: #eef1e9;
  --stone: #ddd5c7;
  --mist: #eee8dd;
  --ink: #292622;
  --muted: #665f55;
  --line: #e3d9c8;
  --shadow: 0 16px 42px rgba(41, 38, 34, 0.08);
  --radius: 8px;
  --page: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 10;
  transform: translateY(-160%);
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.notice {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: var(--gold-soft);
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
}

.notice span {
  font-weight: 700;
}

.notice p {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--page);
  margin: 0 auto;
  min-height: 82px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.brand strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.2;
  font-weight: 600;
}

.brand small {
  display: block;
  max-width: 290px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.site-nav a,
.nav-item > a {
  padding: 0.55rem 0.5rem;
  border-radius: 999px;
  text-decoration: none;
}

.site-nav a:hover,
.nav-item:focus-within > a,
.nav-item:hover > a {
  background: var(--leaf);
}

.site-nav .nav-donate {
  color: var(--ink);
  background: var(--gold-soft);
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item > a::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.7;
}

.submenu {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 0.25rem;
  width: 330px;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

/* Right-align the last dropdowns so they don't overflow the viewport edge */
.site-nav .nav-item:nth-last-of-type(1) .submenu,
.site-nav .nav-item:nth-last-of-type(2) .submenu {
  left: auto;
  right: 0;
}

.submenu.wide {
  width: 420px;
  grid-template-columns: 1fr 1fr;
}

.submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.8rem;
  height: 0.8rem;
}

.nav-item:hover .submenu,
.nav-item:focus-within .submenu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.submenu a {
  display: block;
  padding: 0.8rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.submenu a:hover,
.submenu a:focus-visible {
  background: var(--leaf);
}

.submenu strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.25;
}

.submenu span {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--temple-white);
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 620px;
  max-height: 800px;
  margin: 0;
  overflow: hidden;
  background: #302720;
}

.hero-img,
.hero-img img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-img img {
  object-fit: cover;
  object-position: 50% 38%;
}

/* warm-brown wash behind the text only, fading out to the right */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(42, 31, 26, 0.74) 0%,
    rgba(42, 31, 26, 0.5) 30%,
    rgba(42, 31, 26, 0.18) 54%,
    rgba(42, 31, 26, 0) 74%
  );
}

.hero-text {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text > * {
  max-width: 600px;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--bodhi);
  font: 700 0.78rem Arial, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.05rem;
  font-size: clamp(2.55rem, 5vw, 4.65rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h1 span {
  display: block;
  font-size: 0.48em;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 253, 248, 0.78);
}

h1 strong {
  display: block;
  max-width: 720px;
  font-weight: 560;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.85rem, 3.5vw, 3rem);
  line-height: 1.1;
  font-weight: 400;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.22rem;
  line-height: 1.2;
}

.section-copy p,
.section-heading p,
.learning-layout p,
.contact-strip p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-eyebrow {
  margin: 0 0 1.2rem;
  color: #d2b36e;
  font: 600 0.875rem/1 Arial, "Segoe UI", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-text h1 {
  margin: 0 0 1.4rem;
  color: #fff;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-summary {
  margin: 0 0 2rem;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.125rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 0;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #f7f3ea;
  font: 700 0.95rem Arial, "Segoe UI", sans-serif;
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 243, 234, 0.45);
  padding-bottom: 3px;
  transition: border-color 140ms ease;
}

.hero-link:hover {
  border-bottom-color: #f7f3ea;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 700 0.92rem Arial, sans-serif;
  text-decoration: none;
}

.button.primary {
  color: var(--ink);
  background: var(--gold-soft);
}

.button.secondary {
  color: white;
  background: var(--maroon);
}

.button.ghost {
  border-color: rgba(255, 253, 248, 0.46);
  color: var(--temple-white);
  background: rgba(255, 253, 248, 0.12);
  backdrop-filter: blur(8px);
}

.image-note {
  margin: 1.1rem 0 0;
  max-width: 430px;
  color: rgba(255, 253, 248, 0.82);
  font: 600 0.72rem Arial, sans-serif;
  line-height: 1.5;
}

.now-panel {
  max-width: var(--page);
  margin: -1.6rem auto 3.75rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 2;
}

.now-panel article {
  min-height: 108px;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 14px 34px rgba(47, 42, 36, 0.07);
}

.now-panel article:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.now-panel article:last-child {
  border-right: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.now-panel span,
.path-card span,
.term-card span,
.event-card time {
  display: block;
  color: #8e7036;
  font: 700 0.78rem Arial, sans-serif;
  text-transform: uppercase;
}

.now-panel strong,
.now-panel a {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.12rem;
  line-height: 1.25;
  font-weight: 700;
  text-decoration: none;
}

.visitor-paths {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.25rem 4.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(232px, auto);
  gap: 1rem;
}

.path-card {
  position: relative;
  display: flex;
  min-height: 232px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--temple-white);
  box-shadow: 0 10px 28px rgba(47, 42, 36, 0.05);
}

.path-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.06) 0%, rgba(255, 253, 248, 0.76) 46%, rgba(255, 253, 248, 0.98) 68%),
    repeating-linear-gradient(90deg, rgba(86, 104, 85, 0.08) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.path-card::after {
  content: "";
  position: absolute;
  inset: 0 0 42%;
  background: var(--path-image, none) center / cover no-repeat;
  opacity: 0.92;
  pointer-events: none;
}

.path-card > * {
  position: relative;
  z-index: 1;
}

.path-card.large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 480px;
  color: var(--temple-white);
  overflow: hidden;
  background:
    radial-gradient(130% 90% at 88% 12%, rgba(198, 160, 82, 0.30), transparent 55%),
    radial-gradient(95% 75% at 8% 100%, rgba(86, 104, 85, 0.38), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 253, 248, 0.05) 0 1px, transparent 1px 22px),
    linear-gradient(160deg, #5a3f3c 0%, #3f2e2c 100%);
}

/* Decorative shapes on the large card, drawn with CSS only. */
.path-card.large::before {
  content: "";
  display: block;
  position: absolute;
  inset: auto;
  right: -90px;
  top: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 253, 248, 0.20);
  background: none;
  opacity: 1;
  pointer-events: none;
}

.path-card.large::after {
  content: "";
  display: block;
  position: absolute;
  inset: auto;
  left: -80px;
  bottom: -130px;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  border: 0;
  background: rgba(198, 160, 82, 0.13);
  opacity: 1;
  pointer-events: none;
}

.path-card.teachings {
  --path-image: url("public/images/placeholder-teachings.png");
}

.path-card.meditation {
  --path-image: url("public/images/placeholder-meditation.png");
}

.path-card.events {
  --path-image: url("public/images/placeholder-event.png");
}

.path-card.families {
  --path-image: url("public/images/placeholder-families.png");
}

.path-card.support {
  grid-column: 1 / -1;
  min-height: 170px;
  background:
    linear-gradient(90deg, rgba(238, 241, 233, 0.78), rgba(255, 253, 248, 0.98)),
    url("public/images/placeholder-teachings.png") right center / 42% auto no-repeat,
    var(--leaf);
}

.path-card.support::after {
  display: none;
}

.path-card.support strong,
.path-card.support p {
  max-width: 620px;
}

.path-card strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.24rem;
  line-height: 1.2;
}

.path-card.large strong {
  max-width: 520px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.path-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.path-card.large p {
  max-width: 470px;
  color: rgba(255, 253, 248, 0.88);
}

.path-card em {
  display: inline-block;
  margin-top: 1.1rem;
  color: inherit;
  font: 700 0.78rem Arial, sans-serif;
  font-style: normal;
  text-transform: uppercase;
}

/* Cards whose full design is supplied as artwork. The link text is kept in the
   DOM for screen readers and search engines, but hidden behind the image. */
.path-card.has-art {
  padding: 0;
  background: none;
  border: 1px solid var(--line);
}

.path-card.has-art::before,
.path-card.has-art::after {
  display: none;
}

.path-card.has-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 320ms ease;
}

.path-card.large.has-art img {
  object-position: left center;
}

.path-card.has-art:hover img,
.path-card.has-art:focus-visible img {
  transform: scale(1.03);
}

.path-card-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .path-card.has-art img {
    transition: none;
  }
}

.dhamma-moment {
  padding: 5rem 1.25rem;
  background:
    linear-gradient(90deg, rgba(86, 104, 85, 0.1), transparent 26%, rgba(182, 144, 67, 0.12)),
    var(--temple-white);
  border-block: 1px solid var(--line);
}

.dhamma-moment > div {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.dhamma-moment blockquote {
  margin: 0 0 1.3rem;
  color: var(--maroon);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.15;
}

.text-link {
  color: var(--maroon);
  font: 700 0.88rem Arial, sans-serif;
  text-transform: uppercase;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.26rem;
}

.section-grid,
.learning-layout,
.library-strip,
.support-panel,
.contact-strip {
  max-width: var(--page);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 3rem;
  align-items: start;
}

.info-panel,
.term-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--temple-white);
  box-shadow: 0 10px 28px rgba(47, 42, 36, 0.06);
}

.info-panel {
  padding: 1.5rem;
}

.info-panel ul {
  margin: 0;
  padding-left: 1.2rem;
}

.info-panel li + li {
  margin-top: 0.55rem;
}

.info-panel a,
.section-heading a {
  color: var(--maroon);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.events-band {
  margin: 2rem 0;
  padding: 4.5rem 1.25rem;
  background: #eee9df;
  border-block: 1px solid var(--line);
}

.section-heading,
.event-list,
.community-columns {
  max-width: var(--page);
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 1.7rem;
}

.event-list {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.7fr);
  gap: 1rem;
}

.event-card {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  background: var(--temple-white);
}

.featured-event {
  grid-row: span 2;
  grid-template-columns: 1fr;
}

.event-image {
  min-height: 280px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, transparent, rgba(41, 38, 34, 0.38)),
    url("public/images/placeholder-event.png") center / cover no-repeat;
}

.event-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.event-meta {
  display: block;
  margin: 0.65rem 0 1rem;
  color: var(--bodhi);
  font: 700 0.88rem Arial, sans-serif;
}

/* ---- Observance calendar (month-grouped list) ---- */
.calendar {
  max-width: var(--page);
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.calendar .section-heading { margin-bottom: 2rem; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 0.5rem; }

.cal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.cal-dot.poya { background: var(--gold); }
.cal-dot.festival { background: var(--maroon); }
.cal-dot.programme { background: var(--bodhi); }

.cal-month + .cal-month { margin-top: 1.75rem; }

.cal-month > h3 {
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
  font: 700 0.82rem Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.cal-list { list-style: none; margin: 0; padding: 0; }

.cal-list li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.4rem 1.25rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.cal-list li:last-child { border-bottom: 0; }

.cal-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.cal-item { display: flex; align-items: baseline; gap: 0.7rem; }
.cal-item .cal-dot { margin-top: 0.4rem; align-self: flex-start; }

.cal-title {
  font-size: 1.02rem;
  color: var(--ink);
}
.cal-note {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px 260px;
  gap: 1.25rem;
  align-items: stretch;
}

.term-card {
  padding: 1.35rem;
}

.term-card p {
  margin-bottom: 0;
}

.library-strip,
.support-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 2rem;
  align-items: start;
}

.library-preview {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf6e8;
}

.library-preview span {
  display: block;
  color: #8e7036;
  font: 700 0.78rem Arial, sans-serif;
  text-transform: uppercase;
}

.library-preview strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.library-preview p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.heritage-section {
  padding: 4.5rem 1.25rem;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.92), rgba(255, 253, 248, 0.72)),
    repeating-linear-gradient(135deg, rgba(142, 112, 54, 0.12) 0 1px, transparent 1px 22px),
    var(--leaf);
  border-block: 1px solid var(--line);
}

.history-layout {
  max-width: var(--page);
  margin: 2.5rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 3rem;
  align-items: start;
}

.history-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.history-note,
.founders-source {
  color: var(--terracotta);
  font: 700 0.82rem Arial, sans-serif;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--gold);
}

.timeline li {
  position: relative;
  padding: 0 0 1.4rem 1.4rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
}

.timeline span {
  display: block;
  color: #8e7036;
  font: 700 0.82rem Arial, sans-serif;
}

.timeline p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.founders-section {
  max-width: var(--page);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.founders-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.founder-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--temple-white);
  box-shadow: 0 10px 28px rgba(47, 42, 36, 0.06);
}

.founder-portrait {
  display: flex;
  align-items: flex-end;
  min-height: 190px;
  padding: 1rem 1.5rem;
  background: linear-gradient(160deg, var(--gold-soft), var(--leaf));
}

.founder-portrait span {
  color: var(--terracotta);
  font: 700 0.75rem Arial, sans-serif;
  text-transform: uppercase;
}

.founder-body {
  padding: 1.5rem;
}

.founder-body > span {
  display: block;
  color: #8e7036;
  font: 700 0.78rem Arial, sans-serif;
  text-transform: uppercase;
}

.founder-body h3 {
  margin: 0.35rem 0 0.15rem;
  font-size: 1.3rem;
}

.founder-dates {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font: 700 0.85rem Arial, sans-serif;
}

.founder-body p {
  color: var(--muted);
}

.founders-source {
  margin-top: 1.6rem;
}

.founders-section + .founders-section {
  border-top: 1px solid var(--line);
}

.welcome-message {
  padding: 4.5rem 1.25rem;
  background:
    linear-gradient(90deg, rgba(182, 144, 67, 0.1), transparent 30%),
    var(--temple-white);
  border-block: 1px solid var(--line);
}

.welcome-message > div {
  max-width: 820px;
  margin: 0 auto;
}

.welcome-message p:not(.eyebrow) {
  margin: 0 0 1.1rem;
  font-size: clamp(1.06rem, 1.8vw, 1.3rem);
  line-height: 1.6;
}

.welcome-sign {
  color: var(--maroon);
  font-style: italic;
}


.intro-band {
  max-width: var(--page);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.intro-band > div {
  max-width: 760px;
}

.intro-band p:not(.eyebrow) {
  margin: 0 0 1rem;
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  line-height: 1.5;
}

.community-section {
  padding: 3rem 1.25rem;
  background: #eee9df;
}

.community-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: var(--page);
  margin: 0 auto;
}

.community-gallery article {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--temple-white);
  box-shadow: 0 8px 24px rgba(47, 42, 36, 0.05);
}

.photo-placeholder {
  min-height: 220px;
  background:
    linear-gradient(180deg, rgba(86, 104, 85, 0.16), rgba(79, 55, 53, 0.14)),
    var(--community-image, url("public/images/placeholder-event.png")) center / cover no-repeat;
}

.community-gallery article:nth-child(1) {
  --community-image: url("public/images/placeholder-event.png");
}

.community-gallery article:nth-child(2) {
  --community-image: url("public/images/placeholder-meditation.png");
}

.community-gallery article:nth-child(3) {
  --community-image: url("public/images/placeholder-families.png");
}

.community-gallery article:nth-child(4) {
  --community-image: url("public/images/placeholder-teachings.png");
}

.community-gallery h3 {
  margin: 0;
  padding: 1rem;
  font-size: 1rem;
}

.visit-planner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.visit-planner .visit-copy {
  max-width: 900px;
}

.visit-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.4rem;
}

.portrait-figure {
  margin: 0;
  align-self: start;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--temple-white);
}

.portrait-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.portrait-figure figcaption {
  padding: 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.visit-copy-photo {
  margin: 1.6rem 0 0;
  max-width: 640px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.visit-copy-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.visit-copy-photo figcaption {
  padding: 0.7rem 1rem;
  background: var(--temple-white);
  color: var(--muted);
  font-size: 0.85rem;
}

.visit-list article {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--temple-white);
}

.visit-list p {
  margin-bottom: 0;
  color: var(--muted);
}


.sangha-section {
  max-width: var(--page);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

/* Resident Sangha - photo cards */
.monk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
  justify-content: center;
  gap: 1.75rem;
  margin-top: 0.5rem;
}

.monk-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--temple-white);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.monk-grid figure:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.monk-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  background: var(--mist);
}

.monk-grid figcaption {
  padding: 1.15rem 1.3rem 1.4rem;
  border-top: 1px solid var(--line);
}

.monk-grid .name {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}

.monk-grid .monk-role {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Head-of-Vihara biography (prose, no repeated photo) */
.sangha-section .credit {
  max-width: 70ch;
  margin: 1.75rem auto 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.sangha-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.sangha-layout article {
  min-height: 230px;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(237, 242, 233, 0.72), rgba(255, 253, 248, 0.92)),
    var(--temple-white);
}

.sangha-layout span {
  display: block;
  color: #8e7036;
  font: 700 0.78rem Arial, sans-serif;
  text-transform: uppercase;
}

.sangha-layout p {
  color: var(--muted);
}

.sangha-layout small {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--maroon);
  font: 700 0.78rem Arial, sans-serif;
}

.support-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-strip {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 1.25rem;
  color: white;
  background: #302c27;
}

.site-footer > * {
  max-width: var(--page);
}

.site-footer p {
  margin-bottom: 0;
  color: #dfd4c2;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-family: Arial, sans-serif;
}

@media (max-width: 1080px) {
  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: 104px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--temple-white);
    box-shadow: var(--shadow);
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 128px);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: var(--radius);
  }

  .nav-item {
    position: static;
  }

  .nav-item > a {
    width: 100%;
    justify-content: space-between;
  }

  .submenu,
  .submenu.wide {
    position: static;
    display: grid;
    width: auto;
    grid-template-columns: 1fr;
    gap: 0.1rem;
    margin: 0.15rem 0 0.55rem;
    padding: 0.25rem 0 0.25rem 0.65rem;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .submenu::before {
    display: none;
  }

  .submenu a {
    padding: 0.55rem 0.65rem;
  }

  .hero {
    height: auto;
    min-height: 600px;
    max-height: 680px;
  }

  /* text sits low over the image; stronger warm wash from the bottom */
  .hero::before {
    background: linear-gradient(
      0deg,
      rgba(42, 31, 26, 0.82) 0%,
      rgba(42, 31, 26, 0.5) 38%,
      rgba(42, 31, 26, 0.14) 68%,
      rgba(42, 31, 26, 0.04) 100%
    );
  }

  .hero-img img {
    object-position: 50% 38%;
  }

  .hero-text {
    justify-content: flex-end;
    padding-bottom: clamp(2rem, 8vw, 3.25rem);
  }

  .hero-text h1 {
    font-size: clamp(2.1rem, 8vw, 2.75rem);
  }

  .hero-summary {
    margin-bottom: 1.6rem;
  }

  .now-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .now-panel article:first-child,
  .now-panel article:last-child {
    border-radius: 0;
  }

  .section-grid,
  .learning-layout,
  .library-strip,
  .support-panel,
  .sangha-layout,
  .community-gallery,
  .event-list,
  .history-layout,
  .founders-layout {
    grid-template-columns: 1fr;
  }
  .monk-grid { grid-template-columns: repeat(2, 1fr); }

  .visitor-paths {
    grid-template-columns: 1fr 1fr;
  }

  .path-card.large {
    grid-column: span 2;
    min-height: 360px;
  }

  .contact-strip,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .notice {
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.1rem;
  }

  .brand small {
    display: none;
  }

  h1 {
    font-size: 2.85rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero-actions .hero-link {
    justify-content: center;
  }

  .button {
    width: 100%;
  }

  .now-panel,
  .visitor-paths,
  .visit-list,
  .monk-grid {
    grid-template-columns: 1fr;
  }

  .now-panel article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .path-card.large {
    grid-column: span 1;
  }

  .event-card {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .cal-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Dhamma School schedule list */
.plain-times {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.plain-times li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.9rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.02rem;
}

.plain-times li:last-child {
  border-bottom: 1px solid var(--line);
}

.plain-times strong {
  color: var(--maroon);
  font-family: Arial, sans-serif;
}

/* Shared call-to-action row */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.4rem 0 0;
}

/* Dhamma School application form */
.form-intro {
  max-width: var(--page);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 0;
}

.form-intro .eyebrow a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4.5rem;
}

.app-form fieldset {
  margin: 0 0 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--temple-white);
  box-shadow: 0 10px 28px rgba(47, 42, 36, 0.06);
}

.app-form legend {
  padding: 0 0.5rem;
  margin-left: -0.5rem;
  color: var(--maroon);
  font: 700 0.82rem Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-form .field {
  margin: 0 0 1rem;
}

.app-form .field:last-child {
  margin-bottom: 0;
}

.app-form label,
.app-form .label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.app-form input[type="text"],
.app-form input[type="email"],
.app-form input[type="tel"],
.app-form input[type="date"],
.app-form textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--stone);
  border-radius: 6px;
  background: var(--ivory);
  font: inherit;
  color: var(--ink);
}

.app-form input:focus,
.app-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  background: var(--temple-white);
}

.app-form textarea {
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.field-row .field {
  margin-bottom: 0;
}

.field-row + .field-note,
.app-form .field + .field-note {
  margin-top: 0.8rem;
}

.field-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.radio-row {
  display: flex;
  gap: 1.2rem;
  padding-top: 0.25rem;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 400;
}

.consent {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  font-weight: 400;
  line-height: 1.5;
}

.consent input {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--maroon);
  background: #f3e7df;
  color: var(--maroon);
  font-size: 0.95rem;
}

#copy-box {
  margin-top: 1.2rem;
}

#copy-text {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--stone);
  border-radius: 6px;
  background: var(--temple-white);
  font: 0.9rem/1.5 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  resize: vertical;
}

@media (max-width: 620px) {
  .plain-times li {
    grid-template-columns: 4.5rem 1fr;
    gap: 0.6rem;
  }
}

/* Buttons are buttons, not links - never underline the label */
.button {
  text-decoration: none;
}

/* Balanced two/three-up card row (Dhamma School ethos, etc.) */
.panel-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: var(--page);
  margin: 0 auto;
}

.panel-card {
  padding: 1.6rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--temple-white);
  box-shadow: 0 8px 24px rgba(47, 42, 36, 0.05);
}

.panel-card > span {
  display: block;
  margin-bottom: 0.15rem;
  color: #8e7036;
  font: 700 0.78rem Arial, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.panel-card h3 {
  margin-bottom: 0.9rem;
}

.panel-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.panel-card li {
  color: var(--muted);
}

.panel-card li + li {
  margin-top: 0.55rem;
}

/* Centred single-column section for shorter content blocks */
.narrow-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.75rem 1.25rem;
}

.narrow-section > .eyebrow {
  margin-bottom: 0.6rem;
}

.narrow-section > p {
  color: var(--muted);
  font-size: 1.05rem;
}

.community-gallery.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Dhamma School "How to apply" panel */
.apply-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
}

.narrow-section .apply-panel {
  margin-top: 1.75rem;
}

.apply-panel {
  align-self: start;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(237, 242, 233, 0.6), rgba(255, 253, 248, 0.95)),
    var(--temple-white);
  box-shadow: 0 12px 32px rgba(47, 42, 36, 0.08);
}

.apply-panel h3 {
  margin-bottom: 1rem;
}

.apply-steps {
  margin: 0 0 1.5rem;
  padding-left: 1.3rem;
}

.apply-steps li {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.button-block {
  display: flex;
  width: 100%;
}

.apply-alt {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.apply-alt a {
  color: var(--maroon);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.apply-note {
  margin: 1.15rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted);
}

/* Type preview (internal only, not linked in nav) */
.type-preview {
  max-width: var(--page);
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

.type-preview-intro {
  max-width: 720px;
  margin: 0 0 2.5rem;
}

.type-preview-intro p {
  color: var(--muted);
  line-height: 1.6;
}

.type-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.type-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--temple-white);
  padding: 1.75rem;
}

.type-card--current {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.type-card-label {
  margin: 0 0 1.1rem;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--saffron);
}

.type-card-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--terracotta);
}

.type-card-heading {
  margin: 0 0 0.9rem;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--ink);
}

.type-card-body {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.type-card-note {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
}

