/* =========================================================
   Fleet Rescue — Roadside Assistance
   Tokens measured from the approved design (1440px frame)
   ========================================================= */

:root {
  --red: #D9121A;
  --red-dark: #B30E15;
  --red-tint: #FDECEC;
  --navy: #12294A;
  --text: #1F2937;
  --muted: #5B6676;
  --border: #D9DEE6;
  --bg: #F3F5F8;
  --bg-alt: #EEF1F5;
  --white: #FFFFFF;
  --placeholder: #9AA3AF;
  --success: #15803D;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 10px 30px rgba(12, 29, 54, 0.12);
  --header-h: 66px;
  --dots: radial-gradient(rgba(18, 41, 74, .08) 1px, transparent 1px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
svg { display: block; }
ol, ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 60px;
}

.icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.text-red { color: var(--red); }

/* ---------- Typography ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
}
.eyebrow-red { color: var(--red); }

.section-title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(217, 18, 26, .35); outline-offset: 2px; }

.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-outline { background: var(--white); color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red-tint); }

.btn-lg { min-height: 52px; padding: 0 32px; font-size: 16px; }
.btn-block { width: 100%; }

.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo {
  height: 58px;
  width: auto;
  display: block;
}
.brand-sm .brand-logo { height: 44px; }

.site-nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  margin-right: auto;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 0;
}
.site-nav a:hover { color: var(--red); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  background: none;
  border: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, .12) 38%, rgba(255, 255, 255, 0) 58%),
    #CFE0EF url("hero.jpg") center top / cover no-repeat;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 431px;
  grid-template-rows: auto auto;
  column-gap: 56px;
  padding-top: 28px;
  padding-bottom: 0;
}
.hero-copy {
  grid-column: 1;
  grid-row: 1;
  padding-top: 26px;
  padding-bottom: 12px;
}
.hero-title {
  font-size: clamp(34px, 4.3vw, 62px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.hero-title span { display: block; }
.line-navy { color: var(--navy); }
.line-red { color: var(--red); }
.hero-sub {
  margin-top: 14px;
  font-size: clamp(16px, 1.5vw, 21px);
  color: var(--muted);
  max-width: 680px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}
.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background .15s ease;
}
.pay-badge:hover { background: var(--red-dark); }
.pay-badge .icon { width: 16px; height: 16px; }

/* Photo band: on desktop a transparent spacer that sets the hero height
   (the photo is the section background); on mobile it shows the framed strip */
.hero-image {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  width: 100vw;
  aspect-ratio: 1116 / 277;
  margin-left: calc(50% - 50vw);
}

/* ---------- Form card ---------- */
.form-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 28px 18px;
  margin-bottom: 12px;
  z-index: 2;
}
.form-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.assist-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.field { margin-bottom: 10px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 5px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 60px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217, 18, 26, .15);
}
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--red); }

.input-with-btn { display: flex; gap: 8px; }
.input-with-btn input { flex: 1; min-width: 0; }
.gps-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--red);
}
.gps-btn:hover { background: var(--red-tint); }
.gps-btn[aria-busy="true"] .icon { animation: spin 1s linear infinite; }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  color: var(--text);
}
.select-wrap select:invalid,
.select-wrap select option[value=""] { color: var(--placeholder); }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.field-hint.is-locating { color: var(--navy); }
.field-hint.is-success { color: var(--success); }
.field-hint.is-error { color: var(--red); }
.field-hint a { text-decoration: underline; font-weight: 600; }

.field-error {
  display: none;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--red);
}
.field.is-invalid .field-error { display: block; }

.optional { font-weight: 500; color: var(--muted); }

