/* =========================================
   SIRUNADARKUDIRUPU — ETHEREAL SANCTUARY
   Design System: Peaceful Luxury
   ========================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=Inter:wght@300;400;500;600&display=swap');

/* ─── CSS Variables ─────────────────────── */
:root {
  /* Surface Colors */
  --surface:                  #fef9f0;
  --surface-dim:              #ded9d1;
  --surface-bright:           #fef9f0;
  --surface-container-lowest: #ffffff;
  --surface-container-low:    #f8f3ea;
  --surface-container:        #f2ede4;
  --surface-container-high:   #ece8df;
  --surface-container-highest:#e7e2d9;
  --on-surface:               #1d1c16;
  --on-surface-variant:       #424842;
  --inverse-surface:          #32302b;
  --inverse-on-surface:       #f5f0e7;
  --outline:                  #737971;
  --outline-variant:          #c2c8c0;
  --surface-tint:             #4a654d;
  --surface-variant:          #e7e2d9;
  --background:               #fef9f0;
  --on-background:            #1d1c16;

  /* Primary — Forest Green */
  --primary:                  #46614a;
  --on-primary:               #ffffff;
  --primary-container:        #5e7a61;
  --on-primary-container:     #eeffec;
  --inverse-primary:          #b0ceb1;
  --primary-fixed:            #cbebcc;
  --primary-fixed-dim:        #b0ceb1;
  --on-primary-fixed:         #06200e;
  --on-primary-fixed-variant: #324d37;

  /* Secondary — Temple Gold */
  --secondary:                #765a26;
  --on-secondary:             #ffffff;
  --secondary-container:      #fed798;
  --on-secondary-container:   #785c29;
  --secondary-fixed:          #ffdea9;
  --secondary-fixed-dim:      #e6c184;
  --on-secondary-fixed:       #271900;
  --on-secondary-fixed-variant:#5c4211;

  /* Tertiary — Earth Brown */
  --tertiary:                 #725536;
  --on-tertiary:              #ffffff;
  --tertiary-container:       #8d6d4c;
  --on-tertiary-container:    #fff9f6;
  --tertiary-fixed:           #ffdcbc;
  --tertiary-fixed-dim:       #e7bf99;
  --on-tertiary-fixed:        #2b1701;
  --on-tertiary-fixed-variant:#5c4124;

  /* Semantic */
  --error:                    #ba1a1a;
  --on-error:                 #ffffff;
  --error-container:          #ffdad6;
  --on-error-container:       #93000a;

  /* Typography */
  --font-serif:   'EB Garamond', Georgia, serif;
  --font-display: 'Cormorant Garamond', 'EB Garamond', serif;
  --font-sans:    'Inter', system-ui, sans-serif;

  /* Font Sizes */
  --text-display-lg:      64px;
  --lh-display-lg:        72px;
  --ls-display-lg:        -0.02em;
  --fw-display-lg:        500;

  --text-headline-lg:     48px;
  --lh-headline-lg:       56px;
  --fw-headline-lg:       500;

  --text-headline-lg-mob: 32px;
  --lh-headline-lg-mob:   40px;

  --text-headline-md:     32px;
  --lh-headline-md:       40px;
  --fw-headline-md:       500;

  --text-title-lg:        24px;
  --lh-title-lg:          32px;
  --fw-title-lg:          600;

  --text-body-lg:         18px;
  --lh-body-lg:           28px;
  --fw-body-lg:           400;

  --text-body-md:         16px;
  --lh-body-md:           24px;
  --fw-body-md:           400;

  --text-label-md:        14px;
  --lh-label-md:          20px;
  --ls-label-md:          0.05em;
  --fw-label-md:          600;

  /* Spacing */
  --unit:             8px;
  --promo-banner-height: 36px;
  --container-max:    1280px;
  --gutter:           24px;
  --margin-desktop:   64px;
  --margin-mobile:    20px;
  --section-gap:      120px;

  /* Border Radius */
  --radius-sm:        4px;
  --radius:           8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        24px;
  --radius-2xl:       32px;
  --radius-3xl:       40px;
  --radius-full:      9999px;

  /* Shadows */
  --shadow-soft: 0 30px 60px rgba(139, 107, 74, 0.06);
  --shadow-md:   0 10px 30px -10px rgba(139, 107, 74, 0.12);
  --shadow-nav:  0 20px 40px rgba(139, 107, 74, 0.05);
}

/* ─── Reset & Base ───────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--background);
  color: var(--on-background);
  font-family: var(--font-sans);
  font-size: var(--text-body-md);
  line-height: var(--lh-body-md);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
}

input, textarea {
  font-family: var(--font-sans);
  outline: none;
}

ul, ol {
  list-style: none;
}

/* ─── Typography Utilities ───────────────── */
.font-serif    { font-family: var(--font-serif); }
.font-display  { font-family: var(--font-display); }
.font-sans     { font-family: var(--font-sans); }

.text-display-lg {
  font-family: var(--font-display);
  font-size: var(--text-display-lg);
  line-height: var(--lh-display-lg);
  font-weight: var(--fw-display-lg);
  letter-spacing: var(--ls-display-lg);
}

.text-headline-lg {
  font-family: var(--font-serif);
  font-size: var(--text-headline-lg);
  line-height: var(--lh-headline-lg);
  font-weight: var(--fw-headline-lg);
}

.text-headline-md {
  font-family: var(--font-serif);
  font-size: var(--text-headline-md);
  line-height: var(--lh-headline-md);
  font-weight: var(--fw-headline-md);
}

.text-title-lg {
  font-family: var(--font-serif);
  font-size: var(--text-title-lg);
  line-height: var(--lh-title-lg);
  font-weight: var(--fw-title-lg);
}

.text-body-lg {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg);
  line-height: var(--lh-body-lg);
  font-weight: var(--fw-body-lg);
}

.text-body-md {
  font-family: var(--font-sans);
  font-size: var(--text-body-md);
  line-height: var(--lh-body-md);
  font-weight: var(--fw-body-md);
}

.text-label-md {
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  line-height: var(--lh-label-md);
  font-weight: var(--fw-label-md);
  letter-spacing: var(--ls-label-md);
}

/* ─── Color Utilities ────────────────────── */
.text-primary          { color: var(--primary); }
.text-secondary        { color: var(--secondary); }
.text-tertiary         { color: var(--tertiary); }
.text-on-surface       { color: var(--on-surface); }
.text-on-surface-var   { color: var(--on-surface-variant); }
.text-on-primary       { color: var(--on-primary); }
.text-outline          { color: var(--outline); }
.text-outline-var      { color: var(--outline-variant); }

.bg-primary            { background-color: var(--primary); }
.bg-surface            { background-color: var(--surface); }
.bg-surface-low        { background-color: var(--surface-container-low); }
.bg-surface-high       { background-color: var(--surface-container-high); }
.bg-primary-container  { background-color: var(--primary-container); }
.bg-secondary-container{ background-color: var(--secondary-container); }

/* ─── Layout ─────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--margin-desktop);
}

.section-gap {
  padding-block: var(--section-gap);
}

.section-gap-top    { padding-top: var(--section-gap); }
.section-gap-bottom { padding-bottom: var(--section-gap); }

/* ─── Grid ───────────────────────────────── */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gutter);
}

