/* ── Swastha landing page ────────────────────────────────────────────────
   Professional, corporate, dark olive-green. No emojis, no gradients.
   Solid fills + 1px borders + soft neutral shadows. Inter (UI) + Fraunces
   (display serif). Scroll-reveal via .in-view classes (CSS transitions). */

:root {
  --olive-900: #28301a;
  --olive-800: #353f22;
  --olive-700: #46532c;
  --olive-600: #586b33;
  --olive-500: #6e823f;
  --olive-100: #ecefe2;
  --olive-050: #f5f7ee;

  --bg: #fbfcf7;
  --surface: #ffffff;
  --ink: #1b1f15;
  --body: #41463a;
  --muted: #6b7160;
  --line: #e2e7d5;

  --shadow-sm: 0 1px 2px rgba(20, 25, 15, 0.05);
  --shadow-md: 0 10px 30px rgba(20, 25, 15, 0.07);
  --shadow-lg: 0 18px 48px rgba(20, 25, 15, 0.1);

  --r-card: 10px;
  --r-btn: 6px;

  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;

  --maxw: 1140px;
  --nav-h: 72px;
}

* {
  box-sizing: border-box;
}
/* The `hidden` attribute must win over component display rules (e.g. .btn uses
   display:inline-flex), otherwise hidden buttons like "Open Swastha" still show. */
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
html,
body {
  margin: 0;
}
body {
  font-family: var(--ui);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 760px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ui);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--r-btn);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.btn--sm {
  padding: 9px 18px;
  font-size: 0.9rem;
}
.btn--primary {
  background: var(--olive-700);
  color: #fff;
}
.btn--primary:hover {
  background: var(--olive-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--ghost {
  background: transparent;
  color: var(--olive-700);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--olive-600);
  background: var(--olive-050);
}
.btn--light {
  background: #fff;
  color: var(--olive-800);
}
.btn--light:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* ── Brand lockup ── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__logo {
  height: 36px;
  width: auto;
}
.brand__text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__by {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Nav ── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.nav--solid {
  background: rgba(251, 252, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 28px;
}
.nav__links a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--body);
  transition: color 0.16s ease;
}
.nav__links a:hover {
  color: var(--olive-700);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__signin {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--olive-700);
  padding: 8px 6px;
  transition: color 0.15s ease;
}
.nav__signin:hover {
  color: var(--olive-600);
}
.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r-btn);
  cursor: pointer;
}

/* ── Hero ── */
.hero {
  padding: calc(var(--nav-h) + 64px) 0 72px;
}
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--olive-700);
  background: var(--olive-100);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 6px;
  margin-bottom: 22px;
}
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 20px;
}
.hero__sub {
  font-size: 1.12rem;
  color: var(--body);
  max-width: 30em;
  margin: 0 0 30px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__note {
  margin: 22px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 14px;
  border-left: 2px solid var(--olive-500);
}

/* Chat mockup */
.hero__visual {
  display: flex;
  justify-content: center;
}
.mock {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--olive-700);
  color: #fff;
}
.mock__brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
}
.mock__status {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}
.mock__body {
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--olive-050);
}
.mock__row {
  display: flex;
}
.mock__row--user {
  justify-content: flex-end;
}
.mock__bubble {
  max-width: 84%;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.mock__bubble--user {
  background: var(--olive-700);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.mock__bubble--bot {
  background: var(--surface);
  color: var(--body);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.mock__typing {
  display: inline-flex;
  gap: 5px;
  padding: 12px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  border-bottom-left-radius: 6px;
}
.mock__typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--olive-500);
  animation: blink 1.3s infinite ease-in-out;
}
.mock__typing span:nth-child(2) {
  animation-delay: 0.18s;
}
.mock__typing span:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes blink {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ── Trust strip ── */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.trust__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}
.trust__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--olive-500);
}

/* ── Sections ── */
.section {
  padding: 84px 0;
}
.section--tint {
  background: var(--olive-050);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section__head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-600);
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 14px;
}
.section__lead {
  font-size: 1.06rem;
  color: var(--body);
  margin: 0;
}

/* ── Problem chips ── */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.symptom {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--olive-800);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, transform 0.15s ease;
}
.symptom:hover {
  border-color: var(--olive-500);
  transform: translateY(-2px);
}

