/* ================================================================
   Kunwwer.ai — Design System
   Warm, authoritative, Indian-modern. No frameworks; pure CSS.
   ================================================================ */

/* --------- Reset --------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* --------- Tokens --------- */
:root {
  /* Color */
  --bg:           #faf6ec;
  --bg-card:      #ffffff;
  --bg-soft:      #f3eedd;
  --bg-deep:      #14161f;
  --bg-deeper:    #0c0e16;

  --ink:          #16181d;
  --ink-2:        #4a4d57;
  --ink-3:        #7a7d87;
  --ink-on-dark:  #e8e6df;
  --ink-on-dark-2:#a7a8a5;

  --line:         #e8e3d4;
  --line-strong:  #d2cdb9;
  --line-dark:    #2a2d39;

  --primary:      #1c2a4a;
  --primary-2:    #2a3d6e;
  --accent:       #c8761a;
  --accent-2:     #a85e0d;
  --accent-soft:  #fef0d9;
  --success:      #2d6a3e;
  --danger:       #b32424;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;
  --fs-4xl: 48px;
  --fs-5xl: 64px;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 128px;

  /* Layout */
  --container: 1140px;
  --container-narrow: 820px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20,22,31,0.04), 0 1px 3px rgba(20,22,31,0.05);
  --shadow:    0 4px 12px rgba(20,22,31,0.06), 0 2px 4px rgba(20,22,31,0.04);
  --shadow-lg: 0 18px 40px rgba(20,22,31,0.08), 0 6px 12px rgba(20,22,31,0.05);
}

/* --------- Base --------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--sp-4);
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
}
h1 { font-size: clamp(36px, 5.2vw, var(--fs-5xl)); font-weight: 500; }
h2 { font-size: clamp(28px, 3.5vw, var(--fs-4xl)); font-weight: 500; }
h3 { font-size: var(--fs-2xl); font-weight: 500; }
h4 { font-size: var(--fs-xl); font-weight: 500; }

p { margin: 0 0 var(--sp-4); }
strong { font-weight: 600; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--sp-3);
  display: inline-block;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
}

.muted { color: var(--ink-3); }

/* --------- Layout --------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--sp-5); }

section { padding: var(--sp-9) 0; }
section.tight { padding: var(--sp-7) 0; }
section.bg-deep { background: var(--bg-deep); color: var(--ink-on-dark); }
section.bg-deep h1, section.bg-deep h2, section.bg-deep h3 { color: var(--ink-on-dark); }
section.bg-soft { background: var(--bg-soft); }
section.bg-card { background: var(--bg-card); }

/* --------- Nav --------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .dot { color: var(--accent); }
.nav-links {
  display: flex;
  gap: var(--sp-6);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta-group { display: flex; align-items: center; gap: var(--sp-3); }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 20px; height: 2px; background: var(--ink);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: var(--sp-5);
    border-bottom: 1px solid var(--line);
    gap: var(--sp-4);
  }
}

/* --------- Buttons --------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.1s ease, background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--primary); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-2); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--ink-3); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 12px 12px;
}
.btn-ghost:hover { color: var(--accent-2); }
.btn-lg { padding: 16px 28px; font-size: var(--fs-md); }
.btn-on-dark.btn-secondary {
  color: var(--ink-on-dark);
  border-color: rgba(255,255,255,0.25);
}
.btn-on-dark.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.45); }

/* --------- Hero --------- */
.hero {
  padding: var(--sp-9) 0 var(--sp-9);
  position: relative;
}
.hero-eyebrow { color: var(--accent-2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: var(--fs-xs); }
.hero h1 { margin-top: var(--sp-3); margin-bottom: var(--sp-5); max-width: 18ch; }
.hero .lead { margin-bottom: var(--sp-6); }
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.hero-microcopy { font-size: var(--fs-sm); color: var(--ink-3); }

.hero.bg-deep { color: var(--ink-on-dark); }
.hero.bg-deep .hero-eyebrow { color: var(--accent); }
.hero.bg-deep .lead { color: var(--ink-on-dark-2); }
.hero.bg-deep .hero-microcopy { color: var(--ink-on-dark-2); }

/* --------- Module / Card grid --------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 880px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card .card-mark {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: var(--sp-4);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 20px;
}
.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--ink-2); margin-bottom: var(--sp-4); }
.card-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}
.card-link:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* --------- Section heading --------- */
.section-head {
  margin-bottom: var(--sp-7);
  max-width: 56ch;
}
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { margin-bottom: var(--sp-3); }

/* --------- Stats row --------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  text-align: left;
}
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-row .stat {
  border-left: 2px solid var(--accent);
  padding-left: var(--sp-4);
}
.stat-row .stat .num {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 500;
  color: var(--ink);
  display: block;
  line-height: 1.1;
  margin-bottom: var(--sp-1);
}
.stat-row .stat .label {
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.bg-deep .stat-row .stat .num { color: var(--ink-on-dark); }
.bg-deep .stat-row .stat .label { color: var(--ink-on-dark-2); }

/* --------- Pull quote --------- */
.pull-quote {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: 1.35;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: var(--sp-5);
  margin: var(--sp-6) 0;
  font-style: italic;
}
.pull-quote cite {
  display: block;
  margin-top: var(--sp-3);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* --------- Tag / badge --------- */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
}
.tag.legal { background: #fde9e9; color: #9b1c1c; }
.tag.marketing { background: #fff1d9; color: #9c5a00; }
.tag.export { background: #e1ecff; color: #1e3a8a; }

/* --------- Pricing --------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  align-items: stretch;
}
@media (max-width: 880px) { .tier-grid { grid-template-columns: 1fr; } }
.tier {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-7) var(--sp-6);
  display: flex;
  flex-direction: column;
}
.tier.featured {
  border: 2px solid var(--ink);
  position: relative;
  box-shadow: var(--shadow);
}
.tier.featured .featured-tag {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.tier-name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
}
.tier-price {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 500;
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.tier-price .per { font-size: var(--fs-md); color: var(--ink-3); margin-left: 4px; font-family: var(--font-body); font-weight: 400; }
.tier-desc { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: var(--sp-5); min-height: 40px; }
.tier ul {
  list-style: none;
  padding: 0; margin: 0 0 var(--sp-6);
  flex: 1;
}
.tier li {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  display: flex; align-items: flex-start; gap: var(--sp-2);
  color: var(--ink-2);
}
.tier li::before {
  content: "✓";
  color: var(--accent-2);
  font-weight: 700;
  margin-right: 2px;
  flex-shrink: 0;
}
.tier li.muted-li::before { content: "—"; color: var(--ink-3); }
.tier li.muted-li { color: var(--ink-3); }

/* --------- Form --------- */
.form-row { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.form-row.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row.two { grid-template-columns: 1fr; } }
.field-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-2);
  display: block;
  color: var(--ink-2);
}
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink);
  font-size: var(--fs-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(28, 42, 74, 0.12);
}
.textarea { resize: vertical; min-height: 96px; }
.field-help { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--sp-2); }

