:root {
  --ink: #293036;
  --muted: #68717a;
  --line: #dfe5e8;
  --paper: #ffffff;
  --soft: #f5f6f6;
  --brand: #003f8d;
  --brand-dark: #293036;
  --accent: #003f8d;
  --icon: #3f4449;
  --shadow: 0 14px 38px rgba(24, 34, 42, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #f1f3f3;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.shell {
  width: min(100% - 32px, 1200px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .80);
  border-bottom: 1px solid rgba(210, 218, 222, .72);
  backdrop-filter: blur(18px) saturate(1.1);
  transition: box-shadow .25s ease, background .25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 8px 28px rgba(24, 34, 42, .08);
}

.header-shell {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 267px;
  height: 81px;
  object-fit: contain;
  border-radius: 8px;
  transition: width .25s ease, height .25s ease;
}

.site-header.is-scrolled .brand-logo {
  width: 178px;
  height: 54px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a,
.nav-button,
.site-footer button,
.site-footer a {
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--ink);
  padding: 7px 0;
}

.nav a:hover,
.nav-button:hover,
.site-footer button:hover,
.site-footer a:hover {
  color: var(--brand);
}

.phone-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px !important;
  border-radius: 8px;
  background: var(--brand-dark) !important;
  font-weight: 800;
  color: #fff !important;
}

.floating-team {
  position: fixed;
  left: 18px;
  bottom: 22px;
  z-index: 18;
  display: grid;
  grid-template-columns: 62px minmax(0, 132px);
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  border: 1px solid rgba(223, 229, 232, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transition: opacity .35s ease, transform .35s ease;
}

.floating-team.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px);
}

.floating-team img {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
}

.floating-team strong,
.floating-team span {
  display: block;
  line-height: 1.2;
}

.floating-team strong {
  color: var(--ink);
  font-size: 13px;
}

.floating-team span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-slider {
  height: 400px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.slide-media {
  min-width: 0;
  height: 100%;
  background: #dfe5e7;
  opacity: 1;
  overflow: hidden;
  position: relative;
  transition: opacity .7s ease;
}

.slide-media.is-changing,
.slide-copy.is-changing {
  opacity: 0;
}

.slide-media img,
.slide-media video,
.slide-media object,
.slide-media iframe {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
}

.slide-image-zoom {
  animation: slideImageZoom 7s ease-out forwards;
  transform-origin: center center;
}

@keyframes slideImageZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.055);
  }
}

.slide-copy {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(28px, 3.2vw, 44px);
  opacity: 1;
  transition: opacity .7s ease;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1, h2, h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.02;
}

