/* ClearTrace — cleartrace.in
   Palette: ink navy #101828 · paper #FBF8F1 · ledger blue #1D4ED8
            margin red #C4372B · credit green #15803D · muted #667085 */

:root {
  --ink: #101828;
  --paper: #fbf8f1;
  --paper-line: #e7e0d2;
  --blue: #1d4ed8;
  --blue-dark: #1e40af;
  --red: #c4372b;
  --green: #15803d;
  --muted: #667085;
  --card: #ffffff;
  --radius: 14px;
  --display: "Bricolage Grotesque", "Georgia", serif;
  --body: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 248, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700; font-size: 1.25rem; color: var(--ink);
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.wordmark img { width: 28px; height: 28px; display: block; }
.wordmark:hover { text-decoration: none; }
.wordmark .tick { color: var(--blue); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink); font-size: 0.95rem; }
/* Beat .nav-links a's specificity so the CTA keeps white text. */
.nav-links a.btn { color: #fff; }
.btn {
  display: inline-block;
  background: var(--blue); color: #fff;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  border: none; cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────── */
.hero { padding: 72px 0 88px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
}
h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
h1 em { font-style: normal; color: var(--blue); }
.lede {
  font-size: 1.15rem; color: var(--muted);
  max-width: 34rem; margin-bottom: 32px;
}
.store-row { display: flex; gap: 14px; flex-wrap: wrap; }
.store-badge {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  border-radius: 12px; padding: 9px 20px;
  line-height: 1.25; min-width: 178px;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge span { display: flex; flex-direction: column; }
.store-badge:hover { background: #1f2a44; text-decoration: none; }
.store-badge small { font-size: 0.68rem; opacity: 0.75; }
.store-badge strong { font-size: 1.02rem; font-weight: 600; }
.store-note { margin-top: 14px; font-size: 0.85rem; color: var(--muted); }

/* ── The khata card (signature) ──────────────────────── */
.khata {
  background: var(--card);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -24px rgba(16, 24, 40, 0.25);
  padding: 26px 26px 20px 0;
  position: relative;
  overflow: hidden;
  /* ruled paper */
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 35px,
    #f0ebdf 35px, #f0ebdf 36px);
}
.khata::before {
  /* the red margin line every khata notebook has */
  content: ""; position: absolute; top: 0; bottom: 0; left: 52px;
  width: 2px; background: rgba(196, 55, 43, 0.55);
}
.khata-head {
  padding-left: 72px; margin-bottom: 14px;
}
.khata-head .book {
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
}
.khata-head .sub {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
}
.khata table { width: 100%; border-collapse: collapse; }
.khata td {
  padding: 7px 0; font-size: 0.9rem; vertical-align: baseline;
}
.khata td.what { padding-left: 72px; }
.khata td.amt, .khata td.bal {
  font-family: var(--mono); text-align: right; white-space: nowrap;
}
.khata td.amt { width: 7.2em; }
.khata td.bal { width: 7.6em; padding-right: 4px; color: var(--ink); font-weight: 600; }
.khata .in  { color: var(--green); }
.khata .out { color: var(--red); }
.khata .note {
  display: block; font-size: 0.72rem; color: var(--muted);
}
/* Rows are visible by default (no-JS, crawlers, screenshots);
   the .anim class opts in to the write-in animation. */
.khata.anim tr.row { opacity: 0; transform: translateY(6px); }
.khata.anim tr.row.shown {
  opacity: 1; transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.khata-foot {
  margin-top: 12px; padding: 10px 4px 0 72px;
  border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: baseline;
}
.khata-foot .label { font-size: 0.85rem; color: var(--muted); }
.khata-foot .total {
  font-family: var(--mono); font-weight: 700; font-size: 1.15rem;
}
.khata .stamp {
  position: absolute; right: 18px; top: 16px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  color: var(--green); border: 1.5px solid var(--green);
  border-radius: 6px; padding: 3px 8px; transform: rotate(6deg);
  opacity: 0.85;
}

/* ── Sections ────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: #f4efe4; }
h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.section-sub { color: var(--muted); max-width: 40rem; margin-bottom: 44px; }

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 24px;
}
.feature .glyph {
  font-family: var(--mono); font-size: 0.78rem; color: var(--blue);
  margin-bottom: 12px; display: block; letter-spacing: 0.08em;
}
.feature h3 {
  font-family: var(--display); font-size: 1.08rem; font-weight: 600;
  margin-bottom: 8px;
}
.feature p { font-size: 0.93rem; color: var(--muted); }

/* ── Steps ───────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 8px 4px; }
.step .n {
  font-family: var(--mono); color: var(--red);
  font-size: 0.85rem; display: block; margin-bottom: 10px;
}
.step h3 {
  font-family: var(--display); font-size: 1.1rem; margin-bottom: 8px;
}
.step p { color: var(--muted); font-size: 0.95rem; }

/* ── Trust band ──────────────────────────────────────── */
.trust { background: var(--ink); color: #e6eaf2; }
.trust h2 { color: #fff; }
.trust .section-sub { color: #9aa4b8; }
.trust-points {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px;
  list-style: none; max-width: 46rem;
}
.trust-points li {
  padding-left: 26px; position: relative; font-size: 0.97rem;
}
.trust-points li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green);
  font-weight: 700;
}
.trust a { color: #93b4ff; }

/* ── Footer ──────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--paper-line);
  padding: 36px 0; font-size: 0.9rem; color: var(--muted);
}
.foot-inner {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.foot-links { display: flex; gap: 22px; }

/* ── Document pages (privacy / terms) ────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 88px; }
.doc h1 { font-size: 2rem; margin-bottom: 6px; }
.doc .updated {
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
  margin-bottom: 36px; display: block;
}
.doc h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.doc p, .doc li { color: #344054; font-size: 0.98rem; }
.doc ul { padding-left: 22px; margin: 10px 0; }
.doc li { margin-bottom: 6px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 880px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .features, .steps { grid-template-columns: 1fr; }
  .trust-points { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .khata.anim tr.row { opacity: 1; transform: none; transition: none; }
}
