/* -------------------------------------------------------
   Stonewater Zen Brighton & Hove
   A simple, hand-built stylesheet.
   Palette: Deep Water — ocean navy, pale blue-white,
   amber-orange accent. Still water runs deep.
   ------------------------------------------------------- */

:root {
  --paper: #f3f6f8;
  --paper-deep: #e4ecf2;
  --ink: #1c3340;
  --ink-soft: #4a6270;
  --indigo: #1a3d52;
  --indigo-deep: #0f2838;
  --indigo-light: #6a9ab8;
  --stamp: #c45e28;
  --line: #d0dce4;
  --display: "Fraunces", Georgia, serif;
  --sans: "Albert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Albert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}

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

a {
  color: var(--indigo);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1b2a2f;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1080px;
  margin: 0 auto;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.logo img {
  height: 83px;
  width: auto;
  display: block;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav > a,
.main-nav .nav-link {
  color: rgba(255,255,255,0.82);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.main-nav > a:hover,
.main-nav .nav-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.main-nav > a:not(:last-child)::after,
.main-nav > .nav-item:not(:last-child)::after {
  content: "|";
  margin-left: 18px;
  color: rgba(255,255,255,0.2);
  font-weight: 400;
}

.nav-item {
  position: relative;
}

.nav-item .nav-link::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 8px;
  vertical-align: 0.12em;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid rgba(255,255,255,0.7);
}

.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: -8px;
  min-width: 200px;
  background: #22353b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  box-shadow: 0 14px 34px rgba(0,0,0,0.3);
  z-index: 200;
}

.dropdown::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 5px;
  color: rgba(255,255,255,0.82);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav .dropdown a:hover {
  background: rgba(255,255,255,0.09);
  color: #ffffff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.82);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 0.82rem;
  cursor: pointer;
}

/* ---------- Hero (rounded photo card + text below) ---------- */

.hero {
  padding-top: 44px;
}

.hero-photo-card {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 36px;
}

.hero-photo-card img {
  width: 100%;
  height: 56vh;
  min-height: 320px;
  max-height: 540px;
  object-fit: cover;
  display: block;
}

.hero-text {
  margin-bottom: 64px;
}

.hero-text .kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--stamp);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.hero-text-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

.hero-text h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.3rem;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

.hero-text-grid p {
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 6px 0 0;
}

/* "Practice" link cards: About our group / What is Zen / Newcomers */

.practice-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.practice-links a {
  display: block;
  color: var(--ink);
  text-align: center;
}

.practice-links a:hover {
  text-decoration: none;
}

.practice-links img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 12px;
  filter: saturate(0.92);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.practice-links a:hover img {
  filter: saturate(1.05);
  transform: scale(1.02);
}

.practice-links span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  border-bottom: 1px solid transparent;
}

.practice-links a:hover span {
  color: var(--indigo);
  border-bottom-color: var(--indigo);
}

/* ---------- Sections (generic) ---------- */

section {
  padding: 64px 0;
}

