/* ===========================================================
   VAIDIKAM FOUNDATION — DESIGN SYSTEM
   Palette sampled directly from the foundation logo:
   forest green (the hand) + marigold gold (the flame).
   Signature motif: the stitched thread that binds palm-leaf
   manuscripts together — used as section dividers throughout.
   =========================================================== */

:root {
  --ivory: #FBF7E8;
  --ivory-card: #FFFEF8;
  --indigo: #1B4D2E;
  --indigo-deep: #0F3319;
  --sindoor: #FFC400;
  --sindoor-dark: #E0AC00;
  --turmeric: #FFCD3C;
  --accent: #2E7D32;
  --charcoal: #22301E;
  --charcoal-soft: #52604A;
  --thread: #3C8B3C;
  --on-gold: #12351C;

  --font-display: 'Fraunces', serif;
  --font-body: 'Karla', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: radial-gradient(circle at 1px 1px, var(--charcoal) 1px, transparent 0);
  background-size: 3px 3px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--indigo-deep);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.05; font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--charcoal-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 0.9em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Thread-stitch divider (signature element) ---------- */
.stitch-divider {
  height: 22px;
  width: 100%;
  background-image: repeating-linear-gradient(
    100deg,
    var(--thread) 0px, var(--thread) 14px,
    transparent 14px, transparent 26px
  );
  background-position: center;
  background-size: 26px 2px;
  background-repeat: repeat-x;
  opacity: 0.55;
  margin: 0;
}
.stitch-divider::after { content: none; }

/* ---------- Header / Nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 239, 221, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(42, 33, 21, 0.12);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--indigo-deep);
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }

nav.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav.primary-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--charcoal);
  position: relative;
  padding-bottom: 4px;
}
nav.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--sindoor);
  transition: width 0.25s ease;
}
nav.primary-nav a:hover::after,
nav.primary-nav a.active::after { width: 100%; }
nav.primary-nav a.active { color: var(--accent); }

.btn-donate-nav {
  font-family: var(--font-mono) !important;
  background: var(--sindoor);
  color: var(--on-gold) !important;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
.btn-donate-nav:hover { background: var(--sindoor-dark); }
.btn-donate-nav::after { display: none; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--indigo-deep);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 15px 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--sindoor); color: var(--on-gold); font-weight: 600; }
.btn-primary:hover { background: var(--sindoor-dark); transform: translateY(-1px); }
.btn-outline { border-color: var(--indigo-deep); color: var(--indigo-deep); }
.btn-outline:hover { background: var(--indigo-deep); color: var(--ivory); }
.btn-ghost { color: var(--indigo-deep); border-bottom: 1px solid var(--turmeric); border-radius: 0; padding: 4px 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; max-width: 780px; }
.hero p.lede { font-size: 1.15rem; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.hero-mark {
  position: absolute;
  right: -60px; top: -40px;
  width: 420px; height: 420px;
  border: 1.5px solid var(--turmeric);
  border-radius: 50%;
  opacity: 0.35;
}
.hero-mark::before {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid var(--sindoor);
  border-radius: 50%;
  opacity: 0.5;
}

.page-hero {
  padding: 70px 0 60px;
  border-bottom: 1px solid rgba(42,33,21,0.1);
}
.page-hero p.lede { max-width: 620px; font-size: 1.05rem; }

/* ---------- Sections ---------- */
section { padding: 80px 0; position: relative; z-index: 1; }
section.tight { padding: 56px 0; }
.section-alt { background: var(--indigo-deep); color: var(--ivory); }
.section-alt h2, .section-alt h3 { color: var(--ivory); }
.section-alt .card h3, .section-alt .card-body h3, .section-alt .card p, .section-alt .card-body p { color: var(--charcoal); }
.section-alt .card p { color: var(--charcoal-soft); }
.section-alt p { color: rgba(246,239,221,0.75); }
.section-alt .eyebrow { color: var(--turmeric); }