/* ─── Flex Utilities ─────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end    { align-items: flex-end; }
.gap-gutter   { gap: var(--gutter); }
.gap-sm       { gap: 12px; }
.gap-md       { gap: 16px; }
.gap-lg       { gap: 32px; }
.gap-xl       { gap: 48px; }

/* ─── Glassmorphism ──────────────────────── */
.glass {
  background: rgba(254, 249, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(70, 97, 74, 0.1);
}

.glass-dark {
  background: rgba(50, 48, 43, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── Cards ──────────────────────────────── */
.card {
  background: rgba(254, 249, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(70, 97, 74, 0.1);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.card-premium {
  background: rgba(254, 249, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--secondary-fixed);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 10px 30px -10px rgba(118, 90, 38, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-premium:hover {
  transform: scale(1.02);
}

.card-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-container-high);
  border: 1px solid rgba(70, 97, 74, 0.1);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(70, 97, 74, 0.8) 0%, transparent 60%);
}

.card-image-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  color: var(--on-primary);
}

/* ─── Buttons ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  letter-spacing: var(--ls-label-md);
  line-height: var(--lh-label-md);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(70, 97, 74, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--on-primary);
  border: 1.5px solid var(--on-primary);
}

.btn-outline:hover {
  background: var(--on-primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--secondary);
  border: 1.5px solid var(--secondary-fixed);
}

.btn-ghost:hover {
  background: var(--secondary-fixed);
  color: var(--on-secondary-container);
  transform: scale(1.02);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 12px;
}

/* ─── Chips / Tags ───────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.chip-primary {
  background: rgba(203, 235, 204, 0.4);
  color: var(--primary);
}

.chip-secondary {
  background: rgba(255, 222, 169, 0.4);
  color: var(--secondary);
}

.chip-tertiary {
  background: rgba(255, 220, 188, 0.4);
  color: var(--tertiary);
}

/* ─── Input Fields ───────────────────────── */
.input-field {
  width: 100%;
  background: var(--surface-container-low);
  border: none;
  border-radius: var(--radius-full);
  padding: 16px 24px;
  font-family: var(--font-sans);
  font-size: var(--text-body-md);
  color: var(--on-surface);
  box-shadow: inset 0 2px 6px rgba(139, 107, 74, 0.06);
  transition: box-shadow 0.3s ease;
}

.input-field::placeholder {
  color: var(--outline-variant);
}

.input-field:focus {
  box-shadow: inset 0 2px 6px rgba(139, 107, 74, 0.06),
              0 0 0 3px rgba(201, 166, 107, 0.25);
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--outline);
  font-size: 20px;
  pointer-events: none;
}

.input-with-icon .input-field {
  padding-left: 48px;
}

/* ─── Navigation ─────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(254, 249, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-nav);
  transition: padding 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 12px var(--margin-desktop);
  transition: padding 0.3s ease;
}

.nav.scrolled .nav-inner {
  padding-block: 8px;
}

.nav-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
  gap: 3px;
  transition: opacity 0.25s ease;
}

.nav-tagline {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0.85;
  white-space: nowrap;
}

.nav-brand:hover {
  opacity: 0.88;
}

.nav-logo {
  display: block;
  height: 48px;
  width: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  background: transparent;
  transition: height 0.3s ease;
}

.nav.scrolled .nav-logo {
  height: 40px;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  line-height: 0;
  transition: opacity 0.25s ease;
}

.footer-logo-link:hover {
  opacity: 0.88;
}

.footer-logo {
  display: block;
  height: 130px;
  width: auto;
  max-height: 130px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 32px);
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  color: var(--on-surface-variant);
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Donate link — pill styled like a CTA */
a.nav-link[href="donate.html"] {
  background: var(--primary);
  color: var(--on-primary) !important;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: background 0.22s ease, transform 0.2s ease;
}

a.nav-link[href="donate.html"]:hover {
  background: var(--primary-container);
  transform: scale(1.04);
}

a.nav-link[href="donate.html"]::after {
  display: none !important;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

a.nav-link[href="donate.html"].active {
  background: var(--secondary);
  color: var(--on-secondary) !important;
  box-shadow: 0 4px 14px rgba(118, 90, 38, 0.28);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: all 0.35s ease;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(254, 249, 240, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(70, 97, 74, 0.08);
  padding: 16px var(--margin-mobile);
  padding-bottom: 24px;
}

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

.nav-mobile .nav-link {
  padding: 14px 0 14px 12px;
  border-bottom: 1px solid rgba(70, 97, 74, 0.06);
  font-size: 18px;
  border-left: 3px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.nav-mobile .nav-link.active {
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
  background: rgba(70, 97, 74, 0.06);
}

.nav-mobile .btn-primary {
  margin-top: 12px;
  text-align: center;
  justify-content: center;
  padding: 14px;
}

/* Donate pill in mobile nav */
.nav-mobile a.nav-link[href="donate.html"] {
  background: var(--primary);
  color: var(--on-primary) !important;
  border-radius: var(--radius-xl);
  border-bottom: none;
  border-left: none;
  padding: 14px 20px;
  text-align: center;
  font-weight: 600;
  margin-top: 8px;
}

.nav-mobile a.nav-link[href="donate.html"].active {
  background: var(--secondary);
  color: var(--on-secondary) !important;
}

/* ─── Promo Banner (marquee) ─────────────── */
.promo-banner {
  height: var(--promo-banner-height);
  background: linear-gradient(
    90deg,
    var(--secondary) 0%,
    #8a6b2e 35%,
    var(--secondary-container) 65%,
    var(--secondary) 100%
  );
  color: var(--on-secondary);
  overflow: hidden;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.promo-marquee {
  overflow: hidden;
  width: 100%;
}

.promo-marquee__track {
  display: flex;
  width: max-content;
  background-color: #46604a;
  flex-shrink: 0;
  animation: promo-marquee 22s linear infinite;
  will-change: transform;
}

.promo-marquee:hover .promo-marquee__track {
  animation-play-state: paused;
}

.promo-marquee__text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  padding-inline: 28px;
  letter-spacing: 0.02em;
  line-height: var(--promo-banner-height);
}

@keyframes promo-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-25%); }
}

@media (prefers-reduced-motion: reduce) {
  .promo-marquee__track {
    animation: none;
    width: 100%;
    justify-content: center;
  }

  .promo-marquee__text:last-child {
    display: none;
  }

  .promo-marquee__text {
    padding-inline: 16px;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
  }

  .promo-banner {
    height: auto;
    min-height: var(--promo-banner-height);
    padding-block: 6px;
  }
}

/* ─── Hero ───────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  overflow: visible;
  background: var(--surface);
}

.hero-bg {
  position: relative;
  width: 100%;
  line-height: 0;
}

.hero-bg img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.hero-bg-overlay {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08)  0%,
    rgba(0, 0, 0, 0.52) 30%,
    rgba(0, 0, 0, 0.55) 60%,
    rgba(0, 0, 0, 0.12) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(88px + env(safe-area-inset-top, 0px))
    var(--margin-mobile)
    clamp(72px, 11vh, 96px);
  text-align: center;
  pointer-events: none;
}

.hero-content .hero-title {
  pointer-events: auto;
}

.hero-title {
  width: 100%;
  max-width: min(900px, 100%);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.2vw + 0.5rem, 3.75rem);
  font-weight: 400;
  line-height: 1.28;
  font-style: italic;
  color: #fff8f0;
  text-shadow:
    0 1px 3px  rgba(0, 0, 0, 0.95),
    0 2px 8px  rgba(0, 0, 0, 0.88),
    0 4px 20px rgba(0, 0, 0, 0.75),
    0 8px 36px rgba(0, 0, 0, 0.55);
}

.hero-title-line {
  display: block;
  opacity: 0;
  transform: translateY(22px);
  animation: heroTitleIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.2s + var(--line-delay, 0) * 0.3s);
}

.hero-title-line + .hero-title-line {
  margin-top: 0.35em;
}

.hero-title-highlight {
  position: relative;
  display: inline-block;
  max-width: 100%;
  font-size: clamp(1.5rem, 3.8vw + 0.35rem, 2.75rem);
  font-weight: 700;
  line-height: 1.32;
  color: var(--on-surface);
  background: rgba(255, 242, 210, 0.92);
  padding: 0.18em 0.55em 0.22em;
  border-radius: 8px;
  font-style: normal;
  box-sizing: border-box;
  box-shadow: none;
  text-shadow: none;
}

.hero-title-highlight::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0.08em;
  height: 2.5px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    90deg,
    transparent,
    var(--secondary) 25%,
    var(--secondary) 75%,
    transparent
  );
  transform: scaleX(0);
  transform-origin: center;
  animation: heroHighlightUnderline 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.75s + var(--line-delay, 0) * 0.3s);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4vh, 36px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-primary);
  font-size: 36px;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(-50%);
  animation:
    heroScrollIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.15s forwards,
    heroScrollBounce 2s ease-in-out 1.85s infinite;
  transition: opacity 0.2s ease;
}

@keyframes heroTitleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroHighlightUnderline {
  to {
    transform: scaleX(1);
  }
}

@keyframes heroScrollIn {
  to {
    opacity: 1;
  }
}

.hero-scroll:hover {
  opacity: 0.85;
}

.hero-scroll:focus-visible {
  outline: 2px solid var(--on-primary);
  outline-offset: 6px;
  border-radius: var(--radius-full);
}

/* ─── Section Headers ────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-header h2 {
  color: var(--primary);
  margin-bottom: 20px;
}

.section-header p {
  color: var(--on-surface-variant);
  max-width: 640px;
  margin-inline: auto;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-divider h2 {
  white-space: nowrap;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(70, 97, 74, 0.2), transparent);
}

.section-divider-line.secondary {
  background: linear-gradient(to right, rgba(118, 90, 38, 0.2), transparent);
}

/* ─── Stats ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 240px));
  justify-content: center;
  gap: clamp(32px, 8vw, 96px);
  margin-top: 64px;
}

.stat-item {
  padding: 32px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 500;
  line-height: 56px;
  color: var(--secondary);
  display: block;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-value--symbol {
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-value--symbol.is-visible {
  opacity: 1;
  transform: scale(1);
}

.stat-label {
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  letter-spacing: var(--ls-label-md);
  text-transform: uppercase;
  color: var(--outline);
}

/* ─── Feature Cards Grid ─────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 420px 380px;
  gap: var(--gutter);
}

.feature-card-lg {
  grid-column: span 7;
}

.feature-card-md {
  grid-column: span 5;
}

.feature-card-full {
  grid-column: span 12;
}

/* Explore the Essence — stable layout, no scroll jank */
.essence-header {
  flex-wrap: wrap;
}

.essence-header-text {
  flex: 1;
  min-width: 260px;
}

.feature-card-community {
  background: linear-gradient(135deg, #46614a, #324d37);
}

.feature-grid .card-image img {
  transition: transform 0.55s ease;
}

.feature-grid .card-image:hover img {
  transform: scale(1.06);
}

.feature-card-full .card-image-body-wide {
  position: absolute;
  inset-block: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  max-width: 540px;
}

/* ─── Bento Grid ─────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.bento-cell {
  background: var(--surface-container-high);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid rgba(194, 200, 192, 0.3);
  transition: box-shadow 0.3s ease;
}

.bento-cell:hover {
  box-shadow: var(--shadow-soft);
}

.bento-cell-wide {
  grid-column: span 2;
}

.bento-cell-full {
  grid-column: span 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.bento-cell-primary {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.bento-cell-secondary {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

/* ─── Member Cards ───────────────────────── */
.member-card {
  background: rgba(254, 249, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(70, 97, 74, 0.1);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.member-card-image {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-container);
  margin-bottom: 16px;
}

.member-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.member-card:hover .member-card-image img {
  transform: scale(1.06);
}

.member-card-wide {
  flex-direction: row;
  gap: 24px;
}

.member-card-wide .member-card-image {
  width: 45%;
  flex-shrink: 0;
  aspect-ratio: auto;
  aspect-ratio: 1;
  margin-bottom: 0;
}

/* ─── Leader Cards ───────────────────────── */
.leader-card {
  background: rgba(254, 249, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--secondary-fixed);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(118, 90, 38, 0.12);
  transition: transform 0.3s ease;
}

.leader-card:hover {
  transform: scale(1.02);
}

.leader-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 24px;
  ring: 4px solid rgba(230, 193, 132, 0.2);
  box-shadow: 0 0 0 4px rgba(230, 193, 132, 0.2);
}

.leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Filter Chips ───────────────────────── */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-chip {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.filter-chip-default {
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
}

.filter-chip-default:hover {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
}

.filter-chip-active {
  background: var(--primary);
  color: var(--on-primary);
}

/* ─── FAB ────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(70, 97, 74, 0.35);
  z-index: 90;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fab:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 32px rgba(70, 97, 74, 0.45);
}

/* ─── Footer ─────────────────────────────── */
.footer {
  background: linear-gradient(
    180deg,
    var(--surface-container-low) 0%,
    color-mix(in srgb, var(--surface-container-low) 88%, var(--primary) 12%) 100%
  );
  border-top: 1px solid rgba(70, 97, 74, 0.12);
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  margin-top: var(--section-gap);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 40px 48px;
  align-items: start;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 56px var(--margin-desktop) 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-serif);
  font-size: var(--text-body-md);
  color: var(--on-surface-variant);
  line-height: 1.5;
}

.footer-col-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-col--nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  width: 100%;
}

.footer-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--on-surface-variant);
  transition: color 0.25s ease, transform 0.25s ease;
  padding: 4px 0;
}

