/* QX Logística — home. Dirección: operativa, precisa, técnica (ref. ELIOS):
   grilla firme, mono para rótulos, rojo QX solo de acento. */
:root {
  --bg: #0b0b0c;
  --bg-2: #141417;
  --bg-3: #1d1e22;
  --paper: #f3f2ef;
  --paper-2: #e7e5e0;
  --ink: #0f0f11;
  --ink-2: #3c3d42;
  --line-d: rgba(255, 255, 255, .1);
  --line-l: rgba(15, 15, 17, .12);
  --mute-d: #8b8d93;
  --mute-l: #6b6c71;
  --red: #F5333F;
  --red-2: #d9202c;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --hdr: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: #fff;
  font-family: var(--sans); font-weight: 400; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); letter-spacing: -.045em; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px;
  border-radius: 4px; font: 500 13px/1 var(--mono); letter-spacing: -.02em;
  border: 0; cursor: pointer; white-space: nowrap;
  transition: transform .35s var(--ease-out), background-color .25s, color .25s;
}
.btn:active { transform: scale(.97); }
.btn .dot { width: 5px; height: 5px; background: currentColor; flex-shrink: 0; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #26272c; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-l); }
.btn-ghost:hover { background: rgba(15, 15, 17, .05); }
.btn.big { height: 52px; padding: 0 22px; font-size: 15px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-size: 12.5px; color: var(--mute-d);
}
.light .eyebrow { color: var(--mute-l); }
.eyebrow .sq { width: 6px; height: 6px; background: var(--red); }

/* Esquinas tipo "mira": el detalle técnico de la referencia */
.cnr { position: absolute; width: 3px; height: 3px; background: currentColor; opacity: .55; }
.cnr.tl { top: 8px; left: 8px; } .cnr.tr { top: 8px; right: 8px; }
.cnr.bl { bottom: 8px; left: 8px; } .cnr.br { bottom: 8px; right: 8px; }

/* ═══ Header ═══ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hdr);
  transition: background-color .4s, backdrop-filter .4s, box-shadow .4s;
}
.site-header.solid {
  background: rgba(11, 11, 12, .72);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line-d);
}
.hdr-inner {
  max-width: 1320px; margin: 0 auto; height: 100%; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.logo-slot { display: block; width: 150px; height: 28px; }
.hdr-nav { display: flex; gap: 2px; justify-self: start; margin-left: -12px; }
.hdr-nav a {
  font-size: 14px; color: rgba(255, 255, 255, .72); padding: 8px 10px; border-radius: 4px;
  transition: color .2s, background-color .2s;
}
.hdr-nav a:hover, .hdr-nav a.is-active { color: #fff; }
.hdr-nav a:hover { background: rgba(255, 255, 255, .06); }
.hdr-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.hdr-phone { font-size: 13px; color: rgba(255, 255, 255, .72); }
.hdr-menu { display: none; width: 40px; height: 40px; border: 0; background: rgba(255, 255, 255, .08); border-radius: 4px; cursor: pointer; }
.hdr-menu span { display: block; width: 16px; height: 1.5px; background: #fff; margin: 4px auto; }

/* El logo que viaja: tamaño final grande, se mueve solo con transform */
.logo-fly {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  transform-origin: 50% 50%; will-change: transform, opacity; opacity: 0;
}
.logo-fly svg { display: block; width: 100%; height: 100%; }
.logo-fly.docked { pointer-events: auto; cursor: pointer; }

/* ═══ Hero 3D ═══ */
.stage { position: relative; height: 560vh; }
.stage-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
/* Arrastrable: pan-y deja el scroll vertical al navegador y el gesto
   horizontal al giro del camión (también en touch) */
.stage-sticky { touch-action: pan-y; }
.stage-sticky.can-grab { cursor: grab; }
.stage-sticky.grabbing { cursor: grabbing; }
.hero-chrome { pointer-events: none; }
.hero-chrome .hero-bottom { pointer-events: auto; }
.truck-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; will-change: opacity; }
.stage-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 40%, transparent 55%, rgba(11, 11, 12, .75) 100%),
    linear-gradient(to bottom, rgba(11, 11, 12, .55), transparent 22%, transparent 70%, rgba(11, 11, 12, .6));
}
.hero-chrome {
  position: absolute; inset: 0; padding: calc(var(--hdr) + clamp(20px, 5vh, 56px)) var(--gutter) clamp(20px, 4vh, 40px);
  display: flex; flex-direction: column; justify-content: space-between;
  max-width: 1320px; margin: 0 auto; will-change: opacity, transform;
}
.hero-title {
  margin: 0; font-weight: 400; font-size: clamp(38px, min(5vw, 8vh), 76px);
  line-height: .98; letter-spacing: -.055em; max-width: 12ch;
}
.hero-bottom { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 12px; align-items: stretch; }
.glass {
  position: relative; color: #fff;
  /* Sin backdrop-filter: desenfocar un canvas 3D en movimiento cuesta un
     cuadro entero en equipos medianos. Fondo casi opaco, se lee igual. */
  background: rgba(22, 23, 26, .78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .08);
  border-radius: 6px; padding: 20px 22px;
}
.stat { display: flex; flex-direction: column; gap: 10px; min-height: 120px; justify-content: flex-end; }
.stat strong { font-weight: 400; font-size: clamp(30px, 3vw, 42px); letter-spacing: -.05em; line-height: 1; }
.stat strong small { font-size: .5em; margin-left: 3px; color: var(--mute-d); letter-spacing: 0; }
.stat span { font-size: 12px; color: var(--mute-d); }
.track { display: flex; flex-direction: column; justify-content: flex-end; }
.track label { display: block; font-size: 12px; color: var(--mute-d); margin-bottom: 14px; }
.track-row { display: flex; gap: 8px; }
.track input {
  flex: 1; min-width: 0; height: 40px; border-radius: 4px; border: 0; padding: 0 14px;
  background: rgba(255, 255, 255, .07); color: #fff; font: 400 14px var(--mono);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); outline: none; transition: box-shadow .2s;
}
.track input::placeholder { color: rgba(255, 255, 255, .38); }
.track input:focus { box-shadow: inset 0 0 0 1px rgba(245, 51, 63, .8); }
.scroll-hint {
  position: absolute; right: var(--gutter); top: calc(var(--hdr) + clamp(20px, 5vh, 56px));
  display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; color: var(--mute-d);
}
.scroll-hint .bar { width: 1px; height: 36px; background: linear-gradient(var(--red), transparent); animation: hint 2.2s var(--ease-out) infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Enunciado — mismo mecanismo que el hero del Line Up (ticket que sube) */
.statement-wrap {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: var(--hdr) var(--gutter) 0; opacity: 0; pointer-events: none; will-change: opacity, transform;
}
.statement {
  margin: 0; max-width: 20ch; text-align: center; text-wrap: balance;
  font-size: clamp(32px, min(6.4vw, 10vh), 88px); line-height: 1.04; letter-spacing: -.058em;
}
.statement .w { opacity: .22; }
.statement .hl { color: var(--red); }
/* Subrayado recto que se dibuja de izquierda a derecha (--u de 0 a 1, lo
   mueve main.js). Va como fondo del texto en línea, así acompaña a la frase
   aunque se parta en dos renglones. */
.hl-wrap {
  background: linear-gradient(var(--red), var(--red)) 0 100% / calc(var(--u, 0) * 100%) max(2px, .036em) no-repeat;
  padding-bottom: .06em;
}

/* ═══ Secciones ═══ */
.sec { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.sec.dark { background: var(--bg); color: #fff; }
.sec.light { background: var(--paper); color: var(--ink); }
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 820px; }
.sec-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; max-width: none; }
.sec-head.split .body { max-width: 34ch; margin: 0; }
.h2 { margin: 0; font-weight: 400; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.05em; text-wrap: balance; }
.lead { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.38; letter-spacing: -.025em; margin: 28px 0 0; max-width: 34ch; }
.body { font-size: 15.5px; line-height: 1.6; color: var(--mute-d); }
.light .body { color: var(--ink-2); }
.mono-body { font-family: var(--mono); font-size: 13px; line-height: 1.7; letter-spacing: -.01em; }
.btn-row { display: flex; gap: 10px; margin-top: 36px; flex-wrap: wrap; }

/* Pilares */
.pillars { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 12px; }
.card {
  position: relative; background: var(--bg-2); border-radius: 6px; padding: 24px;
  box-shadow: inset 0 0 0 1px var(--line-d); display: flex; flex-direction: column; min-height: 420px;
  transition: background-color .35s;
}
.card:hover { background: var(--bg-3); }
.card .idx { font-size: 12px; color: var(--mute-d); }
/* Ícono, título y texto arrancan a la misma altura en todas las tarjetas:
   con margin:auto cada una los empujaba según el largo de su texto */
.card .ic { width: 44px; height: 44px; margin: 72px 0 28px; filter: invert(1) grayscale(1) brightness(1.4); opacity: .9; }
.card h3 { margin: 0 0 12px; font-weight: 400; font-size: 22px; letter-spacing: -.035em; }
.card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--mute-d); }
.card .lnk { color: #fff; font-size: 13px; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.card.photo { padding: 0; overflow: hidden; }
/* La foto mide lo justo para que el título caiga a la misma altura que en
   las otras tres (24 + índice + 72 + ícono 44 + 28 = 186px desde arriba) */
.card.photo img { width: 100%; height: 162px; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.card.photo .card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card.photo .idx { position: absolute; top: 24px; left: 24px; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }

/* Sobre nosotros */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.about .body { max-width: 52ch; margin-top: 22px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 12px; }
.tile { position: relative; border-radius: 6px; padding: 26px; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; overflow: hidden; }
.tile strong { font-weight: 400; font-size: clamp(52px, 5.4vw, 76px); letter-spacing: -.06em; line-height: .9; }
.tile strong small { font-size: .42em; letter-spacing: -.02em; margin-left: 4px; }
.tile span { font-size: 12.5px; }
.tile.ink { background: var(--ink); color: #fff; grid-row: span 2; min-height: 432px; }
.tile.ink span { color: var(--mute-d); }
.tile.red { background: var(--red); color: #fff; }
.tile.paper { background: var(--paper-2); color: var(--ink); }
.tile.paper img { position: absolute; top: 22px; right: 22px; width: 84px; mix-blend-mode: multiply; }

/* Servicios — lista con desenfoque (skiper44) */
.services { position: relative; height: calc(var(--n) * 30vh + 100vh); background: var(--bg); }
.services-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.services-grid { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 40px; align-items: center; width: 100%; }
.svc-side .h2 { font-size: clamp(30px, 3.4vw, 48px); }
.svc-count { margin-top: 28px; font-size: 13px; color: var(--mute-d); }
.svc-count span { color: #fff; }
/* Sin overflow:hidden: la máscara ya funde arriba y abajo, y la caja se estira
   32px a los lados para que el desenfoque no quede recortado contra el borde */
.svc-list {
  position: relative; height: min(64vh, 520px); margin: 0 -32px; padding: 0 32px;
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
/* 32px adentro: compensa el margen negativo de .svc-list */
.svc-track { position: absolute; left: 32px; right: 32px; top: 50%; will-change: transform; }
.svc {
  height: 1.3em; display: flex; align-items: center;
  font-size: clamp(30px, 3.4vw, 50px); letter-spacing: -.045em; white-space: nowrap; color: #fff;
  transform-origin: left center; will-change: transform, filter, opacity;
}
.svc-card {
  position: relative; border-radius: 6px; padding: 28px; min-height: 240px; color: #fff;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-d);
  display: flex; flex-direction: column; justify-content: space-between;
}
.svc-card img { width: 52px; height: 52px; filter: invert(1) grayscale(1) brightness(1.5); transition: opacity .3s, transform .5s var(--ease-out); }
.svc-card p { margin: 40px 0 0; font-size: 19px; line-height: 1.4; letter-spacing: -.025em; transition: opacity .3s, filter .4s, transform .5s var(--ease-out); }
.svc-card.swap img, .svc-card.swap p { opacity: 0; filter: blur(6px); transform: translateY(6px); }

/* Beneficios */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-l); }
.benefit { padding: 32px 24px 40px 0; border-right: 1px solid var(--line-l); display: flex; flex-direction: column; gap: 64px; }
.benefit + .benefit { padding-left: 24px; }
.benefit:last-child { border-right: 0; }
.benefit img { width: 34px; height: 34px; }
.benefit h3 { margin: 0; font-weight: 400; font-size: 21px; line-height: 1.25; letter-spacing: -.035em; color: var(--ink-2); }
.benefit h3 b { font-weight: 500; color: var(--ink); display: block; }
.brochure {
  margin-top: 56px; padding: 22px 24px; border-radius: 6px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-l); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brochure > span { font-size: 13px; color: var(--mute-l); }

/* Calidad */
.quality { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 7vw, 120px); }
.q-intro .body { max-width: 46ch; margin-top: 26px; }
.q-intro { position: sticky; top: calc(var(--hdr) + 40px); align-self: start; }
.q-lede { font-size: 13px; color: var(--mute-d); margin: 0 0 8px; }
.q-list ol { list-style: none; margin: 0; padding: 0; }
.q-list li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 28px 0; border-top: 1px solid var(--line-d); }
.q-list li .idx { font-size: 13px; color: var(--red); padding-top: 6px; }
.q-list h3 { margin: 0 0 6px; font-weight: 400; font-size: 26px; letter-spacing: -.04em; }
.q-list p { margin: 0; color: var(--mute-d); font-size: 15px; line-height: 1.55; max-width: 48ch; }

/* Clientes */
.clients { background: #fff; padding: 56px 0 64px; overflow: hidden; }
.clients-lbl { text-align: center; color: var(--mute-l); font-size: 12.5px; margin: 0 0 28px; }
.marquee { mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 72px; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track img { height: 64px; width: auto; filter: grayscale(1) contrast(1.1); opacity: .7; mix-blend-mode: multiply; transition: opacity .3s, filter .3s; }
.marquee-track img:hover { opacity: 1; filter: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 36px)); } }

/* CTA */
.cta { background: var(--red); color: #fff; padding: clamp(80px, 11vw, 150px) 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.cta .h2 { max-width: 18ch; }
.cta .btn-red { background: #fff; color: var(--ink); }
.cta .btn-red:hover { background: var(--ink); color: #fff; }

/* Footer */
.footer { background: var(--bg); padding: 80px 0 28px; color: #fff; }
.f-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: 60px; border-bottom: 1px solid var(--line-d); }
.f-cols a, .f-cols p:not(.f-lbl) { display: block; font-size: 14px; color: rgba(255, 255, 255, .7); margin: 0 0 10px; line-height: 1.5; transition: color .2s; }
.f-cols a:hover { color: #fff; }
.f-cols a.mono { font-size: 13px; }
.f-lbl { font-size: 12px; color: var(--mute-d); margin: 0 0 18px; }
.f-mark { padding: clamp(48px, 8vw, 110px) 0 clamp(24px, 4vw, 48px); }
.f-mark svg { width: 100%; height: auto; display: block; }
.f-bottom { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--mute-d); flex-wrap: wrap; }

.f-credit { margin: 18px 0 0; font-size: 11px; color: rgba(255, 255, 255, .32); }
.f-credit a { text-decoration: underline; text-underline-offset: 2px; }

/* Aparición al entrar (desenfoque + subida) */
.reveal { opacity: 0; filter: blur(8px); transform: translateY(18px); transition: opacity .9s var(--ease-out), filter .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; filter: none; transform: none; }
.reveal-words .rw { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(.3em); transition: opacity .8s var(--ease-out), filter .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i) * 45ms); }
.reveal-words.in .rw { opacity: 1; filter: none; transform: none; }

/* ═══ Responsive ═══ */
@media (max-width: 1180px) {
  .hdr-phone { display: none; }
}
@media (max-width: 1080px) {
  .hdr-nav { display: none; }
  .hdr-inner::before { content: ""; }
  .hdr-menu { display: block; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; gap: 20px; align-content: center; }
  .svc-list { height: 34vh; }
  .svc-detail .svc-card { min-height: 0; }
  .svc-card p { margin-top: 20px; }
  .about, .quality { grid-template-columns: 1fr; }
  .q-intro { position: static; }
  .benefits { grid-template-columns: 1fr 1fr; }
  .benefit:nth-child(2) { border-right: 0; }
  .benefit:nth-child(3) { padding-left: 0; }
  .benefit:nth-child(n+3) { border-top: 1px solid var(--line-l); }
}
@media (max-width: 720px) {
  :root { --hdr: 64px; }
  .logo-slot { width: 118px; height: 22px; }
  .hdr-actions .btn { display: none; }
  .hero-bottom { grid-template-columns: 1fr 1fr; }
  .hero-bottom .track { grid-column: 1 / -1; }
  .stat { min-height: 96px; padding: 16px; }
  .scroll-hint { display: none; }
  .pillars { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card .ic { margin: 36px 0 22px; }
  .sec-head.split, .cta-inner, .brochure { flex-direction: column; align-items: flex-start; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .tile.ink { grid-row: auto; grid-column: 1 / -1; min-height: 220px; }
  .tile { min-height: 170px; padding: 20px; }
  .benefits { grid-template-columns: 1fr; }
  .benefit, .benefit + .benefit { padding: 26px 0; border-right: 0; gap: 22px; }
  .benefit + .benefit { border-top: 1px solid var(--line-l); }
  .f-cols { grid-template-columns: 1fr 1fr; }
  .svc { font-size: clamp(26px, 8vw, 40px); }
  .stage { height: 480vh; }
}

@media (prefers-reduced-motion: reduce) {
  .stage { height: auto; }
  .stage-sticky { position: relative; height: 100vh; }
  .statement-wrap { position: relative; opacity: 1; padding: 80px var(--gutter); }
  .statement .w { opacity: 1 !important; }
  .hl-wrap { --u: 1; }
  .reveal, .reveal-words .rw { opacity: 1; filter: none; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .services { height: auto; }
  .services-sticky { position: relative; height: auto; padding: 100px 0; }
}

/* Hero: las dos cifras y el seguimiento en una sola barra con divisiones,
   centrada bajo el camión, como el panel de un tablero; título centrado */
.hero-chrome .hero-bottom {
  grid-template-columns: auto auto minmax(340px, 1fr); gap: 0; width: min(100%, 1080px); margin: 0 auto;
  background: rgba(22, 23, 26, .86); border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 20px 60px rgba(0, 0, 0, .45);
}
.hero-chrome .glass { background: none; box-shadow: none; border-radius: 0; padding: 22px 28px; }
.hero-chrome .glass + .glass { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .1); }
.hero-chrome .cnr { display: none; }
.hero-chrome .stat { min-height: 0; flex-direction: row; align-items: center; gap: 16px; }
.hero-chrome .stat strong { font-size: clamp(28px, 2.4vw, 36px); }
.hero-chrome .stat span { max-width: 13ch; line-height: 1.35; }
.hero-chrome .track { flex-direction: row; align-items: center; gap: 18px; }
.hero-chrome .track label { margin: 0; max-width: 17ch; line-height: 1.35; }
.hero-chrome .track-row { flex: 1; }
/* Título: Geist con interletra cerrada, alineado a la izquierda y todo en
   blanco (el rojo queda para el logo y el botón). Bajada y rótulos en
   Geist Mono, también cerrada */
.hero-chrome .hero-title {
  margin: 0; max-width: 18ch; font-weight: 500; letter-spacing: -.065em; line-height: .94;
  font-size: clamp(40px, min(5.4vw, 9vh), 92px);
}
.hero-kicker { margin: 0 0 20px; font-family: var(--mono); font-size: 13px; color: rgba(255, 255, 255, .82); letter-spacing: -.045em; }
.hero-chrome .stat span, .hero-chrome .track label { font-family: var(--mono); font-size: 12px; letter-spacing: -.045em; }
.hero-chrome .stat strong { letter-spacing: -.065em; }
@media (max-width: 1080px) {
  .hero-chrome .hero-bottom { grid-template-columns: 1fr 1fr; }
  .hero-chrome .track { grid-column: 1 / -1; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1) !important; }
}
@media (max-width: 720px) {
  .hero-chrome .hero-bottom { grid-template-columns: 1fr 1fr; }
  .hero-chrome .glass { padding: 16px; }
  .hero-chrome .stat { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-chrome .track { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1) !important; }
  .hero-chrome .track label { max-width: none; }
}



/* Título centrado sobre el camión, con la perilla del día debajo */
.hero-top { text-align: center; }
.hero-chrome .hero-title { margin: 0 auto; max-width: 20ch; }
.daytime { margin-left: auto; margin-right: auto; }

/* Hora del día: reloj + perilla. La pista es el propio día (noche, amanecer,
   día, atardecer, noche), así se entiende qué se arrastra */
.hero-top { position: relative; }
.daytime {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; margin-top: 26px; width: min(340px, 100%);
}
.dt-time { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #fff; min-width: 5.4ch; font-variant-numeric: tabular-nums; }
.dt-live { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.daytime.is-live .dt-live { background: var(--red); box-shadow: 0 0 0 0 rgba(245, 51, 63, .6); animation: live 2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(245, 51, 63, .55); } 100% { box-shadow: 0 0 0 7px rgba(245, 51, 63, 0); } }
.dt-range {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 4px; border-radius: 2px; cursor: pointer; margin: 0;
  background: linear-gradient(90deg, #121722 0%, #161b28 20%, #e08f5e 27.5%, #b9cbd9 33%, #c6d6e3 52%, #d8c2a2 71%, #ea8448 78.5%, #4d3040 82.5%, #131824 87.5%, #121722 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.dt-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14), 0 2px 8px rgba(0, 0, 0, .5); }
.dt-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14), 0 2px 8px rgba(0, 0, 0, .5); }
.dt-now { border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 11px; padding: 6px 9px; border-radius: 4px; cursor: pointer; }
.dt-now:hover { background: rgba(255, 255, 255, .18); }

/* De día (cielo claro) el texto del hero y del header pasa a tinta; la
   viñeta oscura se aclara para no ensuciar el cielo */
.stage-vignette { opacity: calc(1 - var(--daylight, 0) * .7); }
.hero-title, .hero-kicker, .dt-time, .scroll-hint, .hdr-nav a, .hdr-phone { transition: none; }
.sky-day .hero-title { color: var(--ink); }
.sky-day .dt-time { color: var(--ink); }
.sky-day .dt-now { background: rgba(15, 15, 17, .1); color: var(--ink); }
.sky-day .site-header:not(.solid) .hdr-nav a, .sky-day .site-header:not(.solid) .hdr-phone { color: rgba(15, 15, 17, .72); }
.sky-day .site-header:not(.solid) .hdr-nav a.is-active, .sky-day .site-header:not(.solid) .hdr-nav a:hover { color: var(--ink); background: rgba(15, 15, 17, .06); }
.sky-day .site-header:not(.solid) .hdr-menu { background: rgba(15, 15, 17, .1); }
.sky-day .site-header:not(.solid) .hdr-menu span { background: var(--ink); }

/* Legibilidad a cualquier hora: un velo muy suave detrás del texto, oscuro
   con letra blanca y claro con letra tinta */
.hero-top::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -60px -80px -50px;
  background: radial-gradient(closest-side, rgba(8, 9, 12, .38), rgba(8, 9, 12, 0));
  transition: background .6s;
}
.sky-day .hero-top::before { background: radial-gradient(closest-side, rgba(250, 248, 244, .36), rgba(250, 248, 244, 0)); }
.hero-top { z-index: 0; }
.hero-top::before { opacity: var(--scrim, .5); }
.sky-day .hero-kicker { color: rgba(15, 15, 17, .8); }
.scroll-hint { color: rgba(255, 255, 255, .7); }
.sky-day .scroll-hint { color: rgba(15, 15, 17, .72); }
.hero-title, .hero-kicker, .dt-time { text-shadow: 0 1px 18px rgba(0, 0, 0, .18); }
.sky-day .hero-title, .sky-day .hero-kicker, .sky-day .dt-time { text-shadow: 0 1px 18px rgba(255, 255, 255, .2); }

/* Sin grises en los textos del hero ni del header: blanco pleno (o tinta
   pleno de día). La jerarquía la da el tamaño, no un color lavado */
.hero-kicker, .scroll-hint, .dt-time { color: #fff; }
.hero-chrome .stat span, .hero-chrome .track label, .hero-chrome .stat strong small { color: #fff; }
.hdr-nav a, .hdr-phone { color: #fff; }
.sky-day .hero-kicker, .sky-day .scroll-hint, .sky-day .dt-time { color: var(--ink); }
.sky-day .site-header:not(.solid) .hdr-nav a, .sky-day .site-header:not(.solid) .hdr-phone { color: var(--ink); }
.track input::placeholder { color: rgba(255, 255, 255, .78); }

/* Primera carga: la ruta queda tapada (el texto ya se ve) hasta que el camión
   está listo; una raya de ruta que corre indica que está cargando */
.stage-loader {
  position: absolute; inset: 0; background: var(--bg); pointer-events: none;
  display: flex; align-items: center; justify-content: center; transition: opacity 1.1s var(--ease-out);
}
.stage-loader-bar { position: relative; width: 160px; height: 2px; overflow: hidden; background: rgba(255, 255, 255, .14); margin-top: 18vh; }
.stage-loader-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: #fff; animation: road 1.1s linear infinite; }
@keyframes road { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.stage.is-ready .stage-loader { opacity: 0; }
.stage.is-ready .stage-loader-bar::after { animation-play-state: paused; }

/* El claim cambia de franja con un fundido corto, no de golpe */
/* Claim: dos renglones fijos que no se parten (el alto nunca cambia) */
.hero-chrome .hero-title { max-width: none; font-size: clamp(38px, min(6.2vw, 10vh), 104px); }
.hero-title .ln { display: block; white-space: nowrap; transition: opacity .3s ease; }
.hero-title.is-swapping .ln, .hero-title.is-entering .ln { opacity: 0; }
.hero-title.is-entering .ln { transition: none; }
@media (max-width: 720px) { .hero-chrome .hero-title { font-size: 11vw; } }

/* Contraste justo → sombra detrás del texto (oscura si la letra es blanca,
   clara si es negra). Siempre blanco o negro plenos, nunca grises */
.hero-title, .hero-kicker, .dt-time, .scroll-hint {
  text-shadow: 0 0 40px rgba(0, 0, 0, calc(var(--tshadow, 0) * .32));
}
.sky-day .hero-title, .sky-day .hero-kicker, .sky-day .dt-time, .sky-day .scroll-hint {
  text-shadow: 0 0 40px rgba(255, 255, 255, calc(var(--tshadow, 0) * .36));
}
.track input::placeholder { color: #fff; opacity: 1; }

/* Cambio blanco ⇄ negro: fundido de opacidad, sin transición de color (a
   mitad de camino entre blanco y negro el texto se veía gris) */
.hero-top, .hdr-nav, .hdr-phone, .scroll-hint { transition: opacity .14s ease; }
.ink-swapping .hero-top, .ink-swapping .site-header:not(.solid) .hdr-nav, .ink-swapping .site-header:not(.solid) .hdr-phone, .ink-swapping .scroll-hint { opacity: 0; }

/* La fila del reloj no cambia de tamaño al aparecer "Ahora": el botón ocupa
   su lugar siempre (invisible en vivo) y la fila tiene alto fijo */
.daytime { height: 28px; }
.dt-now { visibility: visible; }
.dt-now[hidden] { display: inline-block; visibility: hidden; }

/* Momentos del día (solo mobile): tres íconos arriba a la izquierda del header */
.dt-presets { display: none; }
@media (max-width: 720px) {
  .hdr-inner::before { content: none; }
  .dt-presets {
    display: flex; gap: 2px; padding: 3px; border-radius: 8px; justify-self: start;
    background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transition: opacity .3s;
  }
  .dt-presets button { width: 34px; height: 34px; border: 0; border-radius: 6px; background: none; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
  .dt-presets svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .dt-presets button.on { background: #fff; color: var(--ink); }
  .sky-day .site-header:not(.solid) .dt-presets { background: rgba(15, 15, 17, .08); box-shadow: inset 0 0 0 1px rgba(15, 15, 17, .14); }
  .sky-day .site-header:not(.solid) .dt-presets button { color: var(--ink); }
  .sky-day .site-header:not(.solid) .dt-presets button.on { background: var(--ink); color: #fff; }
  .site-header.solid .dt-presets { opacity: 0; pointer-events: none; }
  .daytime { display: none; }
  /* Cifras alineadas arriba: el número a la misma altura en las dos tarjetas */
  .hero-chrome .stat { justify-content: flex-start; }
}

/* Indicación de scroll: una flecha centrada debajo del camión (sin texto) */
.hero-bottom { position: relative; }
.scroll-arrow {
  position: absolute; left: 50%; bottom: calc(100% + 22px); width: 22px; height: 22px; margin-left: -11px;
  color: #fff; animation: nudge 2.2s var(--ease-out) infinite; pointer-events: none;
}
.scroll-arrow svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scroll-arrow svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }   /* va sobre la ruta: siempre blanca */
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-arrow { animation: none; } }

/* Rótulos de las cifras en mobile: dos renglones fijos, cortados donde se
   lee bien. En desktop quedan como estaban (se acomodan en su casilla) */
@media (max-width: 720px) {
  .hero-chrome .stat span.mono { max-width: none; }
  .hero-chrome .stat .nw { display: block; white-space: nowrap; }
}

/* Pantalla de carga: tapa TODO (texto y header incluidos) hasta que el camión
   está listo; después se funde y aparece la página entera junta */
.page-loader {
  position: fixed; inset: 0; z-index: 300; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  transition: opacity .7s var(--ease-out), visibility 0s linear .7s;
}
.page-loader img { width: 168px; height: auto; }
.page-loader-bar { position: relative; width: 168px; height: 2px; overflow: hidden; background: rgba(255, 255, 255, .16); }
.page-loader-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: #fff; animation: road 1.1s linear infinite; }
body:not(.is-loading) .page-loader { opacity: 0; visibility: hidden; }
body.is-loading { overflow: hidden; }

/* Desktop: los rótulos de las cifras también en dos renglones fijos
   ("Envíos puerta a puerta / en AMBA"); el rótulo no se encoge, así la
   casilla crece en vez de que el texto se salga */
@media (min-width: 721px) {
  .hero-chrome .stat span.mono { max-width: none; flex-shrink: 0; }
  .hero-chrome .stat .nw { display: block; white-space: nowrap; }
}

/* El corte del rótulo cambia según el ancho: mobile "…a puerta / en AMBA",
   desktop "…puerta a / puerta en AMBA" (renglón largo más corto) */
.lbl-d { display: none; }
@media (min-width: 721px) {
  .lbl-m { display: none; }
  .lbl-d { display: block; }
}
