/* Sree Rudra Kalari, Tripunithura: shared stylesheet */

:root {
  --earth: #3A2418;
  --brass: #C9973A;
  --kumkum: #9E1B1B;
  --ash: #F1EEE8;
  --leaf: #2F5D3A;
  --text: #2A211C;
  --muted: #65554A;
  --paper: #F8F6F1;
  --rule: #D8CFC2;
  --ring-late: #A79A8D;

  --accent: var(--kumkum);
  --focus: var(--kumkum);

  --font-head: "Marcellus", "Noto Sans Malayalam", "Noto Sans Tamil", "Noto Sans Devanagari", Georgia, serif;
  --font-body: "Mukta", "Noto Sans Malayalam", "Noto Sans Tamil", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 68ch;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--ash);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--earth);
  line-height: 1.2;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.15rem); margin-top: 1.6em; }
h3 { font-size: 1.3rem; }
h2:first-child, h3:first-child { margin-top: 0; }

p, ul, ol { margin: 0 0 1em; }
strong { font-weight: 600; }

a { color: var(--earth); text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

address { font-style: normal; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--brass); color: var(--earth); padding: 0.6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon { flex: none; }

/* ---------------------------------------------------------------- layout */

.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.wrap.prose { max-width: 74rem; }
.wrap.prose > * { max-width: var(--measure); }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.3rem); line-height: 1.6; }

.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section-tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-top-0 { padding-top: 0; }
.page-intro { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2.5rem, 6vw, 4rem); }

.band-earth { background: var(--earth); color: var(--ash); --focus: var(--brass); }
.band-paper { background: var(--paper); border-block: 1px solid var(--rule); }

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-aside { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}

.photo { margin: 0; }
.photo img { width: 100%; border-radius: 3px; }
.photo figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.6rem; }
.photo-portrait { max-width: 20rem; }
.photo-portrait img { aspect-ratio: 1; object-fit: cover; }
.photo-wide { margin-top: clamp(2rem, 5vw, 3.5rem); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.actions-center { justify-content: center; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.65rem 1.35rem;
  border: 2px solid transparent; border-radius: 4px;
  font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--brass); color: var(--earth); }
.btn-primary:hover { background: var(--kumkum); color: var(--ash); }
.btn-outline { border-color: var(--earth); color: var(--earth); }
.btn-outline:hover { background: var(--earth); color: var(--ash); }
.btn-ghost { border-color: var(--ash); color: var(--ash); }
.btn-ghost:hover { background: var(--ash); color: var(--earth); }
.btn-leaf { background: var(--leaf); color: #fff; }
.btn-leaf:hover { background: var(--earth); color: var(--ash); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--earth); color: var(--ash);
  --focus: var(--brass);
}
.header-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0 1rem;
  min-height: var(--header-h);
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ash); padding-block: 0.5rem; margin-right: auto; }
.brand:hover { color: var(--ash); }
.brand-name { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.15; }
.brand-place { font-size: 0.85rem; color: var(--brass); letter-spacing: 0.02em; }

.header-tools { display: flex; align-items: center; gap: 0.5rem; }

.nav-toggle, .lang-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px; padding: 0.4rem 0.7rem;
  background: transparent; color: var(--ash);
  border: 1px solid rgba(241, 238, 232, 0.35); border-radius: 4px;
  font: 600 0.95rem/1 var(--font-body); cursor: pointer;
}
.nav-toggle:hover, .lang-toggle:hover { border-color: var(--brass); }

.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 11rem; margin: 0; padding: 0.35rem 0; list-style: none;
  background: var(--ash); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(42, 33, 28, 0.25);
  --focus: var(--kumkum);
}
.lang-menu a {
  display: block; padding: 0.55rem 1rem; color: var(--text); text-decoration: none;
  font-family: var(--font-body);
}
.lang-menu a:hover { background: var(--paper); color: var(--kumkum); }
.lang-menu a[aria-current="true"] { font-weight: 600; box-shadow: inset 3px 0 0 var(--brass); }

.site-nav { flex-basis: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0 0 0.75rem; }
.site-nav a {
  display: block; padding: 0.7rem 0; color: var(--ash); text-decoration: none;
  border-top: 1px solid rgba(241, 238, 232, 0.12); font-size: 1.05rem;
}
.site-nav a:hover { color: var(--brass); }
.site-nav a[aria-current="page"] { color: var(--brass); }

.js .site-nav:not(.is-open) { display: none; }

