/* Helpling SG x TheProjectSEO — shared styles */
:root {
  --ink: #0e1a14;
  --ink-soft: #2a3a32;
  --muted: #6a7670;
  --line: #e2dccc;
  --paper: #f6f1e7;
  --paper-deep: #efe7d4;
  --paper-card: #fffcf3;
  --accent: #1f4d3f;
  --accent-2: #2f6b4f;
  --accent-soft: #d8e3d8;
  --positive: #2f6b4f;
  --negative: #a4452a;
  --gold: #b08a3e;
  --shadow: 0 1px 3px rgba(14, 26, 20, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

/* ====== Top bar + nav ====== */
.brandbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.brandbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; padding-bottom: 18px;
  flex-wrap: wrap; gap: 16px;
}
.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; font-size: 18px;
  letter-spacing: -0.005em; color: var(--ink);
}
.brand small {
  display: block; font-family: 'Inter';
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  font-weight: 500; margin-top: 3px;
}
nav.pages {
  display: flex; gap: 28px; flex-wrap: wrap;
  font-size: 13px;
}
nav.pages a {
  color: var(--muted); text-decoration: none;
  font-weight: 500; padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}
nav.pages a:hover { color: var(--ink); }
nav.pages a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ====== Hero ====== */
.page-hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 18px; font-weight: 600;
}
.page-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 22px;
  max-width: 780px;
}
.page-hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.page-hero p.lead {
  font-size: 17px; color: var(--ink-soft);
  max-width: 700px; line-height: 1.55;
}

/* ====== Section heads ====== */
.section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: none; }
.section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 14px;
}
.section h2 em { font-style: italic; color: var(--accent); }
.section .lead {
  font-size: 16px; color: var(--ink-soft);
  max-width: 720px; line-height: 1.6;
  margin-bottom: 36px;
}
.section h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px; font-weight: 500;
  margin-bottom: 14px; color: var(--ink);
}

/* ====== Stat tiles ====== */
.tiles {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 8px;
}
.tile {
  border: 1px solid var(--line);
  background: var(--paper-card);
  border-radius: 4px;
  padding: 26px 24px 24px;
  box-shadow: var(--shadow);
}
.tile .label {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  font-weight: 600; margin-bottom: 16px;
}
.tile .num {
  font-family: 'Fraunces', serif;
  font-size: 38px; font-weight: 500;
  line-height: 1; color: var(--ink);
  margin-bottom: 10px; letter-spacing: -0.01em;
}
.tile .num small {
  font-size: 16px; color: var(--muted);
  font-weight: 400; margin-left: 4px;
}
.tile .delta { font-size: 12px; color: var(--positive); font-weight: 600; }
.tile .delta.down { color: var(--negative); }
.tile .delta.flat { color: var(--muted); }
.tile .note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

/* ====== Chart panel ====== */
.panel {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px 30px 24px;
  margin-top: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.panel-title {
  font-family: 'Fraunces', serif; font-size: 19px;
  font-weight: 500; color: var(--ink); margin: 0 0 4px;
}
.panel-sub { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
svg { display: block; max-width: 100%; height: auto; }

.chart-frame {
  width: 100%;
  margin-top: 8px;
}

/* ====== Two-column ====== */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 36px; margin-top: 32px;
}
.three-col {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 32px;
}

/* ====== Tables ====== */
.tbl {
  width: 100%; border-top: 1px solid var(--line);
  margin-top: 24px;
}
.tbl-row {
  display: grid; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.tbl-head {
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  font-weight: 600;
}
.tbl-row .term { font-weight: 500; color: var(--ink); }
.tbl-row .pos {
  font-family: 'Fraunces', serif; font-size: 17px;
  font-weight: 500; text-align: center;
}
.tbl-row .pos.win { color: var(--positive); }
.tbl-row .pos.was { color: var(--muted); }
.tbl-row .arrow { color: var(--muted); text-align: center; }
.tbl-row .v { font-family: 'Fraunces', serif; font-weight: 500; }
.tbl-row .v.up { color: var(--positive); }
.tbl-row .v.down { color: var(--negative); }
.tbl-row .v.gap { color: var(--gold); }

/* ====== Callout ====== */
.callout {
  margin-top: 32px; padding: 28px 32px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
}
.callout .label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--accent);
  font-weight: 600; margin-bottom: 10px;
}
.callout p {
  font-family: 'Fraunces', serif;
  font-size: 18px; line-height: 1.5;
  color: var(--ink); font-weight: 400;
}
.callout p em { font-style: italic; color: var(--accent); }

/* ====== Status pills ====== */
.pill {
  display: inline-block;
  font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 4px 8px;
  border-radius: 2px; font-weight: 600;
}
.pill-live { background: var(--positive); color: white; }
.pill-shipping { background: var(--accent); color: white; }
.pill-draft { background: var(--gold); color: white; }
.pill-proposed { background: #555; color: white; }

/* ====== Cards ====== */
.card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; margin-top: 32px;
}
.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 26px 22px;
}
.card .step-num {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 14px; color: var(--gold);
  font-weight: 400; margin-bottom: 10px;
}
.card h4 {
  font-family: 'Fraunces', serif;
  font-size: 19px; font-weight: 500;
  color: var(--ink); margin: 0 0 10px;
  line-height: 1.25;
}
.card p {
  font-size: 13.5px; line-height: 1.55;
  color: var(--ink-soft); margin: 0 0 12px;
}
.card .meta {
  font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 12px;
  letter-spacing: 0.04em;
}

/* dark variant */
.section.dark {
  background: #0e1a14; color: #e8e3d3;
  border-color: rgba(255,255,255,0.08);
}
.section.dark h2 { color: #fbf4e2; }
.section.dark .lead { color: #c8d0c2; }
.section.dark .sub { color: #a8b1a3; }
.section.dark .card {
  background: rgba(255,252,243,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.section.dark .card .step-num { color: #c5b88a; }
.section.dark .card h4 { color: #fbf4e2; }
.section.dark .card p { color: #c4cdc1; }
.section.dark .card .meta { color: #8e9c8d; border-color: rgba(255,255,255,0.08); }

/* ====== Footer ====== */
footer.global {
  padding: 48px 0 36px;
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
}
footer.global .wrap {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: var(--muted);
}
footer.global strong { color: var(--ink); font-weight: 500; }

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .two-col, .three-col, .card-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 56px 0; }
  .page-hero { padding: 56px 0 48px; }
  .panel { padding: 22px 18px; }
  nav.pages { gap: 16px; font-size: 12.5px; }
  .brandbar .wrap { padding-top: 14px; padding-bottom: 14px; }
}
