/* =============================================================================
   Pep Research -- foundation (Pepvela refocus, 2026-10-11).

   Loaded on every Pep Research page right after the shared brand file
   (css/pepvela-brand.css, byte-identical to pepvela.com) and before the page
   styles. It holds the light base, the type scale, the section and page-hero
   layout, the shared buttons, the order drawer and the /cart page.

   Direction (CEO, 2026-10-11): one brand with pepvela.com. White and very
   light surfaces, deep navy type, restrained indigo / blue accents, generous
   whitespace, Plus Jakarta Sans everywhere (Georgia only in the pep|vela
   wordmark), light theme only, simple hover states, nothing that loops.

   The older page styles (checkout, documentation, modules, legal and service
   pages) read the --v3-* / --pv-* role names; section 1 maps every one of
   them to the brand tokens, so those pages render in the light system.
   ============================================================================= */

/* ---- 1. Role names used by the page styles, mapped to the brand ---- */
:root {
  /* brand-mapped roles */
  --v3-action: var(--brand-navy);
  --v3-action-hover: var(--brand-navy-2);
  --v3-action-pressed: var(--brand-navy);
  --v3-action-gradient: var(--brand-navy);
  --v3-action-gradient-hover: var(--brand-navy-2);
  --v3-on-action: #FFFFFF;
  --v3-accent: var(--brand-indigo);
  --v3-focus: var(--brand-focus);

  --v3-bg-deep: var(--brand-white);
  --v3-bg-deep-2: var(--brand-surface);
  --v3-panel: var(--brand-white);
  --v3-panel-raised: var(--brand-surface);
  --v3-glass: var(--brand-white);
  --v3-glass-strong: var(--brand-white);
  --v3-on-dark: var(--brand-navy);
  --v3-on-dark-muted: var(--brand-ink-2);
  --v3-on-dark-soft: var(--brand-muted);
  --v3-line-dark: var(--brand-line);
  --v3-line-dark-strong: var(--brand-line-strong);
  --v3-accent-on-dark: var(--brand-indigo);

  --v3-surface: var(--brand-surface);
  --v3-paper: var(--brand-white);
  --v3-paper-tint: var(--brand-surface);
  --v3-paper-tint-2: var(--brand-tint);
  --v3-ink: var(--brand-navy);
  --v3-ink-muted: var(--brand-muted);
  --v3-ink-soft: var(--brand-muted);
  --v3-line: var(--brand-line);
  --v3-line-strong: var(--brand-line-strong);
  --v3-link: var(--brand-indigo);
  --v3-tint: var(--brand-tint);

  --v3-glow: none;
  --v3-shadow: var(--brand-shadow);
  --v3-shadow-lift: var(--brand-shadow-lift);
  --v3-shadow-dark: var(--brand-shadow-lift);
  --v3-gradient-signal: linear-gradient(90deg, var(--brand-indigo) 0%, var(--brand-blue) 100%);
  --v3-gradient-light: none;
  --v3-ease-out: var(--brand-ease);
  --v3-ease-cinema: var(--brand-ease);
  --v3-ease-soft: var(--brand-ease);

  --v3-card-line: var(--brand-line);
  --v3-card-line-hover: var(--brand-tint-2);
  --v3-glass-card: var(--brand-white);
  --v3-card-shadow: var(--brand-shadow);
  --v3-card-shadow-hover: var(--brand-shadow-lift);
  --v3-radius-card: var(--brand-radius);
  --v3-radius-panel: var(--brand-radius-lg);

  /* the older palette names, as light-system roles */
  --pv-abyss: var(--brand-surface);
  --pv-night: var(--brand-white);
  --pv-violet-600: var(--brand-navy);
  --pv-violet-400: var(--brand-navy-2);
  --pv-periwinkle: var(--brand-indigo);
  --pv-lavender: var(--brand-indigo);
  --pv-cyan: var(--brand-blue);
  --pv-surface: var(--brand-surface);
  --pv-text-light: #FFFFFF;
  --pv-white: #FFFFFF;

  /* layout and type scale */
  --v3-header-h: var(--brand-header-h);
  --v3-container: var(--brand-wrap);
  --v3-gutter: var(--brand-gutter);
  --t-display: 48px;  --t-display-lh: 56px;
  --t-h1: 40px;       --t-h1-lh: 48px;
  --t-h2: 30px;       --t-h2-lh: 38px;
  --t-h3-lg: 22px;    --t-h3-lg-lh: 30px;
  --t-h3: 18px;       --t-h3-lh: 26px;
  --t-lead: 17px;     --t-lead-lh: 28px;
  --t-body: 15.5px;   --t-body-lh: 26px;
  --t-small: 13px;    --t-small-lh: 20px;
  --t-caps: 12px;
  --t-data: 14px;

  /* radius and motion names used by the page styles */
  --pv3-font-ui: var(--brand-font);
  --pv3-font-display: var(--brand-font);
  --pv3-font-wordmark: var(--brand-font-wordmark);
  --pv3-radius-xs: 4px;
  --pv3-radius-sm: 8px;
  --pv3-radius-md: 10px;
  --pv3-radius-lg: 12px;
  --pv3-radius-xl: 18px;
  --pv3-radius-full: 999px;
  --pv3-dur-press: 120ms;
  --pv3-dur-ui: 180ms;
  --pv3-ease-ui: var(--brand-ease);
}
@media (max-width: 639px) {
  :root {
    --t-display: 34px; --t-display-lh: 40px;
    --t-h1: 30px;      --t-h1-lh: 38px;
    --t-h2: 25px;      --t-h2-lh: 32px;
    --t-h3-lg: 19px;   --t-h3-lg-lh: 26px;
  }
}

