/* ==========================================================================
   Inner page styles — extends ui_kits/marketing-site styles for non-home pages.
   Reuses .at-nav, .at-footer, .at-final-cta, .at-btn from the home — only
   adds what is unique to inner pages: clip-path hero, count-up, button shape
   override, and a few utility sections.
   ========================================================================== */

/* -- Buttons: rectangular with slight radius on inner pages (like the
      scrolled-nav "Become a dealer" button). Keep base button structure
      intact, just override the radius. */
.page-body .at-btn,
.page-body button.at-btn,
.page-body a.at-btn { border-radius: 8px; }

/* Inner-page nav floats at the top in its own reserved slot (page-body
   adds padding-top below to push content out from under it). The nav is
   transparent at rest and morphs into the glassy pill on scroll. The
   `is-no-bg` modifier strips the pill chrome while keeping the dark
   text/logo of `is-scrolled`, so links stay legible on the light page. */
.page-body { padding-top: 100px; }

.at-nav.is-no-bg .at-nav-inner {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ==========================================================================
   PAGE HERO — split layout: content (left) + photo (right) with a
   signature staircase clip-path. Shape varies per page via the `shape`
   prop. Mirrors the visual language of the home's WorkflowBlock.
   ========================================================================== */
.at-page-hero {
  position: relative;
  background: #fff;
  padding: 15px 32px 24px;
  overflow: visible;
}
.at-page-hero-inner {
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 0;
  align-items: stretch;
  min-height: 540px;
}

/* Content column — sits on white, padded for breathing room. */
.at-page-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 56px;
  color: var(--rubber-black);
  min-width: 0;
}
.at-page-hero-crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap;
}
.at-page-hero-crumbs a { color: inherit; text-decoration: none; transition: color 160ms; }
.at-page-hero-crumbs a:hover { color: var(--rubber-black); }
.at-page-hero-crumbs .sep { opacity: 0.4; }
.at-page-hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--performance-orange);
}
.at-page-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 2.2vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--rubber-black);
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
.at-page-hero-sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
  max-width: 52ch;
}

/* Meta — stat row at the bottom of the content column */
.at-page-hero-meta {
  display: flex; gap: 36px; flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--steel-silver);
}
.at-page-hero-meta > div { text-align: left; }
.at-page-hero-meta .l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.at-page-hero-meta .v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--rubber-black);
  line-height: 1;
}
.at-page-hero-meta .v sup { color: var(--performance-orange); font-size: 0.55em; }

/* Photo column — clip-path depends on shape variant. */
.at-page-hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 440px;
  background-color: var(--surface-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  clip-path: url(#page-hero-clip);
}
/* Photo entry animation — fade + slight rise on mount */
.at-page-hero-photo {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 900ms cubic-bezier(.32,.72,0,1), transform 900ms cubic-bezier(.32,.72,0,1);
}
.at-page-hero-photo.is-in {
  opacity: 1;
  transform: translateY(0);
}
.at-page-hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.05) 60%, rgba(0,0,0,0.0) 100%);
  pointer-events: none;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .at-page-hero-photo { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (max-width: 980px) {
  .at-page-hero { padding: 16px 16px 8px; }
  .at-page-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 0;
  }
  .at-page-hero-content {
    padding: 24px 20px 4px;
    order: 2;
    gap: 14px;
  }
  .at-page-hero-photo {
    order: 1;
    min-height: 260px;
    aspect-ratio: 16 / 9;
    /* Mobile: simple rounded rect, no notch. Radius scales with the viewport
       so it tightens further on small phones. */
    clip-path: inset(0 round clamp(12px, 3vw, 20px)) !important;
    -webkit-clip-path: inset(0 round clamp(12px, 3vw, 20px)) !important;
  }
  .at-page-hero-title { font-size: 26px; }
}
@media (max-width: 480px) {
  .at-page-hero-title { font-size: 22px; }
  .at-page-hero-meta .v { font-size: 18px; }
  .at-page-hero-meta { gap: 22px; }
}

/* ==========================================================================
   PLAIN HERO VARIANT — no photo, soft grey card, centered text.
   Use when the page doesn't need a photographic hero (about, careers,
   contact, pricing, 404, etc.). Adds visual rhythm across the site.
   ========================================================================== */
