/* CargoGest · web pública (index.html y páginas legales)
   Las animaciones se muestran siempre, aunque el sistema pida reducir movimiento (decisión de Infonet).
   Colores, letras y formas del manual de marca: azul marino, azul, amarillo con texto marino,
   esquinas redondeadas como los cuadrados del logo. */

@font-face { font-family: "Nunito"; src: url(../fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(../fonts/source-sans-3.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --marino: #1A2E6E;
  --marino-2: #14245A;
  --noche: #0D1840;
  --noche-2: #0A1232;
  --azul: #395CBE;
  --azul-2: #2F4FA8;
  --azul-cl: #8FA8F0;
  --azul-s: #EEF2FC;
  --amarillo: #FFC107;
  --amarillo-2: #F2B200;
  --amarillo-cl: #FFE066;
  --amarillo-s: #FFF7D6;
  --gris: #80868E;
  --gris-2: #5A616B;
  --gris-cl: #C8CDD4;
  --niebla: #F4F6FA;
  --linea: #E2E6ED;
  --tinta: #152251;
  --texto: #3C4558;
  --ok: #17915A;
  --ok-s: #E3F5EC;
  --error: #C2352B;

  --titulos: "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --cuerpo: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-s: 10px;
  --r: 16px;
  --r-l: 24px;
  --r-xl: 32px;
  --ancho: 1320px;
  --gut: clamp(18px, 4vw, 32px);
  --sec: clamp(80px, 9vw, 120px);       /* separación de TODAS las secciones, igual arriba y abajo */
  --cab-sec: clamp(40px, 4.5vw, 60px);  /* de la cabecera de sección a su contenido */
  --sombra-s: 0 1px 2px rgba(20, 34, 81, .06), 0 2px 8px rgba(20, 34, 81, .05);
  --sombra: 0 1px 2px rgba(20, 34, 81, .05), 0 10px 30px -6px rgba(20, 34, 81, .14);
  --sombra-l: 0 2px 4px rgba(13, 24, 64, .06), 0 30px 60px -12px rgba(13, 24, 64, .30);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
@media all { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: #fff; color: var(--texto);
  font: 400 18px/1.6 var(--cuerpo);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--azul); text-underline-offset: .18em; text-decoration-thickness: .07em; }
a:hover { color: var(--marino); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--titulos); color: var(--tinta); line-height: 1.12; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--amarillo-cl); color: var(--marino); }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; border-radius: 6px; }
.oculto { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ancho { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--gut); }
.salta { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amarillo); color: var(--marino); padding: 10px 16px; border-radius: var(--r-s); font-weight: 700; text-decoration: none; transition: top .2s; }
.salta:focus { top: 12px; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i .ac { stroke: var(--ac, var(--amarillo)); }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--amarillo); --fg: var(--marino);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--bg); color: var(--fg); text-decoration: none; white-space: nowrap;
  font: 800 17px/1 var(--titulos); letter-spacing: -.005em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 6px 18px -6px rgba(255, 193, 7, .6);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s;
}
.btn:hover { color: var(--fg); background: var(--amarillo-cl); }
.btn:active { transform: translateY(1px); }
.btn .flecha { display: inline-flex; align-items: center; gap: 3px; }
.btn .flecha i { display: block; height: 2.5px; border-radius: 2px; background: currentColor; opacity: .5; width: 0; transition: width .3s var(--ease); }
.btn .flecha svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 28px -10px rgba(255, 193, 7, .75); }
  .btn:hover .flecha i:nth-child(1) { width: 6px; }
  .btn:hover .flecha i:nth-child(2) { width: 10px; }
  .btn:hover .flecha svg { transform: translateX(3px); }
}
.btn-sec { --bg: transparent; --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.btn-sec:hover { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.btn-marino { --bg: var(--marino); --fg: #fff; box-shadow: 0 8px 20px -8px rgba(26, 46, 110, .55); }
.btn-marino:hover { background: var(--azul-2); color: #fff; box-shadow: 0 14px 28px -10px rgba(26, 46, 110, .6); }

/* ---------- Cabecera (logo · menú centrado · acciones) ---------- */
.cab { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .3s, box-shadow .3s; }
.cab .ancho { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; height: 76px; transition: height .3s var(--ease); }
.cab-logo { justify-self: start; display: block; line-height: 0; border-radius: 8px; }
.cab-logo img { width: 172px; height: 55px; }
.cab-logo .claro { display: none; }
.cab nav ul { display: flex; align-items: center; gap: 2px; }
.cab nav a {
  display: block; padding: 10px 11px; border-radius: 10px; text-decoration: none; white-space: nowrap;
  font: 700 15px/1 var(--titulos); color: rgba(255, 255, 255, .82); transition: color .2s, background-color .2s;
}
.cab nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.cab nav a[aria-current="true"] { color: var(--amarillo); }
.cab-acciones { justify-self: end; display: flex; align-items: center; gap: 16px; }
.cab-tel { display: inline-flex; align-items: center; gap: 8px; font: 800 15.5px/1 var(--titulos); color: #fff; text-decoration: none; white-space: nowrap; }
.cab-tel svg { width: 18px; height: 18px; }
.cab-tel:hover { color: var(--amarillo); }
.cab .btn { min-height: 44px; padding: 0 18px; font-size: 15.5px; border-radius: 12px; }
.cab-menu { display: none; }
.cab.solida { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); box-shadow: 0 1px 0 rgba(20, 34, 81, .08), 0 8px 30px -12px rgba(20, 34, 81, .18); }
.cab.solida .ancho { height: 66px; }
.cab.solida .cab-logo .oscuro { display: none; }
.cab.solida .cab-logo .claro { display: block; }
.cab.solida nav a { color: var(--gris-2); }
.cab.solida nav a:hover { color: var(--marino); background: var(--niebla); }
.cab.solida nav a[aria-current="true"] { color: var(--marino); background: var(--amarillo-s); }
.cab.solida .cab-tel { color: var(--marino); }
.cab.solida .cab-tel:hover { color: var(--azul); }
.cab.solida .cab-menu { color: var(--marino); border-color: var(--linea); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 78% 8%, rgba(57, 92, 190, .55), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(57, 92, 190, .35), transparent 60%),
    linear-gradient(180deg, var(--marino) 0%, var(--noche) 70%, var(--noche-2) 100%);
  color: #DCE3F5; padding: 116px 0 clamp(56px, 6vw, 96px);
}
.hero-trama { position: absolute; inset: 0; z-index: -1; opacity: .9; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 10%, transparent 75%); }
.hero-trama svg { width: 100%; height: 100%; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(20px, 2.5vw, 40px); align-items: center; }
.hero-txt { padding-bottom: 0; }
.etiqueta {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  font: 700 14.5px/1.2 var(--titulos); color: #fff; letter-spacing: .01em;
}
.etiqueta b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--amarillo); color: var(--marino); font-weight: 900; font-size: 12.5px; letter-spacing: .04em; }
.hero h1 { margin: 20px 0 20px; font-size: clamp(38px, 4.7vw, 64px); font-weight: 900; line-height: 1.02; letter-spacing: -.035em; color: #fff; }
.hero h1 .subraya { position: relative; display: inline-block; color: var(--amarillo); white-space: nowrap; }
.hero h1 .subraya svg { position: absolute; left: -2%; right: -2%; bottom: -.16em; width: 104%; height: .32em; overflow: visible; }
.hero h1 .subraya path { fill: none; stroke: var(--amarillo); stroke-width: 6; stroke-linecap: round; opacity: .55; }
@media (scripting: enabled) {
  .hero h1 .subraya path { stroke-dasharray: 420; stroke-dashoffset: 420; animation: traza 1.2s var(--ease) .9s forwards; }
}
.hero-lead { max-width: 540px; font-size: clamp(18px, 1.4vw, 20px); line-height: 1.6; color: #C6D0EA; }
.hero-lead b { color: #fff; font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-ctas .btn { min-height: 56px; padding: 0 22px; font-size: 17px; border-radius: 16px; }
.hero-sellos { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); }
.hero-sellos li { display: flex; align-items: center; gap: 9px; font: 700 15px/1.2 var(--titulos); color: #fff; }
.hero-sellos svg.i { width: 22px; height: 22px; color: var(--azul-cl); }

/* Escena: camión sobre la báscula, grande y a sangre hasta el borde derecho */
.escena { position: relative; align-self: center; margin-right: calc(-1 * var(--gut)); }
/* Portada en 3D (js/escena3d.js): el lienzo ocupa el sitio de la ilustración */
.escena.es3d > svg { visibility: hidden; }
.lienzo3d { position: absolute; inset: -8% 0 -6% -6%; width: 106%; height: 114%; opacity: 0; transition: opacity .9s var(--ease); -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
.escena.listo3d .lienzo3d { opacity: 1; }
.escena > svg { width: 100%; height: auto; }
.lcd-seg { fill: #3B2E00; opacity: .1; }
.lcd-seg.on { opacity: .92; }
.lcd-estado { font: 800 11px/1 var(--titulos); letter-spacing: .14em; fill: #4A3A00; }
.lcd-kg { font: 900 15px/1 var(--titulos); fill: #3B2E00; }
.lcd-led { fill: #7A5E00; transition: fill .3s; }
.lcd-led.ok { fill: #12A150; }

.albaran {
  position: absolute; right: 2%; top: 0; width: min(38%, 290px);
  background: #fff; color: var(--tinta); border-radius: 14px; padding: 16px 16px 14px;
  box-shadow: var(--sombra-l); font-size: 13px; line-height: 1.35;
}
.albaran::before { content: ""; position: absolute; left: -8px; right: -8px; top: -9px; height: 12px; border-radius: 8px; background: linear-gradient(#24346F, #172352); box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.alb-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 10px; border-bottom: 1.5px dashed var(--linea); }
.alb-cab b { font: 900 14px/1 var(--titulos); color: var(--marino); letter-spacing: .02em; white-space: nowrap; }
.alb-cab span { white-space: nowrap; }
.alb-cab span { color: var(--gris-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.alb-filas { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; padding: 10px 0; margin: 0; }
.alb-filas dt { color: var(--gris-2); font-size: 12px; }
.alb-filas dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alb-pie { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1.5px dashed var(--linea); }
.alb-qr { width: 58px; height: 58px; flex: none; padding: 4px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--linea); }
.alb-qr svg { width: 100%; height: 100%; }
.alb-neto small { display: block; color: var(--gris-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.alb-neto strong { font: 900 24px/1.1 var(--titulos); color: var(--marino); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.alb-deca { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 3px 8px 3px 6px; border-radius: 999px; background: var(--ok-s); color: var(--ok); font: 800 11.5px/1.2 var(--titulos); }
.alb-deca svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chip-vf {
  position: absolute; left: 8%; bottom: 3%; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px; border-radius: 16px; background: rgba(255, 255, 255, .96); color: var(--tinta);
  box-shadow: var(--sombra-l); font-size: 13px; line-height: 1.25;
}
.chip-vf .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--marino); color: var(--amarillo); }
.chip-vf .ico svg { width: 20px; height: 20px; --ac: var(--amarillo); }
.chip-vf b { display: block; font: 800 14px/1.2 var(--titulos); color: var(--marino); }
.chip-vf span { color: var(--gris-2); font-variant-numeric: tabular-nums; }
.albaran, .chip-vf { transition: clip-path 1.1s var(--ease-io), opacity .5s var(--ease), transform .6s var(--ease); }
/* Si web.js no llega a cargar, a los 3,5 s se muestra el resultado final igualmente. */
@media (scripting: enabled) {
  .escena .camion { transform: translateX(-900px); animation: ver-camion .01s 3.5s forwards; }
  .escena .albaran { clip-path: inset(0 0 100% 0 round 14px); animation: ver-alb .01s 3.5s forwards; }
  .escena .chip-vf { opacity: 0; transform: translateY(12px) scale(.96); animation: ver-chip .01s 3.5s forwards; }
  .rv-on .escena .camion, .rv-on .escena .albaran, .rv-on .escena .chip-vf { animation: none; }
  .escena .albaran.ver { clip-path: inset(-20px -20px -20px -20px round 14px); }
  .escena .chip-vf.ver { opacity: 1; transform: none; }
}
@keyframes ver-camion { to { transform: none; } }
@keyframes ver-alb { to { clip-path: inset(-20px -20px -20px -20px round 14px); } }
@keyframes ver-chip { to { opacity: 1; transform: none; } }

.hero-fijo { position: relative; }
.escena.es3d { will-change: transform; }
/* Escritorio con 3D: la portada (algo más alta) se queda fija un tramo corto mientras se cuenta la historia */
@media (min-width: 1021px) {
  .hero.pin { --alto-hero: clamp(760px, 90vh, 920px); height: calc(var(--alto-hero) + 80vh); padding: 0; overflow: visible; background: transparent; }
  .hero.pin .hero-fijo {
    position: sticky; top: 0; height: var(--alto-hero); display: flex; align-items: center; padding: 84px 0 40px; overflow: hidden; isolation: isolate;
    background:
      radial-gradient(1200px 600px at 78% 8%, rgba(57, 92, 190, .55), transparent 60%),
      radial-gradient(800px 500px at 0% 100%, rgba(57, 92, 190, .35), transparent 60%),
      linear-gradient(180deg, var(--marino) 0%, var(--noche) 70%, var(--noche-2) 100%);
  }
  .hero.pin .hero-fijo > .ancho { width: 100%; }
}
/* Visor grande y legible y etapas, encima de la escena 3D */
.visor-flot, .etapas { display: none; }
.escena.es3d .visor-flot { display: block; }
.escena.es3d .etapas { display: flex; }
.visor-flot { position: absolute; left: 4%; top: 6%; width: min(40%, 270px); padding: 30px 16px 12px; border-radius: 12px; background: linear-gradient(180deg, #FFD54A, #F2B400); box-shadow: 0 0 0 9px #1A2E6E, 0 0 0 10px rgba(143, 168, 240, .25), var(--sombra-l); opacity: 0; transform: translateY(12px) scale(.95); transition: opacity .5s var(--ease), transform .6s var(--ease); pointer-events: none; }
.visor-flot.ver { opacity: 1; transform: none; }
.visor-flot .est { position: absolute; left: 14px; top: 10px; font: 800 11.5px/1 var(--titulos); letter-spacing: .14em; color: #4A3A00; }
.visor-flot .led { position: absolute; right: 14px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #7A5E00; transition: background-color .3s, box-shadow .3s; }
.visor-flot .led.ok { background: #13A152; box-shadow: 0 0 10px #13A152; }
.visor-flot svg { width: 82%; height: auto; }
.visor-flot .kg { position: absolute; right: 14px; bottom: 12px; font: 900 18px/1 var(--titulos); color: #2B2100; }
.etapas { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); gap: 6px; padding: 6px; border-radius: 999px; background: rgba(10, 18, 50, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); white-space: nowrap; }
.etapas li { display: flex; align-items: center; gap: 7px; padding: 8px 14px 8px 8px; border-radius: 999px; font: 800 13.5px/1 var(--titulos); color: #9DAAD2; transition: background-color .35s, color .35s; }
.etapas li b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 12px; transition: background-color .35s, color .35s; }
.etapas li.activa { background: var(--amarillo); color: var(--marino); }
.etapas li.activa b { background: var(--marino); color: var(--amarillo); }
.escena.es3d .chip-vf { left: auto; right: 3%; top: auto; bottom: 64px; }

/* Escaneo del QR del DeCA al imprimirse el albarán */
.alb-qr { position: relative; overflow: hidden; }
.alb-qr::after { content: ""; position: absolute; left: 3px; right: 3px; top: 4px; height: 2px; border-radius: 2px; background: var(--amarillo); box-shadow: 0 0 8px 2px rgba(255, 193, 7, .8); opacity: 0; }
@media all { .albaran.ver .alb-qr::after { animation: escanea-qr 1.5s var(--ease-io) .7s 2; } }
@keyframes escanea-qr { 0% { opacity: 0; top: 4px; } 12% { opacity: 1; } 50% { top: calc(100% - 6px); } 88% { opacity: 1; } 100% { opacity: 0; top: 4px; } }

/* Móvil y tableta con 3D: escena arriba; debajo, centrados, las etapas y un único hueco donde se turnan
   el visor de pesaje, el albarán con el QR y la factura VeriFactu */
@media (max-width: 1020px) {
  .escena.es3d { display: grid; justify-items: center; row-gap: 14px; }
  .escena.es3d > svg, .escena.es3d .lienzo3d { grid-area: 1 / 1; }
  .escena.es3d > svg { width: 100%; }
  .escena.es3d .lienzo3d { position: relative; inset: auto; width: 100%; height: 100%; }
  .escena.es3d .etapas { grid-area: 2 / 1; position: static; transform: none; }
  .escena.es3d .visor-flot, .escena.es3d .albaran, .escena.es3d .chip-vf { grid-area: 3 / 1; align-self: start; position: relative; inset: auto; margin: 0; }
  .escena.es3d .visor-flot { width: min(76%, 270px); margin-top: 18px; }
  .escena.es3d .albaran { width: min(100% - 2 * var(--gut), 330px); margin-top: 30px; font-size: 13px; padding: 16px 16px 14px; }
  .escena.es3d .alb-cab span { display: inline; }
  .escena.es3d .chip-vf { align-self: center; margin-top: 20px; }
}

/* ---------- Secciones: misma separación arriba y abajo en todas ---------- */
.sec { padding-block: var(--sec); position: relative; }
.sec-niebla { background: var(--niebla); }
.sec-cab { max-width: 760px; margin-bottom: var(--cab-sec); }
.sec-cab.centro { margin-inline: auto; text-align: center; }
.antetitulo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; font: 800 14px/1 var(--titulos); letter-spacing: .12em; text-transform: uppercase; color: var(--azul); }
.antetitulo::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--amarillo-cl), var(--amarillo)); box-shadow: 4px 4px 0 -1px var(--gris-cl); }
.sec h2 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 900; letter-spacing: -.03em; }
.sec-cab p { margin-top: 18px; font-size: clamp(18px, 1.5vw, 20px); color: var(--texto); }
.sec-cab p + p { margin-top: 12px; }
.sec h3 { font-size: 21px; font-weight: 800; letter-spacing: -.015em; }

/* Problema y solución */
.ps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ps-caja { border-radius: var(--r-xl); padding: clamp(28px, 3.4vw, 44px); }
.ps-antes { background: var(--niebla); box-shadow: inset 0 0 0 1px var(--linea); }
.ps-despues { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--marino), var(--noche)); color: #C6D0EA; box-shadow: var(--sombra-l); }
.ps-caja h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 22px; }
.ps-despues h3 { color: #fff; }
.ps-caja h3 .pastilla { font: 800 12.5px/1 var(--titulos); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 8px; }
.ps-antes .pastilla { background: #fff; color: var(--gris-2); box-shadow: inset 0 0 0 1px var(--linea); }
.ps-despues .pastilla { background: var(--amarillo); color: var(--marino); }
.ps-caja li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--linea); font-size: 17.5px; line-height: 1.5; }
.ps-despues li { border-color: rgba(255, 255, 255, .1); }
.ps-caja li:first-child { border-top: 0; padding-top: 0; }
.ps-caja li b { color: var(--tinta); font-weight: 600; }
.ps-despues li b { color: #fff; }
.marca-x, .marca-ok { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; }
.marca-x { background: #fff; color: #A3AAB6; box-shadow: inset 0 0 0 1px var(--linea); }
.marca-ok { background: var(--amarillo); color: var(--marino); }
.marca-x svg, .marca-ok svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Cómo funciona: carretera con 6 paradas */
.ruta { position: relative; }
.ruta-pista { position: absolute; left: 0; right: 0; top: 37px; height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--gris-cl) 0 14px, transparent 14px 26px); }
.ruta-hecha { position: absolute; left: 0; top: 37px; height: 6px; width: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--amarillo-cl), var(--amarillo)); transform-origin: left; transform: scaleX(var(--p, 1)); }
.ruta-camion { position: absolute; top: 2px; left: calc(var(--p, 1) * (100% - 72px)); width: 72px; height: 40px; }
.ruta-camion svg { width: 100%; height: 100%; }
.pasos { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding-top: 76px; }
.paso { position: relative; padding: 22px 20px 24px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--linea), var(--sombra-s); transition: box-shadow .4s var(--ease), transform .4s var(--ease); }
.paso.llego { box-shadow: inset 0 3px 0 var(--amarillo), 0 0 0 1px var(--linea), var(--sombra); }
.paso::before { content: ""; position: absolute; top: -40px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 3px var(--gris-cl); transition: box-shadow .3s, background-color .3s; }
.paso.llego::before { background: var(--amarillo); box-shadow: inset 0 0 0 3px var(--amarillo-2), 0 0 0 6px rgba(255, 193, 7, .2); }
.paso-n { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--linea); }
.paso-n b { font: 900 34px/1 var(--titulos); letter-spacing: -.04em; color: var(--marino); font-variant-numeric: tabular-nums; }
.paso.llego .paso-n b { color: var(--azul); }
.paso-n svg.i { width: 28px; height: 28px; stroke-width: 1.5; color: var(--gris); --ac: var(--amarillo); }
.paso h3 { font-size: 18px; margin-bottom: 8px; }
.paso p { font-size: 15.5px; line-height: 1.55; color: var(--gris-2); }

/* Ventajas: rejilla bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.tarjeta {
  position: relative; overflow: hidden; border-radius: var(--r-l); padding: 30px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--linea), var(--sombra-s);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
@media (hover: hover) { .tarjeta:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px #CFD8EC, var(--sombra); } }
.tarjeta h3 { margin-bottom: 10px; }
.tarjeta p { font-size: 17px; line-height: 1.55; }
.tarjeta .ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px; border-radius: 15px; background: linear-gradient(145deg, #F4F7FE, #E2E9FB); box-shadow: inset 0 0 0 1px rgba(57, 92, 190, .14), 0 6px 14px -8px rgba(26, 46, 110, .35); color: var(--marino); }
.tarjeta .ico svg.i { width: 27px; height: 27px; }
.b-peso { grid-column: span 3; grid-row: span 2; display: flex; flex-direction: column; background: linear-gradient(165deg, var(--marino), var(--noche)); color: #C6D0EA; box-shadow: var(--sombra-l); }
.b-peso h3 { color: #fff; font-size: 28px; }
.b-peso p { font-size: 18px; max-width: 440px; }
.b-peso .ico { width: 60px; height: 60px; border-radius: 18px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: var(--amarillo); }
.b-peso .visor { width: 100%; margin-block: auto; padding-block: 32px 8px; }
.b-deca, .b-vf, .b-centros, .b-flota, .b-conta { grid-column: span 3; }
@media (min-width: 1101px) { .b-centros, .b-flota, .b-conta { grid-column: span 2; } }

/* Visor de báscula grande (tarjeta de peso) */
.visor { margin-top: auto; padding-top: 34px; }
.visor-caja { position: relative; border-radius: 20px; padding: 14px; background: linear-gradient(180deg, #23336B, #121C47); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 20px 40px -16px rgba(0, 0, 0, .6); }
.visor-lcd { position: relative; display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; padding: 30px 20px 16px; border-radius: 12px; background: linear-gradient(180deg, #FFD54A, #F2B400); box-shadow: inset 0 2px 10px rgba(120, 80, 0, .35); }
.visor-lcd::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255, 255, 255, .35), transparent 40%); pointer-events: none; }
.visor-lcd .est { position: absolute; left: 16px; top: 11px; font: 800 11.5px/1 var(--titulos); letter-spacing: .16em; text-transform: uppercase; color: #5C4600; }
.visor-lcd .led { position: absolute; right: 16px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: #8A6A00; box-shadow: 0 0 0 2px rgba(0, 0, 0, .08); transition: background-color .3s, box-shadow .3s; }
.visor-lcd .led.ok { background: #13A152; box-shadow: 0 0 10px #13A152; }
.visor-lcd svg { width: 100%; max-width: 340px; height: auto; }
.visor-lcd .kg { font: 900 20px/1 var(--titulos); color: #3B2E00; padding-bottom: 6px; }
.visor-pie { display: flex; justify-content: space-between; gap: 10px; padding: 12px 6px 2px; font: 700 13.5px/1.2 var(--titulos); color: #8C9BC7; }
.visor-pie b { color: #fff; font-variant-numeric: tabular-nums; }

/* Tarjeta DeCA */
.b-deca { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.deca-qr { position: relative; width: 148px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--linea), var(--sombra); }
.deca-qr svg { width: 100%; height: auto; }
.deca-qr .ok { position: absolute; right: -10px; bottom: -10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--ok); color: #fff; box-shadow: 0 6px 14px -4px rgba(23, 145, 90, .6); }
.deca-qr .ok svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.deca-qr::after { content: ""; position: absolute; left: 12px; right: 12px; top: 12px; height: 3px; border-radius: 3px; background: var(--amarillo); box-shadow: 0 0 14px 2px rgba(255, 193, 7, .7); opacity: 0; }
@media all { .b-deca.visto .deca-qr::after { animation: escanea 2.6s var(--ease-io) .6s 2; } }
@keyframes escanea { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 50% { transform: translateY(118px); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }
.tarjeta .extra { margin-top: 12px; font-size: 15.5px; color: var(--gris-2); }

/* Tarjeta VeriFactu: facturas apiladas */
.b-vf { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.facturas { position: relative; width: 150px; height: 150px; }
.facturas span { position: absolute; inset: 10px 18px 6px 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--linea), var(--sombra-s); }
.facturas span:nth-child(1) { transform: rotate(-8deg) translate(-8px, 4px); }
.facturas span:nth-child(2) { transform: rotate(-3deg) translate(-3px, 2px); }
.facturas span:nth-child(3) { display: flex; flex-direction: column; gap: 7px; padding: 16px 14px; }
.facturas i { display: block; height: 6px; border-radius: 3px; background: var(--linea); }
.facturas i:nth-child(1) { width: 60%; background: var(--marino); }
.facturas i:nth-child(3) { width: 80%; }
.facturas i:nth-child(4) { width: 50%; }
.facturas b { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 7px; background: var(--marino); color: var(--amarillo); font: 900 10.5px/1 var(--titulos); letter-spacing: .06em; }
@media (hover: hover) {
  .facturas span { transition: transform .5s var(--ease); }
  .b-vf:hover .facturas span:nth-child(1) { transform: rotate(-14deg) translate(-16px, 6px); }
  .b-vf:hover .facturas span:nth-child(2) { transform: rotate(-6deg) translate(-8px, 3px); }
}

/* Tarjeta centros: red de plantas */
.red { margin-top: 20px; }
.red svg { width: 100%; height: auto; }
.red .linea { stroke: var(--gris-cl); stroke-width: 2; stroke-dasharray: 4 5; fill: none; }
.red .pulso { fill: var(--amarillo); }
.red .nodo rect { fill: #fff; stroke: var(--gris-cl); stroke-width: 1.5; }
.red .nodo text { font: 800 11px/1 var(--titulos); fill: var(--gris-2); }
.red .central rect { fill: var(--marino); stroke: none; }
.red .central text { fill: #fff; }

/* Tarjeta flota: caducidades */
.caduca { margin-top: 18px; display: grid; gap: 8px; }
.caduca li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 11px; background: var(--niebla); font: 700 14.5px/1.2 var(--titulos); color: var(--tinta); }
.caduca li span { font: 800 12px/1 var(--titulos); padding: 5px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.caduca .ok { background: var(--ok-s); color: #127A4B; }
.caduca .pronto { background: var(--amarillo-s); color: #7A5500; }
.caduca .ya { background: #FCE8E6; color: var(--error); }

/* Tarjeta contabilidad */
.conta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.conta li { padding: 8px 12px; border-radius: 10px; background: var(--niebla); font: 800 14.5px/1 var(--titulos); color: var(--marino); box-shadow: inset 0 0 0 1px var(--linea); }

/* ---------- El programa: capturas reales en ventana ---------- */
.pestanas { display: flex; justify-content: center; gap: 6px; width: max-content; max-width: 100%; margin: 0 auto 28px; padding: 6px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--linea), var(--sombra-s); }
.pestanas button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; font: 800 15.5px/1 var(--titulos); color: var(--gris-2); transition: background-color .2s, color .2s; }
.pestanas button:hover { color: var(--marino); }
.pestanas button[aria-selected="true"] { background: var(--marino); color: #fff; box-shadow: 0 6px 14px -6px rgba(26, 46, 110, .6); }
.pestanas svg.i { width: 19px; height: 19px; }
.ventana { max-width: 1100px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(20, 34, 81, .1), var(--sombra-l); }
.ventana-barra { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; background: linear-gradient(#F7F8FB, #EEF1F6); border-bottom: 1px solid var(--linea); }
.ventana-barra i { width: 12px; height: 12px; border-radius: 50%; background: #E1E5EC; }
.ventana-barra span { margin-left: 10px; font: 700 13px/1 var(--titulos); color: var(--gris); }
.panel[hidden] { display: none; }
.panel { position: relative; container-type: inline-size; }
.panel img { width: 100%; }
@media all { .panel:not([hidden]) img { animation: aparece .5s var(--ease); } }
@keyframes aparece { from { opacity: 0; transform: scale(.99); } }
/* Visor animado encima de la captura del albarán (posiciones en % de la imagen de 1043 × 550) */
.cap-visor { position: absolute; left: 80.9%; top: 40.1%; width: 11%; pointer-events: none; }
.cap-visor .est { position: absolute; left: .4%; top: 0; font: 400 calc(100cqi * 9.5 / 1043)/1 Tahoma, Verdana, sans-serif; color: #111; white-space: nowrap; }
.cap-visor svg { position: absolute; left: 0; top: calc(100cqi * 13 / 1043); width: 100%; height: auto; }
.cap-visor .lcd-seg { fill: #111; opacity: .07; }
.cap-visor .lcd-seg.on { opacity: 1; }
.nota-ficticia { margin-top: 16px; font-size: 14.5px; color: var(--gris-2); text-align: center; }

/* ---------- Funcionalidades ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filtros button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer; background: #fff; color: var(--gris-2); box-shadow: inset 0 0 0 1.5px var(--linea); font: 800 15px/1 var(--titulos); transition: background-color .2s, color .2s, box-shadow .2s; }
.filtros button:hover { color: var(--marino); box-shadow: inset 0 0 0 1.5px var(--gris-cl); }
.filtros button[aria-pressed="true"] { background: var(--marino); color: #fff; box-shadow: none; }
.filtros button span { margin-left: 6px; font-weight: 700; opacity: .65; font-variant-numeric: tabular-nums; }
.funciones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.funcion { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 24px; border-radius: var(--r-l); background: #fff; box-shadow: inset 0 0 0 1px var(--linea); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.funcion[hidden] { display: none; }
@media (hover: hover) { .funcion:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px #CFD8EC, var(--sombra); } }
.funcion .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(145deg, #F4F7FE, #E2E9FB); box-shadow: inset 0 0 0 1px rgba(57, 92, 190, .14); color: var(--marino); }
.funcion h3 { font-size: 18.5px; margin: 2px 0 7px; }
.funcion p { font-size: 16px; line-height: 1.55; }
@media all { .funcion.entra { animation: entra .45s var(--ease) both; } }
@keyframes entra { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Normativa ---------- */
.norma { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(170deg, var(--marino), var(--noche)); color: #C6D0EA; }
.norma .hero-trama { opacity: .6; -webkit-mask-image: radial-gradient(ellipse 60% 80% at 100% 0%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 60% 80% at 100% 0%, #000 10%, transparent 70%); }
.norma h2 { color: #fff; }
.norma .antetitulo, .contacto .antetitulo { color: var(--amarillo); }
.norma .sec-cab p { color: #C6D0EA; }
.normas { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.norma-caja { position: relative; padding: clamp(28px, 3.4vw, 40px); border-radius: var(--r-xl); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.norma-caja .sello { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 24px; border-radius: 18px; background: var(--amarillo); color: var(--marino); box-shadow: 0 10px 24px -10px rgba(255, 193, 7, .7); }
.norma-caja .sello svg.i { width: 32px; height: 32px; --ac: var(--marino); }
.norma-caja h3 { color: #fff; font-size: 24px; margin-bottom: 12px; }
.norma-caja p { font-size: 17.5px; }
.norma-caja p + p { margin-top: 12px; }
.norma-caja b { color: #fff; font-weight: 600; }
.norma-caja small { display: block; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14.5px; color: #9DAAD2; }

/* ---------- Sectores ---------- */
.sectores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sector { position: relative; padding: 26px 24px 24px; border-radius: var(--r-l); background: #fff; box-shadow: inset 0 0 0 1px var(--linea); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.sector::after { content: ""; position: absolute; right: -28px; top: -28px; width: 84px; height: 84px; border-radius: 22px; background: var(--azul-s); transform: rotate(12deg); transition: transform .5s var(--ease), background-color .3s; z-index: 0; }
.sector > * { position: relative; z-index: 1; }
.sector .ico { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 18px; border-radius: 16px; background: linear-gradient(135deg, var(--azul), var(--marino)); color: #fff; box-shadow: 0 10px 20px -10px rgba(26, 46, 110, .7); }
.sector .ico svg.i { width: 28px; height: 28px; }
.sector h3 { font-size: 18.5px; margin-bottom: 7px; }
.sector p { font-size: 15.5px; line-height: 1.5; }
@media (hover: hover) {
  .sector:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--linea), var(--sombra); }
  .sector:hover::after { transform: rotate(32deg) scale(1.2); background: var(--amarillo-s); }
}
.sectores-pie { margin-top: 36px; text-align: center; font: 700 clamp(19px, 1.7vw, 23px)/1.4 var(--titulos); color: var(--tinta); }
.sectores-pie mark { background: linear-gradient(transparent 58%, var(--amarillo-cl) 58%); color: inherit; padding: 0 .1em; }
.arigest { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin: 28px auto 0; max-width: 760px; padding: 16px 20px; border-radius: var(--r); background: var(--amarillo-s); font-size: 16.5px; text-align: center; color: var(--tinta); }

/* ---------- Compatibles: panel por filas ---------- */
.compat-panel { border-radius: var(--r-xl); background: #fff; box-shadow: 0 0 0 1px var(--linea), var(--sombra); overflow: hidden; }
.compat-fila { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 24px; align-items: center; padding: 24px 32px; transition: background-color .25s; }
.compat-fila + .compat-fila { border-top: 1px solid var(--linea); }
@media (hover: hover) { .compat-fila:hover { background: #FAFBFE; } }
.compat-tit { display: flex; align-items: center; gap: 16px; }
.compat-tit .ico { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 15px; background: linear-gradient(135deg, var(--azul), var(--marino)); color: #fff; box-shadow: 0 8px 18px -10px rgba(26, 46, 110, .8); }
.compat-tit .ico svg.i { width: 26px; height: 26px; }
.compat-tit h3 { font-size: 19px; margin: 0 0 3px; }
.compat-tit p { font-size: 15px; line-height: 1.45; color: var(--gris-2); }
.compat-fila ul { display: flex; flex-wrap: wrap; gap: 10px; }
.compat-fila li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--linea); font: 800 15.5px/1 var(--titulos); color: var(--marino); transition: box-shadow .2s, transform .2s var(--ease); }
.compat-fila li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--amarillo); }
@media (hover: hover) { .compat-fila li:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--gris-cl), var(--sombra-s); } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq-grid .sec-cab { position: sticky; top: 110px; margin-bottom: 0; }
.faq-lista { display: grid; gap: 12px; }
.faq-lista details { border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--linea); transition: box-shadow .25s; }
.faq-lista details[open] { box-shadow: inset 0 0 0 1.5px var(--gris-cl), var(--sombra-s); }
.faq-lista summary { position: relative; display: block; padding: 22px 64px 22px 24px; cursor: pointer; list-style: none; font: 800 18.5px/1.35 var(--titulos); color: var(--tinta); border-radius: var(--r); }
.faq-lista summary::-webkit-details-marker { display: none; }
.faq-lista summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 9px; background: var(--niebla) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A2E6E' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center/16px no-repeat; transition: transform .3s var(--ease), background-color .2s; }
.faq-lista details[open] summary::after { transform: rotate(135deg); background-color: var(--amarillo); }
.faq-lista summary:hover { color: var(--azul); }
.faq-lista .resp { padding: 0 24px 22px; font-size: 17px; }
@supports (interpolate-size: allow-keywords) {
  @media all {
    .faq-lista { interpolate-size: allow-keywords; }
    .faq-lista details::details-content { height: 0; overflow: clip; transition: height .35s var(--ease), content-visibility .35s allow-discrete; }
    .faq-lista details[open]::details-content { height: auto; }
  }
}

/* ---------- Contacto ---------- */
.contacto { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(170deg, var(--marino) 0%, var(--noche) 70%); color: #C6D0EA; }
.contacto .hero-trama { opacity: .55; -webkit-mask-image: radial-gradient(ellipse 60% 70% at 0% 100%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 60% 70% at 0% 100%, #000 10%, transparent 70%); }
.contacto-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.contacto h2 { color: #fff; }
.contacto .sec-cab p { color: #C6D0EA; }
.siguiente { display: grid; gap: 18px; margin-top: 8px; }
.siguiente li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.siguiente li span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: var(--amarillo); font: 900 17px/1 var(--titulos); }
.siguiente b { display: block; color: #fff; font: 800 18px/1.3 var(--titulos); margin-bottom: 3px; }
.siguiente p { font-size: 16.5px; }
.llamanos { display: flex; align-items: center; gap: 16px; margin-top: 36px; padding: 20px 22px; border-radius: var(--r-l); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.llamanos .ico { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 15px; background: var(--amarillo); color: var(--marino); }
.llamanos small { display: block; font-size: 14.5px; color: #9DAAD2; }
.llamanos a { font: 900 26px/1.1 var(--titulos); color: #fff; text-decoration: none; letter-spacing: -.01em; }
.llamanos a:hover { color: var(--amarillo); }
.form-caja { position: relative; padding: clamp(26px, 3.4vw, 42px); border-radius: var(--r-xl); background: #fff; color: var(--texto); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.form-caja h3 { font-size: 24px; margin-bottom: 6px; }
.form-caja form > p { font-size: 16px; color: var(--gris-2); margin-bottom: 24px; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.campo { display: grid; gap: 7px; align-content: start; }
.campo.todo { grid-column: 1 / -1; }
.campo label { font: 800 14.5px/1.2 var(--titulos); color: var(--tinta); }
.campo label .opc { font-weight: 600; color: var(--gris-2); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 0; border-radius: 12px; background-color: var(--niebla);
  box-shadow: inset 0 0 0 1.5px var(--linea); font-size: 17px; color: var(--tinta); transition: box-shadow .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.campo select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A2E6E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.campo textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.campo input::placeholder, .campo textarea::placeholder { color: #8A919D; }
.campo input:hover, .campo select:hover, .campo textarea:hover { box-shadow: inset 0 0 0 1.5px var(--gris-cl); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; background-color: #fff; box-shadow: inset 0 0 0 2px var(--azul), 0 0 0 4px rgba(57, 92, 190, .15); }
.campo [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); background-color: #FFF6F5; }
.campo .msg { font-size: 14px; font-weight: 600; color: var(--error); }
.campo .msg:empty, .acepto-msg:empty { display: none; }
.acepto { grid-column: 1 / -1; display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15.5px; line-height: 1.5; color: var(--texto); cursor: pointer; }
.acepto input { width: 24px; height: 24px; margin: 0; border-radius: 7px; -webkit-appearance: none; appearance: none; background: var(--niebla); box-shadow: inset 0 0 0 1.5px var(--gris); cursor: pointer; display: grid; place-items: center; transition: background-color .15s, box-shadow .15s; }
.acepto input::after { content: ""; width: 12px; height: 7px; border-left: 2.6px solid var(--marino); border-bottom: 2.6px solid var(--marino); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s var(--ease); }
.acepto input:checked { background: var(--amarillo); box-shadow: none; }
.acepto input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.acepto input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); }
.acepto small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--gris-2); }
.acepto-msg { grid-column: 1 / -1; margin-top: -8px; font-size: 14px; font-weight: 600; color: var(--error); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enviar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.enviar .btn { min-height: 56px; padding: 0 28px; font-size: 17.5px; }
.enviar .btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.enviar small { font-size: 14px; color: var(--gris-2); }
.form-error { grid-column: 1 / -1; padding: 12px 14px; border-radius: 12px; background: #FDECEA; color: var(--error); font-weight: 600; font-size: 15.5px; }
.form-error:empty { display: none; }
.gracias { text-align: center; padding: 30px 6px 18px; }
.gracias[hidden] { display: none; }
.gracias .ok { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 24px; background: var(--amarillo); color: var(--marino); box-shadow: 0 16px 30px -12px rgba(255, 193, 7, .7); }
.gracias .ok svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media all {
  .gracias .ok svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: traza .6s var(--ease) .2s forwards; }
  .gracias { animation: entra .5s var(--ease) both; }
}
@keyframes traza { to { stroke-dashoffset: 0; } }
.gracias h3 { font-size: 28px; margin-bottom: 10px; }
.gracias p { font-size: 17px; max-width: 420px; margin: 0 auto; }
.gracias:focus { outline: none; }

/* ---------- Pie ---------- */
.pie { background: var(--noche-2); color: #9DAAD2; padding: 72px 0 0; font-size: 15.5px; }
.pie-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.pie-logo { display: inline-block; }
.pie-logo img { width: 190px; height: 61px; }
.pie-marca p { margin-top: 16px; max-width: 320px; line-height: 1.6; }
.pie h2 { font: 800 13px/1 var(--titulos); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.pie li + li { margin-top: 10px; }
.pie a { color: #C6D0EA; text-decoration: none; }
.pie a:hover { color: var(--amarillo); }
.pie-tel { font: 900 22px/1.2 var(--titulos); }
.pie-legal { border-top: 1px solid rgba(255, 255, 255, .08); }
.pie-legal .ancho { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 22px; font-size: 14px; }
.pie-legal ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pie-legal li + li { margin-top: 0; }
.pie-legal button { padding: 0; border: 0; background: none; color: #C6D0EA; cursor: pointer; font-size: 14px; }
.pie-legal button:hover { color: var(--amarillo); }

/* ---------- Flotantes ---------- */
.barra-movil { display: none; }
.arriba { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 15px; cursor: pointer; background: var(--marino); color: #fff; box-shadow: var(--sombra-l); opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .3s, transform .35s var(--ease), background-color .2s; }
.arriba.ver { opacity: 1; transform: none; pointer-events: auto; }
.arriba:hover { background: var(--azul); }
.arriba svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cookies { position: fixed; left: 50%; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 18px; width: min(780px, calc(100% - 24px)); transform: translateX(-50%); padding: 16px 16px 16px 18px; border-radius: var(--r-l); background: #fff; box-shadow: 0 0 0 1px rgba(20, 34, 81, .08), var(--sombra-l); font-size: 15px; line-height: 1.45; }
.cookies[hidden] { display: none; }
.cookies-ico { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--azul-s); color: var(--marino); }
.cookies-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cookies-txt { flex: 1; color: var(--texto); }
.cookies-txt a { font-weight: 600; }
.cookies b { display: block; color: var(--tinta); font: 800 16px/1.3 var(--titulos); margin-bottom: 2px; }
.cookies-btns { display: flex; gap: 8px; flex: none; }
.cookies-btns button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer; font: 800 15px/1 var(--titulos); background: var(--marino); color: #fff; }
.cookies-btns button:hover { background: var(--azul); }
@media all { .cookies:not([hidden]) { animation: sube-aviso .55s var(--ease) both; } }
@keyframes sube-aviso { from { opacity: 0; transform: translate(-50%, 24px); } }

/* Menú móvil (hoja) */
.hoja { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: #fff; color: var(--texto); box-shadow: var(--sombra-l); }
.hoja::backdrop { background: rgba(10, 18, 50, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media all { .hoja[open] { animation: hoja-sube .45s var(--ease); } }
@keyframes hoja-sube { from { transform: translateY(100%); } }
.hoja-in { padding: 14px 20px calc(24px + env(safe-area-inset-bottom)); }
.hoja-asa { width: 44px; height: 5px; margin: 0 auto 14px; border-radius: 5px; background: var(--gris-cl); }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hoja-cab img { width: 150px; height: 48px; }
.hoja-cerrar { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 13px; background: var(--niebla); color: var(--marino); cursor: pointer; }
.hoja-cerrar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.hoja nav li a { display: flex; align-items: center; justify-content: space-between; padding: 15px 4px; border-bottom: 1px solid var(--linea); font: 800 19px/1.2 var(--titulos); color: var(--tinta); text-decoration: none; }
.hoja nav li a::after { content: "→"; color: var(--gris); }
.hoja-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.hoja-ctas .btn { width: 100%; }

/* ---------- Revelado al hacer scroll ---------- */
@media (scripting: enabled) {
  .rv { opacity: 0; translate: 0 28px; animation: rv-red .01s 3.5s forwards; }
  .rv-on .rv { animation: none; }
  .rv.visto { opacity: 1; translate: 0 0; transition: opacity .8s var(--ease), translate .9s var(--ease); }
}
@keyframes rv-red { to { opacity: 1; translate: 0 0; } }

/* ---------- Páginas legales ---------- */
.legal-hero { padding: 140px 0 64px; }
.legal-hero h1 { margin-top: 18px; font-size: clamp(36px, 5vw, 56px); font-weight: 900; color: #fff; letter-spacing: -.03em; }
.legal-hero p { margin-top: 16px; max-width: 680px; font-size: 19px; color: #C6D0EA; }
.volver { display: inline-flex; align-items: center; gap: 8px; color: #C6D0EA; text-decoration: none; font: 700 15px/1 var(--titulos); }
.volver:hover { color: var(--amarillo); }
.legal { max-width: 860px; padding-block: var(--sec); }
.legal section + section { margin-top: 44px; }
.legal h2 { display: flex; align-items: center; gap: 14px; font-size: 26px; font-weight: 900; margin-bottom: 16px; }
.legal h2 span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--azul-s); color: var(--marino); font-size: 17px; }
.legal p, .legal li { font-size: 17.5px; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 12px; }
.legal ul { display: grid; gap: 10px; }
.legal ul li { position: relative; padding-left: 24px; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; border-radius: 3px; background: var(--amarillo); }
.legal b { color: var(--tinta); font-weight: 600; }
.ficha { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; border-radius: var(--r); overflow: hidden; box-shadow: inset 0 0 0 1px var(--linea); }
.ficha dt, .ficha dd { margin: 0; padding: 13px 18px; border-top: 1px solid var(--linea); }
.ficha dt:first-of-type, .ficha dt:first-of-type + dd { border-top: 0; }
.ficha dt { background: var(--niebla); font: 800 13px/1.6 var(--titulos); letter-spacing: .08em; text-transform: uppercase; color: var(--gris-2); }
.ficha dd { font-weight: 600; color: var(--tinta); }
.resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 48px; }
.resumen div { padding: 20px; border-radius: var(--r); background: var(--niebla); }
.resumen b { display: block; font: 800 15px/1.3 var(--titulos); color: var(--marino); margin-bottom: 6px; }
.resumen p { font-size: 16px; }
.tabla { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--r); overflow: hidden; box-shadow: inset 0 0 0 1px var(--linea); font-size: 16px; }
.tabla th, .tabla td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--linea); }
.tabla th { background: var(--niebla); font: 800 13px/1.4 var(--titulos); letter-spacing: .06em; text-transform: uppercase; color: var(--gris-2); border-top: 0; }
.tabla td:first-child { font-weight: 600; color: var(--tinta); white-space: nowrap; }
.actualizado { margin-top: 56px; font-size: 15px; color: var(--gris-2); }
.error-404 { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 120px 0 80px; }
.error-404 .num { font: 900 clamp(90px, 18vw, 180px)/1 var(--titulos); color: var(--amarillo); letter-spacing: -.05em; }
.error-404 h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin: 10px 0 14px; }
.error-404 p { color: #C6D0EA; font-size: 19px; margin-bottom: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .cab nav a.opc { display: none; }
}
@media (max-width: 1100px) {
  .funciones { grid-template-columns: repeat(2, 1fr); }
  .sectores { grid-template-columns: repeat(2, 1fr); }
  .pasos { grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 0; }
  .ruta-pista, .ruta-hecha, .ruta-camion, .paso::before { display: none; }
  .pie-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1020px) {
  .cab .ancho { grid-template-columns: auto 1fr; gap: 12px; }
  .cab nav, .cab-tel { display: none; }
  .cab-acciones { gap: 8px; }
  .cab-menu { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid rgba(255, 255, 255, .25); border-radius: 12px; background: transparent; color: #fff; cursor: pointer; font: 800 15px/1 var(--titulos); }
  .cab-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
  .hero { padding-top: 108px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-txt { padding-bottom: 0; }
  .escena { margin: 8px calc(-1 * var(--gut)) 0; }
  .albaran { right: var(--gut); }
  .ps, .normas, .contacto-grid, .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .sec-cab { position: static; margin-bottom: var(--cab-sec); }
  .bento > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .cab .btn { display: none; }
  .cab-logo img { width: 150px; height: 48px; }
  .funciones { grid-template-columns: 1fr; }
  .compat-fila { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .pasos { grid-template-columns: 1fr 1fr; }
  .b-deca, .b-vf { grid-template-columns: 1fr; }
  .deca-qr { width: 132px; }
  .campos { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: 1fr; gap: 32px; }
  .pestanas { width: 100%; }
  .pestanas button { flex: 1; justify-content: center; padding: 0 10px; font-size: 14.5px; }
  .etapas li { padding: 6px 10px 6px 6px; font-size: 11.5px; }
  .etapas li b { width: 18px; height: 18px; font-size: 10.5px; }
  .visor-flot { padding: 22px 10px 8px; box-shadow: 0 0 0 6px #1A2E6E, var(--sombra-l); }
  .albaran { width: 54%; padding: 11px 11px 9px; font-size: 11.5px; top: 1%; }
  .alb-cab b { font-size: 12px; }
  .alb-cab span { display: none; }
  .alb-filas dt { font-size: 11px; }
  .alb-qr { width: 44px; height: 44px; }
  .alb-neto strong { font-size: 18px; }
  .chip-vf { left: 4%; bottom: 2%; padding: 8px 12px 8px 8px; font-size: 11.5px; }
  .chip-vf .ico { width: 30px; height: 30px; }
  .chip-vf b { font-size: 12.5px; }
  .barra-movil { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 45; display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 8px; border-radius: 20px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px rgba(20, 34, 81, .08), var(--sombra-l); transform: translateY(150%); transition: transform .45s var(--ease); }
  .barra-movil.ver { transform: none; }
  .barra-movil .btn { min-height: 50px; }
  .barra-movil .tel { width: 50px; padding: 0; --bg: var(--niebla); --fg: var(--marino); box-shadow: none; }
  .barra-movil .tel svg { width: 22px; height: 22px; }
  .barra-movil { grid-template-columns: auto 1fr auto; }
  .barra-movil .arriba.en-barra { position: static; width: 50px; height: 50px; border-radius: 14px; box-shadow: none; transform: none; opacity: .35; pointer-events: none; transition: opacity .3s; }
  .barra-movil .arriba.en-barra.ver { opacity: 1; pointer-events: auto; }
  .b-deca .deca-qr, .b-vf .facturas { justify-self: center; }
  .cookies { bottom: 12px; flex-wrap: wrap; gap: 12px; }
  .cookies-txt { flex-basis: calc(100% - 64px); }
  .cookies-btns { width: 100%; }
  .cookies-btns button { flex: 1; }
  .ficha { grid-template-columns: 1fr; }
  .ficha dt { border-top: 1px solid var(--linea); padding-bottom: 2px; }
  .ficha dd { border-top: 0; padding-top: 2px; }
  .resumen { grid-template-columns: 1fr; }
  .tabla { display: block; overflow-x: auto; }
}
@media (max-width: 460px) {
  .pasos { grid-template-columns: 1fr; }
  .sectores { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
  .hoja-ctas { grid-template-columns: 1fr; }
}
@media print {
  .cab, .barra-movil, .arriba, .cookies, .escena { display: none !important; }
  .hero, .norma, .contacto { background: #fff !important; color: #000 !important; }
  .rv { opacity: 1 !important; translate: none !important; }
}
