/* ============================================
   K&S AUTOMOTIVE - professional theme
   Architecture mirrors a card-based, light/dark
   toggle site: container/nav/hero/card/section/footer
   ============================================ */

:root{
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1a1a1e;
  --text-muted: #5a5f68;
  --text-dim: #8b8f97;
  --border: #e6e6e9;

  --brand: #c4212b;   /* deep red */
  --brand-2: #d99a1c; /* amber */

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(20,20,25,0.06);
  --shadow-lg: 0 12px 40px rgba(20,20,25,0.10);

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="dark"]{
  --bg: #111214;
  --surface: #18191c;
  --text: #f2f1ee;
  --text-muted: #a7abb3;
  --text-dim: #75797f;
  --border: #2b2c30;

  --brand: #e0454f;
  --brand-2: #f0b429;

  --shadow: 0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.45);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; overflow-x: hidden; }
body{
  margin:0;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

.container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
h2{ font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3{ font-size: 1.15rem; font-weight: 700; }
p{ margin: 0 0 12px; color: var(--text-muted); }
.small{ font-size: 0.88rem; }

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.gradient-text{
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   HEADER / NAV
   ============================================ */
header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav{
  display:flex;
  align-items:center;
  justify-content: space-between;
  height: 76px;
  position: relative;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}
.brand .mark{
  width: 46px; height: 46px;
  object-fit: contain;
  flex: none;
}
.brand .tagline{
  display:block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.menu{
  display:flex;
  align-items:center;
  gap: 30px;
}
.menu a{
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.menu a:hover{ color: var(--text); }
.menu a.active{ color: var(--text); border-color: var(--brand); }

.nav-actions{ display:flex; align-items:center; gap: 10px; }

.theme-toggle{
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display:flex; align-items:center; justify-content:center;
  cursor: pointer;
}
.theme-toggle svg{ width: 18px; height: 18px; }
.theme-toggle:hover{ color: var(--brand); border-color: var(--brand); }

.mobile-btn{
  display:none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover{ border-color: var(--brand); box-shadow: var(--shadow); }
.btn:active{ transform: translateY(1px); }
.btn.primary{
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
}
.btn.primary:hover{ box-shadow: var(--shadow-lg); }

.cta-row{ display:flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }

/* ============================================
   LAYOUT / CARDS
   ============================================ */
main{ padding-bottom: 40px; }
.section{ padding: 56px 0; }
.section > h2{ margin-bottom: 22px; }

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.highlight-card{
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), var(--surface));
}

.hero{ padding: 60px 0 20px; }
.hero .eyebrow{
  display:inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-2{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.icon-badge{
  width: 46px; height: 46px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  display:flex; align-items:center; justify-content:center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

/* highlight strip (capability badges, not fabricated stats) */
.capability-strip{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.capability-strip .card{
  padding: 22px 18px;
  text-align:center;
}
.capability-strip .cap-label{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}
.capability-strip .cap-sub{
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 4px 0 0;
}

/* certified badges */
.badge-row{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge-pill{
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
}

/* ============================================
   FORM
   ============================================ */
.form{
  display:flex;
  flex-direction: column;
  gap: 14px;
}
.input{
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color .15s ease;
}
.input:focus{ outline: none; border-color: var(--brand); }
textarea.input{ resize: vertical; min-height: 110px; }
select.input{ appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b8f97' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

.check-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.check-item{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.9rem;
  cursor: pointer;
}
.check-item input{ accent-color: var(--brand); width:16px; height:16px; flex: none; }
.check-item:hover{ border-color: var(--brand); }

.field-label{
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  display:block;
}

/* ============================================
   FOOTER
   ============================================ */
.footer{
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
  background: var(--surface);
}

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.in{ opacity: 1; transform: none; }

/* ============================================
   SYMPTOM FINDER
   ============================================ */
.symptom-chips{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 6px;
}
.symptom-chip{
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.symptom-chip:hover{ border-color: var(--brand); color: var(--text); }
.symptom-chip.active{
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}
.symptom-result{
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.symptom-result.show{ display: flex; }
.symptom-result .sr-text{ font-size: 0.92rem; color: var(--text); }
.symptom-result .sr-text strong{ color: var(--brand); }

/* service card highlight pulse when matched by symptom finder */
.service-card{ transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card.pulse{
  border-color: var(--brand);
  animation: pulseGlow 1.4s ease 2;
}
@keyframes pulseGlow{
  0%,100%{ box-shadow: var(--shadow); }
  50%{ box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 14%, transparent); }
}

/* ============================================
   SCROLLSPY NAV
   ============================================ */
.menu a.spy-active{ color: var(--text); border-color: var(--brand); }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display:flex; align-items:center; justify-content:center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, border-color .2s ease;
  z-index: 40;
}
.back-to-top.show{ opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover{ border-color: var(--brand); color: var(--brand); }

/* floating call button (mobile) */
.float-call{
  position: fixed;
  left: 22px;
  bottom: 22px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  z-index: 40;
}
@media (max-width: 760px){
  .float-call{ display: inline-flex; }
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item{
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child{ border-bottom: none; }
.faq-q{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
}
.faq-q .plus{
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--brand);
  display:flex; align-items:center; justify-content:center;
  font-size: 1rem;
  transition: transform .2s ease;
}
.faq-item.open .faq-q .plus{ transform: rotate(45deg); }
.faq-a{
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-item.open .faq-a{ max-height: 240px; }
.faq-a p{ padding: 0 2px 18px; margin: 0; }

/* ============================================
   FORM STATUS PANEL
   ============================================ */
.form-status{
  display: none;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
}
.form-status.show{ display: flex; }
.form-status.success{
  background: color-mix(in srgb, #1c9c5b 10%, transparent);
  border: 1px solid color-mix(in srgb, #1c9c5b 40%, var(--border));
}
.form-status.error{
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--border));
}
.form-status .fs-icon{
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  font-size: 0.95rem;
  color: #fff;
}
.form-status.success .fs-icon{ background: #1c9c5b; }
.form-status.error .fs-icon{ background: var(--brand); }
.form-status h4{ margin: 0 0 4px; font-size: 0.98rem; }
.form-status p{ margin: 0; font-size: 0.88rem; }

.btn.primary[disabled]{ opacity: 0.7; cursor: default; }

/* ============================================
   GARAGE GALLERY
   ============================================ */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.gallery-item{
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.gallery-item img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.gallery-item figcaption{
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 760px){
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px){
  .gallery-grid{ grid-template-columns: 1fr; }
}

/* ============================================
   CHAT WIDGET
   ============================================ */
.chat-widget{
  position: fixed;
  right: 26px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
}
.chat-toggle{
  width: 60px; height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.chat-toggle svg{ width: 26px; height: 26px; }
.chat-toggle svg.icon-close{ display: none; }
.chat-toggle.open svg.icon-chat{ display: none; }
.chat-toggle.open svg.icon-close{ display: block; }
.chat-toggle .ping{
  position: absolute;
  top: -2px; right: -2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #1c9c5b;
  border: 2px solid var(--surface);
  animation: pingPulse 1.8s ease-in-out infinite;
}
@keyframes pingPulse{
  0%,100%{ transform: scale(1); opacity: 1; }
  50%{ transform: scale(1.35); opacity: 0.55; }
}

.chat-panel{
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.chat-panel.open{ opacity: 1; transform: none; pointer-events: auto; }

.chat-header{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  flex: none;
}
.chat-header img{
  width: 32px; height: 32px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  flex: none;
}
.chat-header .ch-title{ font-weight: 700; font-size: 0.94rem; line-height: 1.2; }
.chat-header .ch-sub{ font-size: 0.72rem; opacity: 0.88; }
.chat-close{
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px 6px;
}

.chat-body{
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.chat-msg{
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
}
.chat-msg.bot{
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.chat-msg.user{
  align-self: flex-end;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg a{ color: inherit; text-decoration: underline; }

.chat-quick{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 14px 12px;
  flex: none;
}
.chat-quick button{
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.chat-quick button:hover{ border-color: var(--brand); color: var(--brand); }

.chat-input-row{
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex: none;
}
.chat-input-row input{
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.chat-input-row input:focus{ outline: none; border-color: var(--brand); }
.chat-send{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.chat-send svg{ width: 16px; height: 16px; }

@media (max-width: 480px){
  .chat-panel{ bottom: 70px; }
}

/* ============================================
   MECHANIC BACKGROUND - ambient tool/gear icons
   ============================================ */
.mech-bg{
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -3;
  pointer-events: none;
}
.mech-icon{
  position: absolute;
  will-change: transform;
}
.mech-icon svg{
  display: block;
  width: 100%;
  height: 100%;
  color: var(--text);
  opacity: 0.055;
}
[data-theme="dark"] .mech-icon svg{ opacity: 0.09; }

.mech-icon.gear{ top: -70px; left: -70px; width: 260px; height: 260px; }
.mech-icon.wrench{ bottom: -60px; right: -80px; width: 280px; height: 280px; }
.mech-icon.tire{ top: 8%; right: -90px; width: 200px; height: 200px; }
.mech-icon.nut{ bottom: 10%; left: -75px; width: 160px; height: 160px; }

.mech-spin{ transform-origin: 50% 50%; animation: gearSpin 55s linear infinite; }
@keyframes gearSpin{ to{ transform: rotate(360deg); } }

.mech-icon.wrench svg{ transform: rotate(-18deg); transform-origin: 50% 50%; }

@media (max-width: 760px){
  .mech-icon.gear{ width: 180px; height: 180px; }
  .mech-icon.wrench{ width: 190px; height: 190px; }
  .mech-icon.tire{ width: 140px; height: 140px; }
  .mech-icon.nut{ width: 110px; height: 110px; }
}

/* ============================================
   AMBIENT BACKGROUND GLOW
   ============================================ */
body::before, body::after{
  content:"";
  position: fixed;
  width: 380px; height: 380px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.16;
  z-index: -1;
  pointer-events: none;
  animation: driftBlob 18s ease-in-out infinite;
}
body::before{ background: var(--brand); top: -110px; left: -110px; }
body::after{ background: var(--brand-2); bottom: -130px; right: -110px; animation-delay: -9s; }
@keyframes driftBlob{
  0%,100%{ transform: translate(0,0); }
  50%{ transform: translate(40px, 26px); }
}

/* CTA shine sweep + glow */
.btn.primary{ position: relative; overflow: hidden; }
.btn.primary::after{
  content:"";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-120%);
  animation: shineSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shineSweep{
  0%{ transform: translateX(-120%); }
  40%,100%{ transform: translateX(120%); }
}

/* ============================================
   ROAD STRIP - cars driving across the bottom
   ============================================ */
body{ padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
.road-strip{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(180deg, #303136, #1a1b1d);
  border-top: 2px solid var(--brand);
  overflow: hidden;
  z-index: 35;
  pointer-events: none;
}
.road-strip::before{
  content:"";
  position: absolute;
  top: 29px; left: 0; right: 0; height: 3px;
  background-image: repeating-linear-gradient(90deg, #f0c419 0 26px, transparent 26px 52px);
  animation: laneMove 1.4s linear infinite;
}
@keyframes laneMove{ to{ background-position-x: -52px; } }

.road-car{
  position: absolute;
  bottom: 6px;
  width: 58px;
  height: auto;
  animation-name: driveAcross;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.road-car.c1{ animation-duration: 8s; bottom: 4px; }
.road-car.c2{ animation-duration: 12.5s; bottom: 16px; animation-delay: -4s; opacity: 0.82; transform: scale(0.82); }
.road-car.c3{ animation-duration: 16s; bottom: 26px; animation-delay: -9.5s; opacity: 0.65; transform: scale(0.66); }
@keyframes driveAcross{
  from{ left: -70px; }
  to{ left: 100%; }
}
.road-car .wheel{
  transform-box: fill-box;
  transform-origin: center;
  animation: wheelSpin 0.6s linear infinite;
}
@keyframes wheelSpin{ to{ transform: rotate(360deg); } }

/* keep floating buttons clear of the road strip, and clear of notches/home-indicators */
.back-to-top{ bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
.float-call{ bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }

/* ============================================
   SIDE DOT NAVIGATION - shows position on the page
   ============================================ */
.side-dots{
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 40;
}
.side-dots button{
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.side-dots .dot{
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  background: var(--surface);
  flex: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.side-dots button:hover .dot{ border-color: var(--brand); transform: scale(1.2); }
.side-dots button.active .dot{
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  transform: scale(1.3);
}
.side-dots .dot-label{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.side-dots button:hover .dot-label,
.side-dots button.active .dot-label{
  opacity: 1;
  transform: none;
}

@media (max-width: 1180px){
  .side-dots{ display: none; }
}

/* ============================================
   RESPONSIVE - desktop → large tablet → tablet →
   phone → small phone, plus touch/print/motion cases
   ============================================ */

/* extra-wide desktops: give content a little more room */
@media (min-width: 1600px){
  .container{ max-width: 1240px; }
}

/* large tablets / small laptops (landscape iPad, etc.) */
@media (max-width: 1024px){
  .grid-3{ grid-template-columns: repeat(2, 1fr); }
}

/* tablets in portrait */
@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* phones (and narrow tablets) - nav collapses to a menu */
@media (max-width: 760px){
  .menu{
    position: absolute;
    top: 76px; left: 0; right:0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 14px;
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .menu.open{ display:flex; }
  .mobile-btn{ display:inline-block; }
  .check-grid{ grid-template-columns: 1fr; }
  .road-strip{ height: calc(44px + env(safe-area-inset-bottom, 0px)); }
  .road-car{ width: 42px; }
  body{ padding-bottom: calc(46px + env(safe-area-inset-bottom, 0px)); }
  .back-to-top{ bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }
  .float-call{ bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .chat-widget{ right: 16px; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
}

/* standard phones - stack the remaining 2-col grids */
@media (max-width: 620px){
  .grid-3{ grid-template-columns: 1fr; }
  .capability-strip{ grid-template-columns: 1fr; }
  .cta-row{ flex-direction: column; align-items: stretch; }
  .cta-row .btn{ width: 100%; }
}

/* small phones (SE, older Android, narrow foldables) */
@media (max-width: 400px){
  .container{ padding: 0 16px; }
  .card{ padding: 22px 18px; }
  .brand .tagline{ display: none; }
  .brand{ font-size: 1rem; }
  .nav-actions{ gap: 6px; }
  .road-strip{ height: calc(36px + env(safe-area-inset-bottom, 0px)); }
  .road-car{ width: 32px; }
  body{ padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px)); }
  .back-to-top{ bottom: calc(100px + env(safe-area-inset-bottom, 0px)); width: 42px; height: 42px; }
  .float-call{ bottom: calc(52px + env(safe-area-inset-bottom, 0px)); width: auto; height: auto; padding: 10px 14px; font-size: 0.8rem; }
  .chat-widget{ right: 12px; bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  .chat-toggle{ width: 50px; height: 50px; }
  .chat-panel{ width: calc(100vw - 24px); }
}

/* touch devices: don't leave hover states "stuck" after a tap */
@media (hover: none) and (pointer: coarse){
  .service-card:hover{ transform: none; box-shadow: var(--shadow); }
  .btn:hover{ box-shadow: none; }
  .symptom-chip:hover{ border-color: var(--border); color: var(--text-muted); }
  .side-dots button:hover .dot{ border-color: var(--text-dim); transform: none; }
  .side-dots button:hover .dot-label{ opacity: 0; transform: translateX(6px); }
}

/* respect reduced-motion preference */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  body::before, body::after,
  .road-strip::before,
  .road-car,
  .road-car .wheel,
  .mech-spin,
  .btn.primary::after{
    animation: none !important;
  }
}

/* print: skip decorative/interactive chrome entirely */
@media print{
  .site-nav, header, .road-strip, .back-to-top, .float-call, .side-dots, .theme-toggle{ display: none !important; }
  body{ padding-bottom: 0; background: #fff; color: #000; }
  .card{ box-shadow: none; border: 1px solid #ccc; }
}