/* ==========================================================================
   Nevada Mobile Repairs – Style 2 (Full)
   A11y-first, senior-friendly, responsive, motion-safe, dark-mode ready
   ========================================================================== */

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

:root{
  /* Palette — Nevada-forward (Silver, Navy, Sage) */
  --nv-blue-900: #072a63;
  --nv-blue-800: #0A3A84;
  --nv-blue-700: #0B3B8C; /* primary brand */
  --nv-blue-600: #1552B9;
  --nv-blue-500: #2F6FED; /* gradient partner / focus */
  --nv-sage-600: #6FAE7F; /* accent: sage */
  --nv-sage-500: #7BAA7D;
  --nv-silver-300: #C0C6CC; /* Silver State nod */
  --nv-silver-200: #D9DEE6;
  --nv-ink-900: #0E2033;
  --nv-ink-700: #22344A;
  --nv-ink-500: #4a5a70;
  --nv-warn-600: #B36B00;
  --nv-ok-600:  #2E8B57;
  --nv-error-600:#8c1a1a;

  /* Core tokens */
  --bg: #F7F7F5;
  --ink: var(--nv-ink-900);
  --muted: var(--nv-ink-500);
  --primary: var(--nv-blue-700);
  --primary-ink: #ffffff;
  --accent: var(--nv-sage-600);
  --stroke: var(--nv-silver-200);
  --card: #ffffff;
  --focus: var(--nv-blue-500);
  --ok: var(--nv-ok-600);
  --warn: var(--nv-warn-600);
  --error: var(--nv-error-600);

  /* Layout & type */
  --radius: 16px;
  --shadow: 0 8px 30px rgba(18,32,51,.08);
  --base: clamp(18px, 1.8vw, 20px); /* senior-friendly base */
  --line: 1.6;
  --tap: 52px;
  --maxw: 980px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0C121A;
    --ink: #E9EEF5;
    --muted: #A8B4C3;
    --card: #0F1722;
    --stroke: #1F2A3A;
    --shadow: 0 10px 30px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

/* ----------------------- Document ----------------------- */
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body{
  margin:0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 800px at 110% -10%, rgba(11,59,140,.06), transparent 50%),
    radial-gradient(1200px 800px at -10% 110%, rgba(123,170,125,.08), transparent 50%),
    var(--bg);
  font-size: var(--base);
  line-height: var(--line);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

::selection{ background: color-mix(in srgb, var(--focus) 20%, transparent); }

/* Container */
.wrap{
  width:min(92vw, var(--maxw));
  margin-inline:auto;
  padding: 20px 0 calc(100px + env(safe-area-inset-bottom));
}

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

/* ----------------------- Topbar ----------------------- */
.topbar{
  position: sticky; top: 0; inset-inline: 0; z-index: 30;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin: 0 0 18px; padding: 10px 0 12px;
  background: linear-gradient(#F7F7F5, rgba(247,247,245,.7));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(217,222,230,.6);
}
@media (prefers-color-scheme: dark){
  .topbar{ background: linear-gradient(#0C121A, rgba(12,18,26,.6)); border-bottom-color:#1F2A3A; }
}

.brand{ display:flex; align-items:center; gap:12px; user-select:none; min-width:0; text-decoration:none; }
.logo{
  width:56px; height:56px; border-radius:12px; flex:0 0 auto; overflow:hidden;
  background: conic-gradient(from 200deg at 50% 50%, var(--primary) 0deg, var(--accent) 120deg, var(--nv-silver-300) 220deg, var(--primary) 360deg);
  box-shadow: 0 6px 16px rgba(11,59,140,.25);
  display:grid; place-items:center; color:#fff; font-weight:900;
}
.brand h1{
  font-size: clamp(26px, 3.8vw, 42px);
  margin:0; letter-spacing:.2px; font-weight:900; line-height:1.05;
  display:flex; gap:10px; align-items:center; color:var(--ink);
}
.brand h1 .nv{ color: var(--primary); }
.brand h1 .mobile{ color: var(--accent); }

/* Optional topbar CTA (if added later) */
.cta-call{
  display:inline-flex; align-items:center; gap:10px;
  padding: 14px 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--focus));
  color: var(--primary-ink);
  text-decoration:none; font-weight:900; min-height: var(--tap);
  box-shadow: var(--shadow); white-space: nowrap; font-size: 20px;
  border: 1px solid color-mix(in srgb, #fff 20%, transparent);
}
.cta-call:hover{ filter: brightness(1.05); }
.cta-call:focus-visible{
  outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 30%, transparent);
}

/* ----------------------- Card / Hero ----------------------- */
.card{
  position:relative;
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3.2vw, 30px);
  overflow: hidden;
}

.nv-ribbon{
  position:absolute; top:14px; right:-32px; transform: rotate(10deg);
  background: linear-gradient(135deg, var(--primary), #0D4CC6); color:#fff;
  padding: 8px 56px; font-size:12px; letter-spacing:.6px; font-weight:800;
  box-shadow: 0 6px 16px rgba(11,59,140,.3);
  border: 1px solid rgba(255,255,255,.5); pointer-events:none;
}

.hero{
  font-weight: 900; line-height: 1.18;
  font-size: clamp(26px, 3.4vw, 40px);
  margin: 0 0 10px; text-wrap: balance;
}
.hero .g{
  background: linear-gradient(135deg, var(--primary), var(--focus));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub{ color: var(--muted); margin: 0 0 14px; font-size: clamp(16px, 2vw, 19px); }

/* ----------------------- Highlights / Values ----------------------- */
.badges{
  display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; margin: 12px 0 18px;
}
.badge{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:12px; border-radius: 12px; border:1px solid var(--stroke); background:#FAFBFC;
  font-size: 16px; color: #1f2c3b; text-align:center; min-height: 56px;
}
.badge b{ color: var(--primary); }

.value-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin: 12px 0 18px; }
.value{
  border:1px solid var(--stroke); background:#FCFDFE; border-radius:14px; padding: 14px;
  font-size: 18px; display:flex; align-items:center; justify-content:center; text-align:center; min-height: 64px;
}
.value b{ color: var(--primary); }

/* ----------------------- Progress Dots ----------------------- */
.progress{ display:flex; align-items:center; justify-content:center; gap:10px; margin: 6px 0 16px; }
.dot{
  width:12px; height:12px; border-radius:99px; background:#E6EBF2; border:1px solid #CCD4DF; transition: transform .12s ease, box-shadow .2s ease;
}
.dot.active{
  background: var(--accent); border-color: transparent;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 24%, transparent);
  transform: scale(1.05);
}

/* ----------------------- Stepper ----------------------- */
.steps{ display:grid; }
.step{ display:none; }
.step.active{ display:block; }

/* ----------------------- Form ----------------------- */
.row{ display:grid; gap:12px; grid-template-columns: 1fr 1fr; align-items:start; }
.row.single{ grid-template-columns: 1fr; }
.field{ display:grid; gap:8px; }
label{ font-size: 16px; color:#2b3a4e; letter-spacing:.2px; font-weight:800; }

input, textarea, select{
  width:100%; background:#FFFFFF; border: 2px solid #CFD6DF; border-radius:12px;
  padding: 14px 16px; color: var(--ink); outline: none; font-size: 18px;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease, transform .06s ease;
  min-height: var(--tap);
}
input::placeholder, textarea::placeholder{ color:#6c7d93; opacity:.95; }
textarea{ resize: vertical; min-height: 110px; max-height: 240px; }

input:focus, textarea:focus, select:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 26%, transparent);
}
input:focus-visible, textarea:focus-visible, select:focus-visible{ outline: none; }

.help{ font-size: 14px; color:#5d6f86; }

.error{ color: var(--error); font-weight: 700; letter-spacing:.2px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"]{
  border-color: color-mix(in srgb, var(--error) 80%, #fff 20%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 22%, transparent);
}

/* Number input – remove spinners for cleaner UI */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
input[type="number"]{ -moz-appearance: textfield; appearance: textfield; }

/* ----------------------- Buttons ----------------------- */
.actions{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; align-items:stretch; }
.actions.solo{ grid-template-columns: 1fr; }

.btn{
  appearance:none; border:0; cursor:pointer; user-select:none; border-radius:12px; padding: 14px 18px;
  font-weight:900; min-height: var(--tap); text-align:center;
  background:#EEF2F7; color:#0f1c2a; border: 1px solid #D6DEE8;
  transition: transform .06s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  width:100%;
}
.btn:hover{ background:#E6ECF5; }
.btn:active{ transform: translateY(1px); }
.btn:focus-visible{ outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 26%, transparent); }

.btn.primary{
  background: linear-gradient(135deg, var(--primary), var(--focus));
  color: var(--primary-ink);
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  box-shadow: 0 10px 22px rgba(11,59,140,.28);
}
.btn.big{ padding: 18px 22px; font-size: 20px; min-height: calc(var(--tap) + 8px); letter-spacing:.2px; }
.btn[disabled]{ opacity:.6; cursor:not-allowed; }

/* ----------------------- Social Proof & Legal ----------------------- */
.social-proof{
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin: 10px 0 0; font-size: 16px; color: var(--muted); text-align:center;
}
.pfp{ width:28px; height:28px; border-radius:50%; background:linear-gradient(145deg, #b9c6d8, #d9e1ea); display:inline-block; flex:0 0 auto; }
.legal{ font-size: 12.5px; color: var(--muted); margin-top: 10px; text-align:center; }

/* ----------------------- Success State ----------------------- */
.success{ display:none; text-align:center; padding: 10px 4px 0; }
.success.show{ display:block; animation: fade .25s ease; }
.check{
  display:inline-grid; place-items:center; width:64px; height:64px; border-radius:16px;
  background: linear-gradient(135deg, var(--ok), #6AC89A); color:#062019; font-weight:900; font-size:30px;
  box-shadow: 0 10px 24px rgba(46,139,87,.3); margin-bottom:10px;
}

/* ----------------------- Horizontal Icon Scroller ----------------------- */
.scroller-wrap{ margin-top: 18px; border-top: 1px solid var(--stroke); padding-top: 14px; }
.scroller-title{ font-size: 15px; color: var(--muted); margin-bottom: 8px; font-weight:800; text-align:center; }
.scroller{
  --gap: 18px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.scroll-track{ display:flex; gap:var(--gap); align-items:center; width:max-content; animation: marquee 26s linear infinite; }
.scroll-track:hover{ animation-play-state: paused; }
@keyframes marquee{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }
.chip{
  display:inline-flex; align-items:center; gap:8px; padding:10px 12px;
  border-radius:999px; border:1px solid var(--stroke); background:#FAFBFC; font-size: 16px; white-space:nowrap;
}

/* ----------------------- Vehicle / Equipment Scroller ----------------------- */
.equip-scroller-wrap {
  margin-top: 24px; padding: 20px 0;
  border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke);
  background: #fff; overflow: hidden;
}
@media (prefers-color-scheme: dark){
  .equip-scroller-wrap{ background: var(--card); }
}
.equip-scroller-title {
  font-size: 16px; font-weight: 800; color: var(--muted); text-align: center; margin-bottom: 12px;
}
.equip-scroller {
  --gap: 20px; display: flex; align-items: center; gap: var(--gap);
  width: max-content; animation: equip-marquee 40s linear infinite;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.equip-scroller:hover { animation-play-state: paused; }
.equip-item {
  flex: 0 0 auto; border-radius: 16px; box-shadow: var(--shadow);
  overflow: hidden; background: #fafbfc; border: 1px solid var(--stroke);
}
.equip-item img {
  display: block; width: 260px; height: 180px; object-fit: cover; transition: transform 0.3s ease;
}
.equip-item img:hover { transform: scale(1.05); }
@keyframes equip-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ----------------------- Trust Footer (if used) ----------------------- */
.trust{
  margin-top: 14px; display:grid; grid-template-columns: 1fr 1fr; gap:10px; font-size: 16px; color: var(--muted);
}
.trust > div{

  border:1px solid var(--stroke); background:#FCFDFE; border-radius:14px; padding: 12px 14px; text-align:center;
}
.trust b{ color:var(--primary); }

/* ----------------------- Sticky Callbar (Dual Hotlines) ----------------------- */
.callbar{
  position: fixed; inset-inline: 0; bottom: 0;
  background: var(--primary); color: #fff;
  display:flex; align-items:center; justify-content:center; gap:12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 20px rgba(0,0,0,.12); z-index: 40;
}
.callbar-title{
  font-weight: 900; letter-spacing:.2px; opacity:.95; display:none;
}
.callbar-actions{
  display:contents; gap:10px; flex-wrap:wrap; justify-content:center; width:100%; max-width: var(--maxw);
}

.callbar a,
.callbar .callbar-btn{
  display:inline-flex; align-items:center; gap:10px; text-decoration:none;
  background:#ffffff; color: var(--primary);
  font-weight:900; border-radius:999px; padding: 12px 18px; min-height: var(--tap); white-space:nowrap;
  border:1px solid color-mix(in srgb, var(--primary) 12%, #fff 88%);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  transition: transform .06s ease, filter .12s ease, box-shadow .12s ease;
}
.callbar a:hover{ filter: brightness(1.02); }
.callbar a:active{ transform: translateY(1px); }
.callbar a:focus-visible{ outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 28%, transparent); }

/* Region-specific color tags for quick visual diff */
.callbar-btn--north{
  color: #073066; border-color: color-mix(in srgb, #073066 10%, #fff 90%);
}
.callbar-btn--south{
  color: #22543d; border-color: color-mix(in srgb, #22543d 12%, #fff 88%);
  background: #ffffff;
}

/* ----------------------- Motion & Effects ----------------------- */
.fade-in{ opacity:0; transform: translateY(6px); animation: enter .5s ease forwards; }
@keyframes enter{ to{ opacity:1; transform:none; } }
@keyframes fade{ from{ opacity:0; transform: translateY(6px);} to{ opacity:1; transform:none; } }

/* ----------------------- Media / Accessibility ----------------------- */
@media (max-width: 980px){
  .badges{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px){
  .row{ grid-template-columns: 1fr; }
  .value-grid{ grid-template-columns:1fr; }
  .trust{ grid-template-columns:1fr; }
  .brand h1{ max-width: 56vw; }
  .callbar-title{ display:none; }
}

@media (prefers-reduced-motion: reduce){
  .fade-in, .scroll-track, .equip-scroller{ animation: none !important; }
  html{ scroll-behavior: auto; }
}

/* Increased contrast mode */
@media (prefers-contrast: more){
  .badge, .value, .trust > div { background: #fff; }
  .btn.primary{ box-shadow: none; }
  .dot.active{ box-shadow: 0 0 0 6px #000; }
}

/* ----------------------- Utility Niceties ----------------------- */
a{ color: color-mix(in srgb, var(--primary) 84%, #000 16%); }
a:hover{ text-decoration-thickness: 2px; }

img{ max-width: 100%; height: auto; }

/* Print – ensure clean lead info sheet if someone prints */
@media print{
  .callbar, .topbar, .nv-ribbon{ display:none !important; }
  body{ background:#fff; color:#000; }
  .card{ border:1px solid #ccc; box-shadow:none; }
}

/* ----------------------- Specific IDs from markup ----------------------- */
#formError{ min-height:16px; margin:8px 0 0 0; }
#success h3{ margin:8px 0 6px 0; }

/* ----------------------- Nice Touches ----------------------- */
/* Gentle depth for cards within hero notice bars present in HTML inline styles */
.card .card{
  border-radius: calc(var(--radius) - 4px);
}

/* Input hover – subtle affordance */
input:hover, textarea:hover, select:hover{
  border-color: color-mix(in srgb, var(--focus) 16%, #CFD6DF 84%);
}

/* Ensure buttons in "Back/Next" row have clear hierarchy */
.actions .btn.primary{ order: 2; }
.actions .btn:not(.primary){ order: 1; }

/* Make progress dots keyboard-reachable if needed */
.progress .dot{ outline-offset: 3px; }

/* Ensure safe-area padding on iOS */
@supports (padding: max(0px)){
  .callbar{ padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
/* Accessible separator between hotline buttons */
.callbar-sep{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 0 6px; font-weight: 900; letter-spacing:.2px;
  opacity:.85; text-transform: lowercase;
}

/* If you don't already have a screen-reader utility */
.sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Tighten spacing on very small screens */
@media (max-width: 420px){
  .callbar-sep{ padding: 0 4px; }
}

/* ========= Broken → Repaired Hook ========= */
.repair-hook{
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.6fr;
  gap: 18px;
  margin: 16px 0 6px;
  padding: 16px;
  border: 1px dashed color-mix(in srgb, var(--warn) 30%, var(--stroke) 70%);
  border-radius: calc(var(--radius) - 4px);
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--warn) 7%, transparent) 0%, transparent 100%),
    #fff;
}
@media (max-width: 860px){ .repair-hook{ grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark){
  .repair-hook{ background: linear-gradient(0deg, rgba(179,107,0,.08), transparent), var(--card); }
}

.repair-hook__vis{
  display:grid; place-items:center;
  padding: 10px; background:#fafbfc; border:1px solid var(--stroke);
  border-radius: 12px; box-shadow: var(--shadow);
  overflow:hidden;
}
.repair-svg{ width:100%; max-width: 360px; }
.repair-svg .car rect,
.repair-svg .car circle,
.repair-svg .bolt rect{
  fill: color-mix(in srgb, var(--primary) 16%, #6f7f95);
}
.repair-svg .crack{
  stroke: var(--warn);
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 2 6;
}
.repair-svg .badge circle{
  fill: color-mix(in srgb, var(--ok) 24%, #6ac89a);
  opacity: 0; transform-origin: 196px 26px; transform: scale(.5);
}
.repair-svg .badge path{
  stroke: #063; opacity: 0; stroke-linecap: round; stroke-linejoin: round;
}

.sparks .spark{
  fill: color-mix(in srgb, var(--warn) 40%, #ffdc82);
  opacity: 0;
}

/* Copy */
.repair-hook__copy{ display:grid; align-content:center; gap:8px; }
.repair-hook__copy .glitch{
  font-weight: 900; margin: 0; font-size: clamp(20px, 3vw, 28px);
  position: relative; color: var(--ink);
}
.glitch [data-g1], .glitch [data-g2]{ position:absolute; left:0; top:0; pointer-events:none; }
.glitch [data-g1]{ clip-path: inset(0 0 55% 0); color: color-mix(in srgb, var(--warn) 40%, var(--ink)); }
.glitch [data-g2]{ clip-path: inset(45% 0 0 0); color: color-mix(in srgb, var(--focus) 40%, var(--ink)); }

.fixed-line{ margin:0; color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); }
.hook-ctas{ display:flex; align-items:center; gap: 10px; flex-wrap: wrap; }
.hook-cta{ will-change: transform; }
.hook-proof{ font-size: 14px; color: var(--muted); }

/* Animation states */
.repair-hook.is-broken .glitch{ animation: jitter 0.6s steps(2) 0s 2; }
.repair-hook.is-broken .repair-svg .car{ animation: car-shake 0.7s ease-in-out 0s 1; }
.repair-hook.is-broken .crack{ animation: crack-pulse 1.1s ease-in-out 0.1s 1; }
.repair-hook.is-broken .bolt{ animation: bolt-pop 1s cubic-bezier(.2,.7,.25,1.2) 0.2s 1 both; }
.repair-hook.is-broken .spark{ animation: spark-pop 1s ease-out 0.15s 1 both; }

.repair-hook.is-repaired{
  border-style: solid;
  border-color: color-mix(in srgb, var(--ok) 40%, var(--stroke) 60%);
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--ok) 10%, transparent) 0%, transparent 100%),
    #fff;
}
@media (prefers-color-scheme: dark){
  .repair-hook.is-repaired{ background:
    linear-gradient(0deg, rgba(46,139,87,.12), transparent), var(--card); }
}
.repair-hook.is-repaired .badge circle{ animation: badge-in .6s ease-out .05s both; }
.repair-hook.is-repaired .badge path{ animation: check-draw .6s ease-out .22s both; }
.repair-hook.is-repaired .glitch{ opacity:0; transition: opacity .25s ease; }
.repair-hook.is-repaired .fixed-line{ color: var(--ok); font-weight: 800; }
.repair-hook.is-repaired .hook-cta{ animation: cta-bounce 0.7s ease .25s both; }

/* Keyframes */
@keyframes jitter{ 0%{ transform: translate(0,0);} 50%{ transform: translate(1px,0);} 100%{ transform: translate(-1px,0);} }
@keyframes car-shake{
  0%{ transform: translateX(0) rotate(0); }
  20%{ transform: translateX(-2px) rotate(-.5deg); }
  40%{ transform: translateX(2px) rotate(.5deg); }
  60%{ transform: translateX(-1px) rotate(-.3deg); }
  80%{ transform: translateX(1px) rotate(.3deg); }
  100%{ transform: none; }
}
@keyframes crack-pulse{
  0%{ stroke-dashoffset: 12; opacity: .8; }
  60%{ stroke-dashoffset: 0; opacity: 1; }
  100%{ opacity: .55; }
}
@keyframes bolt-pop{
  0%{ transform: translate(-2px,-4px) rotate(-12deg); opacity: .8; }
  60%{ transform: translate(0,0) rotate(0); opacity: 1; }
  100%{ transform: translate(0,0) rotate(0); opacity: 1; }
}
@keyframes spark-pop{
  0%{ opacity:0; transform: scale(.4) translateY(-2px); }
  40%{ opacity:1; transform: scale(1) translateY(-6px); }
  100%{ opacity:0; transform: scale(.6) translateY(-10px); }
}
@keyframes badge-in{ from{ opacity:0; transform: scale(.5);} to{ opacity:1; transform: scale(1);} }
@keyframes check-draw{ from{ stroke-dasharray: 0 40; opacity:0; } to{ stroke-dasharray: 40 0; opacity:1; } }
@keyframes cta-bounce{
  0%{ transform: translateY(0) scale(1); }
  40%{ transform: translateY(-3px) scale(1.02); }
  100%{ transform: translateY(0) scale(1); }
}

/* Reduced motion: show 'fixed' without theatrics */
@media (prefers-reduced-motion: reduce){
  .repair-hook.is-broken .glitch,
  .repair-hook.is-broken .car,
  .repair-hook.is-broken .crack,
  .repair-hook.is-broken .bolt,
  .repair-hook.is-broken .spark,
  .repair-hook.is-repaired .badge circle,
  .repair-hook.is-repaired .badge path,
  .repair-hook.is-repaired .hook-cta{ animation: none !important; }
  .repair-hook .badge circle, .repair-hook .badge path{ opacity: 1; }
  .repair-hook .glitch{ opacity:0; }
  .repair-hook .fixed-line{ color: var(--ok); font-weight: 800; }
}

/* Make callbar title wrap gracefully on narrow viewports */
.callbar-title { display:inline-block; margin-right:.5rem; }
@media (max-width: 420px) {
  .callbar-title { display:block; margin:0 0 .25rem 0; }
}

/* =========================================================
   Mobile & small-screen polish (append)
   ========================================================= */

/* Container queries for finer control on small screens */
.wrap{ container-type:inline-size; }

/* Avoid iOS zoom on inputs (keeps comfortable 16px+) */
input, select, textarea { font-size: 16px; }

/* Tighten card padding and typography on narrow devices */
@container (max-width: 560px){
  .card{ padding: clamp(14px, 4vw, 20px); }
  .hero{ font-size: clamp(22px, 7.2vw, 30px); }
  .sub{ font-size: clamp(15px, 4.2vw, 18px); }
}

/* Badge/value grids collapse gracefully */
@container (max-width: 720px){
  .badges{ grid-template-columns: 1fr 1fr; }
  .value-grid{ grid-template-columns: 1fr; }
}
@container (max-width: 420px){
  .badges{ grid-template-columns: 1fr; }
  .badge{ font-size: 15px; min-height: 52px; }
}

/* Form rows stack sooner and breathe a bit on mobile */
@container (max-width: 720px){
  .row{ grid-template-columns: 1fr; gap: 10px; }
  .actions{ grid-template-columns: 1fr; }
  .btn.big{ font-size: 18px; min-height: calc(var(--tap) + 4px); }
}

/* Progress dots: larger tap targets on touch devices */
@media (pointer: coarse){
  .progress{ gap: 12px; }
  .dot{ width: 14px; height: 14px; }
}

/* Vehicle scroller tiles scale to viewport without overflow */
.equip-item img{
  width: clamp(180px, 70vw, 260px);
  height: clamp(120px, 42vw, 180px);
}

/* Reduce marquee speed on small screens for readability */
@media (max-width: 480px){
  .scroll-track{ animation-duration: 34s; }
  .equip-scroller{ animation-duration: 52s; }
}

/* Make brand/title wrap safely on very small screens */
.brand h1{ overflow-wrap:anywhere; }

/* Topbar & callbar: safe-area aware and crisp */
.topbar{
  padding-top: max(10px, env(safe-area-inset-top));
  will-change: backdrop-filter;
}

/* Callbar stacks buttons vertically on tight widths */
@media (max-width: 480px){
  .callbar{
    align-items:stretch;
  }
  .callbar-actions{
    display:grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .callbar-sep{ display:none; }
  .callbar a{ justify-content:center; }
}

/* When the on-screen keyboard is open, slide callbar away
   to avoid overlapping form fields (toggled via JS). */
body.kb-open .callbar{
  transform: translateY(110%);
  transition: transform .18s ease;
}

/* Success view: compact spacing on mobile */
@container (max-width: 560px){
  #success .check{ width:56px; height:56px; font-size:26px; }
  #success .sub{ font-size: 16px; }
}

/* Prevent layout shift from sticky elements on ultra-small screens */
@media (max-width: 360px){
  .wrap{ padding-top: 8px; }
  .topbar{ padding-bottom: 8px; }
}


/* =========================================================
   Bottom CTA (callbar) — mobile-first visual improvement
   Append-only CSS: refined size, clarity, and gentle attention
   ========================================================= */

/* Tokens for CTA */
:root{
  --callbar-radius: 18px;
}

/* Floating dock feel with subtle glass & rounded top */
.callbar{
  border-top-left-radius: var(--callbar-radius);
  border-top-right-radius: var(--callbar-radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 92%, #000 8%), var(--primary));
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 28px rgba(0,0,0,.18);
  transition: transform .2s ease, padding .18s ease, background .2s ease;
  will-change: transform;
}

/* Keep layout tight and centered */
.callbar-actions{
   gap:10px; flex-wrap:wrap;
  justify-content:center; align-items:center;
  width:100%; max-width: var(--maxw);
  margin-inline:auto;
}

/* Refine buttons (compact but tappable) */
.callbar a,
.callbar .callbar-btn{
  font-size: 16.5px;
  padding: 12px 16px;
  min-height: 48px; /* slightly under your --tap for compactness, still accessible */
  border-radius: 999px;
  border:1px solid color-mix(in srgb, var(--primary) 14%, #fff 86%);
  background:#fff;
  color: var(--primary);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

/* Regional accents remain subtle but legible */
.callbar-btn--north{
  color:#073066;
  border-color: color-mix(in srgb, #073066 12%, #fff 88%);
}
.callbar-btn--south{
  color:#22543d;
  border-color: color-mix(in srgb, #22543d 14%, #fff 86%);
}

/* Title becomes supporting on wider screens only */
.callbar-title{
  display:inline-block;
  font-size: 14px;
  opacity:.9;
  letter-spacing:.3px;
}

/* Micro attention: one-time halo to draw the eye (no motion spam) */
@keyframes callbarHalo{
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.22), 0 -10px 28px rgba(0,0,0,.18); }
  70%  { box-shadow: 0 0 0 14px rgba(255,255,255,0), 0 -10px 28px rgba(0,0,0,.18); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0), 0 -10px 28px rgba(0,0,0,.18); }
}
.callbar{ animation: callbarHalo 2.2s ease-out 1 1.2s; }
@media (prefers-reduced-motion: reduce){
  .callbar{ animation: none !important; }
}

/* Strong, consistent focus ring for accessibility */
.callbar a:focus-visible,
.callbar .callbar-btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--focus) 34%, transparent),
    0 6px 16px rgba(0,0,0,.14);
}

/* Remove “or” on tight viewports to reduce clutter */
@media (max-width: 560px){
  .callbar-sep{ display:none !important; }
}

/* Compact, thumb-first layout on phones */
@media (max-width: 680px){
  .callbar{
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }
  .callbar-title{ display:none; }
  .callbar a,
  .callbar .callbar-btn{
    font-size: 16px;
    padding: 12px 14px;
    min-height: 46px;
  }
}

/* Stack buttons vertically on very small screens */
@media (max-width: 480px){
  .callbar-actions{
    display:grid;
    grid-template-columns: 1fr;
    gap:8px;
  }
}

/* Ultra-small devices: keep readable but slim */
@media (max-width: 360px){
  .callbar a,
  .callbar .callbar-btn{
    font-size: 15.5px;
    padding: 11px 12px;
    min-height: 44px;
  }
}

/* Dark mode polish */
@media (prefers-color-scheme: dark){
  .callbar{
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 80%, #000 20%), var(--primary));
  }
  .callbar a,
  .callbar .callbar-btn{
    background:#0F1722;
    color:#E9EEF5;
    border-color:#293446;
  }
  .callbar .callbar-btn--north{ color:#CFE1FF; }
  .callbar .callbar-btn--south{ color:#CFF2DB; }
}

/* === Mobile topbar fix: keep words intact, stack neatly, add subtle attention === */
@media (max-width: 680px){
  /* Shrink logo a touch for breathing room */
  .logo{ width:48px; height:48px; border-radius:10px; }

  /* Prevent mid-word breaks that caused the “multiple lines per word” issue */
  .brand h1{
    font-size: clamp(22px, 6.2vw, 30px);
    line-height: 1.05;
    overflow-wrap: normal;   /* overrides earlier `anywhere` */
    word-break: keep-all;
    hyphens: none;

    /* Stack words vertically for clarity on narrow screens */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;

    max-width: none; /* allow full width now that we stack */
  }
  .brand h1 span{
    white-space: nowrap;   /* keep each word on a single line */
    display: block;
  }

  /* Slightly tighter topbar padding on phones */
  .topbar{ padding: max(8px, env(safe-area-inset-top)) 0 10px; }
}

/* Attention without clutter: a quick, one-time glow + underline badge */
@keyframes brandPulse{
  0%{ text-shadow: 0 0 0 rgba(47,111,237,0); }
  40%{ text-shadow: 0 2px 16px rgba(47,111,237,.35); }
  100%{ text-shadow: 0 0 0 rgba(47,111,237,0); }
}
@media (max-width: 680px){
  .brand h1{ animation: brandPulse 1.1s ease-out 1 .35s; }
  .brand h1 .nv{ position: relative; }
  .brand h1 .nv::after{
    content:"";
    display:block;
    height:3px; width:100%;
    margin-top:2px;
    border-radius:2px;
    background: linear-gradient(90deg, var(--primary), var(--focus));
  }
}
@media (prefers-reduced-motion: reduce){
  .brand h1{ animation: none !important; }
}
