/* Team Auto Transports - shared styles
   Look: Florida highway signage. Sign green, road-paint yellow, concrete. */

:root {
  --sign: #0b5d3b;
  --sign-dark: #07402a;
  --paint: #f2b705;
  --concrete: #eceee9;
  --ink: #1b2420;
  --muted: #56615b;
  --line: #cfd5cf;
  --white: #ffffff;
  --radius-sign: 10px;
  --radius-field: 6px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --wrap: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--concrete);
  padding-bottom: 72px; /* room for the mobile call bar */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; display: block; }
a { color: var(--sign); }
:focus-visible { outline: 3px solid var(--paint); outline-offset: 2px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  margin: 0 0 .4em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; max-width: 64ch; }
.lead { font-size: 1.2rem; color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  background: var(--sign);
  color: var(--white);
  border-bottom: 4px solid var(--paint);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  text-decoration: none;
  line-height: 1;
}
.brand small {
  display: block;
  font-family: var(--body);
  font-weight: 500;
  font-size: .8rem;
  opacity: .8;
  margin-top: 3px;
}
.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-field);
  white-space: nowrap;
}
.nav a:hover { background: var(--sign-dark); }
.nav a[aria-current="page"] { background: var(--paint); color: var(--ink); }
.header-call {
  display: none;
  background: var(--paint);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: var(--radius-field);
}
@media (min-width: 900px) { .header-call { display: inline-block; } }
@media (max-width: 899px) {
  .site-header .wrap { padding: 10px 0 6px; }
  .nav { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 0 4px; overflow: visible; }
  .nav a { text-align: center; padding: 8px 4px; font-size: .95rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 1.05rem/1 var(--body);
  padding: 15px 22px;
  border-radius: var(--radius-field);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  min-height: 50px;
}
.btn-paint { background: var(--paint); color: var(--ink); }
.btn-paint:hover { background: #ffc81f; }
.btn-sign { background: var(--sign); color: var(--white); }
.btn-sign:hover { background: var(--sign-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-white { background: var(--white); }
.section-sign { background: var(--sign); color: var(--white); }
.section-sign .lead, .section-sign p { color: #d7e7df; }

.page-hero { padding: 56px 0 40px; }
.page-hero p.lead { margin-bottom: 1.4em; }

/* ---------- Highway sign panels (landing) ---------- */
.signs {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .signs { grid-template-columns: repeat(3, 1fr); } }

.sign {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--sign);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-sign);
  padding: 22px 22px 20px;
  box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 5px var(--white);
  min-height: 220px;
  transition: transform .15s ease;
}
.sign:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .sign:hover { transform: none; } }
.sign-tab {
  align-self: flex-start;
  background: var(--paint);
  color: var(--ink);
  font: 700 .95rem/1 var(--body);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 18px;
}
.sign h2 {
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  margin-bottom: .15em;
}
.sign p { color: #d7e7df; margin: 0 0 18px; font-size: 1.05rem; }
.sign-arrow {
  margin-top: auto;
  width: 44px;
  height: 44px;
}

/* ---------- Two column layout ---------- */
.split {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 1fr; } }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 28px;
  counter-reset: step;
}
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border-top: 4px solid var(--paint); padding-top: 14px; }
.steps li::before {
  content: "Step " counter(step);
  display: block;
  font-weight: 700;
  color: var(--sign);
  margin-bottom: 4px;
}

/* ---------- Routes table ---------- */
.routes { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 1.05rem; }
.routes th, .routes td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--line); }
.routes th { font-family: var(--display); font-size: 1.2rem; }
.routes td:last-child, .routes th:last-child { text-align: right; white-space: nowrap; }

.checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.checklist li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--sign);
  border-bottom: 3px solid var(--sign);
  transform: rotate(-45deg);
}
.section-sign .checklist li { border-color: rgba(255,255,255,.2); }
.section-sign .checklist li::before { border-color: var(--paint); }

