/* Kritaare marketing site — shared styles.
   Palette mirrors lib/app_theme.dart so the site and the app read as one brand.
   No webfont CDN on purpose: a privacy page should not leak visitor IPs to a
   font host. System stack only. */

:root {
  --emerald: #16a34a;
  --emerald-deep: #15803d;
  --emerald-tint: #e7f6ec;
  --forest-ink: #0b1f16;
  --forest-ink-soft: #123324;
  --mint: #5be49b;

  --canvas: #f6f8f6;
  --surface: #ffffff;
  --ink: #121b14;
  --slate: #64716a;
  --ink-faint: #b7c0b9;
  --hairline: #e4e9e5;

  --radius: 18px;
  --radius-pill: 999px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --emerald: #4ade80;
    --emerald-deep: #4ade80;
    --emerald-tint: #16301e;
    --canvas: #10140f;
    --surface: #171d18;
    --ink: #e9eee9;
    --slate: #9aa79e;
    --ink-faint: #5c685f;
    --hairline: #262e28;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Devanagari",
    "Noto Sans Kannada", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 68px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

/* The Kritaare mark is a tall seedling — keep its own aspect ratio rather than
   boxing it into a square. Source: assets/images/kritaare_mark.svg. */
.brand .mark {
  height: 38px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--emerald-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.hero {
  background: var(--forest-ink);
  color: #ffffff;
  padding: 84px 0 92px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 6vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 18ch;
}

.hero p {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: #c7d6cd;
  max-width: 54ch;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--forest-ink-soft);
  color: var(--mint);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--emerald);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #12903f;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--mint);
  color: var(--mint);
}

/* ── Feature grid ───────────────────────────────────────── */

.section {
  padding: 72px 0;
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.02em;
  font-weight: 750;
}

.section .lede {
  margin: 0 0 40px;
  color: var(--slate);
  max-width: 56ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

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

.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--emerald-tint);
  color: var(--emerald-deep);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.card .icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--slate);
  font-size: 0.96rem;
}

/* ── Long-form document pages ───────────────────────────── */

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

.doc-head {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 28px;
  margin-bottom: 40px;
}

.doc-head h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}

.doc-meta {
  margin: 0;
  color: var(--slate);
  font-size: 0.92rem;
}

.doc-body {
  max-width: var(--measure);
}

.doc-body h2 {
  margin: 46px 0 12px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-weight: 730;
  scroll-margin-top: 90px;
}

.doc-body h3 {
  margin: 30px 0 8px;
  font-size: 1.06rem;
  font-weight: 690;
}

.doc-body p,
.doc-body li {
  color: var(--ink);
}

.doc-body ul,
.doc-body ol {
  padding-left: 22px;
}

.doc-body li {
  margin-bottom: 9px;
}

.doc-body a {
  color: var(--emerald-deep);
  text-underline-offset: 3px;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 8px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  font-weight: 700;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  margin-bottom: 5px;
  break-inside: avoid;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* Definition-style table for the "what we collect" matrix. Scrolls on its own
   rather than forcing the page sideways. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 20px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 13px 18px;
  border-bottom: 1px solid var(--hairline);
}

th {
  font-weight: 680;
  color: var(--ink);
  background: var(--emerald-tint);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* On a phone a 3-column table would scroll sideways, so it becomes a stack of
   labelled cards instead. Labels come from each cell's data-label. Nothing is
   hidden or truncated either way. */
@media (max-width: 640px) {
  .table-scroll {
    overflow-x: visible;
    border: none;
    background: none;
    border-radius: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: auto;
    min-width: 0;
  }

  thead {
    /* Header text is repeated per cell via data-label. */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  tbody tr {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 6px 18px 14px;
    margin-bottom: 14px;
  }

  tbody td {
    border-bottom: none;
    padding: 10px 0 0;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 2px;
  }

  /* First cell is the row's subject — read it as the card title. */
  tbody td:first-child {
    font-weight: 680;
    font-size: 1.05rem;
    padding-top: 12px;
  }

  tbody td:first-child::before {
    display: none;
  }
}

.callout {
  border-left: 4px solid var(--emerald);
  background: var(--emerald-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 26px 0;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 10px;
}

.callout.warn {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

/* Numbered steps on the deletion page. */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 24px 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 52px;
  margin-bottom: 24px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--emerald);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.steps li strong {
  display: block;
  margin-bottom: 2px;
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding: 40px 0;
  color: var(--slate);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--slate);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--emerald-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Visible keyboard focus everywhere — the default ring disappears against
   the forest-ink hero. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Centered not-found page. */
.center-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 0;
}
