/* ===== Tokens ===== */
:root {
  --paper: #F5EFDE;
  --paper-deep: #ECE2C8;
  --ink: #241C12;
  --ink-soft: #4A3F30;
  --forest: #1E3A2E;
  --forest-deep: #142821;
  --turmeric: #C98A2B;
  --turmeric-soft: #E0A94E;
  --vermilion: #A63D2E;
  --sandal: #8B7355;

  --display: 'Fraunces', serif;
  --body: 'Work Sans', sans-serif;
  --devanagari: 'Noto Serif Devanagari', serif;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--display); margin: 0; color: var(--forest); }

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

/* subtle grain overlay for warmth */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 239, 222, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(36,28,18,0.08);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: var(--display); font-weight: 500; font-size: 1.25rem;
  color: var(--forest); letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 10px;
}
.wordmark .mark {
  width: 34px; height: 18px; flex-shrink: 0;
}
.wordmark .mark path {
  fill: none; stroke: var(--vermilion); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.main-nav { display: flex; gap: 30px; }
.main-nav a {
  font-size: 0.92rem; color: var(--ink-soft); position: relative;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--vermilion); }
.nav-cta {
  background: var(--forest); color: var(--paper);
  padding: 10px 20px; border-radius: 3px; font-size: 0.88rem; font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--forest-deep); }
.nav-toggle { display: none; }

/* ===== Hero ===== */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: 100px 32px 40px;
  text-align: center;
}
.eyebrow {
  font-family: var(--devanagari);
  color: var(--vermilion);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}
.hero-sub {
  max-width: 560px; margin: 0 auto 36px;
  color: var(--ink-soft); font-size: 1.08rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }

.btn {
  display: inline-block; padding: 14px 28px; border-radius: 3px;
  font-size: 0.94rem; font-weight: 500; transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--vermilion); color: var(--paper); }