/* Plain hero card — centered text card on a soft grey background. */
.at-page-hero.is-plain {
  padding: 15px 32px 24px;
}
.at-page-hero.is-plain .at-page-hero-photo,
.at-page-hero.is-plain svg[aria-hidden="true"] { display: none; }
.at-page-hero.is-plain .at-page-hero-card {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  background: #f9f9f9;
  border: 1px solid #d9d8d8;
  border-radius: 32px;
  padding: 80px 56px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  position: relative;
  overflow: hidden;
}
.at-page-hero.is-plain .at-page-hero-card::before {
  /* Decorative pattern in the bottom-left corner */
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 320px; max-width: 30%;
  aspect-ratio: 288 / 311;
  background: url('../img/illustrations/at-pattern-left.svg') no-repeat bottom left;
  background-size: contain;
  pointer-events: none;
}
.at-page-hero.is-plain .at-page-hero-card::after { content: none; }
.at-page-hero.is-plain .at-page-hero-content {
  position: static;
  color: var(--rubber-black);
  align-items: center;
  text-align: center;
  max-width: 1140px;
  max-height: none;
  overflow: visible;
  padding: 0;
  gap: 14px;
}
.at-page-hero.is-plain .at-page-hero-crumbs {
  color: var(--fg-3);
  justify-content: center;
}
.at-page-hero.is-plain .at-page-hero-crumbs a { color: var(--fg-3); }
.at-page-hero.is-plain .at-page-hero-crumbs a:hover { color: var(--rubber-black); }
.at-page-hero.is-plain .at-page-hero-eyebrow { color: var(--performance-orange); }
.at-page-hero.is-plain .at-page-hero-title {
  color: var(--rubber-black);
  font-size: clamp(26px, 2.6vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.04;
  max-width: 100%;
  text-wrap: balance;
}
.at-page-hero.is-plain .at-page-hero-sub {
  color: var(--fg-2);
  font-size: 16px;
  -webkit-line-clamp: unset;
  display: block;
  max-width: 60ch;
  margin: 4px auto 0;
}
.at-page-hero.is-plain .at-page-hero-meta {
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 28px;
  margin-top: 18px;
  justify-content: center;
  max-width: none;
  border-top: 1px solid var(--steel-silver);
  width: 100%;
}
.at-page-hero.is-plain .at-page-hero-meta > div { text-align: center; }
.at-page-hero.is-plain .at-page-hero-meta .l { color: var(--fg-3); }
.at-page-hero.is-plain .at-page-hero-meta .v { color: var(--rubber-black); }

@media (max-width: 720px) {
  .at-page-hero.is-plain { padding: 16px; }
  .at-page-hero.is-plain .at-page-hero-card { padding: 44px 24px; border-radius: 24px; }
  .at-page-hero.is-plain .at-page-hero-card::before { width: 180px; opacity: 0.7; }
}

/* ==========================================================================
   GENERIC PAGE SECTIONS — light/dark/subtle backgrounds matching home tokens.
   ========================================================================== */
/* Sizing + container rules are now centralized in tokens.css under
   "LAYOUT TOKENS". This file only owns section *appearance* (bg variants). */
.at-section        { background: #fff; }
.at-section.dark   { background: var(--surface-dark); color: #fff; }
.at-section.subtle { background: var(--steel-silver-50); }
.at-section.muted  { background: var(--steel-silver-100); }

/* Within dark sections, ensure base type colors flip */
.at-section.dark h1, .at-section.dark h2, .at-section.dark h3,
.at-section.dark h4, .at-section.dark h5 { color: #fff; }
.at-section.dark p { color: rgba(255,255,255,0.7); }

.at-section-head { margin-bottom: 56px; max-width: 720px; }
.at-section-head .at-eyebrow { margin-bottom: 14px; }
.at-section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.at-section-head p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
  max-width: 60ch;
}
.at-section.dark .at-section-head p { color: rgba(255,255,255,0.7); }

/* ==========================================================================
   STATS — count-up animated metrics row.
   ========================================================================== */
.at-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  border-top: 1px solid var(--steel-silver);
  border-bottom: 1px solid var(--steel-silver);
}
.at-section.dark .at-stats { border-color: rgba(255,255,255,0.1); }
.at-stats .stat {
  padding: 40px 28px;
  border-right: 1px solid var(--steel-silver);
}
.at-section.dark .at-stats .stat { border-right: 1px solid rgba(255,255,255,0.1); }
.at-stats .stat:last-child { border-right: none; }
.at-stats .v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1;
  letter-spacing: -0.015em;
  display: inline-flex; align-items: baseline; gap: 2px;
}
.at-stats .v sup { color: var(--performance-orange); font-size: 0.5em; font-weight: 700; line-height: 1; }
.at-stats .v.orange { color: var(--performance-orange); }
.at-stats .l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-top: 14px;
}
.at-section.dark .at-stats .l { color: rgba(255,255,255,0.55); }