/* ── Grids + cards ── */
.grid {
  display: grid;
  gap: 22px;
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--olive-500);
  box-shadow: var(--shadow-md);
}
.card__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.card__text {
  font-size: 0.96rem;
  color: var(--body);
  margin: 0;
}

/* step cards */
.step__num {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--olive-500);
  margin-bottom: 14px;
}

/* pillar cards */
.pillar__icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--olive-100);
  margin-bottom: 16px;
}
.pillar__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--olive-700);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Approach ── */
.approach {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.approach__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.approach__list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.approach__list strong {
  color: var(--ink);
  font-weight: 600;
}
.tick {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--olive-700);
  position: relative;
}
.tick::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── About ── */
.about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.about__frame {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--olive-100);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.about__placeholder {
  display: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.4rem;
  color: var(--olive-600);
  letter-spacing: 0.04em;
}
.about__frame--empty .about__placeholder {
  display: block;
}
.about__role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--olive-700);
  margin: 0 0 18px;
}
.about__quote {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 22px 0;
  padding-left: 18px;
  border-left: 3px solid var(--olive-500);
}

/* ── Safety band ── */
.safety {
  background: var(--olive-100);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.safety__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
  text-align: left;
}
.safety__inner p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--olive-800);
  max-width: 760px;
}
.safety__inner strong {
  color: var(--ink);
}
.safety__icon {
  flex: 0 0 auto;
}
.safety__icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--olive-700);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── FAQ ── */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.faq__item.open {
  border-color: var(--olive-500);
  box-shadow: var(--shadow-sm);
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-family: var(--ui);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 20px 22px;
  cursor: pointer;
}
.faq__icon {
  flex: 0 0 auto;
  position: relative;
  width: 16px;
  height: 16px;
}
.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  background: var(--olive-600);
  border-radius: 2px;
}
.faq__icon::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
}
.faq__icon::after {
  left: 7px;
  top: 0;
  width: 2px;
  height: 16px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.faq__item.open .faq__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}
.faq__a {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.28s ease;
}
.faq__item.open .faq__a {
  max-height: 320px;
  opacity: 1;
}
.faq__a p {
  margin: 0;
  padding: 0 22px 22px;
  color: var(--body);
  font-size: 0.98rem;
}

/* ── Final CTA ── */
.cta {
  background: var(--olive-900);
  padding: 80px 0;
}
.cta__inner {
  text-align: center;
}
.cta__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0 0 14px;
}
.cta__sub {
  font-size: 1.08rem;
  color: #d4dcc4;
  max-width: 36em;
  margin: 0 auto 28px;
}

/* ── Footer ── */
.footer {
  background: var(--olive-900);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 56px 0 32px;
  color: #c2cbb2;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
}
.footer .brand__name {
  color: #fff;
}
.footer .brand__by {
  color: #9caa86;
}
.footer__tag {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: #9caa86;
  max-width: 24em;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.footer__cols h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 14px;
}
.footer__cols a {
  display: block;
  font-size: 0.94rem;
  color: #c2cbb2;
  padding: 5px 0;
  transition: color 0.16s ease;
}
.footer__cols a:hover {
  color: #fff;
}
.footer__legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.footer__legal p {
  margin: 0;
  font-size: 0.82rem;
  color: #8b9879;
  max-width: 60ch;
}

/* ── Scroll-reveal animation ──
   Progressive enhancement: the hidden/animated state ONLY applies when JS is
   running (`.has-js` is set by landing.js). If the script fails to load, is
   cached-stale, or errors, content stays fully visible — it can never be
   stranded invisible. */
.has-js [data-animate] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.has-js [data-animate].in-view {
  opacity: 1;
  transform: none;
}
[data-index='1'] { transition-delay: 0.08s; }
[data-index='2'] { transition-delay: 0.16s; }
[data-index='3'] { transition-delay: 0.24s; }
[data-index='4'] { transition-delay: 0.32s; }
[data-index='5'] { transition-delay: 0.4s; }
[data-index='6'] { transition-delay: 0.48s; }
[data-index='7'] { transition-delay: 0.56s; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: 2; }
  .approach,
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about__frame { max-width: 360px; }
}
@media (max-width: 720px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 8px 24px 16px;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__toggle { display: inline-flex; }
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section__head { margin-bottom: 36px; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .safety__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  [data-animate] { opacity: 1; transform: none; }
}