/* ---- 2. Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--brand-header-h) + 16px); background: var(--brand-white); }
body {
  margin: 0;
  font-family: var(--brand-font);
  font-size: var(--t-body);
  line-height: var(--t-body-lh);
  color: var(--brand-ink);
  background: var(--brand-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--brand-font); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--brand-navy); text-wrap: balance; }
p { text-wrap: pretty; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-link); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand-focus); outline-offset: 3px; }
::selection { background: var(--brand-tint-2); color: var(--brand-navy); }
main { display: block; }

.v3-sr, .pr-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.v3-container { width: 100%; max-width: var(--brand-wrap); margin: 0 auto; padding: 0 var(--brand-gutter); }
.v3-num, .pr-num { font-variant-numeric: tabular-nums; }

/* ---- 3. Microcopy ---- */
.v3-caps, .v3-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-caps);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-indigo);
  font-variant-numeric: tabular-nums;
}
.v3-index { color: var(--brand-muted); }
.v3-index::after { content: "/"; margin-left: 10px; color: var(--brand-line-strong); }
.v3-dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-blue); }

/* ---- 4. Buttons (rounded rectangles, as .pvb-btn) ---- */
.v3-btn, .pr .btn-primary, .pr .btn-secondary, .pr .btn-ghost, .pr .btn-product {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--brand-radius-sm);
  font: 650 15px/1 var(--brand-font);
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.v3-btn svg { width: 16px; height: 16px; flex: none; }
.v3-btn--lg { min-height: 50px; padding: 0 24px; }
.v3-btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.v3-btn--primary, .pr .btn-primary { background: var(--brand-navy); color: #fff; box-shadow: 0 10px 22px -12px rgba(11, 22, 64, 0.55); }
.v3-btn--primary:hover, .pr .btn-primary:hover { background: var(--brand-navy-2); color: #fff; }
.v3-btn--ghost-dark, .pr .btn-secondary, .pr .btn-ghost, .pr .btn-product { background: var(--brand-white); color: var(--brand-navy); border-color: var(--brand-line-strong); }
.v3-btn--ghost-dark:hover, .pr .btn-secondary:hover, .pr .btn-ghost:hover, .pr .btn-product:hover { border-color: var(--brand-indigo); color: var(--brand-indigo); }
.v3-btn[disabled], .v3-btn[aria-disabled="true"], .pr .btn-primary[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.v3-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--brand-indigo);
  text-decoration: none;
  border-radius: var(--pv3-radius-xs);
}
.v3-link svg { width: 15px; height: 15px; }
.v3-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 5. Sections and the light page hero ---- */
.v3-sec { position: relative; padding: clamp(56px, 7vw, 88px) 0; color: var(--brand-ink); background: var(--brand-white); }
.v3-sec + .v3-sec { border-top: 1px solid var(--brand-line); }
.v3-sec-grid { display: none; }
.v3-sec-head { margin-bottom: 32px; max-width: 44rem; display: flex; flex-direction: column; gap: 10px; }
.v3-sec-head h2 { font-size: var(--t-h2); line-height: var(--t-h2-lh); color: var(--brand-navy); }
.v3-sec-lead { max-width: 38rem; font-size: 16px; line-height: 26px; color: var(--brand-ink-2); }
.v3-sec-head--row { max-width: none; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
.v3-sec-head--row > div:first-child { display: flex; flex-direction: column; gap: 10px; flex: 1 1 420px; min-width: 0; }
@media (max-width: 767px) {
  .v3-sec-head--row { flex-direction: column; align-items: flex-start; }
  .v3-sec-head--row > div:first-child { flex: none; }
}

.v3-page-hero {
  position: relative;
  padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px);
  color: var(--brand-ink);
  background: var(--brand-hero-wash);
  border-bottom: 1px solid var(--brand-line);
}
.v3-page-hero-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.v3-page-hero-inner > * { max-width: 680px; }
.v3-page-hero h1 { font-size: var(--t-h1); line-height: var(--t-h1-lh); letter-spacing: -0.025em; color: var(--brand-navy); }
.v3-page-lead { max-width: 36rem; font-size: var(--t-lead); line-height: var(--t-lead-lh); color: var(--brand-ink-2); }
.v3-crumbs, .pr-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-muted);
}
.v3-crumbs a, .pr-crumbs a { color: var(--brand-ink-2); }
.v3-crumbs a:hover, .pr-crumbs a:hover { color: var(--brand-indigo); text-decoration: underline; text-underline-offset: 3px; }
.v3-crumbs > span:last-child, .pr-crumbs > span:last-child { color: var(--brand-navy); }
.v3-crumbs > span[aria-hidden], .pr-crumbs > span[aria-hidden] { color: var(--brand-line-strong); }