@media (max-width: 380px) {
  .nav-toggle span, .lang-current { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (min-width: 1040px) {
  .nav-toggle { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav, .js .site-nav:not(.is-open) { display: block; flex-basis: auto; order: 1; }
  .header-tools { order: 2; }
  .site-nav ul { display: flex; gap: 1.4rem; padding: 0; }
  .site-nav a { border: 0; padding: 0.4rem 0; font-size: 1rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brass); }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative; display: grid; place-items: center;
  min-height: min(86vh, 760px); min-height: min(86svh, 760px);
  color: var(--ash); text-align: center; overflow: hidden;
  --focus: var(--brass);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(58, 36, 24, 0.66); }
.hero-content { position: relative; z-index: 1; padding-block: 4rem; max-width: 52rem; }
.hero h1 { color: var(--ash); font-size: clamp(2.2rem, 6.4vw, 4rem); }
.hero-tagline { font-size: clamp(1.15rem, 2.6vw, 1.45rem); max-width: 38ch; margin-inline: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero-content { animation: rise 0.9s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ----------------------------------------------------------------- paths */

.paths { display: grid; gap: clamp(2.5rem, 5vw, 3rem); }
@media (min-width: 760px) { .paths { grid-template-columns: 1fr 1fr; } }
.path img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.path-heal img { object-position: 50% 35%; }
.path-text { padding-top: 1.4rem; border-top: 3px solid var(--brass); margin-top: 1.25rem; }
.path-heal .path-text { border-top-color: var(--leaf); }
.path-text h2 { margin-top: 0; }

/* -------------------------------------------- lineage (signature element) */

.ring { display: inline-block; border-radius: 50%; padding: 4px; background: var(--brass); }
.is-late .ring { background: var(--ring-late); }
.ring img, .initials {
  display: block; width: var(--size); height: var(--size); border-radius: 50%;
  object-fit: cover; border: 3px solid var(--ash);
}
.initials {
  display: grid; place-items: center; background: var(--earth); color: var(--brass);
  font-family: var(--font-head); font-size: calc(var(--size) * 0.32); letter-spacing: 0.04em;
}

/* Compact horizontal strip (home page) */
.lineage-strip {
  --size: clamp(48px, 13vw, 96px);
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.25rem; position: relative;
}
.lineage-strip::before {
  content: ""; position: absolute; height: 2px; background: var(--brass);
  left: 10%; right: 10%; top: calc(var(--size) * 0.65 + 6px);
}
.strip-guru { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.strip-guru .ring { margin-top: calc(var(--size) * 0.15); }
.strip-guru.is-present .ring { margin-top: 0; }
.strip-guru.is-present { --size: clamp(60px, 16vw, 124px); }
.band-earth .ring img, .band-earth .initials { border-color: var(--earth); }
.band-earth .initials { background: #4E3426; }
.strip-name { margin-top: 0.7rem; font-size: clamp(0.78rem, 2.2vw, 1rem); line-height: 1.3; color: var(--ash); max-width: 9rem; }
.strip-guru.is-present .strip-name { color: var(--brass); }
.lineage-strip + .actions { margin-top: 2.5rem; justify-content: center; }

/* Vertical line of descent (lineage page) */
.parampara {
  --col: 7.5rem; --size: 6rem; --big: 9rem;
  position: relative;
}
.lamp { width: var(--col); display: flex; justify-content: center; color: var(--brass); }
.lamp .icon { width: 28px; height: 40px; }
.parampara-list { list-style: none; margin: 0; padding: 0; }
.guru {
  display: grid; grid-template-columns: var(--col) minmax(0, 1fr); gap: clamp(1rem, 4vw, 2.5rem);
  position: relative; padding-top: 2.5rem;
}
.guru::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px;
  left: calc(var(--col) / 2 - 1px); background: var(--brass);
}
.guru:last-child::before { bottom: auto; height: calc(2.5rem + var(--big) / 2); }
.guru-portrait { display: flex; justify-content: center; align-items: flex-start; position: relative; z-index: 1; }
.guru-portrait .ring { box-shadow: 0 0 0 8px var(--ash); }
.guru.is-present { --size: var(--big); }
.guru-text { max-width: var(--measure); padding-top: calc(var(--size) / 2 - 1.1rem); }
.guru-text h2 { margin: 0 0 0.4rem; font-size: clamp(1.45rem, 3vw, 1.9rem); }
.guru.is-present .guru-text h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.late { font-family: var(--font-body); font-size: 0.95rem; color: var(--muted); }
.guru-role { font-weight: 600; color: var(--kumkum); margin-bottom: 0.5rem; }

@media (max-width: 600px) {
  .parampara { --col: 5.5rem; --size: 4.25rem; --big: 5.5rem; }
  .guru-text { padding-top: 0.75rem; }
}

/* ------------------------------------------------------- training page */

.benefits {
  display: grid; gap: 0 clamp(1.5rem, 4vw, 3rem); margin-top: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.benefit, .condition { border-top: 1px solid var(--rule); padding-block: 1.4rem 0.6rem; }
.benefit h3, .condition h3 { margin-bottom: 0.4rem; }

.syllabus { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; max-width: var(--measure); }
.syllabus > li {
  counter-increment: step; position: relative;
  padding-left: 3.5rem; padding-bottom: 1.1rem;
}
.syllabus > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--brass);
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 1.15rem; color: var(--earth); line-height: 1;
}
.syllabus p { padding-top: 0.25rem; }
.weapons { columns: 2 14rem; column-gap: 2rem; padding-left: 1.1rem; margin-top: -0.25rem; }
.weapons li { break-inside: avoid; margin-bottom: 0.2rem; }
.weapons li::marker { color: var(--kumkum); }

.facts { display: grid; gap: 2rem clamp(2rem, 5vw, 4rem); }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.facts h2 { margin-top: 0; font-size: clamp(1.4rem, 2.8vw, 1.75rem); }
.facts .actions { margin-top: 1rem; }

.plain { list-style: none; padding: 0; }
.plain li { padding-block: 0.15rem; }

.faq { border-top: 1px solid var(--rule); margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1rem 2.5rem 1rem 0; font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.75rem;
  font-family: var(--font-head); font-size: 1.6rem; line-height: 1; color: var(--kumkum);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--kumkum); }
.faq details p { margin: 0 0 1.2rem; }

.also { margin-top: 3rem; font-size: 0.95rem; color: var(--muted); }

/* ------------------------------------------------------ treatment page */

.theme-leaf { --accent: var(--leaf); }
.theme-leaf a:hover { color: var(--leaf); }
.theme-leaf .btn-outline:hover, .theme-leaf .btn-leaf:hover { color: var(--ash); }
.theme-leaf .faq summary::after, .theme-leaf .faq summary:hover { color: var(--leaf); }

.conditions {
  display: grid; gap: 0 clamp(1.5rem, 4vw, 3rem); margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}
.condition:target { border-top: 3px solid var(--leaf); background: var(--paper); padding-inline: 1rem; }

.note {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font-size: 0.92rem; color: var(--muted);
}
.note p { margin: 0; }

/* --------------------------------------------------------------- gallery */

.gallery { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 1rem; }
@media (min-width: 560px) { .gallery { columns: 2; } }
@media (min-width: 1000px) { .gallery { columns: 3; } }
.gallery li { break-inside: avoid; margin-bottom: 1rem; }
.gallery-item { display: block; border-radius: 3px; overflow: hidden; }
.gallery-item img { width: 100%; transition: transform 0.3s; }
@media (prefers-reduced-motion: no-preference) {
  .gallery-item:hover img { transform: scale(1.02); }
}
.gallery-more { margin-top: 2.5rem; }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(30, 18, 12, 0.94); color: var(--ash);
  --focus: var(--brass);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(30, 18, 12, 0.94); }
.lightbox figure { margin: 0; padding: 4rem 1rem 1rem; display: grid; justify-items: center; gap: 0.75rem; }
.lightbox img { max-width: min(92vw, 1500px); max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); width: auto; object-fit: contain; }
.lightbox figcaption { text-align: center; max-width: 60ch; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid rgba(241, 238, 232, 0.4); border-radius: 50%;
  background: rgba(58, 36, 24, 0.7); color: var(--ash); cursor: pointer;
}
.lb-btn:hover { border-color: var(--brass); color: var(--brass); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------- contact */

.contact { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.contact-info { display: grid; gap: 2.25rem; }
.contact-info h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.contact-info .actions { margin-top: 0.9rem; }
.contact-phone { font-size: 1.35rem; font-weight: 600; margin: 0; }
.contact-phone a { text-decoration: none; }
.social { list-style: none; display: flex; gap: 0.75rem; padding: 0; margin: 0; }
.social a {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--earth); color: var(--earth);
}
.social a:hover { background: var(--earth); color: var(--ash); }
.map iframe { width: 100%; height: clamp(320px, 55vh, 480px); border: 0; border-radius: 3px; background: var(--paper); display: block; }

/* ----------------------------------------------------------------- trust */

.trust { display: flex; align-items: center; gap: 1rem; margin: 0; font-size: 1.15rem; }
.trust-score {
  font-family: var(--font-head); font-size: 1.6rem; color: var(--earth);
  border: 2px solid var(--brass); border-radius: 50%; width: 3.6rem; height: 3.6rem;
  display: grid; place-items: center; flex: none;
}

/* ---------------------------------------------------------------- footer */

.site-footer { background: var(--earth); color: var(--ash); padding-top: clamp(3rem, 7vw, 4.5rem); font-size: 0.98rem; --focus: var(--brass); }
.site-footer a { color: var(--ash); text-decoration-color: rgba(201, 151, 58, 0.6); }
.site-footer a:hover { color: var(--brass); }
.footer-grid { display: grid; gap: 2.25rem 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.1fr 0.9fr; } }
.footer-name { font-family: var(--font-head); font-size: 1.35rem; margin-bottom: 0.5rem; }
.footer-about address { margin-bottom: 1rem; }
.footer-heading { color: var(--brass); font-weight: 600; margin-bottom: 0.5rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding-block: 0.2rem; }
.footer-base { margin-top: 2.5rem; padding-block: 1.25rem 6rem; border-top: 1px solid rgba(241, 238, 232, 0.15); font-size: 0.9rem; color: #D9CFC3; }
.footer-base p { margin: 0; }

/* ------------------------------------------------------ floating WhatsApp */

.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--leaf); color: #fff; border: 2px solid var(--ash);
  box-shadow: 0 4px 14px rgba(42, 33, 28, 0.3);
}
.wa-float:hover { background: var(--earth); color: var(--brass); }

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