/* ============================================================
   havn-pdp — design tokens (brief-page.md §4)
   Mobile-first: :root = mobile (0-767, anchor 375); pseudo-tablet 768-1023
   (no tablet layer: starts at M-767, capped at M-max = max(M, D) — FD-184);
   desktop 1024+ scales from --vw-base 1440, capped at 1920.
   Formulas: pipeline/components/fluid-formulas.md
   ============================================================ */
/* .product re-declares every token: the hero caps --max-vw (product.css), so its type
   and spacing stop growing at 1440 content like thestrom.co --strom-pdp-max-w. */
:root,
.product {
  --vw-base: 1440px;
  --max-vw: min(100vw, calc(1920px + calc((1920px - var(--vw-base)) * 0.015)));

  /* Colors (brief-page §4.4) */
  --color-bg: #FBFBFB;
  --color-surface: #FFFFFF;
  --color-brand: #26352B;
  --color-brand-80: rgba(38, 53, 43, 0.8);
  --color-brand-50: rgba(38, 53, 43, 0.5);
  --color-brand-40: rgba(38, 53, 43, 0.4);
  --color-ink: #1A1A1A;
  --color-heading: #2E312B;
  --color-text: #484848;
  --color-text-muted: rgba(26, 26, 26, 0.6);
  --color-text-strike: rgba(71, 71, 71, 0.8);
  --color-success: #5E8C3A;
  --color-success-text: #527A32; /* success as text on cream: #5E8C3A is 3.66:1 there, this 4.63 */
  --color-star: #E0A43C;
  --color-cream: #EFEEE4;
  --color-sage: #E6E8D8;
  --color-sage-2: #D9DCC6;
  --color-stone: #B1B5A5;
  --color-accent: #D9845F;
  --color-cross: #B4532A;
  --color-cart-badge: #2A251F;
  --color-border-nav: #EBECE9;
  --color-divider: rgba(26, 26, 26, 0.3);
  --color-divider-faq: rgba(46, 49, 43, 0.15);
  --color-divider-table: rgba(72, 72, 72, 0.2);
  --color-white: #FFFFFF;
  --color-white-80: rgba(255, 255, 255, 0.8);
  --color-primary: #26352B; /* focus ring */

  /* Borders / radii */
  --border-width: 1px;
  --radius-pill: 1000px;
  --radius-round: 50%;

  /* Typography (brief-page §4.2) — Fraunces + Poppins (BA-P1) */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  /* Fraunces axes as drawn in Figma (MCP: font-variation-settings "SOFT" 0, "WONK" 1) — set on every Fraunces element */
  --fv-display: "SOFT" 0, "WONK" 1;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --lh-tight: 1.1;
  --lh-ui: 1.25;
  --lh-lead: 1.4;
  --lh-logo: 1;
  --ls-heading: -0.01em;
  --ls-logo: 0.35em;

  /* z-index */
  --z-header: 100;
  --z-overlay: 200;

  /* Fluid scale — MOBILE (base) */
  --text-h2: clamp(20px, calc(24px + (var(--max-vw) - 375px) * 0.015), 40px);
  --text-title: clamp(20px, calc(24px + (var(--max-vw) - 375px) * 0.015), 36px);
  --text-stat: clamp(31px, calc(36px + (var(--max-vw) - 375px) * 0.015), 40px);
  --text-signature: clamp(14px, calc(16px + (var(--max-vw) - 375px) * 0.015), 20px);
  --text-price: clamp(20px, calc(24px + (var(--max-vw) - 375px) * 0.015), 30px);
  --text-logo: clamp(20px, calc(23px + (var(--max-vw) - 375px) * 0.015), 29px);
  --text-h4: clamp(14px, calc(16px + (var(--max-vw) - 375px) * 0.015), 20px);
  --text-h4-lg: clamp(15px, calc(18px + (var(--max-vw) - 375px) * 0.015), 20px);
  --text-cta: clamp(12px, calc(14px + (var(--max-vw) - 375px) * 0.015), 20px);
  --text-lead: clamp(12px, calc(14px + (var(--max-vw) - 375px) * 0.015), 18px);
  --text-h5: clamp(14px, calc(16px + (var(--max-vw) - 375px) * 0.015), 18px);
  --text-label: clamp(12px, calc(14px + (var(--max-vw) - 375px) * 0.015), 18px);
  --text-badge: clamp(15px, calc(18px + (var(--max-vw) - 375px) * 0.015), 18px);
  --text-body: clamp(12px, calc(14px + (var(--max-vw) - 375px) * 0.015), 16px);
  --text-body-sm: clamp(10px, calc(12px + (var(--max-vw) - 375px) * 0.015), 16px);
  --text-body-fixed: clamp(14px, calc(16px + (var(--max-vw) - 375px) * 0.015), 16px);
  --text-small: clamp(12px, calc(14px + (var(--max-vw) - 375px) * 0.015), 14px);
  --text-small-sm: clamp(10px, calc(12px + (var(--max-vw) - 375px) * 0.015), 14px);
  --text-xs: clamp(10px, calc(12px + (var(--max-vw) - 375px) * 0.015), 12px);
  --gutter: clamp(17px, calc(20px + (var(--max-vw) - 375px) * 0.015), 40px);
  --section-gap: clamp(51px, calc(60px + (var(--max-vw) - 375px) * 0.015), 120px);
  --header-bar-h: clamp(36px, calc(42px + (var(--max-vw) - 375px) * 0.015), 42px);
  --header-nav-h: clamp(44px, calc(52px + (var(--max-vw) - 375px) * 0.015), 64px);
  --btn-h: clamp(46px, calc(54px + (var(--max-vw) - 375px) * 0.015), 61px);
  --radius-card: clamp(10px, calc(12px + (var(--max-vw) - 375px) * 0.015), 12px);
}

