/* Auto Reset · portada con video por scroll + secciones */
:root {
  --blanco: #ffffff;
  --tinta: #0C0C0C;          /* tinta y franja: el tono medido del piso del video (mediana 12) */
  --gris: #F2F3F4;           /* paso de tono para separar bloques sobre blanco */
  --gris-2: #5B6068;         /* texto secundario */
  --rojo: #E3141B;           /* acento de la marca */
  --rojo-btn: #CC1119;       /* rojo de botones (contraste 4.5:1 con blanco) */
  --wa: #25D366;
  --letras: #e9e9e9;         /* letras gigantes */
  --u: min(calc(100vw / 1440), calc(100vh / 960));
  --m: clamp(16px, 2vw, 32px);   /* margen de página */
  --sec: clamp(96px, 11vw, 180px); /* aire entre secciones */
  --edge-px: 60vh;           /* borde de la franja: lo escribe escena.js */
  --linea-px: 100vh;         /* línea blanco/negro del fondo: lo escribe escena.js */
  --ph: 0;                   /* 1 cuando la camioneta ya quedó quieta */
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }   /* solo en html: en body rompería el position: sticky */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; background: var(--blanco); color: var(--tinta); }
body { font-family: 'Saira', system-ui, sans-serif; font-stretch: 100%; font-weight: 400; font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .18em; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, blockquote, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
::selection { background: var(--rojo); color: var(--blanco); }

/* Letra grande tipo cartel: Saira condensada (la familia del logo) */
.cartel, .titular, .card h3, .letras, .contacto-titulo, .numero {
  font-family: 'Saira', sans-serif; font-weight: 900; font-stretch: 62.5%; text-transform: uppercase; letter-spacing: -.01em;
}

/* ---------- Pista y menú ---------- */
.track { position: relative; background: var(--blanco); }
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: calc(26 * var(--u)) var(--m) 0; }
.nav-lugar { font-weight: 500; font-size: 14px; }
.nav-der { display: flex; align-items: center; gap: calc(28 * var(--u)); font-weight: 500; font-size: max(13px, calc(13 * var(--u))); }
.nav-der a { text-decoration: none; }
.nav-der a:not(.pill):hover { color: var(--rojo); }
.pill { display: inline-block; border: 1.5px solid currentColor; border-radius: 999px; padding: .75em 1.4em; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; font-size: max(11px, calc(10 * var(--u))); text-decoration: none; transition: background-color .2s, color .2s, transform .2s; }
.pill:hover { background: var(--tinta); color: var(--blanco); }
.pill:active { transform: scale(.97); }

/* ---------- Escena fija ---------- */
.scene { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden;
  background: linear-gradient(var(--blanco) 0 var(--linea-px), var(--tinta) var(--linea-px) 100%); }
#clip { position: absolute; left: 0; top: 0; display: block; will-change: transform;
  /* bordes difuminados para que el video se funda con el blanco de arriba y el negro de los lados */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 14%, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 14%, #000 72%, transparent 100%);
  mask-composite: intersect; }

/* Cortina blanca con el logo: sube con el scroll y descubre la camioneta */
.intro { position: absolute; inset: 0; z-index: 3; background: var(--blanco); display: grid; place-items: center; overflow: hidden; will-change: transform; }
.intro-in { width: min(80vw, 1060px); text-align: center; position: relative; top: -2vh; will-change: transform; }
.intro h1 { margin: 0; }
.intro h1 img { width: 100%; }
.intro-lema { margin-top: calc(28px + 1vw); font-size: clamp(17px, 1.6vw, 22px); font-weight: 500; }
.intro-baja { position: absolute; left: 50%; top: calc(100% + 14vh); transform: translateX(-50%); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gris-2); white-space: nowrap; }
.intro-baja::after { content: ''; display: block; width: 2px; height: 34px; margin: 12px auto 0; background: var(--rojo); transform-origin: top; animation: baja 1.6s var(--ease) infinite; }
@keyframes baja { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .intro-baja::after { animation: none; } }

.letras { position: absolute; left: 0; top: calc(var(--edge-px) - 300 * var(--u) * .8); font-size: calc(300 * var(--u)); line-height: .8;
  color: var(--letras); white-space: nowrap; mix-blend-mode: darken; pointer-events: none; will-change: transform; transform: translateX(100vw); }

