/* ==========================================================================
   Deaddictify — "Calm dawn" design system
   Pure CSS, no build step. One stylesheet for the whole site.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  /* Color */
  --c-primary: #1F4E46;        /* deep pine — headings, primary buttons, header/footer */
  --c-primary-dark: #143531;   /* hover, final CTA band */
  --c-sage: #7FA391;           /* secondary accents, icon strokes */
  --c-sage-tint: #E9F1EC;      /* trust strip, hover backgrounds */
  --c-sand: #F7F3EC;           /* page / hero background */
  --c-surface: #FFFFFF;        /* cards */
  --c-marigold: #E0A458;       /* accent: step numbers, eyebrows, focus rings */
  --c-marigold-soft: #F6E8D4;  /* accent tint */
  --c-ink: #22302E;            /* body text */
  --c-muted: #5A6B67;          /* secondary text */
  --c-whatsapp: #1FAF52;       /* WhatsApp buttons (darkened for contrast) */
  --c-whatsapp-dark: #178A41;
  --c-border: #E3DDD0;

  /* Type */
  --font-head: 'Lora', 'Noto Serif Devanagari', Georgia, serif;
  --font-body: 'Source Sans 3', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --space-7: 96px;

  /* Shape & elevation */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 12px rgba(31, 78, 70, 0.08);
  --shadow-raised: 0 8px 28px rgba(31, 78, 70, 0.14);

  --container: 1140px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;            /* 17px — Devanagari needs the size */
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-sand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:lang(hi) body, body:lang(hi) { line-height: 1.85; }

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--c-primary);
  line-height: 1.25;
  margin: 0 0 var(--space-3);
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
@media (min-width: 768px) {
  h1 { font-size: 3rem; }
}

p { margin: 0 0 var(--space-3); }
.muted { color: var(--c-muted); }
.small { font-size: 0.875rem; }

a { color: var(--c-primary); text-decoration-color: var(--c-marigold); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }

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

ul.checklist { list-style: none; padding: 0; margin: 0 0 var(--space-3); }
ul.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: var(--space-2);
}
ul.checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-sage-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F4E46' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* ---- Layout ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section { padding: var(--space-6) 0; }
.section--lg { padding: var(--space-7) 0; }
/* Uniform background site-wide: tint/surface variants kept as hooks but render
   the same sand tone so sections don't alternate colors */
.section--tint { background: transparent; }
.section--surface { background: transparent; }

.section-head { max-width: 720px; margin-bottom: var(--space-5); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-marigold);
  margin-bottom: var(--space-2);
}
/* Devanagari has no uppercase; keep spacing modest */
.eyebrow:lang(hi) { letter-spacing: 0.05em; text-transform: none; font-size: 0.9375rem; }

.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) {
  .grid--3, .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; box-shadow: var(--shadow-raised); }

.btn-whatsapp { background: var(--c-whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--c-whatsapp-dark); color: #fff; box-shadow: var(--shadow-raised); }

.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary); color: #fff; }

.btn-light { background: #fff; color: var(--c-primary); }
.btn-light:hover { background: var(--c-sand); color: var(--c-primary-dark); }

.btn--lg { padding: 16px 36px; font-size: 1.0625rem; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
}
.site-header .logo { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.site-header .logo img { height: 40px; width: auto; }
.logo-word {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-left: 10px;
}

.site-nav { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; }
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--c-ink);
  padding: 6px 2px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--c-primary); box-shadow: inset 0 -2px 0 var(--c-marigold); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.lang-toggle {
  display: inline-flex;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: #fff;
  flex: none;
}
.lang-toggle a, .lang-toggle span {
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--c-muted);
}
.lang-toggle [aria-current="true"] {
  background: var(--c-primary);
  color: #fff;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 10px;
  margin-left: auto;
  cursor: pointer;
  color: var(--c-primary);
}
.menu-btn svg { width: 28px; height: 28px; }

.mobile-nav {
  display: none;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--space-3) var(--space-4) var(--space-4);
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 4px;
  font-weight: 600;
  text-decoration: none;
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-border);
}
.mobile-nav a:last-child { border-bottom: none; }