/* scenes, parallax layers and reveals are retired: never shown */
.v3-scene, .v3-scene-canvas { display: none !important; }

/* ---- 6. The order drawer, the /cart page and the notice (markup: js/cart.js) ---- */
.sf-cart-overlay { position: fixed; inset: 0; z-index: 9400; display: flex; justify-content: flex-end; background: rgba(11, 22, 64, 0.38); }
.sf-cart-drawer { display: flex; flex-direction: column; width: 420px; max-width: 92vw; height: 100%; background: var(--brand-white); box-shadow: -18px 0 48px -24px rgba(11, 22, 64, 0.4); font-family: var(--brand-font); color: var(--brand-ink); }
.sf-cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--brand-line); }
.sf-cart-head h3 { margin: 0; font-size: 18px; color: var(--brand-navy); }
.sf-cart-close { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; border: 0; border-radius: var(--brand-radius-sm); background: none; color: var(--brand-ink-2); font-size: 26px; line-height: 1; cursor: pointer; }
.sf-cart-close:hover { background: var(--brand-surface); color: var(--brand-navy); }
.sf-cart-body { flex: 1; overflow-y: auto; padding: 6px 22px; }
.sf-cart-foot { padding: 18px 22px; border-top: 1px solid var(--brand-line); }
body.sf-cart-open { overflow: hidden; }