.velocidad { position: absolute; left: var(--m); top: calc(52 * var(--u)); font-family: 'JetBrains Mono', monospace; /* taste-skill-ignore: velocímetro pedido en la plantilla */
  font-size: max(11px, calc(10.5 * var(--u))); letter-spacing: .04em; opacity: var(--ph); transition: opacity .4s; }

.banda { position: absolute; left: 0; right: 0; top: var(--edge-px); bottom: 0; color: var(--blanco); }
.tira { position: absolute; top: calc(70 * var(--u)); left: 0; display: flex; gap: calc(120 * var(--u)); align-items: flex-start;
  will-change: transform; transform: translateX(100vw); }
.lead { display: flex; gap: calc(64 * var(--u)); align-items: flex-start; flex: none; }
.titular { font-size: calc(64 * var(--u)); line-height: .98; white-space: nowrap; }
.titular span { color: var(--rojo); }
.lead-texto { width: calc(250 * var(--u)); display: grid; gap: 1em; font-size: max(13px, calc(12 * var(--u))); line-height: 1.5; color: rgba(255, 255, 255, .7); }

.card { flex: none; width: calc(270 * var(--u)); padding: 0 calc(30 * var(--u)); border-left: 1px solid rgba(255, 255, 255, .12); --s: -40%; }
.lead + .card { border-left: 0; }
.card svg { width: calc(38 * var(--u)); height: calc(38 * var(--u)); min-width: 30px; min-height: 30px; margin-bottom: calc(22 * var(--u)); }
.card h3 { font-size: calc(26 * var(--u)); line-height: 1; margin-bottom: calc(14 * var(--u)); }
.card p { font-size: max(13px, calc(12.4 * var(--u))); line-height: 1.5; }
.card h3, .card p {
  background-image: linear-gradient(90deg, var(--blanco) calc(var(--s) - 34%), var(--rojo) calc(var(--s) - 6%), transparent calc(var(--s) + 26%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.pill-banda { position: absolute; left: 50%; bottom: calc(36 * var(--u)); color: var(--blanco); opacity: var(--ph);
  transform: translate(-50%, calc((1 - var(--ph)) * 24px)); transition: opacity .5s, transform .5s; }
.pill-banda:hover { background: var(--blanco); color: var(--tinta); }

/* ---------- Piezas comunes de las secciones ---------- */
.sec-titulo { font-size: clamp(56px, 8.4vw, 150px); line-height: .88; }
.sec-titulo span { color: var(--rojo); }
.sec-lead { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.4; max-width: 34ch; }
.boton { display: inline-block; background: var(--rojo-btn); color: var(--blanco); text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 16px 26px; border-radius: 999px; transition: transform .2s var(--ease), background-color .2s; }
.boton:hover { background: #A90E15; transform: translateY(-2px); }
.boton:active { transform: scale(.98); }

/* ---------- Quiénes somos ---------- */
.nosotros { padding: var(--sec) var(--m) 0; }
.sec-cabeza { display: grid; grid-template-columns: 1fr 1fr; gap: 24px var(--m); align-items: end; }
.nosotros .sec-lead { justify-self: end; }
.nos-cuerpo { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 96px); align-items: center; margin-top: clamp(48px, 6vw, 96px); }
.nos-foto { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--gris); }
.nos-foto img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.4s var(--ease); }
.nos-foto:hover img { transform: scale(1.08); }
.nos-foto figcaption, .galeria figcaption { position: absolute; left: 0; bottom: 0; padding: 10px 14px; background: var(--tinta); color: var(--blanco); font-size: 14px; font-weight: 600; }
.nos-texto { display: grid; gap: 24px; justify-items: start; }
.nos-texto > p { font-size: clamp(18px, 1.4vw, 21px); max-width: 46ch; }
.nos-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 12px 0; }
.nos-datos li { background: var(--gris); padding: 22px 20px; display: grid; gap: 4px; }
.nos-datos b { font-family: 'Saira', sans-serif; font-weight: 900; font-stretch: 62.5%; font-size: clamp(48px, 5vw, 80px); line-height: .9; color: var(--rojo); }
.nos-datos span { font-size: 15px; line-height: 1.35; }

