/* ==========================================================================
   WorkflowHub — marketing site shared styles
   Self-contained. System font stack. Light/dark via prefers-color-scheme.
   Chart series colors use the validated data-viz categorical palette.
   ========================================================================== */

:root {
  /* Brand */
  --brand:          #2a5fd6;
  --brand-deep:     #1c3f9e;
  --brand-tint:     #eaf1fd;
  --accent:         #4a3aa7;  /* violet */
  --accent-aqua:    #1baf7a;

  /* Surfaces & ink (light) */
  --plane:          #f7f8fb;
  --surface:        #ffffff;
  --surface-2:      #f2f4f8;
  --ink:            #0b0f19;
  --ink-2:          #4b5163;
  --muted:          #8a90a2;
  --border:         rgba(11,15,25,0.10);
  --border-strong:  rgba(11,15,25,0.16);
  --shadow-sm:      0 1px 2px rgba(11,15,25,0.06), 0 1px 3px rgba(11,15,25,0.05);
  --shadow-md:      0 6px 24px rgba(11,15,25,0.08), 0 2px 6px rgba(11,15,25,0.05);
  --shadow-lg:      0 18px 50px rgba(11,15,25,0.14);

  /* Chart series (validated categorical, light) */
  --s1: #2a78d6;  --s2: #1baf7a;  --s3: #eda100;  --s4: #008300;
  --s5: #4a3aa7;  --s6: #e34948;  --s7: #e87ba4;  --s8: #eb6834;
  --good: #0ca30c; --warn: #fab219; --crit: #d03b3b;
  --grid: #e6e8ef; --axis: #c3c6d1;

  --radius:   14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --maxw: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:          #5a8cf0;
    --brand-deep:     #3f6fd6;
    --brand-tint:     #16213b;
    --accent:         #9085e9;
    --accent-aqua:    #199e70;

    --plane:          #0b0d12;
    --surface:        #14171f;
    --surface-2:      #1b1f2a;
    --ink:            #f4f6fb;
    --ink-2:          #b6bccb;
    --muted:          #7f8798;
    --border:         rgba(255,255,255,0.10);
    --border-strong:  rgba(255,255,255,0.18);
    --shadow-sm:      0 1px 2px rgba(0,0,0,0.4);
    --shadow-md:      0 8px 28px rgba(0,0,0,0.5);
    --shadow-lg:      0 20px 60px rgba(0,0,0,0.6);

    --s1: #3987e5;  --s2: #199e70;  --s3: #c98500;  --s4: #37a537;
    --s5: #9085e9;  --s6: #e66767;  --s7: #d55181;  --s8: #d95926;
    --grid: #262b38; --axis: #3a4150;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--plane);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: .9rem;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--ink-2); max-width: 62ch; }
.muted-text { color: var(--muted); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 20px;
  height: 66px;
}
.brand-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-logo:hover { text-decoration: none; }
.brand-logo .mark { flex: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--ink-2); font-weight: 550; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--brand); }

/* Mobile nav (CSS-only disclosure) */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none; margin-left: auto; cursor: pointer;
  width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 9px;
  align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle-label svg { display: block; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 650; font-size: .96rem; padding: 11px 20px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: transform .06s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-deep); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 14px 26px; font-size: 1.03rem; }
.btn-nav { padding: 9px 16px; }

/* ---- Sections ---- */
section { padding: 76px 0; }
.section-tight { padding: 52px 0; }
.section-head { max-width: 64ch; margin-bottom: 42px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 72px;
  background:
    radial-gradient(1100px 520px at 78% -8%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 62%),
    radial-gradient(760px 420px at 6% 8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lede { margin-bottom: 1.7rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-note { font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-2); font-weight: 600; font-size: .82rem;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 1.3rem; box-shadow: var(--shadow-sm);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

.hero-visual {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px;
}

/* ---- Card grids ---- */
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card.hoverable:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-2); margin-bottom: 0; font-size: .96rem; }

.card-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; font-weight: 800; font-size: .95rem;
  background: var(--brand-tint); color: var(--brand); margin-bottom: 14px;
}
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-tint); color: var(--brand); margin-bottom: 16px;
}

