/* HMM Rastreo — estilos compartidos */
:root {
  --paper: #F3F5F2;
  --paper-2: #E8ECE7;
  --ink: #07162E;
  --muted: #4F5E6B;
  --line: #D3DAD3;
  --road: #E2B007;
  --road-dark: #B88C00;
  --deep: #003E7C;
  --deep-2: #0B4F96;
  --wa: #1E9E4F;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --wrap: 1180px;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { max-width: 100%; }
a { color: var(--deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--road); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.7rem, 6.2vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.55rem; line-height: 1.1; }
p { margin: 0 0 1em; max-width: 66ch; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--road); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.25rem; border-radius: var(--radius-sm);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-road { background: var(--road); color: var(--ink); }
.btn-road:hover { background: #F0C21A; color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #17843F; color: #fff; }
.btn-line { border-color: currentColor; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.on-deep .btn-line { color: #fff; }
.on-deep .btn-line:hover { background: #fff; color: var(--deep); }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 245, 242, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { display: block; height: 54px; width: auto; }
@media (max-width: 400px) { .brand img { height: 44px; } }
.nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--road); text-decoration-thickness: 3px; }
.header-cta { padding: .55rem 1rem; font-size: .95rem; }
.menu-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: .4rem .7rem; font: 600 .95rem var(--body); color: var(--ink); cursor: pointer; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; }
  .nav li a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .header-cta { display: none; }
}

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-lede { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-note { margin-top: 1.4rem; font-size: .95rem; color: var(--muted); }
.map-frame { margin: 0; position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.map-frame svg { display: block; width: 100%; height: auto; }
.map-status {
  margin: 0; background: var(--ink); color: #fff;
  padding: .7rem 1rem; font-size: .92rem; line-height: 1.35;
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap;
}
.map-status strong { font-family: var(--display); font-size: 1.1rem; letter-spacing: .02em; }
.map-status .live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--road); margin-right: .35rem; vertical-align: middle; }

/* Rutas animadas del mapa */
.route-line { stroke-dasharray: 410; stroke-dashoffset: 410; animation: draw 3.2s .4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route-line { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* Secciones */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.alt { background: var(--paper-2); }

/* Nosotros */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.about-side { border-left: 4px solid var(--road); padding-left: 1.5rem; }
.about-side h3 { margin-top: 1.4rem; }
.about-side h3:first-child { margin-top: 0; }
.about-side p { color: var(--muted); }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } }

/* Servicios */
.services { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.services li { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; padding: 1.8rem 0; border-bottom: 1px solid var(--line); }
.services h3 { margin: 0; }
.services p { margin: 0; color: var(--muted); }
@media (max-width: 700px) { .services li { grid-template-columns: 1fr; gap: .5rem; } }

/* Tipos de vehículo */
.on-deep { background: var(--deep); color: #fff; }
.on-deep a:not(.btn) { color: #fff; }
.on-deep .section-head p { color: #CFDCEC; }
.vehicles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.vehicle svg { width: 96px; height: 64px; margin-bottom: 1rem; }
.vehicle p { color: #CFDCEC; }
.vehicle h3 { color: #fff; }
@media (max-width: 800px) { .vehicles { grid-template-columns: 1fr; gap: 2rem; } }
.commit { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.2); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.commit p { margin: 0; font-size: 1.15rem; max-width: 60ch; }

/* Clientes */
.clients { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.75rem); }
.clients h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.clients p { color: var(--muted); margin-bottom: 0; }
.clients-actions { display: flex; flex-direction: column; gap: .7rem; min-width: 250px; }
.store { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; border-radius: var(--radius-sm); background: var(--ink); color: #fff; text-decoration: none; line-height: 1.15; }
.store:hover { background: #15294A; color: #fff; }
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font-size: .75rem; opacity: .8; }
.store b { font-weight: 600; }
.store.soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
@media (max-width: 800px) { .clients { grid-template-columns: 1fr; } .clients-actions { min-width: 0; } }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact dl { margin: 0 0 2rem; }
.contact dt { font-weight: 600; margin-top: 1.2rem; }
.contact dd { margin: .2rem 0 0; color: var(--muted); }
.contact dd a { color: var(--ink); }
.map-embed { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .95rem; font-family: var(--display); font-size: 1.7rem; line-height: 1; color: var(--road-dark); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 1rem; }

/* Pie */
.site-footer { background: var(--ink); color: #C5CED6; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-logo { display: block; height: 60px; width: auto; margin-bottom: 1.2rem; }
.site-footer h3 { color: #fff; font-size: 1.25rem; margin-bottom: .7rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #fff; }
.site-footer .legal { grid-column: 1 / -1; max-width: none; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; margin-top: 1rem; font-size: .88rem; }
@media (max-width: 800px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 62, 124, .35);
}
.wa-float:hover { background: #17843F; color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* Páginas legales y de soporte */
.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0 5rem; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.doc h2 { font-size: 1.9rem; margin-top: 2.4rem; }
.doc h3 { margin-top: 1.6rem; }
.doc .updated { color: var(--muted); font-size: .95rem; }
.doc ul, .doc ol { padding-left: 1.3rem; max-width: 66ch; }
.doc li { margin-bottom: .45rem; }
.doc .box { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--road); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; margin: 1.5rem 0; }
.doc .box p:last-child { margin-bottom: 0; }
.doc-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.5rem 0; }

/* Páginas de servicio */
.crumbs { font-size: .92rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.doc .lede { font-size: 1.2rem; color: var(--muted); }
.doc .faq { margin-top: 1rem; }
.related { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .6rem; }
.related a { display: inline-block; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; text-decoration: none; color: var(--ink); font-weight: 500; }
.related a:hover { border-color: var(--deep); color: var(--deep); }
.services a, .vehicle a.more { font-weight: 600; }
.vehicle a.more { color: var(--road); }
.site-footer .wrap { grid-template-columns: 1.6fr 1fr 1fr; }
