/* ==========================================================================
   scaleflow.ca — site.css
   Layer 1: design tokens (retheme the whole site from this block alone)
   Layer 2: the block library's 16 base classes — DO NOT RENAME, the blocks
            in /blocks/ depend on these exact names
   Layer 3: site chrome shared by every page (nav, footer, cards, grids)
   ========================================================================== */

/* ── Layer 1 · Design tokens ─────────────────────────────────────────────── */
:root {
  --ink:        #0b1220;   /* body text, headings */
  --muted:      #5b6b7d;   /* secondary text */
  --cream:      #f5f8fb;   /* alternating section background */
  --line:       #e2e8f0;   /* hairlines, borders */
  --accent:     #1a56db;   /* buttons, links, emphasis */
  --accent-ink: #ffffff;   /* text ON the accent colour */
  --radius:     12px;
}

/* ── Layer 2 · Base (block library contract) ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 750; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }
a  { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.cream { background: var(--cream); }

.section-head { max-width: 46rem; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.section-head > :last-child { margin-bottom: 0; }

.eyebrow {
  margin: 0 0 .6rem; font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.lead { font-size: 1.125rem; color: var(--muted); }

.btn {
  display: inline-block; padding: .85rem 1.6rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 650; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .94; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-blue  { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(26,86,219,.22); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-dark  { background: var(--ink); color: #fff; }

.hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.features { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.feature { padding: 1.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.feature > :last-child { margin-bottom: 0; }

.cta { padding: clamp(2.5rem, 6vw, 4rem); background: var(--ink); color: #fff; border-radius: var(--radius); text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #c3cede; max-width: 40rem; margin-inline: auto; }
.cta a { color: #fff; }

.before { position: relative; }

/* ── Layer 3 · Site chrome (every page) ──────────────────────────────────── */

/* Skip link */
.skip { position: absolute; left: -9999px; background: var(--accent); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0; }
.skip:focus { left: 0; top: 0; z-index: 100; }

/* Header */
.nav { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: saturate(140%) blur(8px); position: sticky; top: 0; z-index: 20; }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1rem 0; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 550; }
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-cta { padding: .5rem 1.05rem; font-size: .88rem; }

/* Hero with side panel */
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.hero-panel { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 2rem; }
.hero-panel h3 { color: #fff; font-size: .95rem; letter-spacing: .01em; }
.hero-panel ul { list-style: none; margin: 0; padding: 0; }
.hero-panel li { padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.13); font-size: .94rem; color: #cbd6e4; }
.hero-panel li:last-child { border-bottom: 0; padding-bottom: 0; }

/* Stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-n { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 0 0 .2rem; }
.stat-l { font-size: .86rem; color: var(--muted); margin: 0; }

/* Demo / link cards */
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.dcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; text-decoration: none; color: inherit; display: block; transition: transform .18s ease, box-shadow .18s ease; }
.dcard:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(11,18,32,.10); }
.dcard-ph { aspect-ratio: 16/10; background: var(--cream); border-bottom: 1px solid var(--line); }
.dcard-ph img { width: 100%; height: 100%; object-fit: cover; }
.dcard-bd { padding: 1.3rem 1.4rem 1.5rem; }
.dcard h3 { margin-bottom: .35rem; font-size: 1.05rem; }
.dcard p { font-size: .9rem; color: var(--muted); margin-bottom: .8rem; }
.dcard .go { font-size: .85rem; font-weight: 700; color: var(--accent); }

/* Numbered steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.25rem; counter-reset: s; }
.step { counter-increment: s; }
.step h3 { display: flex; align-items: center; gap: .65rem; }
.step h3::before {
  content: counter(s); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.95rem; height: 1.95rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .88rem; font-weight: 700;
}

/* Quote cards */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.quote p { font-size: .96rem; }
.quote cite { font-style: normal; font-size: .85rem; color: var(--muted); font-weight: 650; }

/* Definition rows (contact sheet, spec lists) */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 13rem 1fr; gap: 1.5rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.row dt { font-weight: 650; color: var(--ink); margin: 0; }
.row dd { margin: 0; color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 2.75rem 0; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid, .dgrid, .steps, .quotes { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 1fr; gap: .25rem; }
}

/* ── Accessibility + print ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .btn, .cta { box-shadow: none; }
  .section { padding: 1rem 0; }
  .nav { position: static; }
}