.galeria-titulo { font-size: clamp(36px, 4vw, 64px); line-height: .9; margin: var(--sec) 0 28px; }
.galeria { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.galeria figure { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: var(--gris); }
.galeria figure.ancha { grid-column: span 2; aspect-ratio: auto; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.galeria figure:hover img { transform: scale(1.05); }

/* ---------- Opiniones ---------- */
.opiniones { padding: var(--sec) var(--m) 0; }
.ops { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-top: clamp(40px, 5vw, 72px); }
.op { background: var(--gris); padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 260px; }
.op p { font-size: clamp(22px, 2vw, 30px); line-height: 1.25; font-weight: 500; }
.op-grande { background: var(--tinta); color: var(--blanco); }
.op-grande p { font-size: clamp(28px, 3vw, 44px); line-height: 1.12; font-weight: 600; max-width: 22ch; }
.op footer { font-size: 15px; font-weight: 600; }
.op footer::before { content: '★★★★★'; display: block; color: var(--rojo); letter-spacing: .12em; margin-bottom: 6px; }
.ops-pie { margin-top: 20px; font-size: 16px; }

/* ---------- Agenda tu cita ---------- */
.cita { margin-top: var(--sec); background: var(--tinta); color: var(--blanco); padding: var(--sec) var(--m);
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.cita .sec-lead { margin-top: 28px; color: rgba(255, 255, 255, .86); }
.horario { margin-top: 40px; display: grid; gap: 2px; max-width: 420px; }
.horario div { display: flex; justify-content: space-between; gap: 16px; background: #1B1C1E; padding: 14px 18px; font-size: 16px; }
.horario dt { font-weight: 600; }
.cita-form { display: grid; gap: 18px; background: #18191B; padding: clamp(22px, 3vw, 40px); }
.elegir { border: 0; margin: 0; padding: 0; }
.elegir legend, .cita-form label { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .86); }
.elegir legend { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 10px 16px; border-radius: 999px; background: #26282B; color: var(--blanco); font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background-color .2s, transform .2s; user-select: none; }
.chip span:hover { background: #33363A; }
.chip input:checked + span { background: var(--rojo-btn); }
.chip input:focus-visible + span { outline: 3px solid var(--blanco); outline-offset: 2px; }
.chip:active span { transform: scale(.96); }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cita-form label { display: grid; gap: 8px; }
.cita-form input, .cita-form select, .cita-form textarea {
  font: inherit; font-size: 17px; color: var(--blanco); background: #26282B; border: 1.5px solid #26282B; border-radius: 10px; padding: 13px 14px; width: 100%;
  color-scheme: dark; transition: border-color .2s; }
.cita-form input:focus, .cita-form select:focus, .cita-form textarea:focus { outline: none; border-color: var(--rojo); }
.cita-form input::placeholder, .cita-form textarea::placeholder { color: #8C9096; }
.cita-form textarea { resize: vertical; min-height: 90px; }
.cita-error { color: #FF8A8E; font-weight: 600; font-size: 16px; }
.boton-wa { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 700; font-size: 18px; color: var(--tinta);
  background: var(--wa); border: 0; border-radius: 999px; padding: 17px 28px; cursor: pointer; transition: transform .2s var(--ease), filter .2s; }
.boton-wa svg { width: 24px; height: 24px; }
.boton-wa:hover { transform: translateY(-2px); filter: brightness(1.05); }
.boton-wa:active { transform: scale(.98); }
.cita-nota { font-size: 14px; color: rgba(255, 255, 255, .7); }

/* ---------- Preguntas frecuentes ---------- */
.preguntas { padding: var(--sec) var(--m) 0; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.preg-cabeza { position: sticky; top: 32px; display: grid; gap: 28px; }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--gris); transition: background-color .25s; }
.faq details[open] { background: #E8EAEC; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 24px; font-size: clamp(18px, 1.5vw, 22px); font-weight: 700; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tinta); color: var(--blanco);
  font-weight: 600; font-size: 22px; line-height: 1; transition: transform .3s var(--ease), background-color .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--rojo); }
.faq summary:hover::after { background: var(--rojo); }
.faq details p { padding: 0 24px 24px; max-width: 60ch; font-size: 17px; animation: abre .35s var(--ease); }
@keyframes abre { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Contacto ---------- */
.contacto { background: var(--blanco); padding: var(--sec) var(--m) var(--m); }
.contacto-titulo { font-size: clamp(56px, 6.7vw, 120px); line-height: .9; }
.contacto-titulo span { color: var(--rojo); }
.numero { display: block; margin-top: clamp(28px, 3vw, 48px); font-size: clamp(84px, 17vw, 300px); line-height: .85; text-decoration: none; white-space: nowrap;
  transition: color .25s; }
.numero:hover { color: var(--rojo); }
.contacto-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 24px var(--m); margin-top: clamp(32px, 4vw, 56px); align-items: stretch; }
.contacto-datos { display: grid; gap: 22px; align-content: start; font-size: 17px; }
.contacto-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-oscura:hover { background: var(--rojo-btn); border-color: var(--rojo-btn); color: var(--blanco); }
.mapa { width: 100%; min-height: 360px; border: 0; background: var(--gris); }
.pie { margin: var(--sec) calc(var(--m) * -1) calc(var(--m) * -1); background: var(--tinta); color: rgba(255, 255, 255, .72); padding: clamp(40px, 5vw, 72px) var(--m) var(--m); font-size: 14px; }
.pie img { width: 100%; margin-bottom: clamp(28px, 3vw, 48px); }
.pie-fila { display: flex; justify-content: space-between; gap: 16px; }
.pie-fila a { color: var(--blanco); }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22); /* taste-skill-ignore: botón que flota sobre la página */
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .35s, transform .35s var(--ease); }
.wa-flotante.ver { opacity: 1; transform: none; pointer-events: auto; }
.wa-flotante svg { width: 32px; height: 32px; }
.wa-flotante:hover { transform: scale(1.06); }

/* ---------- Entradas ---------- */
.js .entra { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.js .entra.visto { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .entra { opacity: 1; transform: none; transition: none; } }

/* ---------- Teléfonos y pantallas verticales ---------- */
@media (max-width: 767px), (orientation: portrait) {
  :root { --u: min(calc(100vw / 430), 1.4px); }
  .nav-der a:not(.pill) { display: none; }
  .nav { padding: 18px 16px 0; }
  .nav-lugar { font-size: 13px; }
  .nav .pill { font-size: 11px; padding: .7em 1.1em; white-space: nowrap; }
  .intro-in { width: 88vw; top: -6vh; }
  .intro-baja { top: calc(100% + 18vh); }
  #clip { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 72%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 72%, transparent 100%); }
  .velocidad { font-size: 11px; left: 20px; top: 22px; }
  .letras { font-size: calc(180 * var(--u)); top: calc(var(--edge-px) - 180 * var(--u) * .8); }
  .tira { top: calc(44 * var(--u)); gap: calc(56 * var(--u)); padding-left: 22px; }
  .lead { flex-direction: column; gap: calc(20 * var(--u)); }
  .titular { font-size: calc(46 * var(--u)); }
  .lead-texto { width: calc(300 * var(--u)); font-size: calc(13 * var(--u)); }
  .card { width: calc(250 * var(--u)); }
  .card h3 { font-size: calc(26 * var(--u)); }
  .card p { font-size: calc(13 * var(--u)); }
}
@media (max-width: 900px) {
  .sec-cabeza, .nos-cuerpo, .cita, .preguntas, .contacto-grid { grid-template-columns: 1fr; }
  .nosotros .sec-lead { justify-self: start; }
  .nos-foto { aspect-ratio: 4 / 4.4; }
  .galeria { grid-template-columns: 1fr 1fr; }
  .ops { grid-template-columns: 1fr; }
  .op { min-height: 0; }
  .preg-cabeza { position: static; }
  .fila2 { grid-template-columns: 1fr; }
  .nos-datos { grid-template-columns: 1fr 1fr 1fr; }
  .nos-datos li { padding: 16px 12px; }
  .nos-datos span { font-size: 13px; }
  .mapa { min-height: 300px; }
  .pie-fila { flex-direction: column; }
  .wa-flotante { right: 14px; bottom: 14px; width: 56px; height: 56px; }
}
