/* KalPakka validation landing page — mobile-first, no framework.
   Design language per D-012/D-014: warm cream, brand green, provided
   flat-illustration PNGs, magazine-style text flow around images. */

:root {
  --ink: #1a2333;
  --ink-soft: #4c5871;
  --brand: #0d7a5f;
  --brand-deep: #0b5c46;
  --brand-dark: #084d3b;
  --cream: #faf6ef;
  --cream-2: #f3ede1;
  --mark-ivory: #fdfaf3;
  --marigold: #e0a53d;
  --card: #ffffff;
  --border: #e8e2d6;
  --border-soft: #f0ebe0;
  --overdue: #d93025;
  --warn-bg: #fdecea;
  --warn-ink: #8a1c13;
  --ok-bg: #e6f4ec;
  --ok-ink: #0b5c46;
  --chip-today-bg: #fff4d6;
  --chip-today-ink: #7a5a00;
  --chip-upcoming-bg: #e3edff;
  --chip-upcoming-ink: #1e4fa3;
  --chip-overdue-bg: #fdecea;
  --chip-overdue-ink: #a31709;
  --focus: #1d4ed8;
  --shadow-card: 0 18px 50px rgba(26, 35, 51, 0.07);
  --font-ledger: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-editorial: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1.1rem 1.25rem;
  max-width: 76rem;
  margin: 0 auto;
}

.brand {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 2.1rem;
  height: auto;
  flex: none;
}

.header-nav {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
}

.header-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  font-family: var(--font-ledger);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.header-nav a:hover { color: var(--ink); }

.header-cta {
  margin-left: auto;
  padding: 0.55rem 1.1rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 10px;
}

.header-cta:hover { background: var(--brand-dark); }

main { max-width: 76rem; margin: 0 auto; padding: 0 1.25rem 1rem; }

.section { margin-top: clamp(2.25rem, 4.5vw, 3.75rem); }

/* ---------- Shared type ---------- */

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-deep);
  background: var(--ok-bg);
  border: 1px solid rgba(13, 122, 95, 0.16);
  border-radius: 6px;
  padding: 0.34rem 0.62rem;
}

