/* Atomic Signs — design tokens.
 *
 * Taken from design_handoff_atomic_signs/tokens.css verbatim. Additive only:
 * this file declares custom properties on :root and styles nothing, so it
 * cannot disturb Bootstrap, WooCommerce or the sticker studio. Step 1 of the
 * handoff's migration order, and the one step that is safe to do globally
 * before anything has been rebuilt.
 *
 * The --atomic-* names are the shop's existing ones and are kept verbatim.
 */
:root {
  /* ---- Brand (existing names — do not rename) ---- */
  --atomic-blue:         #1ab0e0;
  --atomic-blue-ink:     #0d7aa0; /* the brand blue as small text: 4.87:1 on white, AA (the focus-ring table below) */
  --atomic-dark:         #2d3445;
  --atomic-darker:       #242938;
  --atomic-white:        #ffffff;
  --atomic-input-bg:     #3a4156;
  --atomic-input-border: #4e5670;

  /* ---- Derived surface / text ---- */
  --color-text:          #2d384b; /* body + headings on light */
  --color-text-muted:    #555b68; /* secondary copy, captions (AA on white) */
  --color-text-invert:   #ffffff;
  --color-surface:       #ffffff;
  --color-surface-alt:   #e4e4e4; /* alternating section band */
  --color-surface-tint:  #e3f6fc; /* blue 10% — icon tiles, soft panels */
  --color-border:        rgba(45, 56, 75, 0.18); /* standard 1.5px card border */
  --color-border-soft:   rgba(45, 56, 75, 0.12);
  --color-placeholder:   #9aa0ad;
  --color-positive:      #2fa45c; /* "has it": the compare table's filled ✓ ([Z-GREEN], 2026-11-14) */

  /* ---- Typography ---- */
  --font-sans: 'Poppins', system-ui, -apple-system, sans-serif;
  /* weights in use: 400 body, 500 soft body, 600 labels, 700 headings, 800 display/stats */
  /*
   * ─── THE SCALE IS INTEGERS, WITH GAPS YOU CAN SEE ───────────────────────
   *
   *   11  12  14  16  18  22    30  40  44  52
   *
   * It used to be 11.5 / 12.5 / 13.5 / 15 / 17, and it was ignored: of 650
   * font-size declarations only 66 named a token, while 379 were literals
   * across 45 values. The reason was measurable. EVERY step sat 0.5px from
   * a number people type by hand — 13.5 beside 13 (67 uses) and 14 (63);
   * 12.5 beside 12 (59) and 13. At 13px half a pixel is 3.7%, below what
   * anyone sees on a page, so missing the scale produced no feedback at
   * all. Someone typing 13px was not overriding 13.5px in any way they
   * could perceive. The codebase had already voted: 374 integer uses
   * against 193 half ones.
   *
   * Integers with 1-2px gaps at the bottom and 4-8px higher up mean a
   * missed step is visible, so the scale enforces itself.
   *
   * The four display sizes above 22 were already integers and already
   * spaced. They are unchanged.
   */
  --text-display:   52px; /* hero H1 (clamp down to 34px mobile) */
  --text-h1:        44px;
  --text-h2:        30px; /* section titles */
  --text-h3:        22px; /* card / panel titles */
  --text-stat:      40px; /* big numerals */
  --text-body-lg:   18px; /* hero subhead */
  --text-body:      16px;
  --text-sm:        14px;
  --text-xs:        12px;
  --text-label:     11px; /* uppercase eyebrows, letter-spacing .1em */
  /* The price line's total — handoff price-line-and-timeline, frame 1b. Not
     --text-stat (40px): that is the big numeral on a stats band, and this sits
     in a buy panel beside a 44px control. Proposed by the handoff. */
  --price-xl:       34px;
  --leading-tight:  1.05;
  --leading-snug:   1.4;
  --leading-body:   1.6;
  --tracking-tight: -0.02em; /* display + stats */
  --tracking-label:  0.1em;  /* uppercase eyebrows */

  /* ---- Spacing scale (4px base) ---- */
  /*
   * ─── HALF STEPS ARE NOT A COMPROMISE, THEY ARE THE MEASUREMENT ──────────
   *
   * This was a 4px scale and gap ignored it: 154 uses landed on a step, 235
   * did not, and 182 of those 235 were EXACTLY 2px off one. The single most
   * common gap in the theme is 10px, with 75 uses — more than any step on
   * the scale it was supposed to be using.
   *
   * So the code was never on a 4px grid. It was on a 2px grid at the small
   * end, which is correct: at a 10px gap, 2px is a fifth of the whole thing
   * and plainly visible, while at 48px it is nothing. Forcing those 235 uses
   * onto multiples of 4 would have moved real layout to satisfy a number
   * nobody had ever followed.
   *
   * 2px resolution to 20, 4px to 32, 8px and up above that.
   */
  --space-0-5:  2px;
  --space-1:  4px;
  --space-1-5:  6px;
  --space-2:  8px;
  --space-2-5: 10px;
  --space-3:  12px;
  --space-3-5: 14px;
  --space-4:  16px;
  --space-4-5: 18px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px; /* standard page gutter + section padding */
  --space-16: 64px;

  /* ---- Radii ---- */
  /*
   * The 6-9px cluster had eight uses and nowhere to go: --radius-sm at 10px
   * was the smallest step, and rounding a 2px corner up to 10px turns a
   * near-square into a lozenge. Radii under 6px stay literals on purpose —
   * they draw objects and glyphs (the banner-stand illustration, the 16x8px
   * dash before a spec key), not UI surfaces, and a scale for panels has no
   * business resizing them.
   *
   * Mapping the old literals was NOT nearest-value. 12px and 16px each sat
   * exactly between two steps, and rounding both up would have put inputs on
   * the card radius and cards on the panel radius — flattening the very
   * hierarchy the scale exists to hold. They were mapped by what the element
   * IS, which is what each token's comment already says.
   */
  --radius-xs:    8px; /* small controls, chips with square-ish corners */
  --radius-sm:   10px; /* inputs, small tiles */
  --radius-md:   14px; /* standard card */
  --radius-lg:   18px; /* feature panel */
  --radius-xl:   22px; /* hero / promo band */
  --radius-pill: 999px; /* buttons, chips, badges */

  /* ---- Shadows ---- */
  --shadow-sm:  0 4px 12px rgba(36, 41, 56, 0.08);
  --shadow-md:  0 10px 26px rgba(36, 41, 56, 0.12);
  --shadow-lg:  0 12px 24px rgba(36, 41, 56, 0.18);
  --shadow-xl:  0 22px 44px rgba(36, 41, 56, 0.30); /* hero product */
  --shadow-press: 0 5px 0 rgba(36, 41, 56, 0.35);   /* playful button base */

  /*
   * ─── THE FOCUS RING ─────────────────────────────────────────────────────
   *
   * NOT --atomic-blue. WCAG 1.4.11 wants a focus indicator at 3:1 against
   * whatever sits next to it, and the brand blue is 2.52:1 on white. Every
   * blue ring in this theme failed, not just the odd one — measured:
   *
   *                white  surf-alt  tint   navy   darker
   *   #1ab0e0       2.52     2.36   2.26   4.93     5.75   fails on light
   *   #0d7aa0       4.87     4.57   4.38   2.55     2.97   fails on dark
   *   #0e8ab5       3.95     3.70   3.54   3.15     3.67   passes on all
   *
   * #0e8ab5 is the one value that clears 3:1 on every surface this theme
   * paints, which is why there is no inverted variant to remember.
   *
   * Use it as `outline`, never `box-shadow`: outline follows border-radius,
   * takes no space, and cannot be clipped by an ancestor's overflow.
   */
  --focus-ring: #0e8ab5;

  /*
   * THE CARD, AT REST AND LIFTED. Set 2026-09-20.
   *
   * Cards previously carried six resting shadows and four hover shadows
   * between them, and no two routes agreed: the category card rested at
   * 0.12 and lifted to 0.22, the promo card rested at 0.18 and lifted to
   * 0.25, the homepage favourite rested at 0.12 and lifted to 0.16. Nobody
   * chose those numbers against each other; they were chosen weeks apart.
   *
   * One opacity, both states. Only the geometry moves on hover, which is
   * what makes the lift read as the same card rising rather than a
   * different card appearing.
   */
  /*
   * Three more, each named for the job rather than the size, and each added
   * only because the same value was already written in two files:
   *
   *   --shadow-modal    .as-bn__sheet-panel and .as-pickup-modal__card
   *   --shadow-sticky   the buy block that sticks to the bottom of the screen:
   *                     the bottom of a product page. Offset is NEGATIVE: the
   *                     shadow goes up, onto the page it is covering.
   *   --shadow-pop      .as-badge-splash and .as-stk-promos__bar
   *
   * NOT added: a token for shadows on dark surfaces. Three of those use
   * rgba(0,0,0) where the rest of the theme uses the brand navy, and that
   * reads like drift until you check what is behind them — the stickers
   * sample band they sit on is --atomic-dark. A navy shadow on navy is
   * invisible. They are correct, they share no
   * geometry with each other, and they were twice described in this project's
   * notes as drift. They are not.
   */
  --shadow-modal:      0 34px 80px rgba(36, 41, 56, 0.45);
  --shadow-sticky:     0 -8px 24px rgba(36, 41, 56, 0.13);
  --shadow-pop:        0 8px 20px rgba(36, 41, 56, 0.28);
  --shadow-card:       0 6px 6px rgba(36, 41, 56, 0.12);
  --shadow-card-hover: 0 16px 30px rgba(36, 41, 56, 0.12);

  /*
   * The promo starburst: blue rays on a lighter blue. Drawn on /promos/ (its
   * hero and bands), the stickers page's Split band and the homepage's Split 5
   * band — one gradient, so the three read as the same promotion.
   */
  --burst: repeating-conic-gradient(from 0deg at 50% 50%, var(--atomic-blue) 0deg 8deg, #2fbae5 8deg 16deg);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
  --dur:  180ms;

  /* ---- Layout ---- */
  /*
   * The page container. ONE number: every section that runs the width of the
   * page caps here and carries --gutter inside it, so their content edges line
   * up as you scroll. Before this the theme had four — 1400 on category pages
   * and the search overlay, 1280 on the footer and the section bands, 1160
   * across a dozen route files, and 1100/920 on the reading pages — with four
   * different gutters, so even sections sharing a cap started their text in
   * different places.
   *
   * Because box-sizing is border-box, the gutter comes OUT of this number:
   * 1440 with a 56px gutter is a 1328px column of content.
   */
  --page-max:   1440px;
  --gutter:     var(--space-14);
  --tap-min:    44px;
}

/*
 * ─── THE BREAKPOINT LADDER ──────────────────────────────────────────────────
 *
 *   420   560   720   900   1000   1100   1200
 *
 * Seven values, and every media query in the theme uses one of them. Custom
 * properties CANNOT be used in media queries — `@media (max-width: var(--x))`
 * is invalid CSS, and there is no build step here — so these cannot be tokens.
 * They are literals in ~60 places, kept honest by `bin/css-breakpoints.py`.
 *
 * Queries are `max-width` (desktop-first) because 60 of the 65 that existed
 * when this was written already were. The one `min-width: 901px` is the
 * deliberate partner of a `max-width: 900px` on the same component.
 *
 * ─── WHY THESE NUMBERS AND NOT BOOTSTRAP'S ──────────────────────────────────
 *
 * Bootstrap's 576/768/992/1200/1400 are device widths. These are measured from
 * what the content needs, which is not the same thing:
 *
 *   1200   shop drops 4 product columns to 3. At 1201 a card is 196px, which
 *          is the narrowest a card gets anywhere. It used to happen at 1150,
 *          where the card had squeezed to 184px.
 *          Also the nav becomes a burger. The five items need 444px beside a
 *          172px logo centred on the row, which leaves 14px of slack at 1201
 *          and runs the nav under the logo by 36px at 1101 (measured with the
 *          mega menu, 2026-11-11). ADD A MENU ITEM AND THIS BREAKS before the
 *          burger fires. It is the tightest thing in the theme.
 *   1100   the header's "Sign in" and "Cart" words drop to their icons, which
 *          is what keeps the actions off the logo in burger mode down to 901.
 *   1000   three separate components: the product grid (two columns need
 *          920px, so it cannot collapse at 900 — 901-919 would overflow), the
 *          footer (4 columns to 2; at 901 four columns would be 158px), and
 *          the search grid.
 *    900   the gutter narrows — see below. Most layout collapses happen here.
 *    720   tablet reflow.
 *    560   phone: full-screen sheets, hidden maps, smaller titles.
 *    420   the two smallest-screen adjustments.
 *
 * The top three are 100px apart because three different components genuinely
 * degrade at three different widths. A five-value ladder was tried first and
 * had to be widened: snapping 1000 to 900 put the footer on four 158px columns
 * between 901 and 1000, which measurement caught and reasoning had not.
 */

/*
 * ─── THE GUTTER NARROWS ONCE, FOR EVERYTHING ────────────────────────────────
 *
 * 56px is generous on a phone. It used to be walked back per component — the
 * top bar had its own 24px below 900, the footer its own 24px below 700 — so
 * the containers stopped agreeing with each other at exactly the widths where
 * a misaligned edge is most visible.
 *
 * Redefining the token instead moves every container that uses it, together,
 * in one place.
 */
@media (max-width: 900px) {
  :root { --gutter: var(--space-6); }
}
