/* ============================================================
   Kartik Menon Consulting — site template
   Goal: skimmable, readable, content-first.
   Single shared stylesheet for all pages.
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #fafaf8;
  --ink:       #111111;     /* body text & headings */
  --ink-2:     #3a3a3a;     /* secondary text */
  --ink-3:     #6b6b6b;     /* meta, labels */
  --rule:      #e8e6e1;     /* borders / hairlines */
  --rule-2:    #d4d2cc;
  --accent:    #c0392b;     /* used sparingly */
  --accent-bg: #fdf3f1;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", ui-serif, Georgia, Cambria, serif;

  --measure: 68ch;          /* readable line length */
  --gutter:  24px;
  --max:     1100px;        /* page max width */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
h4 { font-size: 1.05rem; line-height: 1.4; font-weight: 600; }

p { margin: 0; max-width: var(--measure); }
p + p { margin-top: 0.85em; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); color: var(--accent); }

strong { font-weight: 600; }
small { font-size: 0.875rem; color: var(--ink-3); }

ul, ol { margin: 0; padding: 0 0 0 1.25rem; }
li { margin: 0.25em 0; max-width: var(--measure); }
li::marker { color: var(--ink-3); }

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
}

/* ---------- layout primitives ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

.section {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: 0; }
.section.tinted {
  background: var(--bg-soft);
  border-top-color: var(--rule);
}
.section-head { margin-bottom: 40px; }
.section-head h2 { margin-bottom: 10px; }
.section-head .eyebrow { margin-bottom: 8px; }
.section-head .desc { color: var(--ink-3); font-size: 1.05rem; max-width: 60ch; }

/* ---------- nav ---------- */
.nav {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-brand .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--ink-2);
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta {
  font-size: 0.9rem;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  text-decoration: none;
}
.nav-cta:hover { background: var(--accent); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-secondary { border-color: var(--rule-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.btn-link:hover { color: var(--accent); text-decoration: underline; }
.btn-link::after { content: "→"; }

/* ---------- hero ---------- */
.hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.hero h1 { max-width: 18ch; }
.hero .lede { margin-top: 18px; }
.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- numbered list (method, steps) ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 28px;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  max-width: 720px;
}
.step-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
  padding-top: 2px;
}
.step h3 { margin-bottom: 8px; font-size: 1.35rem; }
.step p { color: var(--ink-2); }

/* ---------- service / generic two-col list ---------- */
.list-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-2col > li { max-width: none; margin: 0; }
.list-2col h3 { margin-bottom: 8px; }
.list-2col p { color: var(--ink-2); }

/* ---------- card grid ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.card {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
}
a.card:hover { background: var(--bg-soft); }
.card-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.card h3 { font-size: 1.35rem; }
.card p { color: var(--ink-2); font-size: 0.97rem; }
.card-metric {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
}
.card-cta {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}
.card-cta::after { content: " →"; }

/* ---------- experience list ---------- */
.exp {
  display: grid;
  gap: 40px;
}
.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}
.exp-meta { color: var(--ink-3); font-size: 0.9rem; }
.exp-meta .role { color: var(--ink); font-weight: 600; font-size: 1rem; display: block; margin-bottom: 2px; }
.exp-meta .co { display: block; margin-bottom: 4px; }
.exp-bullets { list-style: disc; padding-left: 1.1rem; }
.exp-bullets li { color: var(--ink-2); }

/* ---------- KPI strip ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.kpi {
  padding: 24px;
  border-right: 1px solid var(--rule);
}
.kpi:last-child { border-right: none; }
.kpi-n {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}
.kpi-n .unit { font-size: 1.25rem; color: var(--accent); font-weight: 500; }
.kpi-l {
  font-size: 0.9rem;
  color: var(--ink-3);
  line-height: 1.4;
}

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
table.data th, table.data td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data thead th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .result { color: var(--accent); font-weight: 600; }

/* ---------- callout / pull-quote ---------- */
.callout {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 32px 0;
  max-width: var(--measure);
}
.callout .q {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--bg-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 40px 0;
}
.cta-band-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h3 { margin-bottom: 6px; font-size: 1.5rem; }
.cta-band p { color: var(--ink-3); font-size: 1rem; margin: 0; }

/* ---------- page header (for inner pages) ---------- */
.page-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.page-header h1 { max-width: 20ch; }
.page-header .lede { margin-top: 16px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--ink-3);
  text-decoration: none;
  margin-bottom: 24px;
}
.back-link::before { content: "←"; }
.back-link:hover { color: var(--ink); }

/* ---------- form ---------- */
.form {
  display: grid;
  gap: 12px;
  max-width: 420px;
  margin-top: 24px;
}
.form input {
  padding: 11px 14px;
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
}
.form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.form button { cursor: pointer; border: 0; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
  color: var(--ink-3);
  font-size: 0.875rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a { color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 40px; }
  .list-2col,
  .cards { grid-template-columns: 1fr; }
  .cards { border-radius: 8px; }
  .exp-item { grid-template-columns: 1fr; gap: 8px; }
  .exp-meta .role { font-size: 1.05rem; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(2) { border-right: none; }
  .kpi:nth-child(1), .kpi:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .nav-links { display: none; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
}
