/* ==========================================================================
   LekhaBooks — Marketing site stylesheet
   Editorial aesthetic. Fraunces (display serif) + Inter (body). Teal brand.
   Shared across all public marketing pages.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-active: #3730a3;
  --brand-soft: #e0e7ff;
  --brand-tint: #eef2ff;

  /* Ink */
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #475569;
  --faint: #64748b;
  --soft: #94a3b8;

  /* Surface */
  --paper: #ffffff;
  --canvas: #fafaf7;   /* warm off-white — editorial feel */
  --paper-2: #f1f5f9;
  --line: #e2e8f0;
  --line-2: #cbd5e1;

  /* Semantic */
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --rust:  #b91c1c;
  --rust-soft: #fee2e2;
  --green: #15803d;
  --green-soft: #dcfce7;

  /* Shape */
  --r-sm: 6px;
  --r:    8px;
  --r-lg: 14px;
  --r-xl: 22px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow:    0 4px 14px rgba(15,23,42,.07), 0 1px 3px rgba(15,23,42,.05);
  --shadow-lg: 0 24px 48px -12px rgba(15,23,42,.18), 0 8px 16px rgba(15,23,42,.06);

  /* Motion */
  --t-fast: 140ms cubic-bezier(.4,0,.2,1);
  --t:      220ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--brand-hover); }

::selection { background: var(--brand-soft); color: var(--ink); }

/* ---------- Typography scale ---------- */
.display, h1.display {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 24px;
  font-variation-settings: 'SOFT' 30, 'opsz' 144;
}
.display em, h1.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 20px;
  font-variation-settings: 'SOFT' 40, 'opsz' 144;
}
h1 em { font-style: italic; color: var(--brand); font-weight: 400; }

h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 16px;
  font-variation-settings: 'SOFT' 30, 'opsz' 96;
}

h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 10px;
}

h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--brand);
}

.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
  max-width: 60ch;
  margin: 0 0 32px;
}
.lede strong { color: var(--ink-2); font-weight: 600; }

p { margin: 0 0 14px; }
p strong { font-weight: 600; color: var(--ink-2); }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }

code, kbd {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-2);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.wrap-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 18px; }
}

section { padding: 96px 0; }
section.tight { padding: 56px 0; }
@media (max-width: 768px) {
  section { padding: 64px 0; }
  section.tight { padding: 40px 0; }
}