section.alt {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.sangha-bg {
  position: absolute;
  inset: 0;
  background-image: url("https://wordpress-1606456-6311911.cloudwaysapps.com/wp-content/uploads/2026/06/heartsutra-2-scaled.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.sangha-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(227, 236, 244, 0.82);
}

section.alt .wrap {
  position: relative;
  z-index: 1;
}

.section-label {
  font-family: var(--mono);
  color: var(--stamp);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.8rem;
  max-width: 700px;
  margin-bottom: 24px;
}

/* ---------- Sangha / quote ---------- */

.sangha-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

blockquote {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 18px;
}

blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.sangha-content p {
  margin-bottom: 14px;
  color: var(--ink);
}

.sangha-content .section-label {
  color: var(--stamp);
}

.read-more {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
  border-bottom: 1px solid var(--indigo);
  padding-bottom: 2px;
}

.read-more:hover {
  text-decoration: none;
  opacity: 0.75;
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: linear-gradient(145deg, #0c1416 0%, #1b2a2f 48%, #385660 100%);
  color: var(--paper);
  text-align: center;
  padding: 56px 24px;
}

.cta-banner h2 {
  color: var(--paper);
  margin: 0 auto 24px;
  font-size: 1.6rem;
}

.cta-banner a {
  display: inline-block;
  background: var(--stamp);
  color: #fff;
  padding: 13px 30px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.cta-banner a:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* ---------- Events ---------- */

.events-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.events-list li {
  display: flex;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.event-date {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--indigo);
  white-space: nowrap;
  min-width: 130px;
  font-size: 0.9rem;
}

.event-info strong {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.event-info span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.event-action {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--indigo);
  border-radius: 6px;
  color: var(--indigo);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.event-action:hover {
  background: var(--indigo);
  color: #ffffff;
  text-decoration: none;
}

.events-note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- News ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-img-wrap {
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 14px;
}

.news-img-wrap a {
  display: block;
}

.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.news-card:hover img {
  transform: scale(1.07);
}

.news-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--stamp);
  margin-bottom: 8px;
}

.news-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

.news-card h3 a {
  color: var(--ink);
}

.news-card h3 a:hover {
  color: var(--indigo);
  text-decoration: none;
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.gallery img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  filter: saturate(0.92);
  position: relative;
  z-index: 0;
  transition: filter 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease, z-index 0s;
}

.gallery img:hover {
  filter: saturate(1.1);
  transform: scale(1.28);
  z-index: 10;
  box-shadow: 0 8px 28px rgba(15, 37, 53, 0.35);
}

/* ---------- Footer ---------- */

footer {
  background: #1b2a2f;
  color: #b8c8d4;
  padding: 48px 0 28px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-logo img {
  height: 72px;
  width: auto;
  display: block;
}

footer h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  margin-bottom: 14px;
  color: var(--paper);
}

footer a {
  color: #b8c8d4;
}

footer a:hover {
  color: #cde2ee;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  color: #b8c8d4;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.footer-social a:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--ink-soft);
  background: transparent;
  color: var(--paper);
  border-radius: 2px;
  font-family: var(--sans);
}

.newsletter-form input::placeholder {
  color: var(--ink-soft);
}

.newsletter-form button {
  background: var(--stamp);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 2px;
  font-family: var(--sans);
  font-weight: 700;
  cursor: pointer;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #2c4148;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #6e8a9a;
  text-align: center;
}

/* ---------- Inner content pages ---------- */

.page-header {
  padding: 36px 0 8px;
}

.page-kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--stamp);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.page-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.3rem;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}

.page-subtitle {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.page-photo {
  border-radius: 20px;
  overflow: hidden;
  margin: 28px 0 8px;
}

.page-photo img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.page-photo.portrait img {
  height: 440px;
  object-position: top center;
}

article.prose {
  max-width: 720px;
  padding: 24px 0 8px;
}

article.prose p {
  color: var(--ink-soft);
  margin-bottom: 18px;
  font-size: 1.05rem;
  line-height: 1.7;
}

article.prose strong {
  color: var(--ink);
}

.prose p.footnote,
.footnote {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 24px;
  max-width: 720px;
}

.related-pages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 16px 0 56px;
  max-width: 720px;
}

.related-pages a {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.related-pages a:hover {
  border-color: var(--indigo);
  text-decoration: none;
}

.related-pages .label {
  display: block;
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--stamp);
  margin-bottom: 6px;
}

.related-pages strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
}

/* ---------- About page: prose + sticky rail ---------- */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
  margin-top: 40px;
}

.about-layout .prose {
  max-width: 680px;
  padding-top: 4px;
}

.about-rail {
  position: sticky;
  top: 128px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rail-photo {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
}

.rail-photo img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.rail-photo figcaption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding: 10px 2px 0;
  line-height: 1.5;
}

.rail-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-title {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--stamp);
  margin-bottom: 2px;
}

