/*
 * Nirman Hisab — the public page.
 *
 * The app's own palette, deliberately. Somebody who has seen the screenshots
 * and then opens the demo should not feel they have arrived somewhere else.
 * core/theme.dart is the source of these values; keep them in step.
 *
 * No web fonts, no CDN, no analytics, nothing fetched from another host. The
 * page is served by the same API the app talks to, so a request that leaves
 * this box is a request that can fail, be blocked, or tell somebody else who
 * is reading. The system font stack is what the phone is already rendering
 * everything else in.
 */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --card: #1e2235;
  --elevated: #22263a;
  --border: #2e334d;
  --text: #f1f3ff;
  --muted: #8b93b5;
  --primary: #1e6fdb;
  --primary-dark: #1557b8;
  --accent: #ff8c42;
  --success: #2ec4b6;
  --warning: #ffd166;

  --max: 1120px;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--text); text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 17, 23, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
}

/* The app icon itself. It carries its own rounded dark square, so there is no
   background or radius here — a second one behind it reads as a badge on a
   badge, and the corners stop agreeing at small sizes. */
.mark {
  width: 30px;
  height: 30px;
  display: block;
  flex: none;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--muted);
}

.nav-links a:hover { color: var(--text); }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--muted); }

.btn-whatsapp { background: #25d366; color: #06281a; }
.btn-whatsapp:hover { background: #1fbe5b; }

.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: 84px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -320px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 620px;
  background: radial-gradient(circle, rgba(30, 111, 219, 0.22), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 20px 0 0;
  font-weight: 800;
}

h1 .grad {
  background: linear-gradient(120deg, #6fb0ff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--muted);
  font-size: 17.5px;
  margin: 20px 0 0;
  max-width: 33em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* The phone. A CSS frame rather than a PNG bezel, so a screenshot can be
   swapped without opening an image editor. */
.phones {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: flex-end;
}

.phone {
  border: 8px solid #14161f;
  border-radius: 34px;
  background: #14161f;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  width: 236px;
}

.phone.small {
  width: 190px;
  opacity: 0.85;
  transform: translateY(26px);
}

.phone img { border-radius: 26px; }

/* ── Sections ───────────────────────────────────────────────────────────── */

section { padding: 76px 0; }

.section-head { max-width: 44em; }

h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.6px;
  margin: 0;
  font-weight: 750;
}

.section-head p {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 16.5px;
}

.divider { border-top: 1px solid var(--border); }

/* ── Strip of plain facts under the hero ────────────────────────────────── */

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.strip div {
  background: var(--surface);
  padding: 22px 20px;
}

.strip strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.strip span { color: var(--muted); font-size: 13.5px; }

/* ── Feature cards ──────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: #3c4370; transform: translateY(-2px); }

.card .ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--elevated);
  display: grid;
  place-items: center;
  font-size: 19px;
  margin-bottom: 14px;
}

.card h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── Screens gallery ────────────────────────────────────────────────────── */

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.shot {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.shot img { border-bottom: 1px solid var(--border); }

.shot figcaption {
  padding: 16px 18px 18px;
}

.shot h3 { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.shot p { margin: 0; color: var(--muted); font-size: 13.5px; }

.shots-note {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ── Two audiences ──────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 40px;
}

.panel {
  background: linear-gradient(180deg, var(--card), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.panel h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.panel .who { color: var(--accent); font-size: 13px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase; }

.panel ul { margin: 18px 0 0; padding: 0; list-style: none; }

.panel li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14.5px;
}

.panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--primary);
}

.panel.enterprise li::before { background: var(--accent); }

/* ── Steps ──────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
  counter-reset: step;
}

.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}

.step .n {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  margin-bottom: 14px;
}

.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── Contact ────────────────────────────────────────────────────────────── */

.contact {
  background: linear-gradient(160deg, rgba(30, 111, 219, 0.16), rgba(255, 140, 66, 0.08));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 48px 40px;
  text-align: center;
}

.contact h2 { margin-bottom: 12px; }
.contact p { color: var(--muted); margin: 0 auto; max-width: 40em; }

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.contact-fine {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  color: var(--muted);
  font-size: 13.5px;
}

.foot {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.foot .spacer { margin-left: auto; }

footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ── Narrow screens ─────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .cards, .shots, .steps { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 620px) {
  section { padding: 56px 0; }
  .hero { padding: 56px 0 40px; }
  .cards, .shots, .steps { grid-template-columns: 1fr; }
  .contact { padding: 36px 22px; }
  .phone { width: 200px; }
  .phone.small { display: none; }
}


/* ── The app icon in the hero ─────────────────────────────────────────────── */

.hero-logo {
  width: 76px;
  height: 76px;
  margin-bottom: 20px;

  /* The icon's own tile is #16232E, which is within a few percent of the page
     background — so without an edge the buildings float and it reads as an
     illustration rather than as the thing you tap on a home screen. The
     border gives the tile back its shape; the radius is the SVG's own
     96/512 corner at this size, so the two agree exactly.
     A shadow in the icon's amber lifts it off the page. */
  border: 1px solid var(--border);
  border-radius: 14px;
  filter: drop-shadow(0 10px 24px rgba(245, 165, 36, 0.18));
}

/* ── Store buttons that are honest about not being buttons ────────────────── */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* A <span>, not an <a>. There is nowhere to go yet, and a link that goes
   nowhere is the thing this is trying to avoid. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 18px 9px 15px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: default;
  user-select: none;
}

.store-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.store-txt small {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--muted);
  margin-bottom: 2px;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .hero-logo { width: 64px; height: 64px; }
  .store { flex: 1 1 auto; }
}

/* ── Long-form pages (privacy) ────────────────────────────────────────────── */

.doc { padding: 56px 0 72px; }

.doc .wrap { max-width: 760px; }

.doc-title {
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.8px;
  margin: 0;
  font-weight: 800;
}

.doc-date { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }

.doc-lede {
  color: var(--text);
  font-size: 17px;
  margin: 24px 0 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
}

.doc h2 {
  font-size: 21px;
  letter-spacing: -0.3px;
  margin: 44px 0 12px;
  font-weight: 700;
}

.doc p { color: var(--muted); margin: 0 0 14px; font-size: 15.5px; }
.doc p strong, .doc li strong { color: var(--text); font-weight: 650; }
.doc a { color: var(--primary); }
.doc a:hover { text-decoration: underline; }

.doc ul { color: var(--muted); font-size: 15.5px; padding-left: 20px; }
.doc li { margin-bottom: 10px; }

/* The table is the heart of the page, so it gets to be readable rather than
   dense. It scrolls inside itself on a phone instead of pushing the page
   sideways. */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}

.doc-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text);
  font-size: 12.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.doc-table td {
  padding: 13px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  min-width: 200px;
}

.doc-table tr:last-child td { border-bottom: 0; }

.doc-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}


