/* Rutriven foundation — tokens.
   Approved by the owner as the storefront direction on 2026-10-10 (docs/storefront-foundation/README.md).

   PRODUCTION FORM. The tokens live on the shell's own roots (.rv-root: the
   strip, the header, the search row, the scrim, the footer and the dialogs)
   and on their dialogs' backdrops, never on :root. Every page surface has its
   own stylesheet with its own :root vocabulary (`--line`, `--ink`, `--bar-h`
   mean different things on the listing, the homepage and Célpakk); declared
   here, the shell's values win inside the shell and never leak into a page —
   the rule the Pult shell kept with `.ps`.

   "Printed on the counter", with a hierarchy. Rutriven's things are printed
   paper objects on a cream counter, in the approved Pult/PDP language — but
   not every object is printed the same way. Pult itself used three levels,
   and round 3 flattened them into one:

     printed   ink edge + solid printed shadow — only what you press to move
               forward: buy and go buttons, the basket, a surface's one hero
               choice (the Célpakk purposes). One or two per surface.
     inked     ink edge, no shadow — things you pick among: chips, fields,
               steppers, cards, secondary buttons.
     paper     no edge — the big surfaces (the header's sheet, drawers, the
               newsletter): soft paper lifted by a warm cast, as Pult's hero
               card is. Lists and links inside them are just type.

   Family colour is used at full strength on small things, status is stamped,
   and Titan One in capitals is the voice. No cocoa fields, no blur.

   Colour roles, in one sentence each:
     cream   the counter — the page ground
     paper   printed paper: sheets, cards, tiles, fields
     sand    a recess in paper: wells, quiet fills, hover
     cocoa   ink: text, outlines and printed shadows, the wordmark, the two
             bookend strips; never a field the size of a panel
     amber   the buying path: basket, buy buttons, checkout, free-shipping progress
     green   Célpakk (its own block), and confirmed success
     coral   the full stop of the wordmark and of a display sentence
     tints   a department's own hue, only where art direction declared one:
             accent at full strength on small things, wash behind its card,
             ink for its name */

.rv-root, .rv-root::backdrop {
  /* ── colour ─────────────────────────────────────────────────────────── */
  --cocoa: #2E1C15;
  --cocoa-2: #3A271F;
  --cocoa-3: #4B352B;
  --cream: #F4EBDB;            /* the counter */
  --cream-2: #EDE1CC;          /* the counter in shade */
  --paper: #FFFCF6;            /* printed paper */
  --sand: #F2E9DA;             /* a recess in paper */
  --sand-2: #E9DDC9;

  --ink: #2E1C15;              /* 15.2:1 on paper */
  --ink-2: #5E4D44;            /* 6.7:1 on cream */
  --ink-3: #7A675C;            /* 4.6:1 on cream, 5.2:1 on paper */
  --rule: rgba(46, 28, 21, .12);

  --on-cocoa: #F4EBDB;         /* 14.6:1 */
  --on-cocoa-2: #C9BAA9;       /* 8.6:1 */

  --amber: #FFD23F;            /* 13.0:1 under cocoa text */
  --amber-hi: #FFDC66;
  --coral: #F2622E;
  --green: #16764F;            /* 5.5:1 on paper */
  --green-2: #0F5E3E;
  --green-block: #1B5E35;      /* Célpakk's own block — the approved band; paper text 7.4:1 */
  --green-block-2: #144A29;
  --green-mint: #BFE3C9;       /* a light green on the block — 5.5:1 */
  --green-ink: #0E4D33;        /* green text on light green — 8.9:1 */
  --green-wash: #E2F0E6;
  --alert: #B83A11;            /* 5.6:1 on paper */
  --alert-wash: #FBE7DE;

  /* ── type ────────────────────────────────────────────────────────────
     Titan One, in capitals, is the voice: the wordmark, one display line per
     surface (a department's name on its card's tab, sheet titles, Célpakk,
     an empty state, a greeting), the labels of the main buttons and the
     free-shipping tag. Rubik does everything that has to be read: 400–500 for text, 600
     for names, prices and choices, 700 for totals. */
  --font-display: 'Titan One', 'Rubik', system-ui, sans-serif;
  --font-ui: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-cap: .8125rem;          /* 13 */
  --fs-sm: .875rem;            /* 14 */
  --fs-md: 1rem;               /* 16 — inputs never below this (iOS zoom) */
  --fs-lg: 1.125rem;           /* 18 */
  --fs-xl: 1.25rem;            /* 20 */
  --fs-2xl: 1.5rem;            /* 24 */
  --fs-d3: 1.375rem;           /* Titan: sheet titles */
  --fs-d2: 1.875rem;           /* Titan: small display */
  --fs-d1: clamp(2.375rem, 1.6rem + 1.6vw, 3.25rem);   /* Titan: a card's name */
  --track-display: .01em;      /* Titan capitals want a hair of air */

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-body: 1.5;

  /* ── space (4px steps) ──────────────────────────────────────────────── */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px; --s10: 72px;

  /* ── shape ───────────────────────────────────────────────────────────
     Pills for things you press, 12–16 for stickers and cards, 20–24 for
     sheets. An inner shape is always smaller than the one around it. */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* ── ink and print ───────────────────────────────────────────────────
     line        the ink edge of an inked or printed object
     line-thin   the lighter edge of a chip or a quiet tile
     pop         the printed shadow, solid cocoa, down and to the right —
                 only on printed objects. Pointing lifts one a pixel;
                 pressing pushes it flat onto its shadow.
     lift        the warm cast under a big paper surface
     pack-shadow a packshot standing on its ground: a short, soft contact
                 shadow, no outline, no tilt — the product as it is. */
  --line: 2px;
  --line-thin: 1.5px;
  --pop-x: 3px; --pop-y: 4px;
  --pop: var(--pop-x) var(--pop-y) 0 0 var(--cocoa);
  --pop-sm: 2px 3px 0 0 var(--cocoa);
  --pop-lift: 4px 5px 0 0 var(--cocoa);
  --lift: 0 1px 2px rgba(46, 28, 21, .08), 0 18px 44px -14px rgba(46, 28, 21, .34);
  --lift-sm: 0 1px 2px rgba(46, 28, 21, .08), 0 8px 18px -8px rgba(46, 28, 21, .26);
  --scrim: rgba(46, 28, 21, .3);
  --rule-2: rgba(46, 28, 21, .2);
  --pack-shadow: drop-shadow(0 5px 5px rgba(46, 28, 21, .16));

  /* ── motion ──────────────────────────────────────────────────────────
     Motion answers the shopper: something opened, landed, arrived or
     changed. Short, physical, printed: buttons lift and press, the header's
     sheet is dealt onto the counter, the free-shipping tag sticks on when
     the store says shipping is free. Exits are faster than entrances. */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  --ease-deal: cubic-bezier(.2, .9, .25, 1);       /* a card dealt onto the counter */
  --t-press: 90ms;
  --t-fast: 150ms;
  --t-base: 220ms;
  --t-deal: 300ms;
  --t-sheet: 380ms;

  /* ── layout ─────────────────────────────────────────────────────────── */
  --shell-max: 1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --bar-h: 32px;               /* the bookend strip with the shipping line */
  --head-h: 76px;              /* the header band */
  --tap: 44px;                 /* minimum target, CONTEXT.md */

  --z-head: 40;
}

@media (max-width: 1023.98px) {
  .rv-root, .rv-root::backdrop { --bar-h: 30px; --head-h: 60px; }
}