/* ==========================================================================
   GENERIC CARDS — matches home tile look.
   ========================================================================== */
.at-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.at-card {
  background: #fff;
  border: 1px solid var(--steel-silver);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  transition: transform 320ms cubic-bezier(.32,.72,0,1),
              border-color 220ms,
              box-shadow 320ms cubic-bezier(.32,.72,0,1);
}
.at-card:hover { transform: translateY(-2px); border-color: var(--rubber-black); }
.at-card .at-card-icon {
  width: 44px; height: 44px;
  background: var(--performance-orange-100);
  color: var(--performance-orange);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.at-card .at-card-icon svg { width: 22px; height: 22px; }
.at-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.at-card p { font-size: 14px; color: var(--fg-2); margin: 0; line-height: 1.55; }

.at-card.dark {
  background: var(--surface-dark-2);
  border-color: rgba(255,255,255,0.08);
  color: #fff;
}
.at-card.dark h3 { color: #fff; }
.at-card.dark p { color: rgba(255,255,255,0.65); }
.at-card.dark .at-card-icon {
  background: rgba(242,105,33,0.18);
  color: var(--performance-orange);
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.at-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.at-form-grid .full { grid-column: 1 / -1; }
.at-form-field { display: flex; flex-direction: column; gap: 8px; }
.at-form-field > label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.at-form-field > label .req { color: var(--performance-orange); margin-left: 3px; }
.at-form-field input,
.at-form-field textarea,
.at-form-field select {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--steel-silver);
  border-radius: 8px;
  background: #fff;
  color: var(--fg-1);
  transition: border-color 160ms, box-shadow 160ms;
  width: 100%;
}
.at-form-field input:focus,
.at-form-field textarea:focus,
.at-form-field select:focus {
  outline: none;
  border-color: var(--rubber-black);
  box-shadow: 0 0 0 4px rgba(242,105,33,0.12);
}
.at-form-field textarea { min-height: 120px; resize: vertical; }
.at-form-field .err { color: var(--danger); font-size: 13px; }
.at-form-field.has-error input,
.at-form-field.has-error textarea,
.at-form-field.has-error select { border-color: var(--danger); }

.at-radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.at-radio-pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--steel-silver);
  background: #fff;
  color: var(--rubber-black);
  text-decoration: none;
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all 160ms;
  user-select: none;
}
.at-radio-pill:hover,
.at-radio-pill:focus,
.at-radio-pill:active { text-decoration: none; }
.at-radio-pill:hover { border-color: var(--rubber-black); }
.at-radio-pill.is-active {
  background: var(--rubber-black);
  color: #fff;
  border-color: var(--rubber-black);
}

