/* ============================================
   brahmi.in — Comprehensive Stylesheet
   Design: Soft greens, muted earth tones, clean white space
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --color-primary:       #2d6a4f;
  --color-primary-dark:  #1b4332;
  --color-primary-light: #40916c;
  --color-accent:        #52b788;
  --color-accent-light:  #95d5b2;
  --color-bg:            #fafbf9;
  --color-bg-alt:        #f0f4ef;
  --color-text:          #1e1e24;
  --color-text-light:    #5a6b5a;
  --color-text-muted:    #8a9a8a;
  --color-border:        #d8e2dc;
  --color-white:         #ffffff;
  --color-warning:       #e9c46a;
  --color-danger:        #d62828;
  --color-success:       #2a9d8f;

  --font-primary: 'Georgia', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono:    'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --max-width: 1200px;
  --content-width: 860px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
  --transition: .3s cubic-bezier(.25,.46,.45,.94);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover,
a:focus {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--color-primary-dark);
  line-height: 1.3;
  margin-bottom: .5em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.2em; }

ul, ol { margin-bottom: 1.2em; padding-left: 1.5em; }
li { margin-bottom: .4em; }

blockquote {
  border-left: 4px solid var(--color-accent);
  margin: 1.5em 0;
  padding: 1em 1.5em;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-light);
}

code {
  font-family: var(--font-mono);
  background: var(--color-bg-alt);
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .9em;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

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

/* ---------- Disclaimer Banner ---------- */
.disclaimer-bar {
  background: var(--color-warning);
  color: #4a3500;
  text-align: center;
  font-size: .8rem;
  padding: 8px 16px;
  line-height: 1.4;
}
.disclaimer-bar a {
  color: #4a3500;
  text-decoration: underline;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: none !important;
}
.site-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.site-logo:hover { text-decoration: none !important; }

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

.main-nav a {
  padding: 6px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a:focus,
.main-nav a.active {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  padding: 4px;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a::after {
  content: ' ▾';
  font-size: .7em;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  border-radius: 0;
  white-space: nowrap;
}
.dropdown-menu a + a { border-top: 1px solid var(--color-bg-alt); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  padding: 12px 0;
  font-size: .85rem;
  color: var(--color-text-muted);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.breadcrumbs li + li::before {
  content: '/';
  margin-right: 6px;
  color: var(--color-text-muted);
}
.breadcrumbs a { color: var(--color-primary); }
.breadcrumbs [aria-current="page"] { color: var(--color-text-light); }

/* ---------- Page Hero ---------- */
.page-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 60px 24px;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: .3;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
}
.page-hero h1 {
  color: var(--color-white);
  margin-bottom: .3em;
}
.page-hero p {
  font-size: 1.1rem;
  opacity: .9;
  margin-bottom: 0;
}

/* ---------- Content Sections ---------- */
.section {
  padding: 60px 0;
}
.section-alt {
  background: var(--color-bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header p {
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-body {
  padding: 20px;
}
.card-body h3 {
  margin-bottom: .4em;
  font-size: 1.15rem;
}
.card-body p {
  font-size: .95rem;
  color: var(--color-text-light);
  margin-bottom: .8em;
}
.card-link {
  font-weight: 600;
  font-size: .9rem;
}

/* ---------- Evidence Badges ---------- */
.evidence-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 6px;
}
.evidence-strong   { background: #d4edda; color: #155724; }
.evidence-moderate { background: #fff3cd; color: #856404; }
.evidence-prelim   { background: #f8d7da; color: #721c24; }
.evidence-trad     { background: #e2e3f5; color: #383d6e; }

/* ---------- Comparison Table ---------- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .95rem;
}
.comparison-table th,
.comparison-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.comparison-table th {
  background: var(--color-primary-dark);
  color: var(--color-white);
  font-weight: 600;
}
.comparison-table tr:nth-child(even) td {
  background: var(--color-bg-alt);
}
.comparison-table tr:hover td {
  background: var(--color-accent-light);
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  display: block;
  width: 100%;
  padding: 16px 20px;
  padding-right: 44px;
  background: var(--color-white);
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  list-style: none;            /* hide default marker */
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { background: var(--color-bg-alt); }
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.faq-item[open] .faq-question::after {
  content: '−';
}
.faq-answer {
  padding: 0 20px 16px;
  color: var(--color-text-light);
}

/* ---------- Recipe Cards ---------- */
.recipe-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.recipe-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.recipe-card .card-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none !important;
}
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-accent:hover { background: var(--color-primary-light); }

/* ---------- Evidence Scale (Dosage Page) ---------- */
.evidence-scale {
  display: flex;
  gap: 4px;
  margin: .5em 0;
}
.evidence-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-border);
}
.evidence-dot.filled { background: var(--color-accent); }

/* ---------- Sidebar / Table of Contents ---------- */
.toc {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
}
.toc h3 {
  font-size: 1.1rem;
  margin-bottom: .8em;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li { margin-bottom: .3em; }
.toc-list a {
  font-size: .9rem;
  padding: 4px 0;
  display: inline-block;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.85);
  padding: 48px 24px 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 36px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-col h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: .8em;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  padding: 3px 0;
}
.footer-col a:hover { color: var(--color-white); text-decoration: none; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}
.footer-bottom a {
  color: rgba(255,255,255,.7);
}
.footer-bottom a:hover { color: var(--color-white); }

/* ---------- Cookie Notice ---------- */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 14px 24px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
}
.cookie-notice.show { display: flex; }
.cookie-notice a { color: var(--color-accent-light); }
.cookie-notice .btn {
  font-size: .82rem;
  padding: 6px 18px;
}

/* ---------- Encrypted Email ---------- */
.encrypted-email {
  cursor: pointer;
  color: var(--color-accent-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.encrypted-email:hover { color: var(--color-white); text-decoration: none; }

/* ---------- Homepage Hero ---------- */
.home-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27,67,50,.85) 0%, rgba(45,106,79,.7) 100%);
}
.home-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 0 24px;
}
.home-hero h1 {
  color: var(--color-white);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: .3em;
}
.home-hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,.85);
  margin-bottom: 2em;
}
.home-hero .hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.home-hero .btn-hero {
  padding: 14px 32px;
  font-size: 1.05rem;
}
.home-hero .btn-hero.btn-primary { background: var(--color-accent); }
.home-hero .btn-hero.btn-primary:hover { background: var(--color-primary-light); }
.home-hero .btn-hero.btn-outline {
  border-color: rgba(255,255,255,.7);
  color: var(--color-white);
}
.home-hero .btn-hero.btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--color-white);
}

/* ---------- Feature Cards (Home) ---------- */
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

/* ---------- Image & Text Side-by-Side ---------- */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split-layout.reverse { direction: rtl; }
.split-layout.reverse > * { direction: ltr; }

.split-img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  text-align: center;
  margin: 2em 0;
}
.stat-item h3 {
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: .2em;
}
.stat-item p {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 90;
  box-shadow: var(--shadow-md);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--color-primary-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .split-layout.reverse { direction: ltr; }

  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 12px 24px;
    gap: 0;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--color-bg-alt);
  }
  .main-nav a:last-child { border-bottom: none; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 16px;
  }
  .nav-dropdown > a::after { content: ' ▸'; }

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

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

@media (max-width: 600px) {
  .page-hero { min-height: 240px; padding: 40px 20px; }
  .section { padding: 40px 0; }
  .home-hero { min-height: 70vh; }

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

  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-item h3 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .back-to-top, .cookie-notice,
  .breadcrumbs, .disclaimer-bar, .home-hero { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