.footer-link:hover {
  color: var(--primary);
  transform: translateX(2px);
}

.footer-bottom {
  border-top: 1px solid rgba(70, 97, 74, 0.1);
  padding: 20px var(--margin-desktop) 28px;
  text-align: center;
  max-width: var(--container-max);
  margin-inline: auto;
}

.footer-bottom p {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--on-surface-variant);
  opacity: 0.72;
  letter-spacing: 0.02em;
}

.footer-contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-xl);
  background: rgba(254, 249, 240, 0.72);
  border: 1px solid rgba(70, 97, 74, 0.12);
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.footer-contact-link:hover {
  background: rgba(254, 249, 240, 0.95);
  border-color: rgba(70, 97, 74, 0.22);
  transform: translateY(-1px);
}

.footer-contact-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(70, 97, 74, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-contact-icon {
  font-size: 18px;
  line-height: 1;
  color: var(--primary);
}

.footer-contact-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.footer-contact-value {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface);
  word-break: break-word;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ─── Section Wave Transitions ───────────── */
.section-wave-bottom {
  --wave-h: 56px;
  padding-top: var(--section-gap);
  padding-bottom: calc(var(--section-gap) + var(--wave-h));
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Crect width='1440' height='56' fill='%23fef9f0'/%3E%3Cpath fill='%23f8f3ea' d='M0 28C240 56 480 0 720 28 960 56 1200 0 1440 28V56H0Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% var(--wave-h);
}

.section-explore {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background-color: var(--surface-container-low);
}

/* ─── Scroll Reveal Animations ───────────── */
.reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal-left {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal-left.active {
  opacity: 1;
}

.reveal-scale {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal-scale.active {
  opacity: 1;
}

/* ─── Utilities ──────────────────────────── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.uppercase    { text-transform: uppercase; }
.italic       { font-style: italic; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }
.mb-4  { margin-bottom: 32px; }
.mb-6  { margin-bottom: 48px; }
.mb-8  { margin-bottom: 64px; }
.mt-4  { margin-top: 32px; }
.mt-6  { margin-top: 48px; }
.mt-8  { margin-top: 64px; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  font-size: inherit;
  vertical-align: middle;
}

/* ─── Page Header (inner pages) ──────────── */
/* ─── Gallery Grid ───────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: var(--gutter);
}

.gallery-item {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

/* ─── Timeline ───────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--primary-fixed), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-fixed);
}

.timeline-year {
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  letter-spacing: var(--ls-label-md);
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Timeline travel — scroll-driven journey */
.timeline-travel {
  --timeline-progress: 0;
  --item-phase: 0;
  padding-left: 40px;
}

.timeline-travel::before {
  display: none;
}

.timeline-travel .timeline-rail {
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  pointer-events: none;
}

.timeline-travel .timeline-rail-track,
.timeline-travel .timeline-rail-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  border-radius: var(--radius-full);
}

.timeline-travel .timeline-rail-track {
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(118, 90, 38, 0.28) 0px,
    rgba(118, 90, 38, 0.28) 8px,
    transparent 8px,
    transparent 20px
  );
}

.timeline-travel .timeline-rail-progress {
  height: 100%;
  transform: scaleY(var(--timeline-progress));
  transform-origin: top center;
  background: repeating-linear-gradient(
    to bottom,
    var(--secondary) 0px,
    var(--secondary) 8px,
    transparent 8px,
    transparent 20px
  );
}

.timeline-travel .timeline-traveler {
  display: none;
}

.timeline-travel .timeline-item {
  /* Container stays fully visible; individual elements handle their own opacity */
  opacity: 1;
}

.timeline-travel .timeline-item::before {
  width: 14px;
  height: 14px;
  background: color-mix(
    in srgb,
    var(--secondary) calc(var(--item-phase, 0) * 100%),
    var(--outline-variant)
  );
  box-shadow: 0 0 0 5px color-mix(
    in srgb,
    var(--secondary-container) calc(var(--item-phase, 0) * 100%),
    var(--surface-container-high)
  );
  transform: scale(calc(0.7 + var(--item-phase, 0) * 0.4));
}

.timeline-travel .timeline-year {
  color: color-mix(
    in srgb,
    var(--secondary) calc(var(--item-phase, 0) * 100%),
    var(--outline)
  );
}


/* ─── Full-width split timeline layout ─────── */
/* Wider container for the history section */
.history-container {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--margin-desktop);
}

/* Heading above timeline */
.history-header {
  max-width: 640px;
  margin-bottom: 72px;
}

/* Remove the left-indent; rail moves to center boundary */
.timeline-travel {
  padding-left: 0;
}

/* Rail at boundary between image col (45%) and text col */
.timeline-travel .timeline-rail {
  left: calc(45% + 20px);
}

/* Traveler dot on rail */

/* Every item: 45% image | rest text, with rail between */
.timeline-travel .timeline-item {
  display: grid;
  grid-template-columns: 45% 1fr;
  column-gap: 0;
  padding-bottom: 0;
}

/* Dot centered on rail */
.timeline-travel .timeline-item::before {
  left: calc(45% + 13px);
  top: 10px;
}

/* Image column */
.tl-image-col {
  padding-right: 44px;
  padding-bottom: 56px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

/* Second stacked photo peeking behind the main polaroid */
.tl-image-col:has(.tl-img)::before {
  content: '';
  position: absolute;
  right: 60px;
  top: 10px;
  width: calc(88% - 44px);
  aspect-ratio: 4 / 3;
  background: #fff;
  box-shadow:
    0 0 0 10px #fff,
    0 0 0 11px rgba(0,0,0,0.08),
    0 6px 20px rgba(0,0,0,0.15);
  border-radius: 3px;
  transform: rotate(4.5deg);
  z-index: 0;
  pointer-events: none;
  opacity: calc(var(--item-phase, 0) * 0.9);
}

/* Paper clip on top-left corner of the polaroid */
.tl-image-col:has(.tl-img)::after {
  content: '📎';
  position: absolute;
  top: -4px;
  right: calc(44px + 5%);
  font-size: 30px;
  line-height: 1;
  transform: rotate(-38deg) scaleX(-1);
  z-index: 3;
  pointer-events: none;
  opacity: calc(var(--item-phase, 0));
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Image — polaroid style, fades & slides in with scroll phase */
.tl-img {
  display: block;
  position: relative;
  z-index: 1;
  width: 88%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 3px;
  /* Uniform white polaroid frame */
  box-shadow:
    0 0 0 10px #fff,
    0 0 0 11px rgba(0,0,0,0.09),
    0 12px 40px rgba(0,0,0,0.22);
  opacity: calc(var(--item-phase, 0));
  transform: rotate(-3deg) translateX(calc((1 - var(--item-phase, 0)) * -28px));
  transition: transform 0.1s linear;
}

.tl-img--bottom {
  object-position: center bottom;
}

/* Text column */
.tl-text-col {
  padding-left: 44px;
  padding-bottom: 64px;
}

/* ── Staggered text animations: year → title → paragraph ── */

/* Year: slides in from the right, arrives first */
.timeline-travel .timeline-item .timeline-year {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--secondary) !important;
  margin-bottom: 4px;
  opacity: var(--year-phase, 0);
  transform: translateX(calc((1 - var(--year-phase, 0)) * 28px));
  transition: transform 0.08s linear;
}

/* Title: slides up, arrives second */
.timeline-travel .timeline-item h4 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  opacity: var(--title-phase, 0);
  transform: translateY(calc((1 - var(--title-phase, 0)) * 22px));
  transition: transform 0.08s linear;
}

/* Paragraph: slides up, arrives last */
.timeline-travel .timeline-item p {
  opacity: var(--para-phase, 0);
  transform: translateY(calc((1 - var(--para-phase, 0)) * 18px));
  transition: transform 0.08s linear;
}

/* ─── Responsive: revert to left-rail below 900px ── */
@media (max-width: 900px) {
  .timeline-travel {
    padding-left: 36px;
  }

  .timeline-travel .timeline-rail {
    left: 10px;
  }

  .timeline-travel .timeline-traveler {
    display: none;
  }

  .timeline-travel .timeline-item {
    display: block;
  }

  .timeline-travel .timeline-item::before {
    display: none;
  }

  .tl-text-col {
    position: relative;
    padding-left: 0;
    padding-bottom: 44px;
  }

  .tl-text-col::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: color-mix(
      in srgb,
      var(--secondary) calc(var(--item-phase, 0) * 100%),
      var(--outline-variant)
    );
    box-shadow: 0 0 0 3px color-mix(
      in srgb,
      var(--secondary-container) calc(var(--item-phase, 0) * 100%),
      var(--surface-container-high)
    );
    transform: scale(calc(0.85 + var(--item-phase, 0) * 0.3));
  }

  .tl-image-col:not(:has(.tl-img)) {
    display: none;
  }

  .tl-image-col:has(.tl-img) {
    padding-right: 0;
    padding-bottom: 0;
    margin-bottom: 28px;
    max-width: 100%;
    justify-content: flex-start;
  }

  .tl-image-col:has(.tl-img)::before,
  .tl-image-col:has(.tl-img)::after {
    display: none;
  }

  .tl-img {
    width: 85%;
    transform: rotate(-1.5deg);
  }

  .history-container {
    padding-inline: var(--margin-mobile);
  }

  .timeline-travel .timeline-item p {
    line-height: 1.75;
  }

  .timeline-travel .timeline-rail-progress {
    will-change: transform;
  }

  .timeline-travel .timeline-item,
  .timeline-travel .timeline-item h4,
  .timeline-travel .timeline-item p,
  .timeline-travel .tl-text-col::before {
    transition:
      opacity 0.2s linear,
      transform 0.2s linear,
      color 0.2s linear,
      background 0.2s linear,
      box-shadow 0.2s linear;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title-line {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero-title-highlight::after {
    transform: scaleX(1);
    animation: none;
  }

  .hero-scroll {
    opacity: 1;
    animation: none;
  }

  .reveal,
  .reveal-left,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none !important;
  }

  .timeline-travel .timeline-item,
  .timeline-travel .timeline-item::before,
  .timeline-travel .timeline-year,
  .timeline-travel .timeline-item h4,
  .timeline-travel .timeline-item p {
    transition: none !important;
  }

  .timeline-travel .timeline-item {
    opacity: 1;
  }

  .timeline-travel .timeline-item::before {
    background: var(--secondary);
    transform: scale(1);
  }

  .timeline-travel .tl-text-col::before {
    background: var(--secondary);
    box-shadow: 0 0 0 3px var(--secondary-container);
    transform: scale(1);
  }

  .timeline-travel .timeline-year,
  .timeline-travel .timeline-item h4,
  .timeline-travel .timeline-item p {
    opacity: 1;
    color: var(--secondary);
  }

  .timeline-travel .timeline-rail-progress {
    transform: scaleY(1);
  }

  .timeline-travel .timeline-traveler {
    display: none;
  }
}