.surface {
  background: var(--paper);
}
.surface-tint {
  background: var(--brand-tint);
}
.surface-dark {
  background: var(--ink);
  color: #cbd5e1;
}
.surface-dark h1, .surface-dark h2, .surface-dark h3, .surface-dark h4 { color: #fff; }
.surface-dark .lede { color: #94a3b8; }
.surface-dark .eyebrow { color: var(--brand-soft); }
.surface-dark .eyebrow::before { background: var(--brand-soft); }
.surface-dark a { color: var(--brand-soft); }

/* ---------- Topnav ---------- */
.topnav {
  background: rgba(250,250,247,0.78);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topnav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  font-family: 'Fraunces', serif;
  font-variation-settings: 'SOFT' 30;
}
.topnav-brand:hover { color: var(--ink); }
.topnav-brand img { width: 32px; height: 32px; }
.topnav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.topnav-links a {
  padding: 8px 14px;
  border-radius: var(--r);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.topnav-links a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.topnav-cta {
  margin-left: 10px;
}
@media (max-width: 820px) {
  .topnav-links a:not(.topnav-cta) { display: none; }
  .topnav-links a.topnav-link-mobile { display: inline-flex; }
}
@media (max-width: 640px) {
  .topnav-inner { padding: 12px 18px; gap: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover { background: #1e293b; color: #fff; box-shadow: 0 4px 12px rgba(15,23,42,0.22); }
.btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(79, 70, 229,0.25), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-brand:hover { background: var(--brand-hover); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229,0.3); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-link {
  background: transparent;
  color: var(--brand);
  padding: 8px 0;
}
.btn-link::after {
  content: '→';
  margin-left: 4px;
  transition: transform var(--t-fast);
}
.btn-link:hover::after { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(79, 70, 229,0.07), transparent 42%),
    radial-gradient(circle at 92% 88%, rgba(79, 70, 229,0.05), transparent 50%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-stat-strip {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stat {
  padding: 24px 28px;
  border-right: 1px solid var(--line);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
  font-variation-settings: 'SOFT' 40;
}
.hero-stat-num em { font-style: italic; color: var(--brand); font-weight: 400; }
.hero-stat-label {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.4;
}
@media (max-width: 820px) {
  .hero-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: none; }
  .hero-stat:nth-child(1), .hero-stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .hero-stat { padding: 18px 16px; }
  .hero-stat-num { font-size: 28px; }
}

/* ---------- Feature grids ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.feat-cell {
  background: var(--paper);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background var(--t-fast);
}
.feat-cell:hover { background: var(--brand-tint); }
.feat-cell-num {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  color: var(--brand);
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 4px;
  font-variation-settings: 'SOFT' 30;
}
.feat-cell h3 { margin-bottom: 6px; }
.feat-cell p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.55; }

@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }

/* Numbered list (editorial 01/02/03) — used on home + features */
.num-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.num-list > li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 36px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  align-items: start;
}
.num-list-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  color: var(--brand);
  letter-spacing: -0.01em;
  font-variation-settings: 'SOFT' 100, 'opsz' 96;
}
.num-list h3 { font-size: 22px; margin-bottom: 8px; }
.num-list p { color: var(--muted); margin: 0; max-width: 60ch; }
@media (max-width: 640px) {
  .num-list > li { grid-template-columns: 1fr; gap: 6px; }
  .num-list-num { font-size: 28px; }
}

/* ---------- Section header ---------- */
.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.price-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.price-card.featured {
  border-color: var(--ink);
  border-width: 2px;
  position: relative;
}
.price-card.featured::before {
  content: 'Most popular';
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.price-tier {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 4px;
  font-variation-settings: 'SOFT' 40;
}
.price-tagline {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
  min-height: 42px;
}
.price-amount {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 52px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
  font-variation-settings: 'SOFT' 40;
}
.price-amount .currency {
  font-size: 28px;
  vertical-align: top;
  margin-right: 2px;
  color: var(--muted);
}
.price-amount .period {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0;
}
.price-billing { color: var(--faint); font-size: 13px; margin-bottom: 24px; }
.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  flex: 1;
}
.price-features li {
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.price-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.price-features li.dim { color: var(--faint); }
.price-features li.dim::before {
  border-left-color: var(--soft);
  border-bottom-color: var(--soft);
  opacity: 0.4;
}
@media (max-width: 880px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card.featured { order: -1; }
}

/* ---------- Tables (GST rates, comparison) ---------- */
.tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: auto;
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.tbl thead th {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
}
table.tbl tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover td { background: var(--brand-tint); }
table.tbl .rate {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}
table.tbl .hsn {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.tbl-meta {
  font-size: 12px;
  color: var(--faint);
  margin-top: 10px;
}

/* ---------- Tag pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-brand { background: var(--brand-soft); color: var(--brand-active); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-line  { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #cbd5e1;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(79, 70, 229,0.20), transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(79, 70, 229,0.12), transparent 50%);
  pointer-events: none;
}
.cta-band-inner { position: relative; max-width: 760px; margin: 0 auto; padding: 0 28px; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: #94a3b8; font-size: 17px; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 64px 0 28px;
  font-size: 14px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand-block { max-width: 320px; }
.footer-brand-block .topnav-brand { margin-bottom: 14px; }
.footer-brand-block p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13px;
}
.footer-bottom-langs { color: var(--faint); font-size: 12.5px; }
.footer-bottom-langs span { color: var(--ink-2); font-weight: 500; }
@media (max-width: 820px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand-block { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
}

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: revealUp 0.7s cubic-bezier(.2,.7,.2,1) forwards;
  }
  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.15s; }
  .reveal-3 { animation-delay: 0.28s; }
  .reveal-4 { animation-delay: 0.42s; }
  @keyframes revealUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- "Made in India" badge ---------- */
.mii {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.mii::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FF9933 0 33%, #ffffff 33% 66%, #138808 66% 100%);
  border: 0.5px solid rgba(15,23,42,0.1);
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.serif { font-family: 'Fraunces', serif; font-variation-settings: 'SOFT' 40; }
.italic { font-style: italic; }
.mb-0 { margin-bottom: 0 !important; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* ---------- Print ---------- */
@media print {
  .topnav, .footer, .cta-band, .btn { display: none; }
  body { background: #fff; }
}