/* ── Pricing ──────────────────────────────────────────────────────────────── */

/* Four across on a desktop, two on a tablet, one on a phone. The cards are
   built by script.js from the API rather than written in the HTML — see the
   comment on the section — so this has to look right with nothing in it as
   well as with four. */
.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
  align-items: stretch;
}

.plans-loading {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

.plan {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--card), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}

/* The plan most people should be on, marked so the eye lands on it. The
   accent border rather than a bigger card: making one card taller breaks the
   row, and this page is read on a phone where "taller" means "first". */
.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 140, 66, 0.2);
}

.plan .plan-tag {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
  /* Fixed, and the same whether the tag says anything or not, so the four
     headings and the four prices sit on the same lines across the row. Without
     the explicit line-height the one card that HAS a tag is four pixels taller
     than the three that do not, and the row reads as slightly broken. */
  display: block;
  line-height: 14px;
  min-height: 14px;
}

.plan h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.plan .price {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0;
}

.plan .price .per {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.plan .yearly {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.plan .limits {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.plan .limits li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 14px;
}

.plan .limits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--primary);
}

.plan.featured .limits li::before { background: var(--accent); }

.plan .tagline {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  /* Pushed to the bottom so the four cards' prices and bullet lists line up
     with each other however long the sentences are. */
  margin-top: auto;
  padding-top: 16px;
}

.plans-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 44em;
}


/* ── The request form ─────────────────────────────────────────────────────── */

.plan-form {
  margin-top: 36px;
  max-width: 760px;
  background: linear-gradient(180deg, var(--card), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { display: block; margin-bottom: 16px; }

.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 650;
}

.field > span em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.field input::placeholder,
.field textarea::placeholder { color: #5b628a; }

.field textarea { resize: vertical; }

.field.hidden { display: none; }

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.check input { width: 16px; height: 16px; accent-color: var(--primary); }

.suggestion {
  margin: 0 0 16px;
  min-height: 21px;
  font-size: 14.5px;
  color: var(--muted);
}

.suggestion strong { color: var(--accent); }

/* The honeypot. Taken out of the layout entirely rather than
   `display: none` — some bots skip fields that are display:none, and this one
   is meant to be found and filled. aria-hidden and tabindex="-1" in the markup
   keep it away from anybody using a keyboard or a screen reader. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.form-status { font-size: 14px; color: var(--muted); }
.form-status.ok { color: var(--success); }
.form-status.bad { color: var(--warning); }

.form-fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .plans { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .plan-form { padding: 24px 20px; }
}