/* ─── Event Cards ────────────────────────── */
.event-card {
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(194, 200, 192, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.event-card-image {
  height: 200px;
  overflow: hidden;
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.event-card:hover .event-card-image img {
  transform: scale(1.06);
}

.event-card-body {
  padding: 24px;
}

/* ─── Keyframes ──────────────────────────── */
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(10px); }
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive: Tablet (≤ 1024px) ─────── */
@media (max-width: 1024px) {
  :root {
    --margin-desktop: 40px;
  }

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

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

  .bento-cell-full {
    grid-column: span 2;
  }

  .feature-grid {
    grid-template-rows: 360px 340px;
  }

  .feature-card-lg {
    grid-column: span 7;
  }

  .feature-card-md {
    grid-column: span 5;
  }

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

  .gallery-item.wide {
    grid-column: span 2;
  }
}

/* ─── Inline Grid Responsive Helpers ─────── */
/* These target inline grid layouts used in page-specific sections */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.two-col-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.stat-strip-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  text-align: center;
}

/* ─── Responsive: Mobile (≤ 768px) ──────── */
@media (max-width: 768px) {
  :root {
    --margin-desktop: var(--margin-mobile);
    --section-gap: 72px;
  }

  .container {
    padding-inline: var(--margin-mobile);
  }

  /* Nav */
  .nav-inner {
    padding: 10px var(--margin-mobile);
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    margin-top: 110px;
  }

  .hero-content {
    padding:
      calc(88px + env(safe-area-inset-top, 0px))
      var(--margin-mobile)
      clamp(64px, 10vh, 88px);
  }

  .hero-title {
    width: auto;
    max-width: 100%;
    font-size: clamp(1.25rem, 5.8vw, 1.875rem);
    line-height: 1.35;
  }

  .hero-title-highlight {
    font-size: clamp(1.125rem, 5.2vw, 1.625rem);
    line-height: 1.38;
    padding: 0.28em 0.6em 0.32em;
    border-radius: 6px;
  }

  .hero-scroll {
    bottom: clamp(16px, 3.5vh, 28px);
    font-size: 30px;
  }

  /* Typography */
  .text-display-lg {
    font-size: clamp(40px, 10vw, 64px);
    line-height: 1.1;
  }

  .text-headline-lg {
    font-size: var(--text-headline-lg-mob);
    line-height: var(--lh-headline-lg-mob);
  }

  .text-headline-md {
    font-size: 26px;
    line-height: 34px;
  }

  /* Feature cards */
  .feature-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 300px 300px 280px;
  }

  .feature-card-lg,
  .feature-card-md,
  .feature-card-full {
    grid-column: span 1;
  }

  /* Bento */
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-cell-wide,
  .bento-cell-full {
    grid-column: span 1;
    flex-direction: column;
    align-items: flex-start;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    justify-content: center;
    max-width: 280px;
    margin-inline: auto;
    gap: 0;
  }

  /* Cards */
  .card-image-body {
    padding: 24px;
  }

  .feature-card-full .card-image-body-wide {
    padding: 24px;
    max-width: none;
  }

  /* Grids */
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  /* Member cards wide */
  .member-card-wide {
    flex-direction: column;
  }

  .member-card-wide .member-card-image {
    width: 100%;
    aspect-ratio: 4/3;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px var(--margin-mobile) 32px;
    text-align: center;
  }

  .footer-col {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }

  .footer-col--nav {
    align-items: center;
  }

  .footer-col-title {
    margin-bottom: 14px;
    width: 100%;
    text-align: center;
  }

  .footer-nav {
    display: inline-grid;
    grid-template-columns: repeat(2, max-content);
    gap: 10px 28px;
    justify-content: center;
    width: auto;
    max-width: 100%;
    text-align: center;
  }

  .footer-link {
    text-align: center;
    justify-self: center;
  }

  .footer-link:hover {
    transform: none;
  }

  .footer-contact-links {
    width: 100%;
  }

  .footer-contact-link {
    text-align: left;
  }

  .footer-bottom {
    padding: 18px var(--margin-mobile) 24px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Two-col grids collapse to single col */
  .two-col-grid,
  .two-col-grid-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* 4-col stat strip collapses to 2x2 */
  .stat-strip-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Section header */
  .section-header {
    margin-bottom: 48px;
  }

  /* FAB */
  .fab {
    bottom: 20px;
    right: 20px;
  }
}

/* ─── Responsive: Small (≤ 480px) ────────── */
@media (max-width: 480px) {
  .hero-content {
    padding-bottom: clamp(56px, 9vh, 72px);
  }

  .hero-title {
    font-size: clamp(1.0625rem, 5.4vw, 1.5rem);
  }

  .hero-title-highlight {
    font-size: clamp(1rem, 5vw, 1.375rem);
    padding: 0.3em 0.55em 0.34em;
  }

  .hero-scroll {
    bottom: clamp(14px, 3vh, 24px);
    font-size: 26px;
  }

  .stat-item {
    padding: 20px;
  }

  .bento-cell {
    padding: 24px;
  }

  .leader-card,
  .card {
    padding: 24px;
  }

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

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

/* ─── Responsive: Tablet stat strip ─────── */
@media (min-width: 481px) and (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(140px, 200px));
    justify-content: center;
    max-width: none;
    gap: clamp(24px, 6vw, 48px);
  }
}

/* =========================================
   DONATION PAGE COMPONENTS
   ========================================= */

/* Atmospheric subtle grid pattern */
.temple-pattern-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.temple-pattern-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(70,97,74,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,97,74,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 80%);
}

/* Donation tier card */
.donation-card {
  background: rgba(254, 249, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(118, 90, 38, 0.12);
  border-radius: var(--radius-3xl);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}

.donation-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(118, 90, 38, 0.12);
}

.donation-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 30px;
  transition: background 0.3s ease;
}

/* Payment glass card */
.payment-card {
  background: rgba(254, 249, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(118, 90, 38, 0.1);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 40px 80px rgba(118, 90, 38, 0.1);
  width: 100%;
  max-width: 100%;
}

.payment-form-side {
  padding: 48px;
  min-width: 0;
}

.payment-qr-side {
  background: rgba(236, 232, 223, 0.5);
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}

.qr-container {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(139,107,74,0.08);
  margin-bottom: 24px;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.amount-preset-btn {
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  color: var(--on-surface);
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amount-preset-btn:hover,
.amount-preset-btn.selected {
  background: rgba(118, 90, 38, 0.12);
  color: var(--secondary);
}

/* Form input standard */
.form-input {
  width: 100%;
  min-width: 0;
  background: var(--surface-container-lowest);
  border: none;
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  font-family: var(--font-sans);
  font-size: var(--text-body-md);
  color: var(--on-surface);
  box-shadow: inset 0 1px 4px rgba(139,107,74,0.06);
  transition: box-shadow 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: var(--outline-variant);
  opacity: 0.7;
}

.form-input:focus {
  box-shadow: inset 0 1px 4px rgba(139,107,74,0.06),
              0 0 0 2px rgba(118, 90, 38, 0.18);
}

.form-label {
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  letter-spacing: var(--ls-label-md);
  color: var(--on-surface-variant);
  display: block;
  margin-bottom: 8px;
  margin-left: 4px;
}

/* Impact list item */
.impact-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 32px;
}

.impact-item + .impact-item {
  border-top: 1px solid rgba(194,200,192,0.25);
  padding-top: 32px;
}

.impact-icon {
  font-size: 28px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Sacred giving badge */
.giving-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  letter-spacing: var(--ls-label-md);
  margin-bottom: 24px;
}

/* =========================================
   CONTACT PAGE COMPONENTS
   ========================================= */

/* Ambient radial gradient background */
.contact-bg {
  background-color: var(--background);
  background-image:
    radial-gradient(at 0% 0%, rgba(203, 235, 204, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255, 222, 169, 0.18) 0px, transparent 50%);
}

/* Contact form layout */
.contact-grid {
  display: flex;
  justify-content: center;
}

.contact-form-card {
  width: 100%;
  max-width: 720px;
  background: rgba(254, 249, 240, 0.62);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(194, 200, 192, 0.32);
  border-radius: var(--radius-3xl);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 20px 40px rgba(139, 107, 74, 0.05);
}

.contact-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.contact-form-row > div {
  min-width: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

/* Textarea variant */
.form-textarea {
  width: 100%;
  background: var(--surface-container-low);
  border: none;
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  font-family: var(--font-sans);
  font-size: var(--text-body-md);
  color: var(--on-surface);
  resize: vertical;
  min-height: 120px;
  box-shadow: inset 0 1px 4px rgba(139,107,74,0.06);
  transition: box-shadow 0.3s ease;
  outline: none;
}

.form-textarea::placeholder {
  color: var(--outline-variant);
  opacity: 0.7;
}

.form-textarea:focus {
  box-shadow: inset 0 1px 4px rgba(139,107,74,0.06),
              0 0 0 2px rgba(118, 90, 38, 0.18);
}

/* WhatsApp CTA card */
.whatsapp-card {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-3xl);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(70, 97, 74, 0.18);
}

.whatsapp-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-full);
  background: var(--on-primary);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease;
}

.whatsapp-btn:hover {
  background: var(--primary-fixed);
  color: var(--primary);
}

/* Social link row */
.social-link-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  padding: 8px 0;
  transition: all 0.25s ease;
}

.social-link-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: all 0.25s ease;
  font-size: 20px;
}

.social-link-item:hover .social-link-icon {
  background: var(--primary);
  color: var(--on-primary);
}

.social-link-item:hover span:last-child {
  color: var(--primary);
}

/* Map placeholder */
.map-placeholder {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(139,107,74,0.12);
  background: #1e2630;
  isolation: isolate;
}