/* ---------- Offer blocks (sales) ---------- */
.offers { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 820px) { .offers { grid-template-columns: repeat(3, 1fr); } }
.offer {
  background: var(--white);
  border-left: 6px solid var(--sign);
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.offer.offer-auction { border-left-color: var(--paint); }
.offer p { color: var(--muted); }
.offer .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Inventory ---------- */
.inventory { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 640px) { .inventory { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .inventory { grid-template-columns: repeat(3, 1fr); } }
.car {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.car-photo {
  aspect-ratio: 4 / 3;
  background: #d9ddd8;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
}
.car-photo img { width: 100%; height: 100%; object-fit: cover; }
.car-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.car-body h3 { font-size: 1.5rem; margin-bottom: 4px; }
.car-meta { color: var(--muted); font-size: .98rem; margin: 0 0 10px; }
.car-price { font-family: var(--display); font-weight: 700; font-size: 1.8rem; color: var(--sign); margin: 0 0 12px; }
.car-body .btn { margin-top: auto; }
.inventory-status { color: var(--muted); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius-sign);
  padding: 26px;
  border-top: 6px solid var(--paint);
  color: var(--ink);
}
.form-card h2, .form-card h3 { margin-bottom: .3em; }
.form-card > p { color: var(--muted); }
.fields { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .fields { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .98rem; }
input, select, textarea {
  font: 400 1rem/1.3 var(--body);
  color: var(--ink);
  padding: 12px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-field);
  background: #fbfbfa;
  width: 100%;
  min-height: 48px;
  font-size: 16px; /* stops iOS zoom on focus */
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sign); outline: 2px solid var(--sign); outline-offset: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-field);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}
.radio-row input { width: auto; min-height: 0; }
.radio-row label:has(input:checked) { border-color: var(--sign); background: #e3efe8; }
.form-card .btn { margin-top: 18px; width: 100%; }
@media (min-width: 560px) { .form-card .btn { width: auto; } }
.hidden-field { display: none; }
.form-msg { margin: 14px 0 0; font-weight: 600; }
.form-msg.ok { color: var(--sign); }
.form-msg.err { color: #a12b1c; }

/* ---------- Rentals ---------- */
.fleet { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; padding: 0; list-style: none; }
.fleet li { background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d0cb; padding: 40px 0; font-size: .95rem; }
.site-footer a { color: var(--white); }
.site-footer .wrap { display: grid; gap: 18px; }
@media (min-width: 820px) { .site-footer .wrap { grid-template-columns: 2fr 1fr; } }
.site-footer strong { color: var(--white); font-family: var(--display); font-size: 1.4rem; }

/* ---------- Mobile call bar ---------- */
.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--sign);
  border-top: 3px solid var(--paint);
  z-index: 30;
}
.call-bar .btn { min-height: 46px; padding: 12px; }
@media (min-width: 900px) { .call-bar { display: none; } }

/* ---------- Sign illustrations ---------- */
.sign-art { width: 100%; max-width: 260px; height: auto; margin: 4px 0 16px; }
.sign-go {
  margin-top: auto;
  align-self: flex-start;
  background: var(--paint);
  color: var(--ink);
  font-weight: 700;
  padding: 11px 16px;
  border-radius: var(--radius-field);
}
.sign:hover .sign-go { background: #ffc81f; }

/* ---------- Road with truck (home, plays once) ---------- */
.road {
  position: relative;
  height: 74px;
  margin-bottom: 26px;
  border-bottom: 6px solid var(--ink);
  overflow: hidden;
}
.road::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--paint) 0 34px, transparent 34px 60px);
}
.road-truck {
  position: absolute;
  bottom: 12px;
  width: 120px;
  height: auto;
  left: calc(100% - 130px);
  animation: drive 2.6s cubic-bezier(.25,.8,.3,1) both;
}
.road-truck rect, .road-truck path[fill="#fff"], .road-truck circle, .road-truck g path, .road-truck g circle { fill: var(--sign); }
.road-truck path[fill="#0b5d3b"] { fill: var(--concrete); }
.road-truck circle { stroke: var(--concrete); }
@keyframes drive { from { left: -140px; } }
@media (prefers-reduced-motion: reduce) { .road-truck { animation: none; } }

/* ---------- Car photo placeholder ---------- */
.car-photo svg { width: 55%; height: auto; opacity: .45; }
.car-photo { position: relative; }
.car-photo .photo-count {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(27,36,32,.8); color: #fff; font-size: .85rem; padding: 3px 8px; border-radius: 4px;
}