.slide-copy h1 {
  font-size: clamp(30px, 3.05vw, 44px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

h3 {
  font-size: 22px;
}

.slide-copy p:not(.eyebrow),
.section-head p,
.team-grid p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.slide-copy p:not(.eyebrow) {
  margin-top: 24px;
  font-size: clamp(17px, 1.65vw, 21px);
  line-height: 1.55;
}

.summary-actions,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
}

.primary-action {
  color: #fff;
  background: var(--brand);
}

.primary-action:hover { background: var(--brand-dark); }
.ghost-action { background: #fff; border-color: var(--line); color: var(--ink); }
.ghost-action:hover { border-color: var(--brand); color: var(--brand); }

.slide-dots {
  position: absolute;
  left: clamp(28px, 4vw, 54px);
  bottom: 22px;
  display: flex;
  gap: 8px;
}

.slide-dots button {
  width: 10px;
  height: 10px;
  min-width: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c5ced3;
}

.slide-dots button.is-active {
  width: 28px;
  background: var(--brand);
}

.audio-teaser {
  margin-top: 16px;
}

.audio-button {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 82px;
  border: 1px solid rgba(0, 63, 141, .22);
  border-radius: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #003f8d, #293036);
  color: #fff;
  text-align: left;
  box-shadow: var(--shadow);
}

.audio-button:hover {
  filter: brightness(1.04);
}

.audio-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}

.audio-icon img {
  width: 34px;
  height: 34px;
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
  display: block;
}

.audio-button.is-playing .audio-icon {
  background: rgba(255, 255, 255, .24);
}

.audio-button strong {
  display: block;
}

.audio-button strong {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.1;
}

.section {
  padding: 58px 0;
}

.section-head {
  max-width: 780px;
  margin-bottom: 24px;
}

.request-section {
  background: transparent;
}

.request-form,
.admin-form,
.import-box,
.dealer-form {
  display: grid;
  gap: 22px;
  width: 100%;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 800;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.vehicle-card {
  min-height: 126px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.vehicle-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.vehicle-card strong { font-size: 17px; }
.vehicle-card small { color: var(--muted); line-height: 1.3; }

.vehicle-card.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.form-grid,
.assist-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.other-vehicle-field {
  display: grid;
}

label {
  display: grid;
  grid-template-rows: auto 58px 18px;
  gap: 8px;
  color: #29323a;
  font-size: 14px;
  font-weight: 800;
}

.help-field {
  grid-template-rows: auto 58px auto auto;
}

.label-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.required-star {
  color: #c62828;
  font-weight: 900;
}

.field-error {
  display: block;
  min-height: 18px;
  color: #c62828;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 58px;
  border: 1px solid #cfd7dc;
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

select {
  appearance: none;
  padding-right: 44px;
  background:
    linear-gradient(45deg, transparent 50%, #27313a 50%) calc(100% - 22px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, #27313a 50%, transparent 50%) calc(100% - 17px) 50% / 7px 7px no-repeat,
    #fff;
}

textarea {
  min-height: 118px;
  padding-top: 14px;
  padding-bottom: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(0, 63, 141, .14);
  border-color: var(--brand);
}

input.has-error,
select.has-error,
textarea.has-error {
  border-color: #c62828;
  background-color: #fff7f7;
}

input.has-error:focus,
select.has-error:focus,
textarea.has-error:focus {
  outline-color: rgba(198, 40, 40, .16);
}

.hint-button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
  font-size: 14px;
  font-weight: 800;
}

.hint {
  display: none;
  padding: 11px;
  border-radius: 8px;
  background: #eef6f7;
  color: #3d5058;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.hint.is-open { display: block; }

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.segmented input:checked + span {
  color: #fff;
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.upload-box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 118px;
  padding: 20px;
  border: 1px dashed #aebac1;
  border-radius: 8px;
  background: #fafbfb;
}

.upload-box.is-dragover {
  border-color: var(--brand);
  background: #eef4ff;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box strong,
.upload-box span {
  display: block;
}

.upload-box span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 400;
}

.upload-note {
  margin-top: -10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}

.privacy-check {
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: start;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.privacy-check input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-footer p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.form-status {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  line-height: 1.45;
  font-weight: 700;
}

.form-status a {
  color: var(--brand);
  font-weight: 800;
}

.form-status.is-success {
  border-color: rgba(0, 63, 141, .24);
  background: #eef4ff;
  color: var(--ink);
}

.form-status.is-error {
  border-color: rgba(176, 42, 42, .25);
  background: #fff0f0;
  color: #9b2424;
}

.region-card {
  padding: clamp(24px, 4vw, 42px);
  border-radius: 8px;
  color: #fff;
  background: var(--brand-dark);
}

.region-card .eyebrow { color: #b9d5ff; }
.region-card .section-head p { color: #dce4ec; }

.place-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.place-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 800;
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(260px, 470px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.team-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.team-photo img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.team-photo figcaption {
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.5;
}

.phone-cta {
  display: inline-flex;
  margin: 8px 0 12px;
  color: var(--brand);
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
}

.dealer-section {
  padding-top: 8px;
}

.dealer-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, .7fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.dealer-form .primary-action {
  justify-self: start;
}

.accordion {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.accordion-toggle {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  padding: 0 14px;
  color: var(--muted);
  line-height: 1.5;
  opacity: 0;
  transition: max-height .55s ease, opacity .45s ease, padding .45s ease;
}

.accordion-panel.is-open {
  padding: 4px 14px 14px;
  opacity: 1;
}

.admin-login {
  display: grid;
  gap: 16px;
  max-width: 460px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-login h1 {
  font-size: 34px;
}

.admin-login .primary-action {
  width: max-content;
}

.admin-login-error {
  margin: 0;
  color: #a83232;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  min-height: 76px;
  color: var(--muted);
}

.lightbox {
  width: min(720px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(12, 20, 26, .54);
  backdrop-filter: blur(4px);
}

.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 26px;
  line-height: 1;
}

.steps {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.steps li span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.legal p {
  color: var(--muted);
  line-height: 1.55;
}

.admin-body { background: var(--soft); }
.admin-main { padding-top: 48px; }
.admin-form { margin-top: 20px; }

.slide-editor {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.slide-editor:last-child { border-bottom: 0; padding-bottom: 0; }

.slide-number {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 800;
}

.slide-editor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.slide-editor-fields label:last-child { grid-column: 1 / -1; }
.import-box { margin-top: 20px; }

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e8eef1;
}

@media (max-width: 900px) {
  .top-slider,
  .team-grid,
  .dealer-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .slide-media { height: 280px; }
  .slide-copy { min-height: 320px; }
  .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid,
  .assist-grid,
  .contact-grid,
  .slide-editor-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .floating-team {
    display: none;
  }

  .shell { width: min(100% - 24px, 1200px); }
  .header-shell {
    min-height: 116px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
  }

  .nav {
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
  }

  .brand-logo {
    width: 225px;
    height: 69px;
  }

  .site-header.is-scrolled .brand-logo {
    width: 150px;
    height: 46px;
  }

  .top-slider {
    margin-top: 14px;
  }

  .slide-media { height: 210px; }
  .slide-copy { min-height: 330px; }
  h1 { font-size: 34px; }
  .vehicle-grid { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; display: grid; }
  .upload-box { grid-template-columns: 1fr; }
  .slide-editor { grid-template-columns: 1fr; }
}