.map-placeholder-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.map-placeholder:hover .map-placeholder-bg {
  transform: scale(1.08);
}

.map-placeholder-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 18, 24, 0.05) 0%, rgba(15, 18, 24, 0.62) 72%, rgba(15, 18, 24, 0.78) 100%);
  pointer-events: none;
}

.map-pin-wrap {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.map-placeholder-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 36px 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  pointer-events: auto;
}

.map-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  color: #d8ccb0;
  letter-spacing: 0.02em;
}

.map-address {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg);
  line-height: 1.75;
  color: rgba(210, 202, 184, 0.88);
}

.map-pin-icon {
  font-size: 48px;
  color: #c4b078;
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
}

.map-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: 1px solid #b8a574;
  background: rgba(18, 22, 28, 0.42);
  color: #c9b884;
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  letter-spacing: var(--ls-label-md);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.map-action-btn .material-symbols-outlined {
  font-size: 20px;
  color: #c9b884;
}

.map-action-btn:hover {
  background: rgba(180, 160, 110, 0.14);
  border-color: #d4c9a8;
  color: #e3d8b8;
  transform: translateY(-1px);
}

.map-action-btn:hover .material-symbols-outlined {
  color: #e3d8b8;
}

.map-ping {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: rgba(180, 160, 110, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mapPulse 2.5s ease-in-out infinite;
}

@keyframes mapPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(196, 176, 120, 0.18); }
  50%        { transform: scale(1.05); box-shadow: 0 0 0 16px rgba(196, 176, 120, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .map-placeholder-bg {
    transition: none;
  }

  .map-placeholder:hover .map-placeholder-bg {
    transform: none;
  }

  .map-ping {
    animation: none;
  }
}

/* =========================================
   GALLERY PAGE COMPONENTS
   ========================================= */

/* Masonry grid (CSS columns) */
.masonry-grid {
  columns: 1;
  column-gap: var(--gutter);
}

@media (min-width: 640px)  { .masonry-grid { columns: 2; } }
@media (min-width: 1024px) { .masonry-grid { columns: 3; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--gutter);
}

/* Gallery card */
.gallery-card-frame {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease;
}

.gallery-card-frame:hover {
  box-shadow: 0 0 24px 3px rgba(201, 166, 107, 0.35);
  transform: scale(1.02);
}

.gallery-card-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-card-frame:hover img {
  transform: scale(1.08);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29, 28, 22, 0.82) 0%, rgba(29,28,22,0) 58%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  pointer-events: none;
}

.gallery-card-frame:hover .gallery-card-overlay {
  opacity: 1;
}

/* Gallery filter chip – border variant */
.gallery-chip {
  padding: 8px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-label-md);
  font-weight: var(--fw-label-md);
  border: 2px solid var(--outline-variant);
  color: var(--on-surface-variant);
  background: transparent;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.gallery-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.gallery-chip:not(.active):hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Gallery category badge */
.gallery-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* WebGL canvas background */
#gallery-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════
   PREMIUM GENEALOGY TREE — Generation Color Coding
═══════════════════════════════════════════════════════════ */

