/* ============================================================
   ev8-seo.css
   ------------------------------------------------------------
   Small companion stylesheet added during the SEO pass.

   It exists so that ev8motors.css did not have to be rewritten:
   a handful of HTML elements were changed to make the markup
   valid and give every page a proper heading structure, and these
   rules make sure those changes are invisible on screen.

   LOAD ORDER MATTERS — link this file AFTER ev8motors.css:
     <link rel="stylesheet" href="ev8motors.css">
     <link rel="stylesheet" href="ev8-seo.css">

   What changed in the HTML and why each rule is here:

   1. <pe> → <p>  (about.html, engine.html)
      "pe" is not an HTML element. Browsers rendered it by accident
      because grid items get blockified; crawlers and screen readers
      never treated it as a paragraph, so several hundred words of
      the best copy on the site were invisible as prose.

   2. events.html had no <h1> at all — "Find Us on the Road." was an
      <h2>. It is now the page's <h1>.

   3. contact.html had two <h1>s. "Reach Us" is now an <h2>.

   4. ev8.html had no <h1>. The title bar text is now one, plus a
      hidden heading labelling the component grid.
   ============================================================ */


/* ── 1. Prose columns ─────────────────────────────────────────
   Mirrors the existing `.body-columns pe` rules so real <p> tags
   render identically. The original selectors are kept alongside so
   nothing breaks if an old page still uses <pe>. */
.body-columns pe,
.body-columns p {
  text-align: justify;
  text-justify: inter-word;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
}

.body-columns pe + pe,
.body-columns p + p { margin-top: 4px; }

.body-columns pe .drop-cap,
.body-columns p .drop-cap {
  float: left;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 54px;
  line-height: 0.9;
  color: var(--black);
  margin: 4px 8px 0 0;
}


/* ── 2. Section headers that are now <h1> ─────────────────────
   Matches the existing `.section-header h2` sizing so promoting a
   heading to <h1> changes nothing visually. */
.section-header h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.8rem);
  letter-spacing: -0.018em;
  text-transform: none;
  max-width: 20ch;
}


/* ── 3. Contact page sub-heading demoted to <h2> ──────────────
   Matches the existing `.classics-sub h1` rule. */
.classics-sub h1,
.classics-sub h2 { font-size: clamp(2.1rem, 5.5vw, 3.8rem); }


/* ── 4. Headings present for crawlers and screen readers only ──
   Used for the "eV8 SBC Components" heading on ev8.html, which
   labels the component grid without adding visible text to a page
   whose layout is already balanced.

   Note: this hides the text visually but keeps it in the
   accessibility tree and in the rendered DOM — unlike
   `display:none`, which search engines discount. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* ── 5. About block wrapper ───────────────────────────────────
   On ev8motors.html the About label/heading/divider were nested
   inside a <span>, which is invalid around block content. They are
   now grouped in .about-intro-text so .about-intro still has exactly
   two flex children and the layout is unchanged. */
.about-intro-text { display: block; width: 100%; }


/* ── 6. Reduced motion ────────────────────────────────────────
   Core Web Vitals and accessibility: honour a visitor's system
   setting for reduced motion. Also stops the intro's scroll
   animation from fighting assistive tech. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ── 7. Visible focus ring ────────────────────────────────────
   Keyboard users need to see where they are. `a { color: inherit;
   text-decoration: none }` in ev8motors.css removes the usual cues. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
