/* ==========================================================================
   Pro Bookkeepers - shell. Loaded FIRST on every page.
   Brand tokens (the single source: BRAND.md section 3), plus the chrome every
   page shares: top bar, header, buttons, inline email capture, footer.
   Page layers load after it: style.css (inner pages) or home.css (homepage).
   Run tools/check-contrast.py after changing any colour here.
   ========================================================================== */

:root {
  --ink: #0D1B2A;
  --ink-800: #142740;
  --ink-600: #1E3C5E;
  --slate: #48566A;          /* body text */
  --muted: #5C6B7F;
  --accent: #00A872;         /* emerald: fills, rules, decoration. Ink text on it, never white */
  --accent-dark: #007A52;    /* emerald as text on light */
  --accent-soft: #DDF7EC;
  --surface: #F3F5F7;        /* mist */
  --surface-2: #E8ECF1;
  --line: #DFE5EB;
  --line-strong: #C9D3DD;
  --white: #FFFFFF;
  --positive: #1F7A54;       /* money in, semantic only */
  --negative: #A83A24;       /* money out, semantic only */

  /* short aliases used by home.css */
  --text: var(--slate);
  --accent-dk: var(--accent-dark);
  --soft: var(--surface);
  --bg: var(--white);
  --card: var(--white);
  --pos: var(--positive);
  --neg: var(--negative);

  --display: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: var(--sans);
  --mono: var(--sans);       /* labels and figures: tabular Schibsted Grotesk, never monospace */
  /* Type scale: the ONLY heading sizes on the site. Page layers point here,
     never at their own clamp(), so a heading of the same rank is the same
     size on every page. */
  --fs-h1: clamp(2.5rem, 5vw, 4rem);              /* page title, 64px max */
  --fs-h2: clamp(2rem, 3.8vw, 3.25rem);           /* section heading, 52px max */
  --fs-h2-card: clamp(1.75rem, 3vw, 2.5rem);      /* h2 set inside a panel */
  --fs-h2-article: clamp(1.5rem, 2.4vw, 1.75rem); /* h2 in long-form reading */
  --fs-h3-lg: clamp(1.375rem, 2.2vw, 1.75rem);    /* feature tile titles */
  --fs-h3: 1.25rem;                               /* card and step titles */
  --tr-display: -.02em;                           /* h1/h2 tracking */
  --gut: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
}

[hidden] { display: none !important; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #C3CCD8; text-align: center; font: 500 .8125rem/1.4 var(--sans); padding: .6rem var(--gut); display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.topbar b, .topbar strong { color: #fff; font-weight: 500; }
.topbar a { color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header.is-stuck { box-shadow: 0 1px 0 var(--line); }
.nav { display: flex; align-items: center; gap: 2rem; height: 70px; position: relative; }
.brand { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; flex-shrink: 0; }
.brand__logo { height: 30px; width: auto; display: block; }
.site-footer .brand__logo { height: 32px; }
.nav__links { display: flex; gap: 1.9rem; list-style: none; margin: 0; padding: 0; }
.nav__links li { margin: 0; }
.nav__links a { color: var(--ink); text-decoration: none; font: 500 .9375rem/1.3 var(--sans); }
.nav__links a:hover, .nav__links a[aria-current] { color: var(--accent-dark); }
.nav__cta { display: flex; align-items: center; gap: .6rem; }
.nav__toggle { display: none; }

/* ---------- Buttons ----------
   Emerald fills take ink text: white on emerald is 3.07:1 and fails AA. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 .9375rem/1.2 var(--sans); padding: .8rem 1.15rem; border-radius: 10px; border: 1.5px solid transparent; text-decoration: none !important; cursor: pointer; white-space: nowrap; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 1rem 1.4rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--accent, .btn--primary { background: var(--accent); color: var(--ink); box-shadow: 0 8px 22px -10px rgba(0,168,114,.8); }
.btn--accent:hover, .btn--primary:hover { background: #00BD80; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-800); color: #fff; }
.btn--line, .btn--ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn--line:hover, .btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--surface-2); }
.btn--line-light, .btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--line-light:hover, .btn--outline-light:hover { border-color: #fff; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .65rem; }
.btn-row.center { justify-content: center; }

/* ---------- Inline email capture ---------- */
.lead-mini { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 480px; }
.lead-mini input[type=email] { flex: 1; min-width: 0; font: 400 1rem var(--sans); padding: .85rem 1rem; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.lead-mini input[type=email]:focus { outline: none; border-color: var(--ink); }
.lead-mini .btn { flex-shrink: 0; }
.lead-mini--stack { flex-direction: column; }
.lead-note { font-size: .8125rem; color: inherit; margin: .75rem 0 0; }
.lead-note a { color: inherit; }
.lead-mini .lead-note { flex-basis: 100%; margin: 0; }
.form-status:empty { display: none; }
.form-status { display: block; font-size: .9375rem; margin: .8rem 0 0; background: #fff; color: var(--ink); padding: .7rem .9rem; border-radius: 8px; border: 1px solid var(--line); }
.form-status.is-ok { color: var(--positive); }
.form-status.is-err { color: var(--negative); }
.form-status a { color: var(--accent-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9DAAB9; padding: 4.5rem 0 2rem; font-size: .9375rem; }
.site-footer a { color: #E6EBF1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer__brand p { margin-top: 1.1rem; max-width: 38ch; }
.footer__grid h4 { font: 500 .8125rem/1 var(--sans); letter-spacing: .01em; color: #7F8DA0; margin: 0 0 1.1rem; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer__grid li { margin: 0; }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid #1E3246; font: 400 .75rem/1.5 var(--sans); color: #7F8DA0; }

/* ---------- Narrow screens ---------- */
@media (max-width: 820px) {
  .nav__links { display: none; position: absolute; top: 100%; left: calc(var(--gut) * -1); right: calc(var(--gut) * -1); flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem var(--gut) 1rem; }
  .nav__links.is-open { display: flex; }
  .nav__links a { display: block; padding: .75rem 0; font-size: 1.0625rem; }
  .nav__toggle { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
  .nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { content: ''; display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
  .nav__toggle span::before { position: absolute; top: -6px; }
  .nav__toggle span::after { position: absolute; top: 6px; }
  .nav__cta .btn { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .lead-mini { flex-direction: column; }
  .lead-mini .btn { width: 100%; }
}
@media print { .site-header, .topbar { display: none; } }

/* ---------- Imagery (shared) ----------
   Rendered "photographs" of our own deliverables (assets/img/_src/scenes.html).
   Every image carries a visible "Illustrative figures" caption. */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 30px 60px -36px rgba(13,27,42,.55); }
.shot figcaption { margin-top: .75rem; font: 400 .875rem/1.5 var(--sans); color: var(--muted); }
.shot figcaption span { display: inline-block; margin-left: .35rem; padding: .1rem .45rem; border: 1px solid var(--line); border-radius: 5px; font-size: .75rem; color: var(--slate); white-space: nowrap; }
.shot-band__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.shot-band__copy h2 { margin-bottom: 1rem; }
.shot-band__copy p { font-size: 1.0625rem; color: var(--slate); max-width: 46ch; }
.shot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) {
  .shot-band__grid, .shot-pair { grid-template-columns: minmax(0, 1fr); }
}

/* Schibsted Grotesk's tabular figures set commas and points on a full figure
   width ("5 , 388"). Use its proportional figures everywhere; tables are
   right-aligned, so columns still read cleanly. Revisit if the face changes. */
*, *::before, *::after { font-variant-numeric: normal !important; font-feature-settings: normal !important; }