/* PSEUDO-TABLET 768-1023 — continues the mobile band (FD-184) */
@media (min-width: 768px) {
  :root,
  .product {
    --text-h2: clamp(29.88px, calc(29.88px + (var(--max-vw) - 768px) * 0.025), 40px);
    --text-title: clamp(29.88px, calc(29.88px + (var(--max-vw) - 768px) * 0.025), 36px);
    --text-stat: clamp(40px, calc(40px + (var(--max-vw) - 768px) * 0.025), 40px);
    --text-signature: clamp(20px, calc(20px + (var(--max-vw) - 768px) * 0.025), 20px);
    --text-price: clamp(29.88px, calc(29.88px + (var(--max-vw) - 768px) * 0.025), 30px);
    --text-logo: clamp(28.88px, calc(28.88px + (var(--max-vw) - 768px) * 0.025), 29px);
    --text-h4: clamp(20px, calc(20px + (var(--max-vw) - 768px) * 0.025), 20px);
    --text-h4-lg: clamp(20px, calc(20px + (var(--max-vw) - 768px) * 0.025), 20px);
    --text-cta: clamp(19.88px, calc(19.88px + (var(--max-vw) - 768px) * 0.025), 20px);
    --text-lead: clamp(18px, calc(18px + (var(--max-vw) - 768px) * 0.025), 18px);
    --text-h5: clamp(18px, calc(18px + (var(--max-vw) - 768px) * 0.025), 18px);
    --text-label: clamp(18px, calc(18px + (var(--max-vw) - 768px) * 0.025), 18px);
    --text-badge: clamp(18px, calc(18px + (var(--max-vw) - 768px) * 0.025), 18px);
    --text-body: clamp(16px, calc(16px + (var(--max-vw) - 768px) * 0.025), 16px);
    --text-body-sm: clamp(16px, calc(16px + (var(--max-vw) - 768px) * 0.025), 16px);
    --text-body-fixed: clamp(16px, calc(16px + (var(--max-vw) - 768px) * 0.025), 16px);
    --text-small: clamp(14px, calc(14px + (var(--max-vw) - 768px) * 0.025), 14px);
    --text-small-sm: clamp(14px, calc(14px + (var(--max-vw) - 768px) * 0.025), 14px);
    --text-xs: clamp(12px, calc(12px + (var(--max-vw) - 768px) * 0.025), 12px);
    --gutter: clamp(25.88px, calc(25.88px + (var(--max-vw) - 768px) * 0.025), 40px);
    --section-gap: clamp(65.88px, calc(65.88px + (var(--max-vw) - 768px) * 0.025), 120px);
    --header-bar-h: clamp(42px, calc(42px + (var(--max-vw) - 768px) * 0.025), 42px);
    --header-nav-h: clamp(57.88px, calc(57.88px + (var(--max-vw) - 768px) * 0.025), 64px);
    --btn-h: clamp(59.88px, calc(59.88px + (var(--max-vw) - 768px) * 0.025), 61px);
    --radius-card: clamp(12px, calc(12px + (var(--max-vw) - 768px) * 0.025), 12px);
  }
}