/* ---- Feature list ---- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-2); }
.checklist svg { flex: none; margin-top: 3px; color: var(--good); }

/* ---- Chart / figure ---- */
figure.chart { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
figure.chart figcaption { color: var(--muted); font-size: .85rem; margin-top: 14px; }
.chart-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.chart-sub { color: var(--ink-2); font-size: .9rem; margin-bottom: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; font-size: .85rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 13px; height: 13px; border-radius: 4px; flex: none; }

/* ---- Comparison table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.compare { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 720px; }
table.compare th, table.compare td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.compare thead th { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
table.compare thead th.us { color: var(--brand); }
table.compare tbody th { font-weight: 600; color: var(--ink); }
table.compare td { text-align: center; }
table.compare td:first-child, table.compare tbody th { text-align: left; }
table.compare col.col-us, table.compare td.us-cell { background: color-mix(in srgb, var(--brand) 8%, transparent); }
table.compare tbody tr:last-child td, table.compare tbody tr:last-child th { border-bottom: none; }
.mk { font-weight: 800; }
.mk.yes { color: var(--good); }
.mk.no  { color: var(--crit); }
.mk.partial { color: var(--warn); }

/* ---- Badges (integrations) ---- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.badge {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 17px; box-shadow: var(--shadow-sm);
}
.badge .b-mark { flex: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--brand); }
.badge b { display: block; font-size: .96rem; }
.badge small { color: var(--muted); font-size: .82rem; }

/* ---- Pricing ---- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 28px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.price-tag { position: absolute; top: -13px; left: 28px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.price-name { font-size: 1.15rem; font-weight: 700; }
.price-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 2px; }
.price-amount small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.price-desc { color: var(--ink-2); font-size: .92rem; min-height: 42px; }
.price-card .btn { margin: 20px 0; justify-content: center; }
.price-card .checklist { font-size: .92rem; }

/* ---- Stat row ---- */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; color: var(--brand); }
.stat .lbl { color: var(--ink-2); font-size: .92rem; }

/* ---- Callout / CTA band ---- */
.cta-band {
  background: linear-gradient(120deg, var(--brand-deep), var(--brand) 55%, var(--accent));
  color: #fff; border-radius: var(--radius-lg); padding: 52px 44px; text-align: center; box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 56ch; margin: 0 auto 1.6rem; }
.cta-band .btn-primary { background: #fff; color: var(--brand-deep); }
.cta-band .btn-primary:hover { background: #f0f4ff; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---- Golden rule flow ---- */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.flow-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.flow-step.human { border-color: var(--brand); border-width: 2px; }
.flow-step h4 { margin-bottom: 6px; }
.flow-step p { font-size: .88rem; color: var(--ink-2); margin: 0; }
.flow-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.flow-tag.ai { color: var(--accent); }
.flow-tag.go { color: var(--good); }
.flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 0 8px; }

/* ---- Footer ---- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 30px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--ink-2); font-size: .92rem; }
.footer-grid a:hover { color: var(--brand); }
.footer-blurb { color: var(--ink-2); font-size: .92rem; max-width: 34ch; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 22px; color: var(--muted); font-size: .85rem; }
.mockup-tag { display: inline-flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .78rem; color: var(--ink-2); }

/* ---- Misc utility ---- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.tag-soon { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 8px; }

/* Worked-example (story) page */
.container.narrow { max-width: 760px; }
.pull-quote { margin: 26px 0; padding: 20px 26px; border-left: 4px solid var(--brand); background: var(--surface-2); border-radius: 0 12px 12px 0; font-size: 1.25rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; }
.soon-note { margin-top: 18px; color: var(--ink-2); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .cols-3, .cols-4, .price-grid, .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: 10px 0; }
  section { padding: 56px 0; }
}
@media (max-width: 620px) {
  .nav-links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px 16px 18px; box-shadow: var(--shadow-md);
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-toggle-label { display: inline-flex; }
  .nav-links a { padding: 12px; font-size: 1rem; }
  .nav-links .btn-nav { margin-top: 6px; text-align: center; justify-content: center; }
  .cols-2, .cols-3, .cols-4, .price-grid, .stat-row, .grid.cols-2 { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
  .badge-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
