/* ==========================================================================
   Promo Car Care — design tokens
   Mirrors the Figma file TO9EyDgwYZlIM1zyDz2R0W 1:1:
   Figma variable "brand/blue-600"  ->  CSS custom property --brand-blue-600
   Figma text style "Desktop/H1"    ->  class .t-h1 (size switches at breakpoints)

   Breakpoints (midpoints between the 1440 / 768 / 390 Figma frames):
     desktop  >= 1024px
     tablet   600px – 1023px
     mobile   < 600px
   ========================================================================== */

/* ---------- Font: DM Sans, self-hosted (variable: weight 400–700 + optical size axis,
   Latin subset). Browsers set optical size from font-size automatically, like Figma. */
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Colors (Figma collection: PCC Colors) */
  --brand-blue-900: #0b2e4f;
  --brand-blue-700: #084a7c;
  --brand-blue-600: #0a5994;
  --brand-blue-100: #e6f0f8;
  --brand-blue-50: #f4f8fc;
  --brand-green-700: #3f7a1f;
  --brand-green-500: #82ba52; /* fills and icons only, never text on white */
  --brand-green-50: #eef6e6;
  --neutral-900: #0f172a;
  --neutral-600: #475569;
  --neutral-500: #64748b;
  --neutral-200: #e2e8f0;
  --neutral-100: #f1f5f9;
  --neutral-white: #ffffff;
  --feedback-error: #b42318;

  /* ---------- Spacing (Figma collection: PCC Spacing) */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-128: 128px;

  /* ---------- Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* ---------- Shadows (Figma effect styles) */
  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-raised: 0 8px 24px rgba(15, 23, 42, 0.1);

  /* ---------- Layout */
  --container: 1200px;
  --page-margin: 40px; /* 120 at 1440 comes from the 1200 container */
  --gutter: 24px;
  --section-pad: var(--space-96);
  --card-pad: var(--space-32);

  /* ---------- Type ramp (desktop values; overridden below)
     Each style = size / line-height / letter-spacing */
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --display-size: 56px; --display-lh: 64px;
  --h1-size: 44px;      --h1-lh: 52px;
  --h2-size: 36px;      --h2-lh: 44px;
  --h3-size: 28px;      --h3-lh: 36px;
  --h4-size: 20px;      --h4-lh: 28px;
  --body-lg-size: 18px; --body-lg-lh: 28px;
  --body-size: 16px;    --body-lh: 24px;
  --body-sm-size: 14px; --body-sm-lh: 20px;
  --label-size: 12px;   --label-lh: 16px;
  --button-size: 16px;  --button-lh: 24px;
  --caption-size: 12px; --caption-lh: 16px;
}

/* ---------- Tablet: Mobile/* sizes for Display–H4, Desktop/* for body
   (responsive rules approved Oct 28, 2026) */
@media (max-width: 1023.98px) {
  :root {
    --section-pad: var(--space-64);
    --display-size: 36px; --display-lh: 44px;
    --h1-size: 32px;      --h1-lh: 40px;
    --h2-size: 28px;      --h2-lh: 36px;
    --h3-size: 22px;      --h3-lh: 30px;
    --h4-size: 18px;      --h4-lh: 26px;
  }
}

/* ---------- Mobile: Mobile/* everywhere */
@media (max-width: 599.98px) {
  :root {
    --page-margin: 20px;
    --gutter: 16px;
    --section-pad: var(--space-48);
    --card-pad: var(--space-24);
    --body-lg-size: 17px; --body-lg-lh: 26px;
  }
}

/* ---------- Text style classes (one per Figma text style) */
.t-display { font-size: var(--display-size); line-height: var(--display-lh); font-weight: 700; letter-spacing: -0.02em; }
.t-h1      { font-size: var(--h1-size);      line-height: var(--h1-lh);      font-weight: 700; letter-spacing: -0.02em; }
.t-h2      { font-size: var(--h2-size);      line-height: var(--h2-lh);      font-weight: 700; letter-spacing: -0.01em; }
.t-h3      { font-size: var(--h3-size);      line-height: var(--h3-lh);      font-weight: 600; }
.t-h4      { font-size: var(--h4-size);      line-height: var(--h4-lh);      font-weight: 600; }
.t-body-lg { font-size: var(--body-lg-size); line-height: var(--body-lg-lh); font-weight: 400; }
.t-body    { font-size: var(--body-size);    line-height: var(--body-lh);    font-weight: 400; }
.t-body-sm { font-size: var(--body-sm-size); line-height: var(--body-sm-lh); font-weight: 400; }
.t-label   { font-size: var(--label-size);   line-height: var(--label-lh);   font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.t-button  { font-size: var(--button-size);  line-height: var(--button-lh);  font-weight: 600; }
.t-caption { font-size: var(--caption-size); line-height: var(--caption-lh); font-weight: 500; }
.t-strong  { font-weight: 600; } /* Body Strong / Body Small Strong */
