/* ==========================================================================
   aaronkinder — theme tokens
   Colors, type, and spacing for light and dark. Loaded by the site and by the admin area.
   ========================================================================== */


/* 1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg: #faf9f5;
  --ink: #141413;
  --ink-2: #3d3d3a;
  --muted: #696862;          /* 5.3:1 on --bg, 4.8:1 on --panel (WCAG AA); was #87867f at 3.5:1 */
  --muted-2: #b0aea5;
  --rule: #e8e6dc;
  --rule-dark: #3a3938;
  --panel: #f0eee6;
  --panel-2: #e5e1d8;
  --ink-3: #5e5d59;        /* hover shade for ink links */
  --accent: #5b8fb9;       /* frost: decorative only (underlines, arrows, rules) */
  --accent-ink: #2f6a9a;   /* frost-interactive: the only blue allowed on text */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1280px;
  --gutter: max(clamp(20px, 4vw, 32px), env(safe-area-inset-left));
  --col-gap: clamp(24px, 4vw, 48px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  /* Tokens that differ between themes for reasons other than a straight swap */
  --rule-strong: var(--ink);                 /* section dividers: ink in light, a mid-grey in dark */
  --header-bg: rgba(250, 249, 245, .82);     /* frosted header once scrolled */
  --header-bg-0: rgba(250, 249, 245, 0);
  --pop-bg: var(--bg);                       /* dropdown panels */
  --pop-shadow: 0 12px 40px rgba(20, 20, 19, .10);
  --foot-bg: #141413;                        /* the footer is dark in both themes, so it has its own colors */
  --foot-ink: #faf9f5;
  --foot-rule: transparent;
  --img-filter: none;                        /* dark: takes the glare off white screenshots */
  --img-edge: transparent;                   /* dark: hairline so dark photos keep an edge */
  --ph-filter: none;                         /* dark: placehold.co images have light colors baked in */
  color-scheme: light;
}

/* 1b. Dark theme
   Auto (no data-theme) follows the device; the Appearance control in the footer sets data-theme
   to "light" or "dark" (main.js, and the inline script in build.py that runs before first paint).
   The two blocks below must stay identical. The surface colors (#141413, #262624, #30302e, #faf9f5)
   are the ones anthropic.com uses for its dark sections.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413;
    --ink: #faf9f5;            /* 17.5:1 on --bg */
    --ink-2: #c9c7be;          /* 10.9:1 */
    --muted: #9b9991;          /* 6.5:1 on --bg, 5.3:1 on --panel */
    --rule: #30302e;
    --rule-strong: #5a5852;
    --panel: #262624;
    --panel-2: #30302e;
    --ink-3: #d6d4cb;
    --accent: #6ea3cd;
    --accent-ink: #8dbbe0;     /* 9.1:1; the light theme's #2f6a9a is only 3.1:1 here */
    --header-bg: rgba(20, 20, 19, .82);
    --header-bg-0: rgba(20, 20, 19, 0);
    --pop-bg: #262624;
    --pop-shadow: 0 16px 48px rgba(0, 0, 0, .5);
    --foot-bg: #0e0e0d;
    --foot-rule: #30302e;
    --img-filter: brightness(.88);
    --img-edge: rgba(250, 249, 245, .08);
    --ph-filter: invert(.92) hue-rotate(180deg);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141413;
  --ink: #faf9f5;            /* 17.5:1 on --bg */
  --ink-2: #c9c7be;          /* 10.9:1 */
  --muted: #9b9991;          /* 6.5:1 on --bg, 5.3:1 on --panel */
  --rule: #30302e;
  --rule-strong: #5a5852;
  --panel: #262624;
  --panel-2: #30302e;
  --ink-3: #d6d4cb;
  --accent: #6ea3cd;
  --accent-ink: #8dbbe0;     /* 9.1:1; the light theme's #2f6a9a is only 3.1:1 here */
  --header-bg: rgba(20, 20, 19, .82);
  --header-bg-0: rgba(20, 20, 19, 0);
  --pop-bg: #262624;
  --pop-shadow: 0 16px 48px rgba(0, 0, 0, .5);
  --foot-bg: #0e0e0d;
  --foot-rule: #30302e;
  --img-filter: brightness(.88);
  --img-edge: rgba(250, 249, 245, .08);
  --ph-filter: invert(.92) hue-rotate(180deg);
  color-scheme: dark;
}
