/* ============================================================
   Cognitivv — the dark site (2026-11-10)
   Loaded LAST on every page. The site was cream with charcoal bands; it is
   now charcoal throughout, in the style of the dither concept the founder
   picked: a near-black ground, warm charcoal bands that carry the ordered
   dither, cream type, hairline rules.

   Almost everything in components.css, pm.css, site.css and blog.css is
   written against tokens, so most of the change is here, in one :root: the
   light tokens are re-pointed at dark values. The two grounds keep their
   roles: --bg-cream (was the page) is the plain ground now, and
   --bg-charcoal (was the dark band) is the band, a step lighter, which is
   where the dither runs. Below the tokens are the few rules that had a
   light colour written in by hand.
   ============================================================ */
:root {
  color-scheme: dark;

  /* surfaces: ground, card, shelf */
  --bg-cream:        #131210;
  --bg-cream-soft:   #1a1816;
  --bg-cream-deep:   #221f1c;
  --bg-charcoal:     #1a1816;
  --bg-charcoal-2:   #221f1c;
  --bg-charcoal-3:   #2c2925;

  /* text: cream, in four steps. --fg-3 is the floor for running text
     (7.0:1 on the ground); --fg-4 is for rules-as-text only. */
  --fg-1:            #faf6ef;
  --fg-2:            #cdc5b7;
  --fg-3:            #a59c8e;
  --fg-4:            #7d7469;

  /* accents: the -ink weights were the darker shade for text on cream;
     on charcoal the readable weight is the -soft one */
  --accent-hover:    #f07b40;
  --accent-press:    #f4b89a;
  --accent-tint:     #3a2417;
  --p-bug-ink:       var(--p-bug-soft);
  --p-bug-tint:      #1d2532;
  --p-pm-ink:        var(--p-pm-soft);
  --p-pm-tint:       #1a2a21;
  --p-lms-ink:       var(--p-lms-soft);
  --p-lms-tint:      #3a2417;

  --success-tint:    #222b1b;
  --warning-tint:    #33291a;
  --danger-tint:     #351d17;
  --info-tint:       #1f2429;

  /* hairlines */
  --line-1:          rgba(250, 246, 239, 0.12);
  --line-2:          rgba(250, 246, 239, 0.20);
  --line-strong:     rgba(250, 246, 239, 0.40);

  --shadow-xs:  0 1px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md:  0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg:  0 4px 8px rgba(0, 0, 0, 0.4), 0 20px 48px rgba(0, 0, 0, 0.45);
  --shadow-inset: inset 0 1px 0 rgba(250, 246, 239, 0.05);
}
html, body { background: var(--bg-cream); color: var(--fg-1); }
::selection { background: var(--accent); color: #fff; }

/* ---- buttons: the solid one is cream, as in the concept; orange stays
   for the accent link colour, not for slabs of button ---- */
.btn-primary { background: var(--fg-1); color: #1a1816; border-color: var(--fg-1); }
.btn-primary:hover { background: #fff; border-color: #fff; color: #1a1816; }
.btn-primary:active { background: #e9e2d6; }
.btn-ghost:hover { border-color: var(--fg-1); background: rgba(250, 246, 239, 0.05); }

/* ---- the bleed squares come off: on a dark page a flat block of accent
   at the edge reads as a stray panel, and the dither concept the redo is
   built from has none. Restore by deleting this rule. ---- */
.band::after,
.how::after, .uses::after, .features::after,
.why::after, .preview-sec::after, .cta-section::after { content: none; }

/* ---- the hero's big button reads cream on the dark box (it took
   --bg-cream-soft, which is a dark card colour now) ---- */
.btn-pill { background: var(--fg-1); color: #1a1816; }
.btn-pill:hover { background: #fff; }

/* ---- every button is a pill, as in the concept. pm.css drew them
   square and site.css round; the founder looked at sharp corners on
   2026-11-10 and kept the round ones. ---- */
.btn { border-radius: var(--r-pill); }

/* ---- the embedded Tally form. The page is color-scheme: dark and the
   form's document is not, and when the two differ the browser paints an
   opaque backdrop (white) behind the iframe, so the form sat on a white
   slab whatever colours it was given. Matching the iframe element's
   scheme to the document inside it keeps the frame transparent, which is
   what the embed's transparentBackground=1 asks for. ---- */
.contact-form iframe { color-scheme: normal; }
