:root {
  --ink: #17202a;
  --muted: #5f6b77;
  --paper: #f6f8fb;
  --surface: #ffffff;
  --line: #dce3ea;
  --blue: #145a9f;
  --blue-dark: #0d3f73;
  --green: #237a57;
  --amber: #b66112;
  --shadow: 0 18px 44px rgba(19, 36, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.language-switcher button {
  min-height: 34px;
  padding: 6px 7px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
}

.language-switcher button.active {
  color: var(--blue-dark);
  background: #e8f2fb;
  border-color: #c7dff3;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 6px;
  font-weight: 800;
  place-items: center;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: none;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  display: grid;
  gap: 24px;
  padding: 46px 18px 34px;
  background:
    linear-gradient(rgba(11, 37, 64, 0.82), rgba(11, 37, 64, 0.78)),
    url("images/cars/subaru-legacy-2011/cover.jpg");
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.hero-content,
.hero-panel,
.section,
.site-footer {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: #2e6f9e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #b9dafa;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(44px, 11vw, 76px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.subtitle {
  max-width: 760px;
  color: #e7eef7;
  font-size: 18px;
}

.hero-actions,
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: #ffffff;
  background: var(--blue);
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.12);
}

.button.light {
  color: var(--blue-dark);
  border-color: var(--line);
  background: #ffffff;
}

.hero-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.market-tag {
  color: var(--blue-dark);
  font-weight: 800;
}

.cost-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfd;
}

.cost-card span {
  color: var(--muted);
}

.section {
  padding: 44px 18px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading p,
.section-note {
  color: var(--muted);
}

.row-heading {
  display: grid;
  max-width: none;
  gap: 8px;
}

.steps,
.cars-grid,
.service-grid,
.channel-grid,
.disclaimers {
  display: grid;
  gap: 14px;
}

.step,
.car-card,
.service-grid article,
.lead-form,
.lead-output,
.disclaimers p {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(19, 36, 56, 0.06);
}

.step {
  padding: 18px;
}

.step span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: #ffffff;
  background: var(--green);
  border-radius: 50%;
  font-weight: 800;
  place-items: center;
}

.step p,
.car-meta,
.car-card p {
  color: var(--muted);
}

.cars-grid {
  grid-template-columns: 1fr;
}

.car-card {
  overflow: hidden;
}

.car-image {
  display: grid;
  width: 100%;
  min-height: 170px;
  padding: 16px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(20, 90, 159, 0.85), rgba(35, 122, 87, 0.82)),
    var(--image-bg);
  background-position: center;
  background-size: cover;
  place-items: end start;
}

button.car-image {
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

button.car-image:focus-visible,
.gallery-thumb:focus-visible,
.video-link:focus-visible,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.car-image span {
  padding: 6px 9px;
  background: rgba(0, 0, 0, 0.52);
  border-radius: 4px;
  font-weight: 800;
}

.car-body {
  padding: 16px;
}

.car-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: var(--green);
  font-weight: 900;
  white-space: nowrap;
}

.price span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.car-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  font-size: 14px;
}

.car-meta span {
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  color: var(--blue-dark);
  background: #e8f2fb;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.gallery-thumb {
  display: block;
  overflow: hidden;
  width: 100%;
  padding: 0;
  aspect-ratio: 1;
  background: #edf2f6;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-link,
.gallery-trigger,
.request-info {
  width: 100%;
  margin-top: 12px;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(9, 16, 24, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close,
.lightbox-nav {
  min-height: 44px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.lightbox-close {
  grid-column: 3;
  justify-self: end;
  width: 44px;
}

.lightbox-frame {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 96px);
  margin: 0;
}

.lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  background: #000000;
  border-radius: 8px;
}

.lightbox-image[hidden],
.lightbox-video[hidden] {
  display: none;
}

.lightbox-caption {
  color: #ffffff;
  font-size: 14px;
  text-align: center;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  min-height: 58px;
  padding: 0;
  overflow: hidden;
  color: transparent;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-prev::before,
.lightbox-next::before {
  color: #ffffff;
  font-size: 28px;
}

.lightbox-prev::before {
  content: "<";
}

.lightbox-next::before {
  content: ">";
}

.request-layout {
  display: grid;
  gap: 18px;
}

.lead-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

fieldset {
  grid-template-columns: repeat(2, 1fr);
  border: 0;
  padding: 0;
}

legend {
  grid-column: 1 / -1;
  padding: 0;
  font-weight: 800;
}

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cbd6df;
  border-radius: 6px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.lead-output {
  padding: 18px;
}

.lead-output textarea {
  min-height: 210px;
  margin-top: 10px;
  font-size: 14px;
}

.summary-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.summary-list strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.service-grid article {
  padding: 18px;
}

.check-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.check-list li::marker {
  color: var(--green);
}

.channel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-grid span {
  padding: 13px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.disclaimers p {
  margin: 0;
  padding: 16px;
  border-left: 5px solid var(--amber);
}

.site-footer {
  display: grid;
  gap: 4px;
  padding: 26px 18px 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: var(--ink);
}

@media (min-width: 720px) {
  .nav-links {
    display: flex;
  }

  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    align-items: end;
    min-height: 610px;
    padding: 70px 24px 58px;
  }

  .section {
    padding: 62px 24px;
  }

  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .cars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .request-layout,
  .service-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: start;
  }

  .lead-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .full {
    grid-column: 1 / -1;
  }

  .row-heading {
    grid-template-columns: 1fr minmax(240px, 360px);
    align-items: end;
  }

  .channel-grid,
  .disclaimers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    max-width: 160px;
  }

  .language-switcher {
    margin-left: 52px;
  }

  .hero-actions .button,
  .message-actions .button {
    width: 100%;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }
}