@media (max-width: 980px) {
  .site-nav, .header-actions .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .site-header .lang-toggle { display: inline-flex; }
}

/* Compact header on small phones so the menu button never overflows */
@media (max-width: 480px) {
  .site-header__inner { gap: var(--space-2); }
  .site-header .logo img { height: 32px; }
  .logo-word { font-size: 1.2rem; margin-left: 7px; }
  .lang-toggle a, .lang-toggle span { padding: 5px 11px; }
  .menu-btn { padding: 8px 2px; margin-left: 0; }
}

/* ---- Hero ---- */
.hero { padding: var(--space-6) 0 var(--space-7); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-6);
  align-items: center;
}
@media (max-width: 900px) {
  .hero { padding-top: var(--space-5); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero__art { order: -1; max-width: 420px; margin: 0 auto; }
}
.hero h1 { margin-bottom: var(--space-3); }
.hero__sub { font-size: 1.1875rem; color: var(--c-muted); max-width: 56ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-4) 0 var(--space-3); }
.hero__trustline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--c-muted);
  font-size: 0.9375rem;
  font-weight: 600;
}
.hero__trustline span { display: inline-flex; align-items: center; gap: 7px; }
.hero__trustline svg { width: 16px; height: 16px; color: var(--c-sage); flex: none; }

/* ---- Trust strip ---- */
.trust-strip {
  background: transparent;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: var(--space-4) 0;
}
.trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 900px) { .trust-strip__grid { grid-template-columns: repeat(2, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item svg { width: 30px; height: 30px; color: var(--c-primary); flex: none; }
.trust-item b { display: block; line-height: 1.35; color: var(--c-primary); }
.trust-item .small { color: var(--c-muted); line-height: 1.4; }

/* ---- Cards ---- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}

.condition-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--c-ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.condition-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-raised);
  border-color: var(--c-sage);
  color: var(--c-ink);
}
.condition-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--c-sage-tint);
  display: grid;
  place-items: center;
  color: var(--c-primary);
}
.condition-card__icon svg { width: 26px; height: 26px; }
.condition-card h3 { font-size: 1.1875rem; margin: 0; }
.condition-card p { margin: 0; color: var(--c-muted); font-size: 0.9375rem; }

/* ---- Framework stepper ---- */
.stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  counter-reset: step;
}
@media (max-width: 980px) { .stepper { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stepper { grid-template-columns: 1fr; } }
.step {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3) var(--space-3);
  box-shadow: var(--shadow-card);
}
.step__num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-marigold);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.step h3 { font-size: 1.125rem; margin-bottom: 6px; }
.step p { margin: 0; font-size: 0.9375rem; color: var(--c-muted); }

/* ---- Team cards (credential-led, no photos) ---- */
.team-card { display: flex; flex-direction: column; gap: 12px; }
.team-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--c-sage-tint);
  display: grid;
  place-items: center;
  color: var(--c-primary);
}
.team-card__icon svg { width: 26px; height: 26px; }
.team-card h3 { font-size: 1.1875rem; margin: 0; }
.team-card .cred {
  display: inline-flex;
  align-self: flex-start;
  background: var(--c-sand);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 3px 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--c-primary);
}
.team-card p { font-size: 0.9375rem; color: var(--c-muted); margin: 0; }
.team-card ul.checklist { margin: 0; }
.team-card ul.checklist li { font-size: 0.9375rem; color: var(--c-muted); margin-bottom: 6px; }

/* ---- Chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--c-primary);
}
.chip svg { width: 16px; height: 16px; color: var(--c-sage); }
.chip--soon {
  background: transparent;
  border-style: dashed;
  color: var(--c-muted);
}

/* ---- Testimonials ---- */
.quote-card { display: flex; flex-direction: column; gap: var(--space-3); }
.quote-card blockquote {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--c-ink);
}
.quote-card cite {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--c-muted);
  font-weight: 600;
}
.quote-card .quote-mark { font-family: var(--font-head); font-size: 3rem; line-height: 0.5; color: var(--c-marigold); }