/* ── Generation palette ──────────────────────────────────── */
:root {
  --gen0-accent:    #C9A84C;
  --gen0-dark:      #7B5015;
  --gen0-light:     #FFF8E1;
  --gen0-card:      linear-gradient(160deg,#FFFBEE 0%,#FFF3C4 100%);
  --gen0-avatar:    linear-gradient(135deg,#8B6010,#C9A84C,#F0D080);
  --gen0-border:    rgba(201,168,76,0.45);
  --gen0-shadow:    rgba(180,130,20,0.22);

  --gen1-accent:    #1B4332;
  --gen1-dark:      #0D2B1E;
  --gen1-light:     #EBFFF4;
  --gen1-card:      linear-gradient(160deg,#F0FDF4 0%,#DCFCE7 100%);
  --gen1-avatar:    linear-gradient(135deg,#0D2B1E,#2D6A4F);
  --gen1-border:    rgba(27,67,50,0.30);
  --gen1-shadow:    rgba(27,67,50,0.18);

  --gen2-accent:    #059669;
  --gen2-dark:      #065F46;
  --gen2-light:     #ECFDF5;
  --gen2-card:      linear-gradient(160deg,#ECFDF5 0%,#D1FAE5 100%);
  --gen2-avatar:    linear-gradient(135deg,#065F46,#059669,#34D399);
  --gen2-border:    rgba(5,150,105,0.30);
  --gen2-shadow:    rgba(5,150,105,0.16);

  --gen3-accent:    #16A34A;
  --gen3-dark:      #14532D;
  --gen3-light:     #F0FDF4;
  --gen3-card:      linear-gradient(160deg,#F0FDF4 0%,#BBF7D0 100%);
  --gen3-avatar:    linear-gradient(135deg,#14532D,#22C55E,#86EFAC);
  --gen3-border:    rgba(22,163,74,0.28);
  --gen3-shadow:    rgba(22,163,74,0.14);

  --gen4-accent:    #22C55E;
  --gen4-dark:      #15803D;
  --gen4-light:     #F0FDF4;
  --gen4-card:      linear-gradient(160deg,#F0FDF4 0%,#DCFCE7 100%);
  --gen4-avatar:    linear-gradient(135deg,#15803D,#22C55E,#86EFAC);
  --gen4-border:    rgba(34,197,94,0.25);
  --gen4-shadow:    rgba(34,197,94,0.12);

  --gen5-accent:    #4ADE80;
  --gen5-dark:      #14532D;
  --gen5-light:     #F7FEF9;
  --gen5-card:      linear-gradient(160deg,#F7FEF9 0%,#ECFDF5 100%);
  --gen5-avatar:    linear-gradient(135deg,#14532D,#4ADE80,#BBF7D0);
  --gen5-border:    rgba(74,222,128,0.22);
  --gen5-shadow:    rgba(74,222,128,0.10);

  --gen6-accent:    #065F46;
  --gen6-dark:      #052E16;
  --gen6-light:     #F0FFFE;
  --gen6-card:      linear-gradient(160deg,#F0FFFE 0%,#ECFDF5 100%);
  --gen6-avatar:    linear-gradient(135deg,#052E16,#065F46,#10B981);
  --gen6-border:    rgba(6,95,70,0.22);
  --gen6-shadow:    rgba(6,95,70,0.10);

  --path-color:     rgba(100,160,120,0.55);
  --path-hover:     rgba(100,160,120,0.85);
}

/* ── Tree wrapper ────────────────────────────────────────── */
.premium-tree {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 8px 24px 100px;
  overflow: visible;
  width: 100%;
}

/* ── SVG overlay ─────────────────────────────────────────── */
.pt-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.pt-path {
  fill: none;
  stroke: var(--path-color);
  stroke-width: 2px;
  stroke-linecap: round;
}

/* ── Generation row ──────────────────────────────────────── */
.pt-gen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ANY element with pt-collapsed hides — gaps, strips, gens, wrapper */
.pt-collapsed {
  display: none !important;
}

.pt-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 8px;
}

/* ── Collapse / Expand button strip ─────────────────────── */
.pt-toggle-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 14px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.pt-toggle-line {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--outline-variant);
}

.pt-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 6px 14px;
  border: 1px solid var(--outline-variant);
  border-radius: 100px;
  background: var(--surface-container-low);
  color: var(--on-surface-variant);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.pt-toggle-btn:hover {
  background: var(--surface-container);
  border-color: var(--outline);
  color: var(--on-surface);
}

.pt-toggle-btn .pt-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.pt-toggle-btn[aria-expanded="false"] .pt-chevron {
  transform: rotate(-90deg);
}

/* ── Base card ───────────────────────────────────────────── */
.pt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 16px;
  overflow: hidden;
  cursor: default;
  text-align: center;
  min-width: 0;
  /* Reveal animation — both opacity AND transform share the stagger delay */
  transition:
    opacity   0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--card-delay, 0ms),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--card-delay, 0ms),
    box-shadow 0.28s ease;
  opacity: 0;
  transform: translateY(28px) scale(0.94);
  will-change: transform, opacity;
}

.pt-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  /* Override transition for hover — instant delay, spring easing */
  transition:
    transform  0.30s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.28s ease;
}

.pt-card.visible:hover {
  transform: translateY(-8px) scale(1.03);
  z-index: 5;
}

/* ── Role banner — sits at top of card, full-width colored strip ── */
.pt-banner {
  width: 100%;
  padding: 12px 14px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pt-role {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
  line-height: 1;
}

/* Banner gradient per generation */
.pt-card[data-gen="0"] .pt-banner {
  background: linear-gradient(120deg, #6B4010 0%, #C9A84C 60%, #F0D080 100%);
  padding: 14px 18px 13px;
}
.pt-card[data-gen="1"] .pt-banner {
  background: linear-gradient(120deg, #0A1F15 0%, #1B4332 55%, #2D6A4F 100%);
}
.pt-card[data-gen="2"] .pt-banner {
  background: linear-gradient(120deg, #022C22 0%, #059669 60%, #34D399 100%);
}
.pt-card[data-gen="3"] .pt-banner {
  background: linear-gradient(120deg, #134E2A 0%, #166534 60%, #15803D 100%);
}
.pt-card[data-gen="4"] .pt-banner {
  background: linear-gradient(120deg, #14532D 0%, #22C55E 60%, #4ADE80 100%);
}
.pt-card[data-gen="5"] .pt-banner {
  background: linear-gradient(120deg, #0F4024 0%, #16A34A 55%, #4ADE80 100%);
}
.pt-card[data-gen="6"] .pt-banner {
  background: linear-gradient(120deg, #052E16 0%, #064E3B 55%, #065F46 100%);
  padding: 10px 12px 9px;
}
.pt-card[data-gen="6"] .pt-role {
  font-size: 11px;
  letter-spacing: 0.07em;
}

/* ── Avatar section ──────────────────────────────────────── */
.pt-avatar-zone {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 18px 16px 12px;
  position: relative;
}

.pt-avatar-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 3px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.8) inset;
}

.pt-avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.pt-avatar-img {
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Card name (bottom) ──────────────────────────────────── */
.pt-card-foot {
  padding: 8px 16px 20px;
  text-align: center;
}

.pt-name {
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.45;
  color: var(--on-surface);
}

/* ── Subtle shine overlay ────────────────────────────────── */
.pt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    rgba(255,255,255,0.30) 0%,
    rgba(255,255,255,0.04) 50%,
    transparent 100%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

/* ── Sub-group separator inside Gen 3 ───────────────────── */
.pt-subgroup {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pt-subgroup + .pt-subgroup {
  margin-top: 20px;
}

.pt-subgroup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 680px;
  padding: 0 24px 12px;
}

.pt-subgroup-line {
  flex: 1;
  height: 1px;
  background: var(--gen3-border);
}

.pt-subgroup-tag {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gen3-accent);
  background: var(--gen3-light);
  border: 1px solid var(--gen3-border);
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ═══ GEN 0 — Founder (Gold) ════════════════════════════ */
.pt-card[data-gen="0"] {
  width: 260px;
  background: var(--gen0-card);
  border: 2px solid var(--gen0-border);
  box-shadow:
    0 2px 8px var(--gen0-shadow),
    0 12px 40px var(--gen0-shadow),
    0 0 0 1px rgba(255,255,255,0.7) inset;
}

.pt-card[data-gen="0"] .pt-avatar-ring {
  width: 96px;
  height: 96px;
  background: var(--gen0-avatar);
  box-shadow:
    0 0 0 4px rgba(201,168,76,0.25),
    0 4px 20px rgba(180,130,20,0.35);
}

.pt-card[data-gen="0"] .pt-avatar {
  width: 88px;
  height: 88px;
  font-size: 30px;
  background: var(--gen0-avatar);
}

.pt-card[data-gen="0"] .pt-role {
  font-size: 20px;
  letter-spacing: 0.10em;
  color: #fff;
}

.pt-card[data-gen="0"] .pt-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gen0-dark);
}

/* Gold crown badge */
.pt-crown-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  background: var(--gen0-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(180,130,20,0.4);
  z-index: 3;
  border: 2px solid #fff;
}

/* ═══ GEN 1 — Children (Dark Green) ═════════════════════ */
.pt-card[data-gen="1"] {
  width: 210px;
  background: var(--gen1-card);
  border: 1.5px solid var(--gen1-border);
  box-shadow:
    0 2px 6px var(--gen1-shadow),
    0 8px 28px var(--gen1-shadow);
}

.pt-card[data-gen="1"] .pt-avatar-ring {
  width: 76px;
  height: 76px;
  background: var(--gen1-avatar);
  box-shadow: 0 0 0 3px rgba(27,67,50,0.18), 0 4px 14px rgba(27,67,50,0.28);
}

.pt-card[data-gen="1"] .pt-avatar {
  width: 70px;
  height: 70px;
  font-size: 24px;
  background: var(--gen1-avatar);
}

.pt-card[data-gen="1"] .pt-role { color: #A7F3D0; }

.pt-card[data-gen="1"] .pt-name {
  font-size: 13px;
  color: var(--gen1-dark);
}

/* ═══ GEN 2 — Secretary (Emerald) ═══════════════════════ */
.pt-card[data-gen="2"] {
  width: 240px;
  background: var(--gen2-card);
  border: 1.5px solid var(--gen2-border);
  box-shadow:
    0 2px 6px var(--gen2-shadow),
    0 8px 28px var(--gen2-shadow);
}

.pt-card[data-gen="2"] .pt-avatar-ring {
  width: 72px;
  height: 72px;
  background: var(--gen2-avatar);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.18), 0 4px 14px rgba(5,150,105,0.28);
}

.pt-card[data-gen="2"] .pt-avatar {
  width: 66px;
  height: 66px;
  font-size: 22px;
  background: var(--gen2-avatar);
}

.pt-card[data-gen="2"] .pt-role { color: #D1FAE5; }

.pt-card[data-gen="2"] .pt-name {
  font-size: 13px;
  color: var(--gen2-dark);
}

/* ═══ GEN 3 — Treasurer (Medium Green) ══════════════════ */
.pt-card[data-gen="3"] {
  width: 235px;
  background: var(--gen3-card);
  border: 1.5px solid var(--gen3-border);
  box-shadow:
    0 2px 6px var(--gen3-shadow),
    0 8px 24px var(--gen3-shadow);
}

.pt-card[data-gen="3"] .pt-avatar-ring {
  width: 68px;
  height: 68px;
  background: var(--gen3-avatar);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.16), 0 4px 12px rgba(22,163,74,0.25);
}

.pt-card[data-gen="3"] .pt-avatar {
  width: 62px;
  height: 62px;
  font-size: 20px;
  background: var(--gen3-avatar);
}

.pt-card[data-gen="3"] .pt-role { color: #BBF7D0; }

.pt-card[data-gen="3"] .pt-name {
  font-size: 12.5px;
  color: var(--gen3-dark);
}

/* ═══ GEN 4 — Deputy Secretaries (Light Green) ══════════ */
.pt-card[data-gen="4"] {
  width: 200px;
  background: var(--gen4-card);
  border: 1.5px solid var(--gen4-border);
  box-shadow:
    0 2px 6px var(--gen4-shadow),
    0 8px 24px var(--gen4-shadow);
}

.pt-card[data-gen="4"] .pt-avatar-ring {
  width: 68px;
  height: 68px;
  background: var(--gen4-avatar);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.16), 0 4px 12px rgba(34,197,94,0.25);
}

.pt-card[data-gen="4"] .pt-avatar {
  width: 62px;
  height: 62px;
  font-size: 20px;
  background: var(--gen4-avatar);
}

.pt-card[data-gen="4"] .pt-name {
  font-size: 12.5px;
  color: var(--gen4-dark);
}

/* ═══ GEN 5 — Honorary Advisors (Lightest Green) ════════ */
.pt-card[data-gen="5"] {
  width: 230px;
  background: var(--gen5-card);
  border: 1.5px solid var(--gen5-border);
  box-shadow:
    0 2px 6px var(--gen5-shadow),
    0 8px 24px var(--gen5-shadow);
}

.pt-card[data-gen="5"] .pt-avatar-ring {
  width: 68px;
  height: 68px;
  background: var(--gen5-avatar);
  box-shadow: 0 0 0 3px rgba(74,222,128,0.14), 0 4px 12px rgba(74,222,128,0.22);
}

.pt-card[data-gen="5"] .pt-avatar {
  width: 62px;
  height: 62px;
  font-size: 20px;
  background: var(--gen5-avatar);
}

.pt-card[data-gen="5"] .pt-name {
  font-size: 12.5px;
  color: var(--gen5-dark);
}

/* ═══ GEN 6 — செயற்குழு உறுப்பினர்கள் (Mini Cards) ════ */
.pt-card[data-gen="6"] {
  width: 148px;
  background: var(--gen6-card);
  border: 1.5px solid var(--gen6-border);
  border-radius: 16px;
  box-shadow:
    0 2px 6px var(--gen6-shadow),
    0 6px 18px var(--gen6-shadow);
}

.pt-card[data-gen="6"] .pt-avatar-ring {
  width: 50px;
  height: 50px;
  background: var(--gen6-avatar);
  box-shadow: 0 0 0 2px rgba(6,95,70,0.18), 0 3px 10px rgba(6,95,70,0.22);
}

.pt-card[data-gen="6"] .pt-avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
  background: var(--gen6-avatar);
}

.pt-card[data-gen="6"] .pt-avatar-zone {
  padding: 10px 12px 6px;
}

.pt-card[data-gen="6"] .pt-card-foot {
  padding: 2px 10px 12px;
}

.pt-card[data-gen="6"] .pt-name {
  font-size: 11px;
  color: var(--gen6-dark);
}

/* gen6 section label divider row */
.pt-gen-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1000px;
  padding: 0 16px;
  margin-bottom: 18px;
  box-sizing: border-box;
}

.pt-gen-label-line {
  flex: 1;
  height: 1px;
  background: var(--gen6-border);
}

.pt-gen-label-text {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gen6-accent);
  background: var(--gen6-light);
  border: 1px solid var(--gen6-border);
  padding: 5px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ── Spacing between generations ─────────────────────────── */
.pt-gen-gap {
  height: 72px;
}

/* ═══ EXECUTIVE GRID (Gen 4 — Light Green) ══════════════ */
.pt-exec-section {
  width: 100%;
  max-width: 960px;
  padding: 0 16px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative;
  z-index: 1;
}

.pt-exec-section.visible {
  opacity: 1;
  transform: none;
}

.pt-exec-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.pt-exec-label-line {
  flex: 1;
  height: 1px;
  background: var(--outline-variant);
}

.pt-exec-label-text {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  background: var(--surface-container);
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid var(--outline-variant);
  white-space: nowrap;
}

.pt-exec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pt-exec-card {
  background: var(--gen4-card);
  border: 1px solid var(--gen4-border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 10px var(--gen4-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: default;
}

.pt-exec-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--gen4-shadow);
}

.pt-exec-initial {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gen4-avatar);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(22,163,74,0.3);
}

.pt-exec-name {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--gen3-dark);
  line-height: 1.4;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pt-card[data-gen="0"] { width: 240px; }
  .pt-card[data-gen="1"] { width: 195px; }
  .pt-card[data-gen="2"] { width: 220px; }
  .pt-card[data-gen="3"] { width: 215px; }
  .pt-card[data-gen="4"],
  .pt-card[data-gen="5"] { width: 185px; }
  .pt-card[data-gen="6"] { width: 138px; }
}

@media (max-width: 768px) {
  .premium-tree {
    padding: 8px 12px 72px;
  }

  .pt-svg {
    display: block;
  }

  .pt-path {
    stroke-width: 1.5px;
    opacity: 0.82;
  }

  .pt-row {
    display: grid;
    width: 100%;
    gap: 14px;
    padding: 0;
    justify-items: stretch;
  }

  #g0 .pt-row {
    grid-template-columns: minmax(0, 240px);
    justify-content: center;
  }

  #g1 .pt-row,
  #g4 .pt-row,
  #g5 .pt-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #g2 .pt-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: min(100%, 520px);
    margin-inline: auto;
  }

  .pt-row.pt-row--wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    gap: 10px;
  }

  .pt-card[data-gen="0"],
  .pt-card[data-gen="1"],
  .pt-card[data-gen="2"],
  .pt-card[data-gen="3"],
  .pt-card[data-gen="4"],
  .pt-card[data-gen="5"],
  .pt-card[data-gen="6"] {
    width: 100% !important;
    max-width: none;
  }

  .pt-role {
    font-size: clamp(9px, 2.6vw, 12px);
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .pt-card[data-gen="0"] .pt-role {
    font-size: clamp(13px, 3.2vw, 16px);
    letter-spacing: 0.06em;
  }

  .pt-card[data-gen="6"] .pt-role {
    font-size: clamp(8px, 2.2vw, 10px);
  }

  .pt-name {
    font-size: clamp(10px, 2.6vw, 12px);
    line-height: 1.35;
  }

  .pt-card[data-gen="0"] .pt-name {
    font-size: clamp(12px, 3vw, 14px);
  }

  .pt-card {
    border-radius: 14px;
  }

  .pt-banner {
    padding: 10px 10px 9px;
  }

  .pt-card[data-gen="0"] .pt-banner {
    padding: 12px 12px 11px;
  }

  .pt-avatar-zone {
    padding: 14px 12px 10px;
  }

  .pt-card-foot {
    padding: 6px 12px 16px;
  }

  .pt-card[data-gen="0"] .pt-avatar-ring {
    width: 72px;
    height: 72px;
  }

  .pt-card[data-gen="0"] .pt-avatar {
    width: 66px;
    height: 66px;
    font-size: 22px;
  }

  .pt-card[data-gen="1"] .pt-avatar-ring,
  .pt-card[data-gen="4"] .pt-avatar-ring,
  .pt-card[data-gen="5"] .pt-avatar-ring {
    width: 52px;
    height: 52px;
  }

  .pt-card[data-gen="1"] .pt-avatar,
  .pt-card[data-gen="4"] .pt-avatar,
  .pt-card[data-gen="5"] .pt-avatar {
    width: 46px;
    height: 46px;
    font-size: 15px;
  }

  .pt-card[data-gen="2"] .pt-avatar-ring {
    width: 54px;
    height: 54px;
  }

  .pt-card[data-gen="2"] .pt-avatar {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .pt-card[data-gen="6"] .pt-avatar-ring {
    width: 44px;
    height: 44px;
  }

  .pt-card[data-gen="6"] .pt-avatar {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }

  .pt-card.visible:hover {
    transform: translateY(0) scale(1);
  }

  .pt-gen-gap {
    height: 44px;
  }

  .pt-gen-gap--lg {
    height: 48px;
  }
}

@media (max-width: 380px) {
  #g1 .pt-row,
  #g4 .pt-row,
  #g5 .pt-row,
  #g2 .pt-row {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-inline: auto;
  }

  .pt-row.pt-row--wrap {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 520px) and (max-width: 768px) {
  .pt-row.pt-row--wrap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .pt-row.pt-row--wrap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 100%;
    width: 100%;
  }

  .pt-row.pt-row--wrap .pt-card[data-gen="6"] {
    width: 100% !important;
  }
}

/* =========================================
   SHARED PAGE UTILITIES
   ========================================= */

.is-hidden   { display: none !important; }
.is-visible  { display: block !important; }

.field-error {
  box-shadow: inset 0 1px 4px rgba(186, 26, 26, 0.1), 0 0 0 2px rgba(186, 26, 26, 0.35) !important;
}

.field-hint {
  display: block;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  color: #ba1a1a;
  margin-top: 0;
  opacity: 0;
  transition: max-height 0.22s ease, margin-top 0.22s ease, opacity 0.18s ease;
}

.field-hint:not(:empty) {
  max-height: 48px;
  margin-top: 6px;
  opacity: 1;
}

.main--offset {
  padding-top: calc(128px + var(--promo-banner-height));
}

.main--gallery {
  padding-top: calc(120px + var(--promo-banner-height));
  padding-bottom: var(--section-gap);
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-hero-title--compact {
  margin-bottom: 16px;
}

.lead-text {
  max-width: 750px;
  margin-inline: auto;
  line-height: 1.85;
}

.lead-text--560 {
  max-width: 830px;
  margin-inline: auto;
  text-align: center;
  line-height: 1.8;
}


.form-field-mb-20 { margin-bottom: 20px; }
.form-field-mb-28 { margin-bottom: 28px; }

.btn--lg {
  padding: 16px 40px;
  font-size: 14px;
}

.icon-16 { font-size: 16px; }
.icon-24 { font-size: 24px; }
.icon-32 { font-size: 32px; }
.icon-36 {
  font-size: 36px;
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.icon-40 {
  font-size: 40px;
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.icon-48 {
  font-size: 48px;
  color: var(--outline-variant);
  display: block;
  margin-bottom: 16px;
}

.icon-filled {
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.hero-title-line--0 { --line-delay: 0; }
.hero-title-line--1 { --line-delay: 1; }
.hero-title-line--2 { --line-delay: 2; }

.story-intro {
  max-width: 720px;
  margin-inline: auto;
}

.line-height-16  { line-height: 1.6; }
.line-height-17  { line-height: 1.7; }
.line-height-18  { line-height: 1.8; }
.line-height-175 { line-height: 1.75; }
.line-height-185 { line-height: 1.85; }

.history-heading { font-family: var(--font-serif); }

.mt-3  { margin-top: 12px; }
.mb-10 { margin-bottom: 40px; }

.section-surface-low {
  background: var(--surface-container-low);
  padding-block: var(--section-gap);
}

.two-col-grid--impact {
  align-items: center;
  gap: 80px;
}

.card-overlay--gold {
  background: linear-gradient(to top, rgba(80, 55, 10, 0.96) 0%, rgba(100, 70, 20, 0.72) 45%, transparent 75%);
}

.card-overlay--green {
  background: linear-gradient(to top, rgba(30, 55, 34, 0.96) 0%, rgba(50, 80, 55, 0.72) 45%, transparent 75%);
}

.card-overlay--dark-right {
  background: linear-gradient(to right, rgba(15, 14, 10, 0.92) 0%, rgba(20, 18, 12, 0.65) 50%, transparent 80%);
}

.card-title-light {
  color: var(--on-primary);
  margin-bottom: 12px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 3px 16px rgba(0, 0, 0, 0.5);
}

.card-caption {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  max-width: 380px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 2px 10px rgba(0, 0, 0, 0.5);
}

.card-caption--sm {
  font-size: 14px;
  max-width: none;
}

.card-caption--wide {
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: none;
}

.btn-card {
  margin-top: 20px;
  padding: 10px 24px;
  font-size: 13px;
}

.btn-card--sm-mt {
  margin-top: 16px;
  padding: 10px 24px;
  font-size: 13px;
}

.btn-card--fit {
  padding: 10px 28px;
  font-size: 13px;
  width: fit-content;
}

.flex-1 { flex: 1; }

.font-serif { font-family: var(--font-serif); }

.font-medium { font-weight: 500; }

.text-xs { font-size: 11px; }

.text-sm { font-size: 13px; }

.footer--raised {
  position: relative;
  z-index: 1;
}

.body-no-scroll { overflow: hidden; }

/* ─── Page body backgrounds ──────────────── */

.page-home {
  background-color: var(--background);
}

.page-contact {
  background-color: var(--background);
  background-image:
    radial-gradient(at 0% 0%, rgba(203, 235, 204, 0.16) 0px, transparent 55%),
    radial-gradient(at 100% 0%, rgba(255, 222, 169, 0.16) 0px, transparent 55%);
}

.page-donate,
.page-gallery,
.page-gatherings,
.page-community {
  background-color: var(--background);
}

.page-gallery {
  position: relative;
}

/* =========================================
   CONTACT PAGE (extended)
   ========================================= */

.contact-input {
  width: 100%;
  min-width: 0;
  background: var(--surface-container-low);
  border: none;
  border-radius: var(--radius-full);
  padding: 15px 22px;
  font-family: var(--font-sans);
  font-size: var(--text-body-md);
  color: var(--on-surface);
  box-shadow: inset 0 1px 4px rgba(139, 107, 74, 0.05);
  transition: box-shadow 0.3s ease;
  outline: none;
}

.contact-input::placeholder { color: var(--outline-variant); }

.contact-input:focus {
  box-shadow:
    inset 0 1px 4px rgba(139, 107, 74, 0.05),
    0 0 0 2px rgba(118, 90, 38, 0.18);
}

.contact-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--on-surface-variant);
  display: block;
  margin-bottom: 8px;
  margin-left: 6px;
  text-transform: uppercase;
}

.form-sent {
  display: none;
  text-align: center;
  padding: 48px 24px;
}

.form-sent.is-visible {
  display: block;
}

.form-sent-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-fixed);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-sent-message {
  max-width: 320px;
  margin-inline: auto;
  line-height: 1.7;
}

.form-error {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  background: rgba(186, 26, 26, 0.08);
  color: var(--on-surface-variant);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.form-error a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .contact-form-card {
    padding: 24px 20px 28px;
    border-radius: var(--radius-2xl);
  }

  .contact-form-card .mb-8 {
    margin-bottom: 28px;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-label {
    font-size: 12px;
    margin-left: 4px;
    margin-bottom: 6px;
  }

  .contact-input,
  .form-textarea {
    font-size: 16px;
    padding: 14px 16px;
  }

  .contact-input {
    border-radius: var(--radius-xl);
  }

  .form-textarea {
    min-height: 140px;
    border-radius: var(--radius-xl);
  }

  .form-field-mb-20 {
    margin-bottom: 20px;
  }

  .form-field-mb-28 {
    margin-bottom: 24px;
  }

  #contact-form .btn--lg {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    padding: 16px 24px;
  }
}

@media (max-width: 480px) {
  .contact-form-card {
    padding: 20px 16px 24px;
  }
}

.contact-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(70, 97, 74, 0.08);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-phone-link:hover {
  background: rgba(70, 97, 74, 0.14);
  transform: translateY(-1px);
}

.contact-phone-link .material-symbols-outlined {
  font-size: 22px;
}


/* =========================================
   DONATE PAGE
   ========================================= */

.btn-gold {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: var(--on-secondary);
  font-family: var(--font-serif);
  font-size: var(--text-title-lg);
  font-weight: var(--fw-title-lg);
  border: none;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
  box-shadow: 0 8px 24px rgba(118, 90, 38, 0.22);
  margin-top: 32px;
}

.btn-gold:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(118, 90, 38, 0.32);
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 24px;
}

.form-success.is-visible {
  display: block;
}

.payment-card--centered {
  max-width: 900px;
  margin-inline: auto;
}

/* Manual UPI workflow — QR first, form second, single column */
.payment-card--manual {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.donate-intro {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 32px;
}

.donate-intro-text {
  margin-top: 12px;
  line-height: 1.7;
}

.payment-step-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  background: rgba(118, 90, 38, 0.1);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.payment-step-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 8px;
}

.payment-step-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  margin-bottom: 24px;
  max-width: 420px;
}

.payment-card--manual .payment-qr-side {
  border-bottom: 1px solid rgba(118, 90, 38, 0.12);
  padding: clamp(28px, 5vw, 40px);
}

.payment-card--manual .payment-form-side {
  padding: clamp(28px, 5vw, 40px);
}

.payment-card--manual .payment-step-desc {
  margin-inline: auto;
  text-align: center;
}

.payment-card--manual .payment-qr-side .payment-step-desc {
  margin-inline: auto;
}

.payment-card--manual .payment-form-side .payment-step-desc {
  margin-inline: 0;
  text-align: left;
}

.payment-upi-id {
  word-break: break-word;
}

.donate-success-text {
  max-width: 360px;
  margin-inline: auto;
  line-height: 1.7;
}

.btn-gold:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 900px) {
  .page-donate .main--offset {
    padding-top: calc(100px + var(--promo-banner-height));
  }

  .payment-card {
    grid-template-columns: 1fr;
    border-radius: var(--radius-2xl);
    box-shadow: 0 16px 40px rgba(118, 90, 38, 0.08);
  }

  .payment-form-side {
    padding: clamp(24px, 5vw, 36px);
  }

  .payment-qr-side {
    padding: clamp(24px, 5vw, 32px);
  }

  .payment-card--manual .payment-qr-side {
    border-bottom: 1px solid rgba(118, 90, 38, 0.12);
    border-top: none;
  }

  .payment-card--centered {
    max-width: 100%;
  }

  .payment-form-side .text-headline-md {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 20px;
  }

  .form-input {
    font-size: 16px;
    padding: 14px 16px;
  }

  .form-label {
    font-size: 12px;
    margin-left: 0;
  }

  .amount-presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .amount-preset-btn {
    padding: 10px 6px;
    font-size: 12px;
  }

  .btn-gold {
    margin-top: 24px;
    padding: 16px;
    font-size: clamp(1rem, 4.2vw, 1.25rem);
  }

  .bank-details-box {
    width: 100%;
    max-width: 360px;
  }

  .impact-image {
    border-radius: 24px;
    max-height: 320px;
  }

  .two-col-grid--impact {
    gap: 32px;
  }

  .impact-item {
    gap: 16px;
    padding-bottom: 24px;
  }

  .impact-item + .impact-item {
    padding-top: 24px;
  }
}

.amount-presets--spaced {
  margin-top: 10px;
}

.success-icon-wrap {
  width: 72px;
  height: 72px;
  background: var(--primary-fixed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.qr-image {
  width: 160px;
  height: 160px;
  opacity: 0.92;
}

.payment-methods {
  display: flex;
  gap: 16px;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.payment-methods:hover {
  opacity: 0.9;
}

.payment-methods .material-symbols-outlined {
  font-size: 32px;
}

.bank-details-box {
  margin-top: 32px;
  padding: 20px;
  background: rgba(70, 97, 74, 0.06);
  border-radius: var(--radius-xl);
  text-align: left;
}

.bank-details-label {
  font-size: 11px;
}

.bank-details-text {
  font-size: 13px;
  line-height: 1.7;
}

.impact-image {
  width: 100%;
  border-radius: 48px;
  box-shadow: 0 32px 64px rgba(139, 107, 74, 0.14);
  object-fit: cover;
  max-height: 520px;
}

.impact-heading {
  font-family: var(--font-serif);
}

/* =========================================
   GALLERY PAGE (extended)
   ========================================= */

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-entrance {
  animation: fadeInDown 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.page-gallery .gallery-card-frame {
  transform:
    rotateX(calc(var(--mouse-y, 0) * 8deg))
    rotateY(calc(var(--mouse-x, 0) * -8deg));
}

.page-gallery .gallery-card-frame:hover {
  transform:
    scale(1.02)
    rotateX(calc(var(--mouse-y, 0) * 8deg))
    rotateY(calc(var(--mouse-x, 0) * -8deg));
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.page-gallery .gallery-chip:hover:not(.active) {
  background: linear-gradient(90deg, transparent, rgba(70, 97, 74, 0.08), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(29, 28, 22, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

#lightbox.open #lightbox-img {
  transform: scale(1);
}

#lightbox-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
}

#lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  transition: background 0.2s ease;
}

#lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.badge-sacred   { background: var(--secondary-container); color: var(--on-secondary-container); }
.badge-nature   { background: var(--primary-fixed);       color: var(--on-primary-fixed); }
.badge-village  { background: var(--tertiary-fixed);      color: var(--on-tertiary-fixed); }
.badge-festival { background: var(--secondary-fixed);     color: var(--on-secondary-fixed-variant); }

.gallery-empty {
  display: none;
  text-align: center;
  padding: 80px 24px;
  color: var(--on-surface-variant);
}

.gallery-empty.is-visible {
  display: block;
}

.gallery-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.gallery-card-title {
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}

.aspect-4-5  { aspect-ratio: 4 / 5; }
.aspect-1    { aspect-ratio: 1; }
.aspect-3-4  { aspect-ratio: 3 / 4; }
.aspect-16-9 { aspect-ratio: 16 / 9; }

.masonry-item {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.masonry-item.is-filtered-out {
  opacity: 0;
  transform: scale(0.96);
}

.masonry-item.is-filtered-out.is-collapsed {
  display: none;
}

/* =========================================
   GATHERINGS PAGE
   ========================================= */

/* ─── Community page header ─────────────── */
.community-page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px var(--margin-desktop) 96px;
  background: linear-gradient(
    135deg,
    #7b3f00 0%,
    #c0392b 25%,
    #8e44ad 50%,
    #1a5276 75%,
    #0e6655 100%
  );
  position: relative;
  overflow: hidden;
}

.community-page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,200,80,0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 75% 30%, rgba(255,100,80,0.15) 0%, transparent 55%);
  pointer-events: none;
}

.community-page-header .gatherings-hero-title,
.community-page-header .gatherings-hero-desc {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .community-page-header {
    padding: 120px var(--margin-mobile) 72px;
  }
}

.gatherings-hero {
  position: relative;
  height: 70svh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gatherings-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

.gatherings-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(118, 90, 38, 0.3) 0%, rgba(29, 28, 22, 0.65) 100%);
}

.gatherings-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-inline: var(--margin-mobile);
  max-width: 720px;
}

.gatherings-hero-label {
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

.gatherings-hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.1;
  color: var(--on-primary);
  margin-bottom: 20px;
}

.gatherings-hero-desc {
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  max-width: 600px;
  margin-inline: auto;
}

.event-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  min-width: 60px;
  flex-shrink: 0;
}

.event-date-badge .day {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.event-date-badge .month {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.event-date-badge--secondary {
  background: var(--secondary);
}

.event-date-badge--tertiary {
  background: var(--tertiary-container);
}

.event-date-badge--primary-container {
  background: var(--primary-container);
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-list-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px 32px;
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(194, 200, 192, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.event-list-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.event-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.event-desc {
  line-height: 1.7;
  margin-bottom: 12px;
}

.event-meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--outline);
  font-size: 13px;
  font-family: var(--font-sans);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.calendar-month {
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid rgba(194, 200, 192, 0.3);
}

.calendar-month-title {
  border-bottom: 1px solid rgba(194, 200, 192, 0.4);
  padding-bottom: 16px;
}

.calendar-event-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.pt-gen-gap--lg {
  height: 56px;
}

.pt-row--wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1000px;
  gap: 10px;
}

@media (max-width: 1024px) {
  .calendar-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .gatherings-hero { height: 55svh; }
  .event-list-item { flex-direction: row; padding: 20px; }
  .calendar-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   NEW MEMBER REQUEST — Badge + Modal
   ═══════════════════════════════════════════════ */

/* ── Floating badge button (right side) ── */
.member-badge-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 12px 16px;
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: 12px 0 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: -4px 4px 20px rgba(118, 90, 38, 0.35);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: padding 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.member-badge-btn:hover {
  background: var(--primary);
  padding-right: 18px;
  box-shadow: -6px 6px 28px rgba(70, 97, 74, 0.4);
}

.member-badge-btn .badge-icon {
  font-size: 18px;
  writing-mode: horizontal-tb;
  transform: rotate(90deg);
}

/* ── Modal backdrop ── */
.member-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.member-modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal box ── */
.member-modal {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 680px;
  max-height: 90svh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  transform: translateY(28px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.member-modal-backdrop.open .member-modal {
  transform: translateY(0) scale(1);
}

.member-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.member-modal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--primary);
}

.member-modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--surface-container-high);
  color: var(--on-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.member-modal-close:hover {
  background: var(--surface-container-highest);
}

.member-modal-body {
  padding: 20px 28px 28px;
}

.member-modal-subtitle {
  font-size: 13.5px;
  color: var(--on-surface-variant);
  margin-bottom: 24px;
  line-height: 1.55;
}

/* ── Form rows inside modal ── */
.member-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.member-form-full {
  margin-bottom: 16px;
}

.member-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--on-surface-variant);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.member-label .req {
  color: #ba1a1a;
  margin-left: 2px;
}

.member-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--outline-variant);
  background: var(--surface-container-lowest);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}

.member-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(118, 90, 38, 0.12);
}

.member-input.field-error {
  border-color: #ba1a1a;
  box-shadow: 0 0 0 3px rgba(186, 26, 26, 0.12);
}

.member-input::placeholder {
  color: var(--outline-variant);
  opacity: 0.8;
}

/* section divider */
.member-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  padding: 4px 0 10px;
  border-bottom: 1px solid var(--outline-variant);
  margin-bottom: 16px;
  margin-top: 8px;
}

/* submit btn */
.member-submit-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--secondary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.member-submit-btn:hover:not(:disabled) {
  background: var(--primary);
}

.member-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* success state */
.member-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px;
  gap: 12px;
}

.member-success.visible {
  display: flex;
}

/* responsive */
@media (max-width: 540px) {
  .member-form-row {
    grid-template-columns: 1fr;
  }

  .member-modal-header,
  .member-modal-body {
    padding-inline: 18px;
  }

  .member-badge-btn {
    font-size: 11px;
    padding: 10px 12px 10px 13px;
  }
}