.at-form-success {
  background: var(--surface-dark);
  color: #fff;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
}
.at-form-success .ok-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--performance-orange);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.at-form-success h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: #fff;
}
.at-form-success p { color: rgba(255,255,255,0.7); margin: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 720px) {
  /* .at-section vertical padding is driven by --at-section-y in tokens.css */
  .at-form-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SCROLL REVEAL — cascading fade+rise as sections enter view.
   Driven by the IIFE at the bottom of page.jsx which tags elements with
   .at-reveal and sets --reveal-delay for staggered children.
   ========================================================================== */
.at-reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 900ms cubic-bezier(.22,.61,.36,1),
    transform 1000ms cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.at-reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Hero meta — cascades AFTER the clip-path morph finishes (triggered by
   PageHero's effect, not the IO). */
.at-page-hero-meta > * {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 700ms cubic-bezier(.22,.61,.36,1),
    transform 800ms cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.at-page-hero-meta > *.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* Hero title block — gentle rise on initial load */
.at-page-hero-content > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: at-hero-rise 800ms cubic-bezier(.32,.72,0,1) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}
.at-page-hero-content > *:nth-child(1) { --reveal-delay: 350ms; }
.at-page-hero-content > *:nth-child(2) { --reveal-delay: 450ms; }
.at-page-hero-content > *:nth-child(3) { --reveal-delay: 550ms; }
.at-page-hero-content > *:nth-child(4) { --reveal-delay: 650ms; }
@keyframes at-hero-rise {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .at-reveal, .at-page-hero-meta > *, .at-page-hero-content > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Count-up utility — tabular numerals so the digits don't jitter mid-animation */
.at-countup { font-variant-numeric: tabular-nums; }

/* ============================================================================
   Nav-light variant — opt-in via `bad-nav-light` body class. Used on pages
   with a light hero background (become-a-dealer, careers, careers archive/
   single). Swaps the wordmark to the dark logo, recolors links + CTA, and
   defers the white sticky panel chrome until the nav actually scrolls.
   ========================================================================== */
body.bad-nav-light .at-nav .at-nav-brand .dark-mark  { opacity: 0; }
body.bad-nav-light .at-nav .at-nav-brand .light-mark { opacity: 1; }
body.bad-nav-light .at-nav .at-nav-links a   { color: var(--rubber-black); }
body.bad-nav-light .at-nav .at-nav-links a:hover { color: var(--performance-orange); }
body.bad-nav-light .at-nav .at-nav-utility a { color: var(--rubber-black); opacity: 0.7; }
body.bad-nav-light .at-nav .at-nav-utility a:hover { opacity: 1; }
body.bad-nav-light .at-nav .at-nav-login     { color: var(--rubber-black); }
body.bad-nav-light .at-nav .at-nav-search-toggle { color: var(--rubber-black); }
body.bad-nav-light .at-nav .at-nav-actions .at-btn-primary {
    background: var(--rubber-black);
    color: #fff;
    border-color: var(--rubber-black);
    border-radius: 8px;
}
body.bad-nav-light .at-nav .at-nav-actions .at-btn-primary:hover {
    background: var(--rubber-black);
    border-color: var(--performance-orange);
}
body.bad-nav-light .at-nav .at-nav-burger .bar { background: var(--rubber-black); }

/* At rest (not scrolled) the bar reads as a flush header on the light hero:
   a bottom hairline divider and squared-off bottom corners. Selector is
   scoped through .at-nav so it outranks the nav-in-hero transparent-border
   rule (which would otherwise hide the hairline on shared pages). */
body.bad-nav-light .at-nav .at-nav-inner {
    border-bottom: 1px solid #d9d8d8;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Pure-white sticky panel once scrolled (override the default 0.92 alpha).
   Drop the hairline and bring the rounded bottom corners back so it reads
   as a floating pill again. */
body.bad-nav-light .at-nav.is-scrolled .at-nav-inner {
    background: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

/* When the "New to ECU tuning" full-screen quiz takeover is open, the fixed nav
   sits over a WHITE surface on ANY page (homepage, etc.) — so force the
   dark-text nav variant (mirrors bad-nav-light) for the duration, otherwise the
   default white-on-dark nav reads white-on-white and disappears. */
body.bad-ecu-quiz-open .at-nav .at-nav-brand .dark-mark  { opacity: 0; }
body.bad-ecu-quiz-open .at-nav .at-nav-brand .light-mark { opacity: 1; }
body.bad-ecu-quiz-open .at-nav .at-nav-links a   { color: var(--rubber-black); }
body.bad-ecu-quiz-open .at-nav .at-nav-links a:hover { color: var(--performance-orange); }
body.bad-ecu-quiz-open .at-nav .at-nav-utility a { color: var(--rubber-black); opacity: 0.7; }
body.bad-ecu-quiz-open .at-nav .at-nav-utility a:hover { opacity: 1; }
body.bad-ecu-quiz-open .at-nav .at-nav-login     { color: var(--rubber-black); }
body.bad-ecu-quiz-open .at-nav .at-nav-search-toggle { color: var(--rubber-black); }
body.bad-ecu-quiz-open .at-nav .at-nav-actions .at-btn-primary {
    background: var(--rubber-black);
    color: #fff;
    border-color: var(--rubber-black);
    border-radius: 8px;
}
body.bad-ecu-quiz-open .at-nav .at-nav-burger .bar { background: var(--rubber-black); }

/* The quiz takeover (.bad-ecu-quiz) is its OWN scroll container
   (position:fixed; overflow-y:auto) with the document locked
   (body.bad-ecu-quiz-open { overflow:hidden }), so window scroll never fires and
   the nav's .is-scrolled background never kicks in — the bar stays transparent
   while the quiz content scrolls UNDER it (looks like "no background"). Force the
   solid frosted background (identical to .at-nav.is-scrolled) whenever the
   takeover is open, to match the dark-link treatment above. */
body.bad-ecu-quiz-open .at-nav-inner {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px 0px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
            backdrop-filter: blur(22px) saturate(160%);
}

/* ============================================================================
   Custom select enhancer (.at-select-host) — mirrors the alttune-vehicles
   attnvl-select look. Native <select data-at-select> stays in the DOM but
   is hidden; JS in main.js builds .at-select__trigger + .at-select__panel.
   ========================================================================== */
.at-select-host {
    position: relative;
    display: inline-block;
}
.at-select-host .at-select-native {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    border: 0;
}
.at-select__trigger {
    appearance: none;
    display: inline-flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 6px 12px;
    min-width: 70px;
    background: #fff;
    border: 1px solid var(--steel-silver);
    border-radius: 8px;
    color: var(--rubber-black);
    font-family: var(--font-display); font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 140ms, box-shadow 140ms;
}
.at-select__trigger:hover { border-color: var(--rubber-black); }
.at-select-host[data-open="true"] .at-select__trigger,
.at-select__trigger:focus-visible {
    border-color: var(--rubber-black);
    box-shadow: 0 0 0 3px rgba(242,105,33,0.18);
    outline: none;
}
.at-select__chevron {
    transition: transform 160ms cubic-bezier(.32,.72,0,1);
    color: var(--fg-3);
    flex: 0 0 auto;
}
.at-select-host[data-open="true"] .at-select__chevron { transform: rotate(180deg); }

.at-select__panel {
    position: absolute;
    top: calc(100% + 6px); left: 0;
    min-width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--steel-silver);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(10,9,8,0.14);
    padding: 4px;
    z-index: 30;
    display: none;
}
.at-select-host[data-open="true"] .at-select__panel { display: block; }

.at-select__option {
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-display); font-size: 13px;
    color: var(--rubber-black);
    cursor: pointer;
    user-select: none;
    transition: background-color 120ms;
    white-space: nowrap;
}
.at-select__option:hover,
.at-select__option:focus {
    background: var(--steel-silver-100);
    outline: none;
}
.at-select__option[aria-selected="true"] {
    background: var(--rubber-black);
    color: #fff;
}
.at-select__option[aria-selected="true"]:hover {
    background: var(--rubber-black);
}

/* ============================================================================
   News dark nav — opt-in via `news-nav-dark` body class.
   Used on the news index, category/tag archives, and single post pages.
   Renders the .at-nav-inner as a solid black pill with white text + the
   light wordmark so it reads cleanly against the news section's editorial
   look (mirrors the Futurism magazine reference).
   ========================================================================== */
body.news-nav-dark .at-nav .at-nav-inner {
    background: var(--rubber-black, #050505);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.news-nav-dark .at-nav .at-nav-brand .dark-mark  { opacity: 0; }
body.news-nav-dark .at-nav .at-nav-brand .light-mark { opacity: 1; }
body.news-nav-dark .at-nav .at-nav-links a            { color: #fff; }
body.news-nav-dark .at-nav .at-nav-links a:hover      { color: var(--performance-orange); }
body.news-nav-dark .at-nav .at-nav-utility a          { color: rgba(255,255,255,0.65); opacity: 1; }
body.news-nav-dark .at-nav .at-nav-utility a:hover    { color: #fff; }
body.news-nav-dark .at-nav .at-nav-login              { color: rgba(255,255,255,0.85); }
body.news-nav-dark .at-nav .at-nav-login:hover        { color: var(--performance-orange); }
body.news-nav-dark .at-nav .at-nav-burger .bar        { background: #fff; }

/* CTA inside the dark nav — white pill with orange wipe-in on hover.
   Mirrors the .news-hero-search__submit pattern for visual consistency. */
body.news-nav-dark .at-nav .at-nav-actions .at-btn-primary {
    background: #ffffff;
    color: var(--rubber-black);
    border-color: #ffffff;
    border-radius: 8px;
}
body.news-nav-dark .at-nav .at-nav-actions .at-btn-primary:hover {
    color: #fff;
    background: transparent;
    border-color: var(--performance-orange);
}

/* Scrolled state — keep the dark pill, just lift the shadow a touch
   so the nav still reads "elevated" once the user starts scrolling. */
body.news-nav-dark .at-nav.is-scrolled .at-nav-inner {
    background: var(--rubber-black, #050505);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ============================================================================
   Nav-dark variant — opt-in via `bad-nav-dark` body class. Used on pages
   with a dark editorial feel (news index, category/tag archives, single
   posts). Forces a solid black nav at all times (no glass-transparent
   first state), keeps the white wordmark, links and CTA all stay white.
   ========================================================================== */
body.bad-nav-dark .at-nav-inner {
    background: var(--rubber-black);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.bad-nav-dark .at-nav.is-scrolled .at-nav-inner {
    background: var(--rubber-black);
}
body.bad-nav-dark .at-nav .at-nav-brand .dark-mark  { opacity: 1; }
body.bad-nav-dark .at-nav .at-nav-brand .light-mark { opacity: 0; }
body.bad-nav-dark .at-nav.is-scrolled .at-nav-brand .dark-mark  { opacity: 1; }
body.bad-nav-dark .at-nav.is-scrolled .at-nav-brand .light-mark { opacity: 0; }
body.bad-nav-dark .at-nav .at-nav-links a,
body.bad-nav-dark .at-nav.is-scrolled .at-nav-links a { color: #fff; }
body.bad-nav-dark .at-nav .at-nav-links a:hover,
body.bad-nav-dark .at-nav.is-scrolled .at-nav-links a:hover { color: var(--performance-orange); }
body.bad-nav-dark .at-nav .at-nav-utility a,
body.bad-nav-dark .at-nav.is-scrolled .at-nav-utility a { color: rgba(255,255,255,0.7); opacity: 1; }
body.bad-nav-dark .at-nav .at-nav-utility a:hover,
body.bad-nav-dark .at-nav.is-scrolled .at-nav-utility a:hover { color: #fff; }
body.bad-nav-dark .at-nav .at-nav-login,
body.bad-nav-dark .at-nav.is-scrolled .at-nav-login { color: #fff; }
body.bad-nav-dark .at-nav-burger .bar { background: #fff; }

/* Dropdown panel — flip to white-on-black to stay legible against the
   dark nav strip. */
body.bad-nav-dark .at-nav-dropdown {
    background: var(--rubber-black);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}
body.bad-nav-dark .at-nav-dropdown a,
body.bad-nav-dark .at-nav-dropdown-link { color: #fff; }
body.bad-nav-dark .at-nav-dropdown a:hover,
body.bad-nav-dark .at-nav-dropdown-link:hover { color: var(--performance-orange); background: rgba(255,255,255,0.04); }

/* CTA button — white pill with black text, orange wipe-in on hover so it
   still pops against the dark nav. */
body.bad-nav-dark .at-nav .at-nav-actions .at-btn-primary,
body.bad-nav-dark .at-nav.is-scrolled .at-nav-actions .at-btn-primary {
    background: #fff;
    color: var(--rubber-black);
    border-color: #fff;
}
body.bad-nav-dark .at-nav .at-nav-actions .at-btn-primary:hover,
body.bad-nav-dark .at-nav.is-scrolled .at-nav-actions .at-btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: var(--performance-orange);
}

/* ============================================================================
   nav-in-hero — used by pages whose hero is a light card (#f9f9f9 with
   border + rounded corners) and want the fixed top nav to sit visually
   INSIDE that card rather than floating in its own pill above it.
   Opt-in via body class `nav-in-hero`. Pair with `bad-nav-light` so the
   text/logo read correctly against the light card.
   ========================================================================== */
body.nav-in-hero .at-nav-inner {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* Once scrolled past the hero, restore the regular glassy pill chrome
   so the nav stays legible over the rest of the page. */
body.nav-in-hero .at-nav.is-scrolled .at-nav-inner {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px 0px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
}

/* ============================================================================
   .at-hero-card — generic hero card chrome shared by news + careers.
   Soft-grey card on a white page band, rounded corners, light border,
   decorative pattern anchored bottom-left, inner content capped at 1440 px.
   Outer card extends to 1860 px max so it feels "full-bleed" on big
   screens while content stays readable.
   ========================================================================== */
.at-hero-card {
    position: relative;
    overflow: hidden;
    max-width: 1860px;
    margin: 0 auto;
    background: #f9f9f9;
    border: 1px solid #d9d8d8;
    border-radius: clamp(18px, 2vw, 32px);
    /* Top padding clears the fixed nav (which sits transparently over
       the card via body.nav-in-hero); sides + bottom keep breathing room. */
    padding: 112px 56px 22px;
}
.at-hero-card__pattern {
    position: absolute;
    bottom: 0; left: 0;
    width: 190px;
    max-width: 11%;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}
.at-hero-card__pattern img { display: block; width: 100%; height: auto; }

.at-hero-card__inner {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding-inline: var(--at-gutter);
}

@media (max-width: 720px) {
    .at-hero-card {
        padding: 96px 24px 48px;
        border-radius: clamp(16px, 4vw, 24px);
    }
    .at-hero-card__pattern { width: 180px; opacity: 0.7; }
}

/* ------------------------------------------------------------------
   Shared feature-block helpers (About + Become a Dealer).
   ------------------------------------------------------------------ */
/* Bottom spacing for the feature row — single source of truth. */
.at-features-pad { padding-bottom: 48px; }

/* ------------------------------------------------------------------
   "New to ECU tuning" full-screen quiz takeover.
   Rendered globally from footer.php and opened by any [data-bad-open-ecu]
   CTA (homepage hero, footer final-CTA, Become a Dealer). Fills the
   viewport with a solid surface at z-index 40 — BELOW the fixed site nav
   (z-index 50) — so the header stays visible and clickable on top while
   the quiz is centred. Scrolls internally on long flows.
   ------------------------------------------------------------------ */
.bad-ecu-quiz {
    position: fixed; inset: 0; z-index: 40;
    display: none;
    background: #f9f9f9;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.bad-ecu-quiz.is-open { display: block; animation: badEcuFade 0.25s ease; }
.bad-ecu-quiz__inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 120px 20px 64px; /* top clears the fixed nav */
}
.bad-ecu-quiz__body { width: 100%; margin: 0 auto; }
.bad-ecu-quiz__close {
    position: fixed; top: 152px; right: 24px;
    z-index: 60; /* above the fixed nav (z-index 50) so it's always clickable */
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-1);
    background: var(--pure-white);
    color: var(--fg-1);
    display: none; /* shown only while the takeover is open */
    align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: background 0.15s ease, transform 0.15s ease;
}
body.bad-ecu-quiz-open .bad-ecu-quiz__close { display: flex; }
.bad-ecu-quiz__close:hover { background: var(--steel-silver-100); transform: scale(1.05); }
body.bad-ecu-quiz-open { overflow: hidden; }
@keyframes badEcuFade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
    /* Top-align (not center): tall steps were overflowing ABOVE the top padding,
       under the fixed nav, with justify-content:center. flex-start keeps the
       title below the nav, and a generous top padding clears the fixed nav
       (~70px) with breathing room. Bottom padding stays light because the quiz's
       own fixed mobile action bar reserves its space inside `.atlr`. */
    .bad-ecu-quiz__inner { padding: 120px 14px 24px; justify-content: flex-start; }
    .bad-ecu-quiz__close { top: 72px; right: 14px; }
    /* WP admin bar pushes the fixed nav down 46px on mobile — match it so a
       logged-in admin doesn't see the title tuck under the bar. */
    body.admin-bar .bad-ecu-quiz__inner { padding-top: 158px; }
}