/* ---------- Grid / Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }

.card {
  background: var(--ivory-card);
  border: 1px solid rgba(42,33,21,0.1);
  padding: 34px 30px;
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(31,58,84,0.1); }
.card .num { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; letter-spacing: 0.08em; }

.card-photo { padding: 0; overflow: hidden; }
.card-photo img { width: 100%; height: 240px; object-fit: cover; object-position: center 25%; }
.card-photo .card-body { padding: 26px 26px 30px; }

/* ---------- Stats ---------- */
.stat {
  text-align: left;
  border-left: 2px solid var(--turmeric);
  padding-left: 20px;
}
.stat .stat-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--indigo-deep);
  display: block;
  line-height: 1;
}
.section-alt .stat { border-left-color: var(--accent); }
.section-alt .stat .stat-num { color: var(--ivory); }
.stat .stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--charcoal-soft);
}
.section-alt .stat .stat-label { color: rgba(246,239,221,0.6); }

/* ---------- Quote / testimonial ---------- */
.quote-card {
  background: var(--ivory-card);
  border-left: 3px solid var(--sindoor);
  padding: 30px 32px;
  border-radius: var(--radius);
}
.quote-card p.q { font-family: var(--font-display); font-size: 1.15rem; color: var(--indigo-deep); font-style: italic; }
.quote-card .who { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; color: var(--accent); }

/* ---------- Forms ---------- */
input, textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 13px 14px;
  border: 1px solid rgba(42,33,21,0.25);
  background: var(--ivory-card);
  border-radius: var(--radius);
  color: var(--charcoal);
}
label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--charcoal-soft);
  display: block;
  margin-bottom: 6px;
}
.field { margin-bottom: 20px; }

/* ---------- Donate amount selector ---------- */
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.amount-btn {
  font-family: var(--font-mono);
  padding: 14px 8px;
  text-align: center;
  border: 1px solid var(--indigo-deep);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--indigo-deep);
  background: transparent;
  font-size: 0.95rem;
}
.amount-btn.active, .amount-btn:hover { background: var(--sindoor); color: var(--on-gold); border-color: var(--sindoor); font-weight: 600; }