/* ---- FAQ ---- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow-card);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 52px 18px 22px;
  font-weight: 700;
  color: var(--c-primary);
  position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--c-marigold);
  transition: transform .18s ease;
}
.faq details[open] summary::after { content: '−'; }
.faq .faq__body { padding: 0 22px 18px; color: var(--c-muted); }
.faq .faq__body p:last-child { margin-bottom: 0; }

/* ---- Crisis banner (always white, on every page) ---- */
.crisis-banner {
  background: #FFFFFF !important;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-marigold);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  color: var(--c-muted);
  font-size: 0.9875rem;
}
.crisis-banner strong, .crisis-banner b, .crisis-banner a { color: var(--c-primary); }
.crisis-banner p { margin: 0; }

/* ---- Final CTA band ---- */
.cta-band {
  background: var(--c-primary-dark);
  color: #fff;
  text-align: center;
  padding: var(--space-7) 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 60ch; margin-left: auto; margin-right: auto; }
.cta-band__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--c-primary);
  color: rgba(255, 255, 255, 0.88);
  padding: var(--space-6) 0 calc(var(--space-4) + 72px); /* clearance for sticky bar */
  font-size: 0.9375rem;
}
@media (min-width: 768px) { .site-footer { padding-bottom: var(--space-4); } }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--c-marigold); color: #fff; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--space-3); }
.site-footer h4:lang(hi) { text-transform: none; letter-spacing: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 10px; }
.footer-brand img { height: 44px; margin-bottom: var(--space-3); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Sticky mobile CTA bar + desktop WA pill ---- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 110;
  display: none;
  grid-template-columns: 1fr;
  box-shadow: 0 -4px 18px rgba(20, 53, 49, 0.22);
}
.sticky-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: #fff;
}
.sticky-cta a svg { width: 20px; height: 20px; }
.sticky-cta__call { background: var(--c-primary); }
.sticky-cta__wa { background: var(--c-whatsapp); }
@media (max-width: 767px) {
  .sticky-cta { display: grid; }
  body { padding-bottom: 56px; }
}

.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 110;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--c-whatsapp);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-raised);
  transition: background-color .18s ease, transform .18s ease;
}
.wa-float:hover { background: var(--c-whatsapp-dark); color: #fff; transform: translateY(-2px); }
.wa-float svg { width: 22px; height: 22px; }
@media (min-width: 768px) { .wa-float { display: inline-flex; } }

/* ---- Page hero (inner pages) ---- */
.page-hero {
  background: transparent;
  border-bottom: 1px solid var(--c-border);
  padding: var(--space-6) 0;
}
.page-hero h1 { margin-bottom: var(--space-2); }
.page-hero p { max-width: 64ch; color: var(--c-muted); margin-bottom: 0; font-size: 1.125rem; }

/* ---- Condition detail blocks (conditions.html) ---- */
.condition-block {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-4);
}
@media (max-width: 600px) { .condition-block { padding: var(--space-4); } }
.condition-block h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.5rem;
}
.condition-block h2 .condition-card__icon { flex: none; }
.condition-block .help-line {
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-sage-tint);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: var(--space-3) 0 0;
}

/* ---- Two-column narrative ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: var(--space-4); } }

/* ---- Contact page ---- */
.contact-card { text-align: center; padding: var(--space-5) var(--space-4); }
.contact-card svg { width: 40px; height: 40px; color: var(--c-primary); margin: 0 auto var(--space-3); }
.contact-card .big {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-primary);
  display: block;
  margin-bottom: 6px;
  text-decoration: none;
}

/* ---- Reveal animation (minimal, motion-safe) ---- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
  }
  .reveal.in-view { opacity: 1; transform: none; }
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.hidden { display: none; }

/* ---- Print: keep contact info usable ---- */
@media print {
  .site-header, .sticky-cta, .wa-float, .cta-band { display: none !important; }
  body { background: #fff; }
}