/* ---------- Turo booking panel ---------- */
.turo-panel {
  background: var(--paint);
  color: var(--ink);
  border-radius: var(--radius-sign);
  padding: 30px 26px;
  display: grid;
  gap: 18px;
  align-items: center;
  margin-top: 8px;
}
@media (min-width: 820px) { .turo-panel { grid-template-columns: 1.3fr 1fr; padding: 40px; } }
.turo-panel h2 { margin-bottom: .2em; }
.turo-panel p { margin: 0; font-size: 1.1rem; }
.btn-turo {
  background: var(--ink);
  color: var(--white);
  font-size: 1.3rem;
  min-height: 64px;
  padding: 18px 28px;
  width: 100%;
  box-shadow: 0 6px 0 var(--sign);
}
.btn-turo:hover { background: var(--sign-dark); }
.btn-turo:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sign); }
.turo-panel .fleet { margin: 14px 0 0; }
.turo-panel .fleet li { border-color: rgba(27,36,32,.25); }

/* ---------- Chat widget ---------- */
.chat-launch {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paint);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: 700 1rem/1 var(--body);
  box-shadow: 0 6px 18px rgba(7,64,42,.35);
  cursor: pointer;
}
@media (min-width: 900px) { .chat-launch { bottom: 24px; right: 24px; } }
.chat-launch svg { width: 22px; height: 22px; }
.chat-panel {
  position: fixed;
  right: 12px;
  left: 12px;
  bottom: 88px;
  z-index: 41;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: min(560px, calc(100dvh - 120px));
}
@media (min-width: 560px) { .chat-panel { left: auto; width: 370px; } }
@media (min-width: 900px) { .chat-panel { bottom: 24px; right: 24px; } }
.chat-panel.open { display: flex; }
.chat-head {
  background: var(--sign);
  color: var(--white);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--paint);
}
.chat-head strong { font-family: var(--display); font-size: 1.3rem; }
.chat-head small { display: block; opacity: .8; }
.chat-close { background: none; border: 0; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-log { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; background: var(--concrete); }
.bubble { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 1rem; line-height: 1.4; }
.bubble.bot { background: var(--white); align-self: flex-start; border-bottom-left-radius: 3px; }
.bubble.me { background: var(--sign); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-choices button {
  background: var(--white); border: 1.5px solid var(--sign); color: var(--sign);
  border-radius: 999px; padding: 8px 12px; font: 600 .95rem var(--body); cursor: pointer;
}
.chat-choices button:hover { background: var(--sign); color: #fff; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input input { min-height: 44px; }
.chat-input button { flex: none; min-height: 44px; padding: 0 16px; }

/* ---------- Photo gallery (lightbox) ---------- */
.car-photo[data-car] { cursor: zoom-in; }
.car-photo[data-car]:focus-visible { outline: 3px solid var(--paint); outline-offset: -3px; }
body.lb-open { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: #0a0e0c;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto auto;
  align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  gap: 8px;
}
.lightbox[hidden] { display: none; }

.lb-stage {
  grid-column: 2; grid-row: 1;
  display: grid; place-items: center;
  min-height: 0; height: 100%;
}
.lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: #0a0e0c;
}

.lb-nav {
  grid-row: 1;
  width: 52px; height: 52px;
  font-size: 2.2rem; line-height: 1;
  color: #fff; background: rgba(255,255,255,.12);
  border: 0; border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
}
.lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }

.lb-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top)); right: 12px;
  width: 44px; height: 44px;
  font-size: 2rem; line-height: 1;
  color: #fff; background: rgba(255,255,255,.12);
  border: 0; border-radius: 50%;
  cursor: pointer; z-index: 2;
}
.lb-close:hover { background: rgba(255,255,255,.24); }

.lb-bar {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; color: #fff; padding: 0 4px;
}
.lb-title { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.lb-count { color: #c9d2cc; font-size: .95rem; white-space: nowrap; }

.lb-strip {
  grid-column: 1 / -1; grid-row: 3;
  display: flex; gap: 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  padding: 4px 2px;
  scrollbar-width: thin;
}
.lb-strip img {
  width: 84px; height: 60px; flex: 0 0 auto;
  object-fit: cover; border-radius: 4px;
  opacity: .5; cursor: pointer;
  border: 2px solid transparent;
}
.lb-strip img.on { opacity: 1; border-color: var(--paint); }

@media (max-width: 640px) {
  /* arrows float over the photo instead of stealing width from it */
  .lightbox { grid-template-columns: 1fr; padding-left: 8px; padding-right: 8px; }
  .lb-stage { grid-column: 1; }
  .lb-bar, .lb-strip { grid-column: 1; }
  .lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; font-size: 1.8rem;
    background: rgba(10,14,12,.55);
  }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-title { font-size: 1.1rem; }
  .lb-strip img { width: 66px; height: 48px; }
}