.qr-box {
  background: var(--ivory-card);
  border: 1px solid rgba(42,33,21,0.15);
  padding: 30px;
  text-align: center;
  border-radius: var(--radius);
}
.qr-box img { margin: 0 auto 16px; border: 8px solid #fff; }
.upi-id-display {
  font-family: var(--font-mono);
  font-size: 1rem;
  background: var(--ivory);
  padding: 10px 16px;
  border-radius: var(--radius);
  display: inline-block;
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  margin-left: 8px;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--indigo-deep);
  color: rgba(246,239,221,0.8);
  padding: 64px 0 30px;
}
footer.site-footer h4 { color: var(--ivory); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-grid p, .footer-grid a { color: rgba(246,239,221,0.65); font-size: 0.92rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--turmeric); }
.footer-logo { font-family: var(--font-display); font-size: 1.3rem; color: var(--ivory); margin-bottom: 14px; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 50px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid rgba(246,239,221,0.15);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
  color: rgba(246,239,221,0.5);
}
.social-row { display: flex; gap: 14px; margin-top: 6px; }
.social-row a {
  width: 34px; height: 34px;
  border: 1px solid rgba(246,239,221,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.social-row a:hover { border-color: var(--turmeric); color: var(--turmeric); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.max-620 { max-width: 620px; }
.center-col { margin-left: auto; margin-right: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  nav.primary-nav { position: fixed; top: 68px; left: 0; right: 0; background: var(--ivory); flex-direction: column; padding: 20px 32px; border-bottom: 1px solid rgba(42,33,21,0.1); display: none; }
  nav.primary-nav.open { display: flex; }
  nav.primary-nav ul { flex-direction: column; gap: 18px; }
  .menu-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .amount-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 80px 0 60px; }
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sindoor);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Logo image ---------- */
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 46px; width: 46px; object-fit: contain; display: block; border-radius: 50%; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text .lt-main { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--indigo-deep); }
.logo-text .lt-sub { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; font-family: var(--font-mono); font-size: 0.75rem; }
.lang-switch select {
  appearance: none;
  background: var(--ivory-card);
  border: 1px solid rgba(42,33,21,0.25);
  color: var(--charcoal);
  padding: 7px 28px 7px 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}
.lang-switch::after {
  content: "▾";
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.7rem;
  color: var(--charcoal-soft);
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float .wa-tooltip {
  position: absolute;
  right: 70px;
  background: var(--indigo-deep);
  color: var(--ivory);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.whatsapp-float:hover .wa-tooltip { opacity: 1; }
@media (max-width: 720px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-float .wa-tooltip { display: none; }
}

/* ---------- Team cards ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 40px; }
.team-card { text-align: center; }
.team-card .photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid var(--turmeric);
  margin-bottom: 16px;
}
.team-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.team-card h4 { font-family: var(--font-display); margin: 0 0 4px; font-size: 1.05rem; }
.team-card .role { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- Legal / documents page ---------- */
.legal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.legal-card {
  background: var(--ivory-card);
  border: 1px solid rgba(42,33,21,0.1);
  border-radius: var(--radius);
  padding: 18px;
}
.legal-card img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid rgba(42,33,21,0.12); margin-bottom: 14px; }
.legal-card h4 { font-family: var(--font-display); margin: 0 0 6px; font-size: 1.05rem; }
.legal-card p { font-family: var(--font-mono); font-size: 0.78rem; color: var(--charcoal-soft); margin: 0; }
.legal-facts { margin-top: 50px; background: var(--indigo-deep); color: var(--ivory); padding: 34px; border-radius: var(--radius); }
.legal-facts h3 { color: var(--ivory); font-family: var(--font-display); margin-top: 0; }
.legal-facts dl { display: grid; grid-template-columns: 1fr 2fr; gap: 10px 20px; font-family: var(--font-mono); font-size: 0.85rem; }
.legal-facts dt { color: var(--turmeric); }
.legal-facts dd { margin: 0; color: rgba(246,239,221,0.85); }
@media (max-width: 1100px) { .legal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .legal-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .legal-grid { grid-template-columns: 1fr; } .legal-facts dl { grid-template-columns: 1fr; } }

/* ---------- Bank transfer block ---------- */
.bank-details {
  margin-top: 28px;
  background: var(--ivory-card);
  border: 1px dashed var(--sindoor);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.bank-details h4 { font-family: var(--font-display); margin: 0 0 12px; }
.bank-details dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-family: var(--font-mono); font-size: 0.85rem; margin: 0; }
.bank-details dt { color: var(--charcoal-soft); }
.bank-details dd { margin: 0; font-weight: 600; }

/* ---------- Form status ---------- */
.form-msg.success { color: var(--accent); font-weight: 600; }

/* ---------- Homepage team preview: single unified frame ---------- */
.team-frame {
  margin-top: 40px;
  background: var(--ivory-card);
  border: 1px solid rgba(34,48,30,0.12);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px);
}
.team-frame-photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 2vw, 18px);
}
.team-frame-photos img {
  width: clamp(64px, 9vw, 110px);
  height: clamp(64px, 9vw, 110px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid var(--turmeric);
  display: block;
}

/* ---------- Flyer / programme document cards ---------- */
.flyer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; }
.flyer-card { background: var(--ivory-card); border: 1px solid rgba(34,48,30,0.1); border-radius: var(--radius); overflow: hidden; }
.flyer-card img { width: 100%; height: auto; display: block; }
.flyer-card .flyer-label { padding: 12px 14px; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); text-align: center; }
@media (max-width: 900px) { .flyer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .flyer-grid { grid-template-columns: 1fr; } }

