:root {
  /* Colores de marca (logo Logitrack) */
  --navy: #1b2a86;
  --blue: #2456a6;
  --gold: #e2b80a;
  --gold-hover: #cfa707;
  --on-gold: #16236e;

  --heading: #16236e;
  --wordmark: #1b2a86;
  --blue-soft: #eaf0fa;
  --gold-soft: #fbf3d2;
  --text: #141a33;
  --text-muted: #59607a;
  --border: #e1e5ef;
  --bg: #ffffff;
  --bg-muted: #f5f7fc;
  --surface: #ffffff;
  --danger: #d92d20;
  --header-bg: rgba(255, 255, 255, .9);
  --band-from: #1b2a86;
  --band-to: #2a5fae;
  --map-bg: #edf1f8;
  --map-grid: #dde4f0;
  --map-road: #ffffff;
  --focus: rgba(36, 86, 166, .35);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 26, 51, .04), 0 12px 32px rgba(20, 26, 51, .08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --heading: #eef2fb;
    --wordmark: #eef2fb;
    --blue: #6d9be0;
    --blue-soft: rgba(109, 155, 224, .14);
    --gold-soft: rgba(226, 184, 10, .14);
    --text: #e6e9f2;
    --text-muted: #9ba3ba;
    --border: #25304d;
    --bg: #0b1230;
    --bg-muted: #0e1638;
    --surface: #121b3f;
    --danger: #f87171;
    --header-bg: rgba(11, 18, 48, .85);
    --band-from: #141f63;
    --band-to: #1b3a78;
    --map-bg: #10193d;
    --map-grid: #1b2750;
    --map-road: #1f2d5c;
    --focus: rgba(109, 155, 224, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --heading: #eef2fb;
  --wordmark: #eef2fb;
  --blue: #6d9be0;
  --blue-soft: rgba(109, 155, 224, .14);
  --gold-soft: rgba(226, 184, 10, .14);
  --text: #e6e9f2;
  --text-muted: #9ba3ba;
  --border: #25304d;
  --bg: #0b1230;
  --bg-muted: #0e1638;
  --surface: #121b3f;
  --danger: #f87171;
  --header-bg: rgba(11, 18, 48, .85);
  --band-from: #141f63;
  --band-to: #1b3a78;
  --map-bg: #10193d;
  --map-grid: #1b2750;
  --map-road: #1f2d5c;
  --focus: rgba(109, 155, 224, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }

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

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold); color: var(--on-gold); }
.btn--primary:hover { background: var(--gold-hover); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-muted); }
.btn--outline { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn--outline:hover { background: var(--blue-soft); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--block { width: 100%; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { width: 34px; height: 41px; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__word {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--wordmark);
}
.logo__logi { color: var(--gold); }
.logo__tag {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  text-align: right;
}
.logo--sm .logo__mark { width: 26px; height: 31px; }
.logo--sm .logo__word { font-size: 19px; }
.logo--sm .logo__tag { font-size: 7.5px; }

/* Header */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav { display: flex; gap: 32px; font-size: 15px; color: var(--text-muted); font-weight: 500; }
.nav a:hover { color: var(--heading); }
.header__actions { display: flex; align-items: center; gap: 10px; }

/* Hero */
.hero { padding: 80px 0 96px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.hero h1 { font-size: clamp(36px, 5vw, 54px); color: var(--heading); margin-bottom: 20px; }
.hero h1 .hl { color: var(--blue); }
.lead { font-size: 18px; color: var(--text-muted); max-width: 520px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.hero__stats { display: flex; gap: 40px; list-style: none; padding: 0; margin: 0; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: "Poppins", "Inter", sans-serif; font-size: 24px; color: var(--heading); }
.hero__stats span { font-size: 13px; color: var(--text-muted); }

/* Mapa */
.map-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--map-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 5 / 4;
  max-width: 100%;
}
/* Mapa real con el recorrido animado */
.map-card--live { aspect-ratio: 712 / 642; background: #e8ece6; }
.map-card--live img,
.live-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-card--live img { object-fit: cover; }
.map-card--live .status-card { top: 12px; bottom: auto; left: 12px; right: 12px; z-index: 3; transition: opacity .35s ease; }
/* Durante el video la tarjeta va abajo para no tapar el pin del camión */
.map-card--live.status-bottom .status-card { top: auto; bottom: 12px; }
.map-card--live.status-fading .status-card { opacity: 0; }

/* Video del camión: se muestra primero y se desvanece para revelar el mapa */
.map-card__video {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: 50% 45%;
  transition: opacity 1.5s ease-in-out, transform 1.6s ease-in-out, filter 1.5s ease-in-out;
}
/* Transición suave: el video se aleja y se desenfoca mientras el mapa se asienta */
.map-card--live img,
.map-card--live .live-map { transition: transform 1.8s cubic-bezier(.22, .61, .36, 1); }
.map-card--live:not(.show-map) img,
.map-card--live:not(.show-map) .live-map { transform: scale(1.08); }
.map-card--live.show-map .map-card__video { transform: scale(1.1); filter: blur(3px); }
.cam-chip {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 18, 48, .75);
  color: #ffffff;
  font-size: 12px; font-weight: 600;
  transition: opacity .8s ease;
}
.cam-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
/* Pin del logo sobre el camión: el punto (0,0) es el techo; la punta del pin se apoya ahí */
.truck-pin {
  --s: 60px;
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 0; height: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity .9s ease;
}
.truck-pin img {
  position: absolute;
  width: var(--s); height: var(--s);
  left: calc(var(--s) * -0.499); top: calc(var(--s) * -0.991);
  max-width: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
}
.truck-pin__pulse {
  position: absolute;
  width: calc(var(--s) * .9); height: calc(var(--s) * .32);
  left: calc(var(--s) * -.45); top: calc(var(--s) * -.16);
  border: 2px solid #e2b80a;
  border-radius: 50%;
  animation: pin-pulse 1.6s ease-out infinite;
}
@keyframes pin-pulse {
  0% { transform: scale(.4); opacity: .9; }
  100% { transform: scale(1.4); opacity: 0; }
}
.map-card--live.show-map .map-card__video,
.map-card--live.show-map .truck-pin,
.map-card--live.show-map .cam-chip { opacity: 0; pointer-events: none; }

.status-card {
  position: absolute; left: 20px; right: 20px; bottom: 20px;
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.status-card__head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--heading); margin-bottom: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.status-card__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.status-card small { display: block; font-size: 11px; color: var(--text-muted); }
.status-card strong { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

/* Secciones */
.section { padding: 96px 0; }
.section--muted { background: var(--bg-muted); }
.section__head { max-width: 620px; margin: 0 auto 56px; text-align: center; }
.section__head h2, .booking h2 { font-size: clamp(28px, 3.4vw, 38px); color: var(--heading); margin-bottom: 14px; }
.section__head p { color: var(--text-muted); font-size: 17px; }

/* Beneficios */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.feature:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.feature__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 18px;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; color: var(--heading); }
.feature p { font-size: 15px; color: var(--text-muted); }

/* Pasos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { padding: 32px 28px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.step__num {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 700; font-size: 16px;
  margin-bottom: 18px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; color: var(--heading); }
.step p { color: var(--text-muted); font-size: 15px; }

/* Agendar: franja con los colores de marca */
.section--brand { background: linear-gradient(135deg, var(--band-from), var(--band-to)); }
.booking { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.booking__copy { position: sticky; top: 110px; color: #ffffff; }
.booking__copy h2 { color: #ffffff; }
.booking__copy > p { color: #d6e0f7; font-size: 17px; }
.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 32px; font-weight: 500; }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316236e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.booking__contact { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 15px; color: #d6e0f7; }
.booking__contact a { color: #ffffff; font-weight: 600; border-bottom: 1px solid var(--gold); }

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 24px 48px rgba(8, 14, 50, .25);
}
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.optional { font-weight: 400; color: var(--text-muted); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus);
}
.field__error { display: none; font-size: 12px; color: var(--danger); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--danger); }
.field.is-invalid .field__error { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(217, 45, 32, .08);
  color: var(--danger);
  font-size: 14px;
}
.form__error a { font-weight: 600; text-decoration: underline; }
.btn[disabled] { opacity: .7; cursor: wait; }
.form__note { margin-top: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }

.form--success { text-align: center; padding: 56px 32px; }
.form--success h3 { font-size: 24px; color: var(--heading); margin-bottom: 10px; }
.form--success p { color: var(--text-muted); margin: 0 auto 28px; max-width: 360px; }
.success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.success__icon {
  width: 60px; height: 60px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-hover);
}
.success__icon svg { width: 28px; height: 28px; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 0, 0, .28); }
.wa-float svg { width: 26px; height: 26px; flex: none; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0 40px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { font-size: 14px; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .hero { padding: 48px 0 64px; }
  .hero__inner, .booking { grid-template-columns: 1fr; gap: 48px; }
  .booking__copy { position: static; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .vehicle__label { display: none; }
  .map-card--live .status-card { top: 8px; left: 8px; right: 8px; padding: 10px 12px; }
  .map-card--live.status-bottom .status-card { bottom: 8px; }
  .cam-chip { left: 8px; top: 8px; }
  .status-card__head { margin-bottom: 6px; }
  .features, .form__grid { grid-template-columns: 1fr; }
  .form { padding: 24px 20px; }
  .hero__stats { gap: 28px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .header__cta { display: none; }
  .header .btn--sm { padding: 9px 14px; font-size: 13px; }
  .logo__word { font-size: 21px; }
  .footer__inner { flex-direction: column; text-align: center; padding-bottom: 56px; }
  .wa-float { padding: 0; width: 56px; justify-content: center; }
  .wa-float span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cam-chip__dot, .truck-pin__pulse { animation: none; }
}
