/* Rutriven foundation — the shell's document defaults and the primitives
   every shell surface shares. Approved as the storefront direction on
   2026-10-10 (docs/storefront-foundation/README.md).

   PRODUCTION FORM. Nothing here is layered: every page surface's own
   stylesheet is unlayered, and so are WooCommerce's and the plugins', and an
   unlayered rule beats any layered one whatever its specificity. So the
   shell's defaults are scoped to its own roots (.rv-root) instead, carry no
   specificity of their own (:where), and the page keeps its own body, type
   and resets — the rule the Pult shell kept with `.ps`. The fonts are the
   storefront's (assets/canonical/assets/fonts/fonts.css, the same files). */

.rv-root, .rv-root *, .rv-root *::before, .rv-root *::after { box-sizing: border-box; }
.rv-root {
  font: 400 var(--fs-md)/var(--lh-body) var(--font-ui);
  color: var(--ink);
  caret-color: var(--cocoa);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  --ring: var(--cocoa);
}
/* The retired theme's base layer styles bare h1–h6, buttons and links on the
   WordPress pages. Inside the shell they revert to the browser's own defaults
   — the ground the foundation was designed on — and the shell's rules style
   them from there. No specificity, so every shell rule still wins. */
:where(.rv-root) :where(h1, h2, h3, h4, h5, h6) { font-family: revert; font-size: revert; font-weight: revert; line-height: revert; color: revert; letter-spacing: revert; text-transform: revert; }
:where(.rv-root) :where(button) { padding: revert; border-radius: revert; text-transform: revert; letter-spacing: revert; }
:where(.rv-root) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(.rv-root) :where(ul, ol)[role="list"], :where(.rv-root) :where(nav) :where(ul, ol) { list-style: none; padding: 0; }
:where(.rv-root) :where(img, svg) { display: block; max-width: 100%; }
:where(.rv-root) :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.rv-root) :where(button) { cursor: pointer; }
:where(.rv-root) :where(a) { color: inherit; text-underline-offset: .18em; text-decoration-thickness: from-font; }
:where(.rv-root) :where(h1, h2, h3) { text-wrap: balance; }
:where(.rv-root) :where(p) { text-wrap: pretty; }
.rv-root[hidden], .rv-root [hidden] { display: none !important; }

:where(.rv-root) ::selection { background: var(--cocoa); color: var(--paper); }

/* One focus language: a cocoa ring with a gap, legible on every light
   ground; the cocoa strips and the green block set --ring to amber. */
/* No specificity beyond the pseudo-class itself (it sat in a lower cascade
   layer in the foundation), so a component that draws its own focus — the
   search field's ring around its input — still wins. */
:where(.rv-root) :focus-visible, .rv-root:where(:focus-visible) { outline: 2.5px solid var(--ring); outline-offset: 3px; }
:where(.rv-root) :focus:not(:focus-visible) { outline: none; }

/* Scrollbars inside panels are part of the design too. */
.rv-root, .rv-root * { scrollbar-width: thin; scrollbar-color: rgba(46, 28, 21, .32) transparent; }

/* Controls are not content: no long-press text selection or callout on
   touch, and no double-tap zoom delay. Text stays selectable everywhere else. */
:where(.rv-root) :where(button, [role="button"], .rv-btn, .rv-iconbtn, .rv-chip) {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
:where(.rv-root) :where(a) { touch-action: manipulation; }

@media (prefers-reduced-motion: reduce) {
  .rv-root, .rv-root *, .rv-root *::before, .rv-root *::after, .rv-root::backdrop {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.rv-skip {
  position: fixed; left: var(--s3); top: var(--s3); z-index: 100;
  padding: var(--s3) var(--s5); border-radius: var(--r-pill);
  background: var(--cocoa); color: var(--paper); font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.rv-skip:focus-visible { transform: none; --ring: var(--amber); }

.rv-i { width: 22px; height: 22px; flex: none; fill: currentColor; }
.rv-i--sm { width: 18px; height: 18px; }
.rv-i--xs { width: 14px; height: 14px; }

/* Titan in capitals: the voice. One display line per surface. */
.rv-display { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: var(--track-display); line-height: .98; }
.rv-stop { color: var(--coral); }

/* ── buttons ─────────────────────────────────────────────────────────────
   The variant names the job, not the colour. Printed (ink edge and the
   solid printed shadow) only for the way forward: buy (amber, the buying
   path), go (cocoa, the next step), guide (Célpakk). Quiet is inked, not
   printed: an outline you can press, for the second choice beside them. */
.rv-btn {
  --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-pop: var(--pop);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 50px; padding: 0 var(--s6);
  border: var(--line) solid var(--cocoa); border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 400 15px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .035em;
  text-decoration: none; white-space: nowrap;
  box-shadow: var(--btn-pop);
  transition: translate var(--t-press) var(--ease-out), box-shadow var(--t-press) var(--ease-out), background-color var(--t-fast) ease;
}
.rv-btn:active:not(:disabled, [aria-disabled="true"]) { translate: var(--pop-x) var(--pop-y); box-shadow: 0 0 0 0 var(--cocoa); }
.rv-btn--buy { --btn-bg: var(--amber); --btn-fg: var(--cocoa); }
/* A cocoa button's shadow would vanish into it, so it prints as an outline. */
.rv-btn--go { --btn-bg: var(--cocoa); --btn-fg: var(--paper); --btn-pop: var(--pop-x) var(--pop-y) 0 0 var(--paper), var(--pop-x) var(--pop-y) 0 var(--line) var(--cocoa); }
.rv-btn--guide { --btn-bg: var(--green); --btn-fg: var(--paper); }
.rv-btn--quiet { --btn-pop: none; min-height: 48px; font: 600 var(--fs-md)/1.1 var(--font-ui); text-transform: none; letter-spacing: 0; }
.rv-btn--quiet:active:not(:disabled) { translate: none; background: var(--sand-2); }
.rv-btn--block { width: 100%; }
.rv-btn--lg { min-height: 58px; font-size: 17px; }
.rv-btn .rv-i { margin-inline: -2px; }
.rv-btn[aria-disabled="true"], .rv-btn:disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.rv-btn[aria-busy="true"] { color: transparent; }
.rv-btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--btn-fg); border-right-color: transparent;
  animation: rv-spin .7s linear infinite;
}
@keyframes rv-spin { to { rotate: 1turn; } }
@media (hover: hover) and (pointer: fine) {
  .rv-btn:not(.rv-btn--quiet):hover { translate: -1px -1px; }
  .rv-btn:not(.rv-btn--go, .rv-btn--quiet):hover { box-shadow: var(--pop-lift); }
  .rv-btn--quiet:hover { background: var(--sand); }
  .rv-btn--buy:hover { --btn-bg: var(--amber-hi); }
  .rv-btn--go:hover { --btn-bg: var(--cocoa-3); --btn-pop: 4px 5px 0 0 var(--paper), 4px 5px 0 var(--line) var(--cocoa); }
  .rv-btn--guide:hover { --btn-bg: var(--green-2); }
  /* A trailing arrow leans the way the button goes. */
  .rv-btn:hover > .rv-i:last-child:not(:first-child) { translate: 3px 0; }
}
.rv-btn > .rv-i:last-child:not(:first-child) { transition: translate var(--t-base) var(--ease-out); }

.rv-iconbtn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--tap); height: var(--tap); padding: 0;
  border: 0; border-radius: 50%; background: none; color: inherit;
  transition: background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out);
}
.rv-iconbtn:active { transform: scale(.92); background: var(--sand-2); }
@media (hover: hover) and (pointer: fine) { .rv-iconbtn:hover { background: var(--sand); } }