.rail-links a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.rail-links a:hover {
  border-color: var(--indigo);
  background: var(--paper-deep);
  text-decoration: none;
}

.rail-links .label {
  display: block;
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--stamp);
  margin-bottom: 5px;
}

.rail-links strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
}

/* ---------- FAQ accordion ---------- */

.page-intro {
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1.5;
  max-width: 640px;
  margin-top: 10px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.4;
  color: var(--ink);
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--stamp);
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  content: "\2013";
}

.faq-item summary:hover {
  color: var(--indigo);
}

.faq-answer {
  padding: 0 40px 26px 0;
}

.faq-answer p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.rail-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}

.rail-note p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.rail-note a {
  font-weight: 600;
  border-bottom: 1px solid var(--indigo);
  padding-bottom: 1px;
}

.rail-note a:hover {
  text-decoration: none;
  opacity: 0.75;
}

/* ---------- Weekly meetings ---------- */

.meeting-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 4px;
}

.meeting-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 28px;
}

.meeting-card .card-label {
  display: block;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--stamp);
  margin-bottom: 10px;
}

.meeting-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.meeting-card p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 8px;
}

.meeting-card p:last-child {
  margin-bottom: 0;
}

.meeting-when {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--paper-deep);
}

.meeting-when span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink);
}

.meeting-card a {
  font-weight: 600;
  border-bottom: 1px solid var(--indigo);
  padding-bottom: 1px;
}

.meeting-card a:hover {
  text-decoration: none;
  opacity: 0.75;
}

.prose .pull-quote {
  border-left: 3px solid var(--indigo);
  padding: 4px 0 4px 22px;
  margin: 28px 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--ink);
}

.prose .pull-quote span {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stamp);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.article-meta .tag {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--stamp);
}

.article-meta .dot {
  color: var(--line);
}

.article-meta .date {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.prose .poem {
  margin: 28px 0;
  padding: 24px 28px;
  background: var(--paper-deep);
  border-radius: 12px;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}

.prose .references {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.prose .references p {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.back-to-news {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stamp);
  margin-bottom: 4px;
}

.back-to-news:hover {
  color: var(--indigo);
  text-decoration: none;
}

/* ---------- Contact page ---------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 620px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-field label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--stamp);
}

.contact-field input,
.contact-field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  width: 100%;
}

.contact-field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(58, 86, 96, 0.12);
}

.contact-submit {
  align-self: flex-start;
  padding: 13px 30px;
  border: none;
  border-radius: 8px;
  background: var(--indigo);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.contact-submit:hover {
  opacity: 0.85;
}

.form-status {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--indigo);
  margin-top: 2px;
  min-height: 1.2em;
}

.contact-detail {
  margin-bottom: 26px;
}

.contact-detail:last-child {
  margin-bottom: 0;
}

.contact-detail .rail-title {
  margin-bottom: 8px;
}

.contact-detail p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.contact-detail a {
  font-weight: 600;
  border-bottom: 1px solid var(--indigo);
  padding-bottom: 1px;
}

.contact-detail a:hover {
  text-decoration: none;
  opacity: 0.75;
}

.contact-social {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.contact-social a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-social a:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  text-decoration: none;
}

/* ---------- Recommended reading ---------- */

.reading-section {
  margin-bottom: 44px;
  scroll-margin-top: 130px;
}

.reading-section:last-child {
  margin-bottom: 0;
}

.reading-section > h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ink);
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--indigo);
}