/* DESKTOP 1024+ — scales from --vw-base 1440, capped at 1920 */
@media (min-width: 1024px) {
  :root,
  .product {
    /* Page gutter as on thestrom.co PDP (re-measured 2026-11-17): the drawn 40 at 1440,
       scaled with the viewport, 28 at 1024 and 53 at 1920. The product hero is capped
       separately at 1440 (product.css), the other sections run the full content width. */
    --gutter: clamp(28px, calc(40px * (var(--max-vw) / var(--vw-base))), 53px);
    --text-h2: clamp(28px, calc(40px * (var(--max-vw) / var(--vw-base))), 53px);
    --text-title: clamp(26px, calc(36px * (var(--max-vw) / var(--vw-base))), 48px);
    --text-stat: clamp(28px, calc(40px * (var(--max-vw) / var(--vw-base))), 53px);
    --text-signature: clamp(14px, calc(20px * (var(--max-vw) / var(--vw-base))), 27px);
    --text-price: clamp(21px, calc(30px * (var(--max-vw) / var(--vw-base))), 40px);
    --text-logo: clamp(21px, calc(29px * (var(--max-vw) / var(--vw-base))), 39px);
    --text-h4: clamp(14px, calc(20px * (var(--max-vw) / var(--vw-base))), 27px);
    --text-h4-lg: clamp(14px, calc(20px * (var(--max-vw) / var(--vw-base))), 27px);
    --text-cta: clamp(14px, calc(20px * (var(--max-vw) / var(--vw-base))), 27px);
    --text-lead: clamp(13px, calc(18px * (var(--max-vw) / var(--vw-base))), 24px);
    --text-h5: clamp(13px, calc(18px * (var(--max-vw) / var(--vw-base))), 24px);
    --text-label: clamp(13px, calc(18px * (var(--max-vw) / var(--vw-base))), 24px);
    --text-badge: clamp(13px, calc(18px * (var(--max-vw) / var(--vw-base))), 24px);
    --text-body: clamp(11px, calc(16px * (var(--max-vw) / var(--vw-base))), 21px);
    --text-body-sm: clamp(11px, calc(16px * (var(--max-vw) / var(--vw-base))), 21px);
    --text-body-fixed: clamp(11px, calc(16px * (var(--max-vw) / var(--vw-base))), 21px);
    --text-small: clamp(10px, calc(14px * (var(--max-vw) / var(--vw-base))), 19px);
    --text-small-sm: clamp(10px, calc(14px * (var(--max-vw) / var(--vw-base))), 19px);
    --text-xs: clamp(9px, calc(12px * (var(--max-vw) / var(--vw-base))), 16px);
    --section-gap: clamp(85px, calc(120px * (var(--max-vw) / var(--vw-base))), 160px);
    --header-bar-h: clamp(30px, calc(42px * (var(--max-vw) / var(--vw-base))), 56px);
    --header-nav-h: clamp(46px, calc(64px * (var(--max-vw) / var(--vw-base))), 85px);
    --btn-h: clamp(43px, calc(61px * (var(--max-vw) / var(--vw-base))), 81px);
    --radius-card: clamp(9px, calc(12px * (var(--max-vw) / var(--vw-base))), 16px);
  }
}

/* Page gutter resolved at the page level, so the hero keeps the page side padding
   even though .product re-scales --gutter with its capped --max-vw. */
:root { --page-gutter: var(--gutter); }