.file-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.field .file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0;
}
.field .file-drop:hover { border-color: var(--red); color: var(--red); }
.field:has(.file-input:focus-visible) .file-drop { outline: 3px solid rgba(217, 18, 26, .35); outline-offset: 2px; }
.file-list { margin-top: 6px; font-size: 12px; color: var(--muted); }
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}
.file-list button {
  background: none;
  border: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn-submit { margin-top: 6px; min-height: 48px; }
.form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.form-status {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}
.form-status.is-error {
  display: block;
  background: var(--red-tint);
  color: var(--red-dark);
}
.form-status a { text-decoration: underline; font-weight: 700; }

.form-success { text-align: center; padding: 10px 4px 6px; }
.form-success .success-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #E6F6EC;
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.form-success .success-icon svg { width: 28px; height: 28px; }
.form-success h3 { font-size: 20px; color: var(--navy); font-weight: 800; margin-bottom: 8px; }
.form-success p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.form-success .btn { margin-top: 8px; }

/* ---------- Services ---------- */
.services { padding: 40px 0; background: var(--white); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.service-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.service-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
}
.service-icon svg { width: 44px; height: 44px; fill: currentColor; }
.service-card h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.service-card p { font-size: 13px; color: var(--muted); }

/* ---------- Service area & hours ---------- */
.coverage { padding: 0 0 40px; background: var(--white); }
.coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.coverage-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--white);
}
.coverage-card .eyebrow { color: rgba(255, 255, 255, .7); margin-bottom: 6px; }
.coverage-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--red);
  color: var(--white);
}
.coverage-icon .icon { width: 22px; height: 22px; }
.coverage-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.coverage-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 14px; }
.coverage-list li { position: relative; padding-left: 14px; }
.coverage-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.coverage-text { font-size: 14px; color: rgba(255, 255, 255, .85); }
.coverage-card-wide { grid-column: 1 / -1; }
.coverage-card-wide .coverage-text { margin-bottom: 10px; }
.coverage-list-inline { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.coverage-text a { color: var(--white); font-weight: 700; text-decoration: underline; }

/* ---------- How it works ---------- */
.how {
  padding: 40px 0;
  background: var(--bg-alt);
  background-image: var(--dots);
  background-size: 18px 18px;
}
.how-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-right: 24px;
}
.step-num {
  width: 30px; height: 30px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}
.step h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--muted); }
.step-arrow {
  position: absolute;
  right: -4px;
  top: 2px;
  color: var(--placeholder);
  font-size: 18px;
}

/* ---------- Call band ---------- */
.call-band { background: var(--red-tint); padding: 24px 0; }
.call-band-inner { display: flex; align-items: center; gap: 20px; }
.call-band-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.call-band-icon .icon { width: 24px; height: 24px; }
.call-band-copy { flex: 1; }
.call-band-copy .eyebrow { margin-bottom: 4px; }
.call-band-copy h2 { font-size: 20px; font-weight: 800; color: var(--navy); }
.call-band-copy p:last-child { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--border); padding: 18px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-meta { font-size: 12px; color: var(--muted); text-align: center; flex: 1; }
.footer-nav { display: flex; gap: 28px; }
.footer-nav a { font-size: 13px; color: var(--muted); }
.footer-nav a:hover { color: var(--red); }

/* ---------- Sticky mobile call bar ---------- */
.sticky-call { display: none; }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gps-btn .icon { transition: none; animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1200px) {
  .container { padding: 0 32px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 380px; column-gap: 32px; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 340px; column-gap: 28px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; gap: 20px; }
  .steps { gap: 16px; }
}

@media (max-width: 820px) {
  body { padding-bottom: 84px; } /* room for sticky call bar */
  .container { padding: 0 24px; }

  .field-row { grid-template-columns: 1fr; }
  .field input, .field select, .field textarea { min-height: 44px; padding: 10px 12px; }
  .gps-btn { width: 44px; height: 44px; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 12px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--bg); }
  .site-nav a:last-child { border-bottom: 0; }
  .header-call { display: none; }
  .nav-toggle { display: flex; }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding-top: 28px;
  }
  .hero {
    background: var(--white);
    background-image: var(--dots);
    background-size: 18px 18px;
  }
  .hero-copy { grid-column: 1; grid-row: 1; padding-top: 0; padding-bottom: 20px; }
  .hero-title { font-size: clamp(30px, 8vw, 40px); }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; }

  .hero-image {
    grid-column: 1;
    grid-row: 2;
    aspect-ratio: auto;
    height: 186px;
    background: #B9C4CF url("hero.jpg") 20% 86% / 200% auto no-repeat;
  }

  .form-card {
    grid-column: 1;
    grid-row: 3;
    margin-top: -14px;
    margin-bottom: 20px;
    position: relative;
  }

  .services { padding: 32px 0; }
  .services-grid { grid-template-columns: 1fr; gap: 12px; }

  .coverage { padding-bottom: 32px; }
  .coverage-grid { grid-template-columns: 1fr; }
  .coverage-list { grid-template-columns: 1fr; }
  .coverage-list-inline { display: grid; }
  .pay-badge { font-size: 11px; }
  .footer-meta { text-align: left; }

  .how { padding: 32px 0; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .step { padding-right: 0; }
  .step-arrow { display: none; }

  .call-band-inner { flex-wrap: wrap; }
  .call-band-inner .btn { width: 100%; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .sticky-call {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(243, 245, 248, .92);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .form-card { padding: 20px 16px 16px; }
}