/* --------- Notebook (blog) cards --------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-6);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.post-card .tag { margin-bottom: var(--sp-3); align-self: flex-start; }
.post-card h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.post-card p { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.post-meta { font-size: var(--fs-xs); color: var(--ink-3); margin-top: auto; }
.post-meta a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

/* --------- Two-column with image/content --------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-7);
  align-items: center;
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.portrait {
  background: var(--bg-soft);
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--ink-3);
  text-align: center;
  padding: var(--sp-5);
}

/* --------- Demo widgets --------- */
.demo-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  margin-top: var(--sp-4);
}
.demo-result {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  white-space: pre-wrap;
  min-height: 30px;
}
.demo-result.ok { border-color: var(--success); border-style: solid; }
.demo-result.warn { border-color: var(--accent-2); border-style: solid; }

/* --------- Feature list (checked) --------- */
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li {
  padding: var(--sp-3) 0;
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--fs-md);
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
ul.checks li::before {
  content: "✓";
  color: var(--accent-2);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
}

/* --------- Comparison table --------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare th, .compare td {
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare th { background: var(--bg-soft); font-weight: 600; }
.compare tr:last-child td { border-bottom: none; }
.compare td.center, .compare th.center { text-align: center; }
.compare .yes { color: var(--success); font-weight: 700; }
.compare .no { color: var(--ink-3); }

/* --------- FAQ --------- */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: var(--sp-5) 0;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 24px; color: var(--ink-3); transition: transform 0.2s; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { color: var(--accent-2); }
.faq-item .answer { padding-top: var(--sp-3); color: var(--ink-2); font-size: var(--fs-md); }

/* --------- Footer --------- */
.footer {
  background: var(--bg-deeper);
  color: var(--ink-on-dark-2);
  padding: var(--sp-8) 0 var(--sp-6);
  margin-top: var(--sp-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: var(--sp-7);
  margin-bottom: var(--sp-7);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { color: var(--ink-on-dark); font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: var(--sp-2) 0; }
.footer ul a { color: var(--ink-on-dark-2); font-size: var(--fs-sm); transition: color 0.15s; }
.footer ul a:hover { color: var(--ink-on-dark); }
.footer .brand { color: var(--ink-on-dark); font-size: 24px; }
.footer .brand .dot { color: var(--accent); }
.footer-tagline { color: var(--ink-on-dark-2); font-size: var(--fs-sm); margin-top: var(--sp-3); max-width: 28ch; }
.footer-bottom {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--ink-on-dark-2);
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.footer-newsletter input {
  background: var(--bg-deep);
  color: var(--ink-on-dark);
  border-color: var(--line-dark);
  padding: 10px 12px;
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-dark);
}
.footer-newsletter input::placeholder { color: var(--ink-on-dark-2); }
.footer-newsletter form { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.footer-newsletter button {
  background: var(--accent); color: #fff; padding: 10px 14px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: var(--fs-sm);
}

/* --------- Misc utilities --------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-3 { gap: var(--sp-3); }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* --------- Skip link (a11y) --------- */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  position: fixed;
  top: 8px; left: 8px;
  background: var(--ink); color: var(--bg);
  padding: 8px 14px; border-radius: var(--radius-sm);
  z-index: 100;
}