.ledger-label {
  font-family: var(--font-ledger);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.ledger-copy {
  font-family: var(--font-ledger);
  font-variant-numeric: tabular-nums;
}

.eyebrow-center { display: block; text-align: center; width: fit-content; margin-left: auto; margin-right: auto; }

h1 {
  font-size: clamp(2.55rem, 7.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 0.9rem;
  font-weight: 800;
}

h1 .highlight { color: var(--brand); }

.section-title {
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  line-height: 1.05;
  margin: 0 0 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
}

.section-title-left { text-align: left; }

h3 { font-size: 1.05rem; margin: 0 0 0.3rem; color: var(--ink); font-weight: 700; }

.lead { max-width: 38rem; font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 1.5rem; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 1.5rem;
  margin-top: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.cta {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  min-height: 46px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
}

.cta:hover { background: var(--brand-dark); }

.cta-secondary {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  min-height: 46px;
  background: transparent;
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  border: 1.5px solid var(--border);
}

.cta-secondary:hover { border-color: var(--brand); }

.trust { margin: 1.25rem 0 0; font-weight: 600; color: var(--ink-soft); font-size: 0.95rem; }

.hero-video {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.hero-video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--ink);
  box-shadow: 0 18px 42px rgba(26, 35, 51, 0.12);
}

.hero-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hero-video figcaption {
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: center;
}

.hero-video figcaption a {
  color: var(--brand-deep);
  font-weight: 700;
}

/* ---------- Relationship section ---------- */

.relationship-layout {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

#how { scroll-margin-top: 15px; }

.relationship-copy p {
  max-width: 42rem;
  margin: 0;
  color: var(--ink-soft);
}

.relationship-figure {
  order: -1;
  display: block;
  width: min(78%, 340px);
  margin: 0 auto;
}

.relationship-conversation { max-width: 300px; }

/* ---------- Feature cards ---------- */

.feature-cards {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(26, 35, 51, 0.045);
}

.feature-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Built-for-India strip ---------- */

.built {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.built-layout {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.built-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.built-grid li { text-align: center; }

.built-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2rem;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(13, 122, 95, 0.18);
  border-radius: 6px;
  background: transparent;
  color: var(--brand-deep);
  font-weight: 800;
  font-size: 0.72rem;
}

.built-grid p { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

.built-figure {
  display: block;
  width: min(58%, 220px);
  height: auto;
  margin: 0 auto;
}

/* ---------- Problem (MSME stat) ---------- */

.problem { text-align: center; }

.brand-panel {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding: clamp(2.08rem, 5.12vw, 3.84rem) 1.25rem;
  background: var(--brand-deep);
  border-radius: 24px;
  color: var(--mark-ivory);
}

.brand-panel .eyebrow-reversed {
  color: var(--mark-ivory);
  background: rgba(253, 250, 243, 0.08);
  border-color: rgba(253, 250, 243, 0.2);
}

.brand-panel .section-title,
.brand-panel .stat-big { color: var(--mark-ivory); }

.brand-panel .problem-lead { color: #d7efe4; }

.brand-panel .problem-source { color: rgba(253, 250, 243, 0.7); }
.brand-panel .problem-source a { color: var(--mark-ivory); }

.stat-big {
  margin: 0.25rem 0 0;
  font-size: 2.6rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand);
  font-family: var(--font-ledger);
  font-variant-numeric: tabular-nums;
}

.problem .section-title { margin-top: 0.25rem; }

.problem-lead {
  max-width: 42rem;
  margin: 0 auto 0.9rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.problem-source { font-size: 0.78rem; color: var(--ink-soft); }
.problem-source a { color: var(--brand-deep); }

/* ---------- Coming soon (roadmap) ---------- */

.roadmap-disclosure {
  max-width: 76rem;
  margin: 0 auto;
}

.roadmap-disclosure summary {
  position: relative;
  display: block;
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 3rem 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.roadmap-disclosure summary::-webkit-details-marker { display: none; }

.roadmap-disclosure summary::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--brand-deep);
  font-size: 1.25rem;
  font-weight: 800;
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.roadmap-disclosure[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.summary-pill {
  display: block;
  margin-bottom: 0.35rem;
}

.summary-helper {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.roadmap-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.roadmap-grid li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-card);
}

.roadmap-grid li::before {
  content: "Soon";
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: var(--ok-bg);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.roadmap-grid h3 { padding-right: 3rem; }
.roadmap-grid p { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Product preview ---------- */

.preview-wrap .mock-panel { margin: 0 auto; }
.preview-wrap .mock-note { max-width: 34rem; margin: 0.5rem auto 0; text-align: center; }

.mock-panel {
  max-width: 34rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: var(--shadow-card);
}

.mock-title { margin: 0 0 1rem; font-weight: 800; font-size: 1.05rem; }
.mock-title .ledger-label { display: block; margin-bottom: 0.15rem; color: var(--brand-deep); font-size: 0.64rem; }

.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.9rem; }

.mock-stat {
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mock-stat-label { font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; }
.mock-stat-value { font-size: 0.95rem; font-weight: 800; overflow-wrap: anywhere; }
.mock-stat-value { font-family: var(--font-ledger); font-variant-numeric: tabular-nums; }
.mock-stat-value.overdue { color: var(--overdue); }

.mock-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.95rem; }

.mock-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: var(--card);
  box-shadow:
    0 4px 12px rgba(26, 35, 51, 0.04),
    0 6px 0 -2px #fff,
    0 6px 0 -1px var(--border-soft),
    0 12px 0 -5px rgba(255, 255, 255, 0.72),
    0 12px 0 -4px var(--border-soft);
  font-size: 0.85rem;
  line-height: 1.35;
  min-width: 0;
}

.mock-cust {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.mock-cust strong,
.mock-meta,
.mock-date {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-cust strong { font-size: 0.9rem; line-height: 1.2; }
.mock-meta { font-size: 0.76rem; color: var(--ink-soft); }
.mock-date { font-size: 0.72rem; color: var(--brand-deep); font-weight: 600; }
.mock-meta,
.mock-date { font-family: var(--font-ledger); font-variant-numeric: tabular-nums; }

.avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--brand-deep);
  font-weight: 800;
}

.chip {
  flex: 0 0 auto;
  max-width: 5.5rem;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.chip-today { background: var(--chip-today-bg); color: var(--chip-today-ink); }
.chip-upcoming { background: var(--chip-upcoming-bg); color: var(--chip-upcoming-ink); }
.chip-overdue { background: var(--chip-overdue-bg); color: var(--chip-overdue-ink); }

.mock-bubble {
  background: #e9f8f0;
  border: 1px solid #cdeeda;
  border-radius: 12px 12px 12px 2px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
}

.mock-bubble-label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mock-bubble-text { margin: 0; font-size: 0.85rem; }
.mock-received {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: var(--brand-deep);
}

.mock-received strong { display: block; font-size: 0.85rem; }
.mock-received .ledger-copy { display: block; color: var(--ink-soft); font-size: 0.72rem; }
.mock-note { font-size: 0.78rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */

.cta-band {
  margin-top: clamp(2.25rem, 4.5vw, 3.75rem);
  background: var(--brand-deep);
  color: #fff;
  border-radius: 24px;
  padding: 2.25rem 1.5rem;
}

.cta-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.cta-band-figure {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--cream);
  overflow: hidden;
}

.cta-band-figure img {
  width: 96%;
  height: auto;
  transform: translateY(6%);
}

.cta-band-copy { min-width: 0; }
.cta-band h2 { margin: 0 0 0.75rem; font-size: 1.8rem; font-weight: 800; letter-spacing: -0.01em; }
.cta-band p { margin: 0 0 1.5rem; color: #d7efe4; }

.cta-invert { background: #fff; color: var(--brand-deep); }
.cta-invert:hover { background: var(--cream); }

/* ---------- Waitlist ---------- */

.waitlist {
  margin-top: 2rem;
  scroll-margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--shadow-card);
}

.waitlist-grid { display: grid; gap: 2rem; align-items: start; }

.waitlist-intro { max-width: 28rem; }
.waitlist-intro .section-title { margin-bottom: 1rem; }
.waitlist-intro > p:not(.eyebrow) { color: var(--ink-soft); }
.waitlist-promise { margin-top: 1.5rem; font-family: var(--font-editorial); font-size: 1.2rem; }

.waitlist form {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--cream);
}

.form-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }

.field { margin-bottom: 1.1rem; }

label, legend { display: block; font-weight: 600; margin-bottom: 0.3rem; }

.hint { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }

input[type="text"],
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  font-size: 1rem;
  border: 1px solid #b3aa97;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

fieldset.field { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem 1rem; }

.radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  min-height: 32px;
}

.radio input { width: 1.15rem; height: 1.15rem; }

button[type="submit"] {
  padding: 0.85rem 1.7rem;
  min-height: 46px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

button[type="submit"]:hover { background: var(--brand-dark); }
button[type="submit"]:disabled { background: #7d8ba1; cursor: wait; }

.status { margin: 0.75rem 0 0; font-weight: 600; min-height: 1.5rem; }
.status.success { color: var(--ok-ink); background: var(--ok-bg); padding: 0.6rem 0.8rem; border-radius: 8px; }
.status.error { color: var(--warn-ink); background: var(--warn-bg); padding: 0.6rem 0.8rem; border-radius: 8px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.1rem 1.25rem 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer-fine { display: none; }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.footer-brand img { width: 1.5rem; height: auto; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.footer-links a {
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

.footer-note {
  max-width: 44rem;
  margin: 0.65rem auto 0;
  color: #718096;
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (min-width: 560px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 680px) {
  .built-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .header-nav { display: flex; }
  .header-cta { margin-left: 0; }
  .hero {
    grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
    gap: clamp(2rem, 3vw, 3rem);
  }
  .hero-video {
    max-width: 680px;
    transform: translateX(clamp(0px, calc((100vw - 76rem) / 2), 50px));
  }
  .built-layout {
    grid-template-columns: minmax(150px, 0.22fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
  }
  .built-figure {
    width: 100%;
    max-width: 220px;
  }
  .relationship-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    gap: 2.5rem;
  }
  .relationship-figure {
    order: 0;
    width: 100%;
    max-width: 360px;
  }
  .relationship-conversation { max-width: 330px; }
  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1.25rem;
  }
  .roadmap-grid { grid-template-columns: repeat(4, 1fr); }
  .cta-band { padding: 2.75rem 3rem; }
  .cta-band-inner {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    text-align: left;
  }
  .cta-band-figure { width: 220px; height: 220px; }
  .cta-band p { margin-left: 0; margin-right: 0; }
  .cta-band h2 { font-size: 2.1rem; }
  .waitlist-grid { grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr); gap: 3.5rem; }
  .waitlist-intro { position: sticky; top: 2rem; }
}

/* Stack floated figures on small screens */
@media (max-width: 620px) {
  .float-fig, .float-fig.left {
    float: none;
    display: block;
    width: 78%;
    max-width: 300px;
    margin: 0 auto 1.25rem;
  }
  .section-title-left { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