.sf-cart-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--brand-line); }
.sf-cart-thumb { flex-shrink: 0; }
.sf-cart-thumb img { display: block; width: 60px; height: 72px; padding: 6px 0; object-fit: contain; border-radius: var(--brand-radius-sm); background: linear-gradient(180deg, #F3F6FD 0%, #E9EEFA 100%); }
.sf-cart-info { flex: 1; min-width: 0; }
.sf-cart-name { display: block; font-size: 15px; font-weight: 650; color: var(--brand-navy); text-decoration: none; }
.sf-cart-name:hover { color: var(--brand-indigo); }
.sf-cart-unit { margin: 2px 0 8px; font-size: 13px; color: var(--brand-muted); }
.sf-cart-lineend { flex-shrink: 0; text-align: right; }
.sf-cart-line { font-size: 15px; font-weight: 650; color: var(--brand-navy); font-variant-numeric: tabular-nums; }
.sf-cart-remove { min-height: 32px; padding: 4px 0 0; border: 0; background: none; color: var(--brand-indigo); font-size: 13px; font-weight: 600; cursor: pointer; }
.sf-cart-remove:hover { text-decoration: underline; text-underline-offset: 3px; }

.sf-qty { display: inline-flex; align-items: center; border: 1px solid var(--brand-line-strong); border-radius: var(--brand-radius-sm); overflow: hidden; background: var(--brand-white); }
.sf-qty-dec, .sf-qty-inc { width: 36px; height: 36px; border: 0; background: var(--brand-white); color: var(--brand-navy); font-size: 18px; line-height: 1; cursor: pointer; }
.sf-qty-dec:hover, .sf-qty-inc:hover { background: var(--brand-surface); }
.sf-qty-val { min-width: 36px; text-align: center; font-size: 15px; font-weight: 600; color: var(--brand-navy); font-variant-numeric: tabular-nums; }

.sf-cart-subtotal, .sf-cart-total { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; color: var(--brand-navy); font-variant-numeric: tabular-nums; }
.sf-cart-subtotal { margin-bottom: 6px; font-size: 16px; }
.sf-cart-discount { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-size: 14px; font-weight: 600; color: var(--brand-indigo); }
.sf-cart-total { margin: 8px 0 6px; padding-top: 8px; border-top: 1px solid var(--brand-line); font-size: 17px; }
.sf-cart-ship { margin: 6px 0 14px; font-size: 13px; line-height: 1.5; color: var(--brand-muted); }
.sf-checkout { display: flex !important; width: 100%; }
.sf-cart-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.sf-cart-actions .btn-secondary { flex: 1; min-width: 130px; padding: 0 12px; font-size: 14px; }
.sf-cart-empty { padding: 44px 10px; text-align: center; color: var(--brand-muted); }
.sf-cart-empty p { margin-bottom: 14px; }
.sf-inquiry-link { display: inline-block; color: var(--brand-indigo); font-size: 14px; font-weight: 600; text-decoration: none; }
.sf-inquiry-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sf-cart-wholesale { margin-top: 16px; font-size: 13.5px; color: var(--brand-muted); }
.sf-cart-summary { padding: 22px; border: 1px solid var(--brand-line); border-radius: var(--brand-radius); background: var(--brand-white); box-shadow: var(--brand-shadow); }

.sf-cart-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 9600;
  max-width: 90vw;
  padding: 12px 18px;
  border-radius: var(--brand-radius-sm);
  background: var(--brand-navy);
  color: #fff;
  font: 500 14px/1.4 var(--brand-font);
  text-align: center;
  box-shadow: var(--brand-shadow-lift);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.2s, transform 0.2s;
}
.sf-cart-notice.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 480px) { .sf-cart-drawer { width: 100%; max-width: 100%; } }

/* ---- 7. Product cards (.pvb-product) -- Pep Research details ---- */
.pvb-product__cat { font: 700 11.5px/1.3 var(--brand-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-muted); }
.pvb-product__price--na { color: var(--brand-muted); font-weight: 600; }
.pvb-product__add[disabled] { background: var(--brand-surface); color: var(--brand-muted); cursor: not-allowed; }

/* ---- 8. The research-use disclaimer above the shared footer ---- */
.pr-compliance { margin-top: clamp(40px, 6vw, 80px); padding: 18px var(--brand-gutter); border-top: 1px solid var(--brand-line); background: var(--brand-white); }
.pr-compliance p { max-width: 900px; margin: 0 auto; font-size: 12.5px; line-height: 1.6; text-align: center; color: var(--brand-muted); }
.pr-compliance + .pvb-footer { margin-top: 0; }

/* ---- 9. Phones: touch targets of at least 24px for standalone links ---- */
@media (max-width: 767px) {
  .v3-crumbs a, .pr-crumbs a, .sf-cart-name, .v3-link, .sf-inquiry-link { padding-top: 4px; padding-bottom: 4px; margin-top: -4px; margin-bottom: -4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