.btn-primary:hover { background: #8a3226; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-primary-inverse { background: var(--turmeric-soft); color: var(--forest-deep); }
.btn-primary-inverse:hover { background: #ecc17a; }
.btn-ghost-inverse { border-color: rgba(245,239,222,0.5); color: var(--paper); }
.btn-ghost-inverse:hover { background: rgba(245,239,222,0.12); }

.pulse-line {
  margin-top: 50px; width: 100%; height: 90px;
  color: var(--vermilion);
}
.pulse-line svg { width: 100%; height: 100%; }
.pulse-line path {
  fill: none; stroke: currentColor; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: draw 2.6s ease-out 0.3s forwards;
  opacity: 0.85;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* section dividers reuse the pulse motif, quiet */
.divider { max-width: var(--max); margin: 0 auto; padding: 0 32px; color: var(--sandal); opacity: 0.55; }
.divider svg { width: 100%; height: 24px; }
.divider path { fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ===== Section shared ===== */
.section-label {
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sandal); font-weight: 500; margin-bottom: 14px;
}
.section-label.center { text-align: center; }
.section-label.light { color: rgba(245,239,222,0.6); }
.section-title.center { text-align: center; margin-bottom: 14px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-sub.center { text-align: center; color: var(--ink-soft); max-width: 520px; margin: 0 auto 56px; }
.seva-note {
  text-align: center; max-width: 560px; margin: 0 auto 56px;
  font-size: 0.86rem; font-style: italic; color: var(--sandal);
  border-top: 1px solid rgba(139,115,85,0.25); padding-top: 16px;
}

/* ===== About ===== */
.about { max-width: var(--max); margin: 0 auto; padding: 90px 32px; }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.about-image img {
  border-radius: 4px;
  box-shadow: 0 20px 50px -20px rgba(36,28,18,0.35);
}
.about-copy h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 24px; font-weight: 400; }
.about-copy p { margin: 0 0 18px; color: var(--ink-soft); }
.about-copy strong { color: var(--forest); font-weight: 600; }
.pull-quote {
  font-family: var(--display); font-style: italic; font-size: 1.3rem;
  color: var(--forest); border-left: 3px solid var(--vermilion);
  padding-left: 22px; margin: 32px 0 !important;
}
.credentials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.credentials span {
  border: 1px solid var(--sandal); color: var(--sandal);
  font-size: 0.78rem; letter-spacing: 0.08em; padding: 6px 12px; border-radius: 20px;
}

/* ===== Services ===== */
.services { max-width: var(--max); margin: 0 auto; padding: 40px 32px 100px; }
.service-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 10px; align-items: start;
}
.service-card {
  background: var(--paper-deep); border-radius: 6px; padding: 36px 30px;
  border: 1px solid rgba(36,28,18,0.08);
}
.shloka {
  font-family: var(--devanagari); font-size: 1.05rem; line-height: 1.7;
  color: var(--forest); margin: 0 0 10px;
}
.service-card.featured .shloka { color: var(--turmeric-soft); }
.shloka-gloss {
  font-size: 0.86rem; font-style: italic; color: var(--sandal);
  margin: 0 0 26px !important; line-height: 1.5;
}
.service-card.featured .shloka-gloss { color: rgba(245,239,222,0.6); }
.service-card.featured {
  background: var(--forest); color: var(--paper);
}
.service-card.featured h3, .service-card.featured .with { color: var(--paper); }
.service-card.featured p { color: rgba(245,239,222,0.82); }
.service-kicker {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--vermilion); margin-bottom: 12px; font-weight: 600;
}
.service-card.featured .service-kicker { color: var(--turmeric-soft); }
.service-card h3 { font-size: 1.5rem; font-weight: 500; margin-bottom: 16px; line-height: 1.25; }
.service-card .with { font-size: 1.05rem; color: var(--ink-soft); font-style: italic; }
.service-card p { color: var(--ink-soft); margin-bottom: 26px; }
.follow-up-note { text-align: center; margin-top: 40px; color: var(--ink-soft); }
.follow-up-note a { color: var(--vermilion); text-decoration: underline; }

/* ===== Teaching ===== */
.teaching { max-width: var(--max); margin: 0 auto; padding: 40px 32px 100px; }
.teaching-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.teaching-card {
  padding: 34px 30px; border-top: 2px solid var(--vermilion);
}
.teaching-card h3 { font-size: 1.25rem; font-weight: 500; margin-bottom: 14px; }
.teaching-card p { color: var(--ink-soft); margin-bottom: 18px; }
.link-arrow { color: var(--forest); font-weight: 500; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.link-arrow:hover { border-color: var(--forest); }

/* ===== Gallery ===== */
.gallery { max-width: var(--max); margin: 0 auto; padding: 40px 32px 100px; }
.gallery-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto; gap: 20px;
}
.gallery-item { overflow: hidden; border-radius: 6px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item.tall { grid-row: span 1; }
.gallery-note { text-align: center; margin-top: 40px; color: var(--ink-soft); }
.gallery-note a { color: var(--vermilion); font-weight: 500; }

/* ===== Final CTA ===== */
.cta-final { background: var(--forest-deep); padding: 110px 32px; text-align: center; }
.cta-final-inner { max-width: 700px; margin: 0 auto; }
.cta-final h2 { color: var(--paper); font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 40px; line-height: 1.15; }
.contact-note { margin-top: 30px; color: rgba(245,239,222,0.55); font-size: 0.9rem; }
.contact-note a { color: var(--turmeric-soft); text-decoration: underline; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: var(--paper); padding: 50px 32px 24px; }
.footer-inner {
  max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid rgba(245,239,222,0.14);
}
.footer-name { font-family: var(--display); font-size: 1.15rem; margin: 0 0 6px; color: var(--paper); }
.footer-sign p { margin: 2px 0; color: rgba(245,239,222,0.65); font-size: 0.92rem; }
.footer-links { display: flex; gap: 26px; align-items: flex-start; }
.footer-links a { font-size: 0.92rem; color: rgba(245,239,222,0.8); }
.footer-links a:hover { color: var(--turmeric-soft); }
.footer-base { max-width: var(--max); margin: 20px auto 0; font-size: 0.8rem; color: rgba(245,239,222,0.45); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image img { max-width: 340px; margin: 0 auto; }
  .service-grid { grid-template-columns: 1fr; }
  .teaching-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1050px) and (min-width: 901px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none;
    padding: 6px; cursor: pointer;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }
  .header-inner { position: relative; }
  .main-nav.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); padding: 20px 32px; gap: 16px;
    border-bottom: 1px solid rgba(36,28,18,0.08);
  }
  .hero { padding: 70px 24px 20px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

/* Keyboard focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--vermilion); outline-offset: 3px;
}