/* ── text affordances ───────────────────────────────────────────────── */
.rv-link {
  color: inherit; font-weight: 500;
  text-decoration: underline; text-decoration-color: currentColor;
  text-underline-offset: .24em; text-decoration-thickness: 2px;
  transition: text-decoration-color var(--t-fast) ease, color var(--t-fast) ease;
}
@media (hover: hover) and (pointer: fine) { .rv-link:hover { text-decoration-color: var(--coral); } }

.rv-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-meta { color: var(--ink-2); font-size: var(--fs-sm); }

/* A department's colour as a small swatch. Departments without a declared
   hue get paper: never an invented colour. */
.rv-dot {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  background: var(--tint, var(--paper));
  box-shadow: inset 0 0 0 1.5px var(--cocoa);
}

/* A packshot standing on a soft tile of its department's wash, as on the
   Pult cards: upright, a short contact shadow, never cut out or tilted. */
.rv-pack {
  position: relative; flex: none; display: grid; place-items: center;
  width: 56px; aspect-ratio: 1; border-radius: var(--r-sm);
  background: var(--wash, var(--sand));
}
.rv-pack img { position: absolute; inset: 8% 11%; width: 78%; height: 84%; object-fit: contain; filter: var(--pack-shadow); } /* a tall pack never grows its tile */
.rv-pack--none::after {
  content: ""; width: 40%; height: 54%; border-radius: 5px 5px 8px 8px;
  border: 2px dashed rgba(46, 28, 21, .3);
}

.rv-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--cocoa); color: var(--paper);
  font: 700 12px/1 var(--font-ui); font-variant-numeric: tabular-nums;
}

/* ── fields ─────────────────────────────────────────────────────────────
   Inked: an ink edge you write inside. Focus draws the ring; nothing moves. */
.rv-field {
  display: flex; align-items: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s2) 0 var(--s4);
  border: var(--line) solid var(--cocoa); border-radius: var(--r-pill);
  background: var(--paper); color: var(--ink);
}
.rv-field:focus-within { outline: 2.5px solid var(--ring); outline-offset: 3px; }
.rv-field > .rv-i { color: var(--ink); }
.rv-field input {
  flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 0; padding: 0; background: none;
  font-size: var(--fs-md); outline: none;
}
.rv-field input::placeholder { color: var(--ink-2); opacity: 1; }
.rv-field input::-webkit-search-cancel-button { display: none; }

.rv-check { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--fs-sm); line-height: 1.4; }
.rv-check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--cocoa); }

/* ── chips: one choice among siblings — inked, a lighter edge ──────── */
.rv-chip {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s4);
  border: var(--line-thin) solid var(--cocoa); border-radius: var(--r-pill);
  background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.rv-chip:active { background: var(--sand-2); }
.rv-chip[aria-current], .rv-chip[aria-pressed="true"] { background: var(--cocoa); color: var(--paper); }
@media (hover: hover) and (pointer: fine) { .rv-chip:not([aria-current], [aria-pressed="true"]):hover { background: var(--sand); } }

/* ── quantity stepper: inked, with round keys ─────────────────────── */
.rv-step {
  display: inline-flex; align-items: center; height: 42px; padding: 0 2px;
  border: var(--line) solid var(--cocoa); border-radius: var(--r-pill); background: var(--paper);
}
.rv-step button {
  width: 36px; height: 36px; border: 0; background: none; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
  transition: background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out);
}
.rv-step button:not(:disabled):active { transform: scale(.86); background: var(--sand-2); }
.rv-step button:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .rv-step button:not(:disabled):hover { background: var(--sand); } }