.reading-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 22px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.book-cover {
  width: 76px;
  aspect-ratio: 2 / 3;
  border-radius: 3px;
  background: var(--paper-deep);
  box-shadow: 0 2px 10px rgba(15, 37, 53, 0.16);
  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reading-item:last-child {
  border-bottom: none;
}

.reading-cite {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 6px;
}

.reading-cite em {
  font-style: italic;
}

.reading-note {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.rail-toc {
  display: flex;
  flex-direction: column;
}

.rail-toc a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.02rem;
}

.rail-toc a:first-child {
  border-top: 1px solid var(--line);
}

.rail-toc a:hover {
  color: var(--indigo);
  text-decoration: none;
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animations — children cascade in after parent reveals */
@keyframes revealChild {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes revealFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* News cards */
.news-grid.is-visible .news-card {
  animation: revealChild 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.news-grid.is-visible .news-card:nth-child(1) { animation-delay: 0.15s; }
.news-grid.is-visible .news-card:nth-child(2) { animation-delay: 0.28s; }
.news-grid.is-visible .news-card:nth-child(3) { animation-delay: 0.41s; }

/* Practice link cards — deliberately slower so the cascade is visible */
.practice-links.is-visible a {
  animation: revealChild 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.practice-links.is-visible a:nth-child(1) { animation-delay: 0.2s; }
.practice-links.is-visible a:nth-child(2) { animation-delay: 0.42s; }
.practice-links.is-visible a:nth-child(3) { animation-delay: 0.64s; }

/* Events list items */
.events-list.is-visible li {
  animation: revealChild 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.events-list.is-visible li:nth-child(1) { animation-delay: 0.1s; }
.events-list.is-visible li:nth-child(2) { animation-delay: 0.22s; }
.events-list.is-visible li:nth-child(3) { animation-delay: 0.34s; }
.events-list.is-visible li:nth-child(4) { animation-delay: 0.46s; }

/* Gallery images — fade only (avoid transform conflict with hover scale) */
.gallery.is-visible img {
  animation: revealFade 0.45s ease both;
}
.gallery.is-visible img:nth-child(1) { animation-delay: 0.1s; }
.gallery.is-visible img:nth-child(2) { animation-delay: 0.18s; }
.gallery.is-visible img:nth-child(3) { animation-delay: 0.26s; }
.gallery.is-visible img:nth-child(4) { animation-delay: 0.34s; }
.gallery.is-visible img:nth-child(5) { animation-delay: 0.42s; }
.gallery.is-visible img:nth-child(6) { animation-delay: 0.50s; }

/* Related pages on inner pages */
.related-pages.is-visible a {
  animation: revealChild 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.related-pages.is-visible a:nth-child(1) { animation-delay: 0.1s; }
.related-pages.is-visible a:nth-child(2) { animation-delay: 0.22s; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-photo-card img {
    height: 42vh;
    min-height: 260px;
  }

  .hero-text-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-text h1 {
    font-size: 1.9rem;
  }

  .sangha-bg {
    background-attachment: scroll;
  }

  .sangha-content {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .page-photo img {
    height: 260px;
  }

  .page-photo.portrait img {
    height: 320px;
    object-position: left 30% !important;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-rail {
    position: static;
    max-width: 680px;
  }

  .rail-photo img {
    height: 260px;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-block;
  }

  nav.main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 12px;
    padding: 16px 0 4px;
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 12px;
  }

  nav.main-nav.open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    text-align: right;
  }

  .main-nav > a:not(:last-child)::after,
  .main-nav > .nav-item:not(:last-child)::after,
  .nav-item .nav-link::after {
    display: none;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    border: none;
    box-shadow: none;
    padding: 6px 14px 2px 0;
    gap: 0;
    align-items: flex-end;
  }

  .dropdown::before {
    display: none;
  }

  .main-nav .dropdown a {
    padding: 7px 0;
    color: rgba(255,255,255,0.7);
  }

  .header-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .logo img {
    height: 48px;
  }


  .hero-photo-card img {
    height: 34vh;
    min-height: 220px;
    border-radius: 14px;
  }

  .hero-text h1 {
    font-size: 1.55rem;
  }

  .practice-links {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .events-list li {
    flex-wrap: wrap;
  }

  .event-date {
    min-width: 90px;
    font-size: 0.85rem;
  }

  .event-action {
    margin-left: 0;
    align-self: flex-start;
  }

  .related-pages {
    grid-template-columns: 1fr;
  }
}
