/* ============================================================
   Car Help Canada — Base element styles
   Ported from the redesign design system (tokens/base.css).
   Sensible, on-brand defaults so raw HTML inherits the system.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Prevent horizontal scroll from off-canvas fixed elements (e.g. the CF7
   reCAPTCHA v3 badge). `clip` (not `hidden`) keeps the sticky header working. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: var(--lh-heading);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-light); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-light); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard);
}
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

strong, b { font-weight: var(--fw-semibold); }

hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-6) 0;
}

img, svg, video { max-width: 100%; }
img { height: auto; display: block; }

button { font-family: inherit; }

::selection { background: var(--red-100); color: var(--black); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---- Layout helper ---- */
.chc-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.chc-container--narrow { max-width: var(--container-narrow); }

/* ---- Eyebrow / uppercase label utility ---- */
.chc-eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 14px;
}

/* ---- Screen-reader-only text ---- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--color-primary);
  display: block;
  height: auto;
  left: 12px;
  top: 12px;
  padding: 12px 18px;
  width: auto;
  z-index: 100000;
}
