/* Clovercoder tokens. Dark is the home theme (black + white dots). Light is the same system inverted.
   Switch with <html data-theme="light|dark">; without it the OS setting decides. */
@font-face{font-family:"Geist";src:url(../fonts/geist-400-700.woff2) format("woff2");font-weight:400 700;font-display:swap}
@font-face{font-family:"Geist Mono";src:url(../fonts/geistmono-400-500.woff2) format("woff2");font-weight:400 500;font-display:swap}

:root{
  /* colour: dark (default) */
  --cc-bg:#000000;
  --cc-surface:#0A0A0A;
  --cc-raised:#111111;
  --cc-line:#1F1F1F;
  --cc-line-strong:#333333;
  --cc-text:#FFFFFF;
  --cc-muted:#A3A3A3;      /* 8.3:1 on bg */
  --cc-faint:#8A8A8A;      /* 6.1:1 on bg, 5.5:1 on raised */
  --cc-dot:#FFFFFF;        /* halftone ink */
  --cc-accent:#4ADE80;     /* the one accent: signal green. 12:1 on bg */
  --cc-on-accent:#000000;
  --cc-danger:#FF6B6B;     /* errors and destructive only, not decoration */
  --cc-scrim:rgba(0,0,0,.72);
  --cc-focus:var(--cc-accent);

  /* type */
  --cc-sans:"Geist",ui-sans-serif,-apple-system,"Segoe UI",Arial,sans-serif;
  --cc-mono:"Geist Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --cc-fs-xs:12px;  --cc-lh-xs:16px;
  --cc-fs-sm:14px;  --cc-lh-sm:20px;
  --cc-fs-md:16px;  --cc-lh-md:24px;
  --cc-fs-lg:18px;  --cc-lh-lg:28px;
  --cc-fs-h3:24px;  --cc-lh-h3:30px;
  --cc-fs-h2:clamp(28px,3.2vw,40px); --cc-lh-h2:1.12;
  --cc-fs-h1:clamp(48px,7vw,96px);   --cc-lh-h1:.98;
  --cc-fs-display:clamp(56px,10vw,144px); --cc-lh-display:.92;
  --cc-track-tight:-.035em; --cc-track-display:-.05em;

  /* space: one scale, nothing in between */
  --cc-s1:4px; --cc-s2:8px; --cc-s3:12px; --cc-s4:16px; --cc-s5:24px;
  --cc-s6:32px; --cc-s7:48px; --cc-s8:64px; --cc-s9:96px; --cc-s10:128px;

  /* radius */
  --cc-r-sm:4px; --cc-r-md:6px; --cc-r-lg:10px; --cc-r-full:999px;

  /* grid */
  --cc-pad:clamp(20px,5vw,64px);
  --cc-max:1200px;
  --cc-gutter:24px;
  --cc-sidebar:248px; --cc-rail:56px; --cc-list:340px;

  /* elevation: borders first, shadows almost never */
  --cc-ring:0 0 0 1px var(--cc-line-strong);
  --cc-pop:0 0 0 1px var(--cc-line-strong),0 12px 32px rgba(0,0,0,.55);

  /* motion */
  --cc-dur-1:90ms; --cc-dur-2:150ms; --cc-dur-3:240ms; --cc-dur-4:400ms;
  --cc-ease:cubic-bezier(.2,.7,.2,1);
  --cc-ease-in:cubic-bezier(.4,0,1,1);

  /* halftone */
  --cc-pitch:12px;         /* lattice step; use 8, 12, 16 or 24 */
}

:root[data-theme="light"]{
  --cc-bg:#FFFFFF; --cc-surface:#F5F5F5; --cc-raised:#FFFFFF;
  --cc-line:#E5E5E5; --cc-line-strong:#CFCFCF;
  --cc-text:#0A0A0A; --cc-muted:#525252; --cc-faint:#6B6B6B;
  --cc-dot:#0A0A0A;
  --cc-accent:#15803D; --cc-on-accent:#FFFFFF;
  --cc-danger:#C62828;
  --cc-scrim:rgba(255,255,255,.78);
  --cc-pop:0 0 0 1px var(--cc-line-strong),0 12px 32px rgba(0,0,0,.10);
}
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]){
    --cc-bg:#FFFFFF; --cc-surface:#F5F5F5; --cc-raised:#FFFFFF;
    --cc-line:#E5E5E5; --cc-line-strong:#CFCFCF;
    --cc-text:#0A0A0A; --cc-muted:#525252; --cc-faint:#6B6B6B;
    --cc-dot:#0A0A0A;
    --cc-accent:#15803D; --cc-on-accent:#FFFFFF;
    --cc-danger:#C62828;
    --cc-scrim:rgba(255,255,255,.78);
    --cc-pop:0 0 0 1px var(--cc-line-strong),0 12px 32px rgba(0,0,0,.10);
  }
}

/* motion: reduced motion removes movement, keeps state changes instant */
@media (prefers-reduced-motion:reduce){
  :root{--cc-dur-1:0ms;--cc-dur-2:0ms;--cc-dur-3:0ms;--cc-dur-4:0ms}
}
