/* =====================================================================
   OEM Software Services — interactive EV systems visualization.
   Scoped feature stylesheet (all selectors start .oem-*). Loaded ONLY on
   the general EV Repair page and the Tesla make page so unrelated routes
   carry no extra CSS. Uses the site design tokens from site.css
   (--red, --red2, --ink, --head, --body) which are in :root there.
   ===================================================================== */
.oem-section{
  --oem-char:#121214;--oem-char2:#17171b;--oem-line:rgba(255,255,255,.1);
  --oem-red:#ff3b50;--oem-red-soft:rgba(224,12,35,.16);--oem-ok:#22c55e;
  position:relative;background:var(--oem-char);color:#fff;overflow:hidden;
  padding:84px 0;
}
.oem-section::before{/* ambient red lighting */
  content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(60% 55% at 18% 12%,rgba(224,12,35,.20),transparent 60%),
    radial-gradient(50% 50% at 92% 88%,rgba(224,12,35,.12),transparent 60%);
}
.oem-section::after{/* technical grid */
  content:"";position:absolute;inset:0;pointer-events:none;z-index:0;opacity:.5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
  background-size:46px 46px;
  -webkit-mask-image:radial-gradient(ellipse 80% 70% at 50% 40%,#000 55%,transparent 100%);
  mask-image:radial-gradient(ellipse 80% 70% at 50% 40%,#000 55%,transparent 100%);
}
.oem-section>.wrap{position:relative;z-index:1}

.oem-head{max-width:720px;margin:0 0 40px}
.oem-head .eyebrow{color:var(--oem-red)}
.oem-head h2{font:800 clamp(30px,4vw,50px)/1.03 var(--head);text-transform:uppercase;
  color:#fff;margin:0 0 16px;letter-spacing:.01em}
.oem-head p{font-size:17.5px;line-height:1.65;color:#c7c7cc;margin:0}

/* ---- stage: two-column visualization + panel ---- */
.oem-stage{display:grid;grid-template-columns:1.02fr .98fr;gap:34px;align-items:stretch}

/* left: vehicle visualization */
.oem-viz{position:relative;background:linear-gradient(160deg,#17171c,#0e0e11);
  border:1px solid var(--oem-line);border-radius:18px;padding:22px 22px 16px;
  display:flex;flex-direction:column;overflow:hidden}
.oem-viz::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.6;z-index:0;
  background-image:linear-gradient(rgba(255,255,255,.028) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.028) 1px,transparent 1px);
  background-size:34px 34px;
  -webkit-mask-image:radial-gradient(ellipse 78% 70% at 50% 56%,#000 55%,transparent 100%);
  mask-image:radial-gradient(ellipse 78% 70% at 50% 56%,#000 55%,transparent 100%)}
.oem-viz>*{position:relative;z-index:1}
.oem-viz-label{display:flex;align-items:center;justify-content:space-between;
  font:700 11.5px/1 var(--head);letter-spacing:.14em;text-transform:uppercase;color:#8a8a93;margin-bottom:8px}
.oem-viz-label .oem-dot{display:inline-flex;align-items:center;gap:7px}
.oem-viz-label .oem-dot::before{content:"";width:8px;height:8px;border-radius:50%;
  background:var(--oem-ok);box-shadow:0 0 0 0 rgba(34,197,94,.5)}
@media (prefers-reduced-motion:no-preference){
  .oem-viz-label .oem-dot::before{animation:oem-pulse 2.6s ease-in-out infinite}
}
/* pause all decorative animation while the section is scrolled out of view */
.oem-section.oem-paused #oem-g-net .oem-path,
.oem-section.oem-paused .oem-viz-label .oem-dot::before,
.oem-section.oem-paused .oem-hotspot .oem-ping{animation-play-state:paused}
/* tighten the transition when the section sits directly under the hero + trust strip */
.svc-hero + .oem-section{padding-top:54px}
@keyframes oem-pulse{0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.45)}50%{box-shadow:0 0 0 5px rgba(34,197,94,0)}}

.oem-car{position:relative;flex:1;display:flex;align-items:center;justify-content:center;margin:2px 0;min-height:0}
.oem-car-frame{position:relative;width:100%}
.oem-ev{width:100%;height:auto;display:block}
/* semi-transparent bodywork so the internal systems read through */
.oem-car-body{fill:url(#oemBody);fill-opacity:.5;stroke:rgba(255,255,255,.34);stroke-width:2}
.oem-car-glass{fill:url(#oemGlass);stroke:rgba(255,255,255,.22);stroke-width:1.2}
.oem-pillar{stroke:rgba(255,255,255,.22);stroke-width:1.2}
/* internal system groups — visible but subdued until their system is selected */
.oem-sys{opacity:.4;transition:opacity .4s ease,filter .4s ease}
.oem-sys rect,.oem-sys>circle{fill:rgba(170,182,200,.10);stroke:rgba(205,215,230,.55);stroke-width:1.4}
.oem-sys line{stroke:rgba(205,215,230,.42);stroke-width:1.1}
.oem-sys .oem-inner{fill:rgba(205,215,230,.2);stroke:none}
.oem-sys .oem-node{fill:rgba(255,80,98,.75);stroke:none}
.oem-sys.is-lit{opacity:1}
.oem-sys.is-lit rect,.oem-sys.is-lit>circle{fill:rgba(224,12,35,.18);stroke:var(--oem-red);
  filter:drop-shadow(0 0 5px rgba(224,12,35,.7))}
.oem-sys.is-lit line{stroke:rgba(255,120,135,.9)}
.oem-sys.is-lit .oem-inner{fill:rgba(224,12,35,.45)}
/* network pathways (part of #oem-g-net) animate only when the network is lit */
#oem-g-net .oem-path{fill:none;stroke:rgba(205,215,230,.32);stroke-width:1.4;stroke-dasharray:4 6}
#oem-g-net.is-lit .oem-path{stroke:var(--oem-red)}
@media (prefers-reduced-motion:no-preference){
  #oem-g-net.is-lit .oem-path{animation:oem-dash 1.1s linear infinite}
}
@keyframes oem-dash{to{stroke-dashoffset:-20}}
/* wheels */
.oem-car-wheel{fill:#0c0c0f;stroke:rgba(255,255,255,.34);stroke-width:2.4}
.oem-rim{fill:#1a1a1f;stroke:rgba(255,255,255,.22);stroke-width:1.6}
.oem-hub{fill:#2a2a30;stroke:rgba(255,255,255,.3);stroke-width:1.2}

/* hotspots */
.oem-hotspot{position:absolute;transform:translate(-50%,-50%);width:30px;height:30px;
  border-radius:50%;border:0;padding:0;cursor:pointer;background:transparent;z-index:3;
  -webkit-tap-highlight-color:transparent}
.oem-hotspot::before{/* ring */
  content:"";position:absolute;inset:0;border-radius:50%;
  border:2px solid rgba(255,255,255,.4);background:rgba(18,18,20,.7);transition:.2s}
.oem-hotspot::after{/* core dot + number via data */
  content:attr(data-n);position:absolute;inset:0;display:grid;place-items:center;
  font:800 12px/1 var(--head);color:#fff}
.oem-hotspot .oem-ping{position:absolute;inset:-6px;border-radius:50%;border:2px solid var(--oem-red);opacity:0}
.oem-hotspot:hover::before,.oem-hotspot:focus-visible::before{border-color:var(--oem-red);transform:scale(1.12)}
.oem-hotspot:focus-visible{outline:2px solid #fff;outline-offset:3px}
.oem-hotspot[aria-selected="true"]::before{background:var(--oem-red);border-color:#fff;
  box-shadow:0 0 18px rgba(224,12,35,.8)}
@media (prefers-reduced-motion:no-preference){
  .oem-hotspot[aria-selected="true"] .oem-ping{animation:oem-ping 1.8s ease-out infinite}
}
@keyframes oem-ping{0%{opacity:.7;transform:scale(.7)}100%{opacity:0;transform:scale(1.8)}}

.oem-viz-hint{text-align:center;font-size:12.5px;color:#7d7d86;margin:6px 0 0}

/* right: tablist + panels */
.oem-panels{display:flex;flex-direction:column;gap:16px;min-width:0}
/* no-vehicle layout: a single centered column of system tabs + the active panel */
.oem-noviz .oem-panels{max-width:1040px;margin:0 auto;width:100%}
.oem-tablist{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.oem-tab{display:flex;align-items:center;gap:8px;text-align:left;background:var(--oem-char2);
  border:1px solid var(--oem-line);border-radius:10px;padding:10px 11px;cursor:pointer;color:#c2c2c9;
  font:700 11px/1.15 var(--head);text-transform:uppercase;letter-spacing:.05em;transition:.16s;min-height:46px}
.oem-tab .oem-tab-n{font-size:12px;color:#6f6f78;flex:none}
.oem-tab:hover{border-color:rgba(255,255,255,.28);color:#fff}
.oem-tab:focus-visible{outline:2px solid var(--oem-red);outline-offset:2px}
.oem-tab[aria-selected="true"]{background:linear-gradient(180deg,#242428,#1a1a1e);
  border-color:var(--oem-red);color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.4)}
.oem-tab[aria-selected="true"] .oem-tab-n{color:var(--oem-red)}

.oem-panel-wrap{position:relative;flex:1;background:linear-gradient(170deg,#1b1b20,#141418);
  border:1px solid var(--oem-line);border-top:3px solid var(--oem-red);border-radius:14px;
  padding:26px 28px 24px;min-height:272px}
.oem-panel{display:none}
.oem-panel.is-active{display:block}
/* No-JS fallback: the site adds .js to <html>; without it the tab script never runs,
   so reveal every panel (all content stays reachable) and drop the non-functional
   hotspot markers. With JS, the script controls visibility normally. */
html:not(.js) .oem-panel{display:block;margin-bottom:16px;border-top:1px solid var(--oem-line);padding-top:16px}
html:not(.js) .oem-panel:first-child{border-top:0;padding-top:0}
html:not(.js) .oem-hotspot{display:none}
@media (prefers-reduced-motion:no-preference){
  .oem-panel.is-active{animation:oem-fade .4s ease}
}
@keyframes oem-fade{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.oem-panel-top{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.oem-panel-ico{flex:none;width:46px;height:46px;border-radius:11px;background:var(--oem-red-soft);
  display:grid;place-items:center;border:1px solid rgba(224,12,35,.35)}
.oem-panel-ico svg{width:26px;height:26px;fill:none;stroke:var(--oem-red);stroke-width:1.8}
.oem-panel-num{font:700 12px/1 var(--head);letter-spacing:.14em;color:var(--oem-red);text-transform:uppercase}
.oem-panel h3{font:800 23px/1.1 var(--head);text-transform:uppercase;color:#fff;margin:4px 0 0}
.oem-panel>p{font-size:15.5px;line-height:1.6;color:#c7c7cc;margin:0 0 16px}
.oem-panel-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px 24px;margin:0 0 20px}
.oem-col h4{font:700 11px/1 var(--head);letter-spacing:.1em;text-transform:uppercase;color:#8a8a93;margin:0 0 9px}
.oem-col ul{list-style:none;margin:0;padding:0}
.oem-col li{position:relative;padding:0 0 7px 20px;font-size:14px;line-height:1.45;color:#d2d2d7}
.oem-col li::before{content:"";position:absolute;left:2px;top:7px;width:7px;height:7px;border-radius:2px;
  background:var(--oem-red);transform:rotate(45deg)}
.oem-col.oem-col-sym li::before{background:none;border:1.5px solid #f0b23a;border-radius:50%;
  transform:none;left:2px;top:5px;width:9px;height:9px}
.oem-panel-cta{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.oem-panel-cta .btn{min-height:42px}

/* ---- Tesla variant: distinct, reuses tokens, not identical ---- */
.oem-tesla .oem-tesla-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:34px;align-items:center}
.oem-modules{position:relative;background:linear-gradient(160deg,#17171c,#0e0e11);
  border:1px solid var(--oem-line);border-radius:18px;padding:26px;display:grid;
  grid-template-columns:1fr 1fr;gap:12px}
.oem-mod{display:flex;gap:11px;align-items:flex-start;background:var(--oem-char2);
  border:1px solid var(--oem-line);border-radius:11px;padding:14px 13px}
.oem-mod i{flex:none;width:34px;height:34px;border-radius:9px;background:var(--oem-red-soft);
  display:grid;place-items:center;border:1px solid rgba(224,12,35,.32)}
.oem-mod i svg{width:19px;height:19px;fill:none;stroke:var(--oem-red);stroke-width:1.8}
.oem-mod b{display:block;font:700 12.5px/1.15 var(--head);text-transform:uppercase;letter-spacing:.03em;color:#fff}
.oem-mod span{display:block;font-size:11.5px;line-height:1.35;color:#9a9aa2;margin-top:3px}
.oem-tesla-txt h3{font:800 clamp(22px,2.4vw,30px)/1.08 var(--head);text-transform:uppercase;color:#fff;margin:0 0 14px}
.oem-tesla-txt .oem-tesla-list{list-style:none;margin:0 0 20px;padding:0}
.oem-tesla-txt .oem-tesla-list li{position:relative;padding:0 0 10px 24px;font-size:15px;line-height:1.5;color:#cfcfd4}
.oem-tesla-txt .oem-tesla-list li svg{position:absolute;left:0;top:3px;width:16px;height:16px;fill:none;stroke:var(--oem-red);stroke-width:2}
.oem-tesla-txt .ctas{display:flex;flex-wrap:wrap;gap:12px}

/* ---- responsive ---- */
@media (max-width:1000px){
  .oem-stage{grid-template-columns:1fr;gap:20px}
  .oem-tesla .oem-tesla-grid{grid-template-columns:1fr;gap:24px}
  .oem-viz{min-height:0}
  .oem-car svg{max-height:240px}
}
@media (max-width:620px){
  .oem-section{padding:56px 0}
  .oem-tablist{grid-template-columns:1fr 1fr}
  .oem-panel-cols{grid-template-columns:1fr;gap:16px}
  .oem-panel-wrap{padding:22px 20px}
  .oem-modules{grid-template-columns:1fr}
  .oem-car svg{max-height:200px}
  .oem-hotspot{width:34px;height:34px}/* larger tap targets */
}
