/* Viadry · hoja de estilos única. Sin dependencias. */

/* Fuentes de Fontshare (ITF Free Font License 2.0): uso comercial y autoalojamiento permitidos;
   no se modifican ni se redistribuyen. Licencia en docs/licencias/. */
@font-face {
  font-family: "Clash Display";
  src: url("../fonts/ClashDisplay-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #CC0000;          /* Rojo Ferrari (manual de marca) */
  --red-dark: #A30000;
  --ink: #1F140F;          /* Negro Regaliz (manual de marca) */
  --rubber: #352A25;       /* goma, para la rueda */
  --concrete: #EEEEEC;     /* suelo de nave */
  --white: #FFFFFF;
  --muted: #55504D;        /* 7:1 sobre --concrete */
  --muted-dark: #CFC5BF;   /* 10:1 sobre --ink */
  --line: #D9D7D3;
  --focus: #FFB800;
  --wrap: 1180px;
  --header-h: 64px;
  --font: "Satoshi", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Clash Display", "Satoshi", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--concrete);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; line-height: 1.04; margin: 0 0 .5em; font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
ul, ol, dl, dd { padding: 0; margin: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8em 1.4em; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #3A2C25; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-sm { min-height: 44px; padding: .5em 1.1em; font-size: .92rem; }

/* Cabecera */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: var(--white); transition: background-color .25s;
}
.site-header.is-solid { background: var(--ink); }
.header-in { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: block; padding: 6px 0; margin-right: auto; }
.brand img { width: 120px; }
.nav { order: 3; }
.nav-toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; color: inherit; cursor: pointer; border-radius: 8px;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; display: block; width: 22px; height: 2px; background: currentColor; transition: transform .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }
.nav-list {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: var(--ink); padding: 8px 16px 20px; display: none;
  border-top: 1px solid rgba(255,255,255,.1);
}
.nav-list.is-open { display: block; }
.nav-list a { display: block; padding: 12px 4px; text-decoration: none; font-weight: 600; }
.no-js .nav-toggle, .no-js .nav-list { display: none; }
.header-cta { order: 2; white-space: nowrap; }
.show-sm { display: none; }
@media (max-width: 599px) { .hide-sm { display: none; } .show-sm { display: inline; } }
@media (max-width: 370px) { .header-cta { padding: .5em .8em; font-size: .82rem; } .brand img { width: 100px; } }
@media (min-width: 900px) {
  .nav { order: 0; }
  .nav-toggle { display: none; }
  .nav-list, .no-js .nav-list { position: static; display: flex; gap: 4px; padding: 0; background: none; border: 0; }
  .nav-list a { padding: 8px 12px; font-size: .92rem; border-radius: 6px; }
  .nav-list a:hover { background: rgba(255,255,255,.08); }
  .brand img { width: 144px; }
}

/* Apertura: vídeo de Gemini Flow en fotogramas, guiado por el scroll */
.intro { position: relative; background: #0B0705; color: var(--white); }
.js .intro.is-scrub { height: 300svh; }
.intro-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.intro-poster img, .intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-poster img { object-fit: cover; transform: translate(var(--px, 0), var(--py, 0)); }
.intro-canvas { opacity: 0; }
.intro.is-ready .intro-canvas { opacity: 1; }
.intro.is-ready .intro-poster { visibility: hidden; }
.intro-sticky::before { /* velo para leer el texto inicial */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(5,3,2,.95) 0%, rgba(5,3,2,.6) 38%, rgba(5,3,2,0) 62%);
  opacity: var(--veil, 1);
}
.intro-copy {
  position: absolute; left: 0; right: 0; bottom: 64px; z-index: 2;
  opacity: var(--copy, 1); transform: translateY(calc((1 - var(--copy, 1)) * -40px));
}
.intro-copy h1 { font-size: clamp(2.3rem, 1.4rem + 4.4vw, 4.6rem); max-width: 12em; }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: #E4DCD8; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.intro-claim {
  position: absolute; left: 0; right: 0; bottom: 14svh; z-index: 2; margin: 0; padding: 0 16px; text-align: center;
  font-family: var(--display); font-weight: 500; font-size: clamp(1.1rem, .9rem + 1vw, 1.6rem); letter-spacing: .01em;
  opacity: var(--claim, 0); transform: translateY(calc((1 - var(--claim, 0)) * 24px));
}
.intro-copy, .intro-claim, .intro-sticky::before { will-change: opacity, transform; }
@media (orientation: portrait) and (max-width: 899px) {
  .intro { --py: -17%; }
  .intro-copy { bottom: 72px; }
}
@media (min-width: 900px) {
  .intro { --px: 25%; }
  .intro-sticky::before { background: linear-gradient(to right, rgba(5,3,2,.95) 18%, rgba(5,3,2,.55) 45%, rgba(5,3,2,0) 68%); }
  .intro-copy { top: 50%; bottom: auto; transform: translateY(calc(-50% + (1 - var(--copy, 1)) * -40px)); }
  .intro-copy h1, .intro-copy .lead { max-width: 11.5em; }
  .intro-copy .lead { max-width: 30em; }
}
/* Movimiento reducido o sin JS: imagen fija con el texto, sin scroll largo */
.no-js .intro-poster img, .intro.is-static .intro-poster img { transform: none; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted-dark); font-size: .85rem; font-weight: 500; text-decoration: none;
  opacity: var(--cue, 1);
}
.scroll-cue-track {
  width: 22px; height: 34px; overflow: hidden;
  background: url("../img/huella.svg") repeat-y center top / 22px auto; opacity: .55;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue-track { animation: track 1.2s linear infinite; }
}
@keyframes track { to { background-position: center 8px; } }
@media (orientation: portrait) and (max-width: 899px) { .intro .scroll-cue { display: none; } }

/* Secciones */
.service, .catalogs, .contact { padding: 88px 0; }
.sec-head { max-width: 760px; margin-bottom: 40px; }
.sec-lead { color: var(--muted); font-size: 1.12rem; }

/* Qué hacemos: carrusel horizontal independiente del scroll vertical, con brillo rojo */
.service {
  position: relative; overflow: hidden; color: var(--white); padding: 88px 0 72px;
  background: radial-gradient(60% 40% at 15% 0%, rgba(204,0,0,.28), transparent 70%), var(--ink);
}
.service .sec-lead { color: var(--muted-dark); }
.hs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hs-hint { margin: 0 0 40px; color: var(--muted-dark); font-size: .95rem; display: flex; align-items: center; gap: 10px; }
.hs-arrows { display: flex; gap: 10px; margin-bottom: 40px; }
.hs-arrow {
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; font-size: 1.6rem; line-height: 1; color: var(--white);
  background: radial-gradient(circle at 50% 30%, #3A2C25, #1A110E); border: 2px solid rgba(255,80,60,.55);
  box-shadow: 0 0 14px rgba(255,30,20,.35), inset 0 1px 0 rgba(255,255,255,.12);
  transition: box-shadow .2s, border-color .2s, opacity .2s;
}
.hs-arrow:hover { border-color: #FF4A3D; box-shadow: 0 0 24px rgba(255,30,20,.6), inset 0 1px 0 rgba(255,255,255,.12); }
.hs-arrow:disabled { opacity: .3; cursor: default; box-shadow: none; }

.hs { position: relative; }
.hs-track {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; outline-offset: -3px;
}
.hs-track::-webkit-scrollbar { display: none; }
.hs-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.hs-track.is-drag * { pointer-events: none; }
.hs-panel {
  position: relative; flex: none; width: 88vw; max-width: 1180px; height: min(76svh, 720px); margin-right: 14px;
  scroll-snap-align: center; overflow: hidden; border-radius: 18px; display: flex; align-items: flex-end;
  box-shadow: 0 0 0 1px rgba(255,60,40,.18), 0 30px 60px -30px rgba(0,0,0,.9);
}
.hs-panel:first-child { margin-left: 6vw; }
.hs-panel:last-child { margin-right: 6vw; }
.hs-img { position: absolute; inset: 0 -8%; width: 116%; height: 100%; object-fit: cover; will-change: transform; }
.hs-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,10,8,.94) 0%, rgba(18,10,8,.35) 48%, rgba(18,10,8,0) 72%); }
.hs-card { position: relative; z-index: 1; max-width: 34em; padding: 0 22px 30px; will-change: transform, opacity; }
.hs-card h3 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.4rem); margin-bottom: .3em;
  text-shadow: 0 0 24px rgba(255,40,30,.45);
}
.hs-card h3::before {
  content: ""; display: block; width: 56px; height: 4px; margin-bottom: 18px; border-radius: 2px;
  background: #FF2A1F; box-shadow: 0 0 10px #FF2A1F, 0 0 24px rgba(255,42,31,.7);
}
.hs-card p { color: #E7E0DC; margin: 0; font-size: 1.08rem; }
@media (min-width: 900px) {
  .hs-panel { width: 78vw; margin-right: 24px; }
  .hs-panel:first-child { margin-left: max(32px, calc((100vw - var(--wrap)) / 2 + 32px)); }
  .hs-card { padding: 0 40px 44px; }
}

/* Carretera de progreso, con brillo */
.hs-road { position: relative; height: 86px; margin: 22px 6vw 0; }
@media (min-width: 900px) { .hs-road { margin-left: max(32px, calc((100vw - var(--wrap)) / 2 + 32px)); margin-right: max(32px, calc((100vw - var(--wrap)) / 2 + 32px)); } }
.hs-line { position: absolute; left: 0; right: 0; top: 24px; height: 6px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 16px, transparent 16px 26px); }
.hs-fill {
  position: absolute; inset: 0; border-radius: 3px; transform-origin: left; transform: scaleX(var(--hs, 0));
  background: linear-gradient(90deg, #A00000, #FF2A1F);
  box-shadow: 0 0 8px #FF2A1F, 0 0 22px rgba(255,42,31,.75), 0 0 46px rgba(255,42,31,.35);
}
.hs-nodes { position: absolute; left: 0; right: 0; top: 0; height: 100%; display: flex; justify-content: space-between; }
.hs-nodes li {
  position: relative; width: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer;
  font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.55); white-space: nowrap; transition: color .3s, text-shadow .3s;
}
.hs-nodes li::before {
  content: ""; width: 18px; height: 18px; margin-top: 18px; margin-bottom: 10px; border-radius: 50%;
  background: #120C0A; border: 3px solid rgba(255,255,255,.35); transition: background-color .3s, border-color .3s, box-shadow .3s, transform .3s;
}
.hs-nodes li.is-on { color: var(--white); }
.hs-nodes li.is-on::before { background: #FF2A1F; border-color: #FF6A5F; transform: scale(1.2); box-shadow: 0 0 10px #FF2A1F, 0 0 26px rgba(255,42,31,.8); }
.hs-nodes li.is-here { text-shadow: 0 0 12px rgba(255,80,60,.9); }
.hs-nodes li:first-child { align-items: flex-start; }
.hs-nodes li:last-child { align-items: flex-end; }
/* Rueda realista (foto generada con Codex) que rueda por la carretera, con contraluz rojo */
.hs-tire { position: absolute; left: 0; top: 0; width: 54px; height: 54px; margin-left: -27px; will-change: transform; filter: drop-shadow(0 0 6px rgba(255,42,31,.9)) drop-shadow(0 0 14px rgba(255,42,31,.45)) drop-shadow(0 5px 6px rgba(0,0,0,.7)); }
.hs-tire img { display: block; width: 100%; height: 100%; }
.no-js .hs-road, .no-js .hs-arrows { display: none; }
@media (max-width: 599px) { .hs-nodes li { font-size: .72rem; } }
@media (prefers-reduced-motion: reduce) { .hs-track { scroll-behavior: auto; } }

/* Vehículos: pestañas */
.vehicles { background: var(--concrete); padding: 88px 0; }
.tabs {
  display: flex; gap: 6px; margin: 0 -16px 20px; padding: 0 16px 4px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  flex: none; min-height: 46px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 2px solid var(--line); transition: background-color .2s, color .2s, border-color .2s;
}
.tabs [role="tab"]:hover { border-color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.panel { display: grid; background: var(--white); border-radius: 18px; overflow: hidden; }
.panel[hidden] { display: none; }
/* Sin JS: se ven todos los paneles y no hay pestañas ni botón de hojear */
.no-js .tabs, .no-js .cat-actions [data-viewer-open] { display: none; }
.no-js .panel[hidden] { display: grid; margin-top: 16px; }
.panel img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.panel-copy { padding: 22px 20px 26px; }
.panel-copy h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.panel-copy p { color: var(--muted); max-width: 34em; margin-bottom: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .panel.is-entering img { animation: panel-img .6s cubic-bezier(.2,.7,.2,1); }
  .panel.is-entering .panel-copy { animation: panel-copy .5s cubic-bezier(.2,.7,.2,1); }
}
@keyframes panel-img { from { opacity: 0; transform: scale(1.06); } }
@keyframes panel-copy { from { opacity: 0; transform: translateX(16px); } }
@media (min-width: 720px) { .tabs { margin: 0 0 24px; padding: 0; } }
@media (min-width: 900px) {
  .panel { grid-template-columns: 1.3fr 1fr; align-items: center; }
  .panel img { height: 100%; aspect-ratio: auto; min-height: 420px; }
  .panel-copy { padding: 40px; }
}

/* Por qué: foto con el título encima y la lista al lado */
.why { background: var(--white); display: grid; }
.why-media { position: relative; overflow: hidden; min-height: 62svh; display: flex; align-items: flex-end; color: var(--white); }
.why-media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.why-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(31,20,15,.85), rgba(31,20,15,0) 60%); }
.why-media h2 { position: relative; z-index: 1; padding: 0 16px 28px; margin: 0; max-width: 11em; }
.why-list { padding: 16px 16px 72px; }
.why-list > div { padding: 24px 0; border-top: 2px solid var(--ink); }
.why-list dt { font-family: var(--display); font-weight: 600; font-size: 1.4rem; margin-bottom: .3em; letter-spacing: -.01em; }
.why-list dd { color: var(--muted); max-width: 34em; }
@media (min-width: 900px) {
  .why { grid-template-columns: 1fr 1fr; }
  .why-media { min-height: 100%; position: sticky; top: 0; height: 100svh; }
  .why-media h2 { padding: 0 48px 56px; }
  .why-list { padding: 96px 64px; align-self: center; }
}

/* Marcas: dos bandas de texto que se cruzan al hacer scroll */
.trust { position: relative; overflow: hidden; background: var(--ink); color: var(--white); padding: 104px 0 88px; }
.trust-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.trust::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(31,20,15,.25), var(--ink) 88%); }
.trust > * { position: relative; }
.trust-t { font-family: var(--font); font-size: 1.15rem; font-weight: 500; color: #E4DCD8; letter-spacing: 0; }
/* Bandas de distribuidores con los colores de cada marca; se cruzan y se inclinan con la velocidad del scroll */
.bands { position: relative; margin: 40px 0 56px; padding: 24px 0; }
.bandx { position: relative; overflow: hidden; padding: .16em 0; font-family: var(--display); font-weight: 700; line-height: 1; font-size: clamp(2.6rem, 1.2rem + 7vw, 7rem); box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); }
.bandx p {
  margin: 0; white-space: nowrap; display: flex; align-items: center; width: max-content;
  transform: translateX(calc(var(--k, 0) * var(--dir, 1) * 1px - 30%)) skewX(calc(var(--skew, 0) * 1deg));
  will-change: transform;
}
.bandx span { padding: 0 .28em; letter-spacing: -.01em; }
.bandx i { display: inline-block; flex: none; }
.bandx-giti { background: #FFCD00; color: #111; transform: rotate(-3.5deg); z-index: 1; }
.bandx-giti i { width: .22em; height: .22em; border-radius: 50%; background: #111; }
.bandx-yoko { background: #0E0E0E; color: #fff; transform: rotate(2.5deg); margin-top: -.12em; z-index: 3; }
.bandx-yoko i { width: .5em; height: .42em; background: #E60012; clip-path: polygon(0 0, 28% 0, 64% 50%, 28% 100%, 0 100%, 36% 50%); }
.bandx-dunlop { background: #FFE600; color: #111; transform: rotate(-1.5deg); margin-top: -.08em; z-index: 2; }
.bandx-dunlop i { width: .32em; height: .16em; background: #111; border-radius: 2px; }

.trust-facts { display: grid; gap: 16px; }
.trust-facts p { color: #E4DCD8; margin: 0; padding-left: 16px; border-left: 3px solid var(--red); max-width: 34em; }
@media (min-width: 900px) { .trust-facts { grid-template-columns: 1fr 1fr; gap: 40px; } }

/* Catálogos */
.catalogs { background: var(--concrete); }
.cat-list { display: grid; gap: 20px; }
.cat {
  display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 16px; align-items: start;
  background: var(--white); border-radius: 16px; padding: 14px;
}
.cat-open { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; perspective: 800px; }
.cat-cover { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 14px 28px -14px rgba(31,20,15,.6); transform-origin: left center; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s; }
.cat-open:hover .cat-cover, .cat-open:focus-visible .cat-cover { transform: rotateY(-14deg) translateX(4px); box-shadow: 18px 18px 30px -16px rgba(31,20,15,.55); }
.cat-body h3 { font-size: 1.2rem; margin-bottom: .3em; }
.cat-meta { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.cat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-note { color: var(--muted); font-size: .92rem; margin: 20px 0 0; max-width: 40em; }
@media (min-width: 900px) {
  .cat-list { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cat { grid-template-columns: 210px 1fr; gap: 24px; padding: 22px; }
  .cat-body { padding-top: 8px; }
}

/* Visor de catálogos */
.viewer {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0;
  background: #120C0A; color: var(--white); overflow: hidden;
}
.viewer::backdrop { background: rgba(0,0,0,.7); }
.viewer[open] { display: grid; grid-template-rows: auto 1fr; }
.viewer-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.viewer-t { font-family: var(--font); font-size: 1rem; font-weight: 700; margin: 0; letter-spacing: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-count { margin: 0; font-size: .9rem; color: var(--muted-dark); white-space: nowrap; font-variant-numeric: tabular-nums; }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }
.viewer-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.viewer-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain;
  padding: 16px max(16px, calc(50vw - 300px)); align-items: center; scrollbar-width: thin;
}
.viewer-page { flex: none; scroll-snap-align: center; margin: 0; }
.viewer-page img {
  height: auto; width: min(calc(100vw - 32px), calc((100dvh - 120px) / var(--r, 1.414)), 600px);
  background: #2A211D; border-radius: 4px; box-shadow: 0 20px 40px -20px #000;
}
.viewer-nav {
  position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: var(--white); font-size: 2rem; line-height: 1; cursor: pointer; display: none;
}
.viewer-prev { left: 16px; }
.viewer-next { right: 16px; }
.viewer-nav:hover { background: var(--red); }
@media (min-width: 900px) { .viewer-nav { display: block; } }
@media (max-width: 599px) { .viewer-pdf { display: none; } }

/* Cómo empezar */
.start { background: var(--white); display: grid; }
.start-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.start-copy { position: relative; padding: 48px 16px 88px; }
.road { position: relative; padding-left: 56px; counter-reset: r; margin-top: 24px; }
.road::before, .road::after {
  content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 6px; border-radius: 3px;
}
.road::before { background: repeating-linear-gradient(var(--line) 0 14px, transparent 14px 22px); }
.road::after { background: var(--red); transform-origin: top; transform: scaleY(var(--road, 1)); }
.road li { position: relative; counter-increment: r; padding: 0 0 40px; }
.road li:last-child { padding-bottom: 0; }
.road li::before {
  content: counter(r); position: absolute; left: -56px; top: -2px; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--white); font-weight: 700; font-size: 1rem;
  box-shadow: 0 0 0 4px var(--white);
}
.road h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; }
.road p { color: var(--muted); margin: 0; max-width: 34em; }
.road-tire { position: absolute; left: 16px; top: 0; width: 40px; height: 40px; z-index: 2; display: none; will-change: transform; }
.road-tire svg { width: 100%; height: 100%; }
.js .road-tire { display: block; }
@media (prefers-reduced-motion: reduce) { .js .road-tire { display: none; } }
@media (min-width: 900px) {
  .start { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .start-media img { height: 100%; aspect-ratio: auto; }
  .start-copy { padding: 96px 64px; }
  .road-tire { left: 64px; }
}

/* Contacto */
.contact { background: var(--concrete); }
.contact-grid { display: grid; gap: 32px; }
.contact-copy > p { color: var(--muted); font-size: 1.1rem; }
/* Socios: una ficha por persona, con WhatsApp, llamada y correo */
.partners { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.partner { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px; padding: 18px 20px; }
.partner p { margin: 0; }
.partner-name { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; color: var(--ink); }
.partner-role { color: var(--muted); font-size: .98rem; }
.partner-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.partner-line { font-size: .95rem; color: var(--muted); overflow-wrap: anywhere; }
.partner-line a { color: var(--ink); font-weight: 700; }
@media (min-width: 600px) and (max-width: 899px) { .partners { grid-template-columns: 1fr 1fr; } }

/* Contratos de mantenimiento */
.plans { background: var(--white); padding: 88px 0; }
.plans-grid { display: grid; gap: 40px; }
.plans-copy .btn { margin-top: 8px; }
.plans-list { margin: 0; display: grid; gap: 0; }
.plans-list > div { padding: 20px 0; border-top: 2px solid var(--ink); }
.plans-list dt { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin-bottom: .25em; letter-spacing: -.01em; }
.plans-list dd { margin: 0; color: var(--muted); max-width: 34em; }
@media (min-width: 900px) {
  .plans-grid { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
  .plans-list { grid-template-columns: 1fr 1fr; column-gap: 32px; }
}

/* Viadry Flota: app propia. Foto de Codex, móvil con captura real y semáforo que se enciende */
.app { background: var(--ink); color: var(--white); padding: 88px 0 96px; overflow: hidden; }
.app-grid { display: grid; gap: 48px; }
.app-kicker { margin: 0 0 .6em; color: #FF6B6B; font-weight: 700; font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; }
.app .sec-lead { color: var(--muted-dark); }
.app-list { margin: 8px 0 28px; display: grid; }
.app-list > div { padding: 18px 0; border-top: 2px solid rgba(255,255,255,.18); }
.app-list dt { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin-bottom: .25em; letter-spacing: -.01em; }
.app-list dd { margin: 0; color: var(--muted-dark); max-width: 34em; }
.app-media { position: relative; padding-bottom: 18%; }
.app-photo { display: block; width: 100%; height: auto; border-radius: 16px; }
.app-phone {
  position: absolute; left: 6%; top: 10%; width: 30%; margin: 0;
  padding: 2.2%; background: #0B0807; border-radius: 13% / 6%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 24px 60px rgba(0,0,0,.55);
}
.app-phone img { display: block; width: 100%; height: auto; border-radius: 10% / 4.6%; }
.app-lights {
  position: absolute; right: 4%; bottom: 0; margin: 0; padding: 12px 16px; list-style: none;
  display: flex; gap: 14px; background: var(--white); color: var(--ink); border-radius: 999px;
  font-weight: 700; font-size: .92rem; box-shadow: 0 14px 40px rgba(0,0,0,.4);
}
.app-lights li { display: flex; align-items: center; gap: 7px; }
.app-lights span { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.app-lights .is-green { --c: #1E7D45; }
.app-lights .is-amber { --c: #E0A100; }
.app-lights .is-red { --c: var(--red); }
@media (max-width: 479px) { .app-lights { gap: 10px; padding: 10px 12px; font-size: .85rem; right: 0; } }
@media (min-width: 900px) {
  .app-grid { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; }
}
/* Animación al entrar en pantalla (solo con JS y sin «reducir movimiento») */
@media (prefers-reduced-motion: no-preference) {
  .js .app-photo { transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .8s ease; }
  .js .app-phone { transition: transform 1s cubic-bezier(.2,.8,.2,1) .25s, opacity .7s ease .25s; }
  .js .app-lights { transition: transform .7s cubic-bezier(.2,.8,.2,1) .7s, opacity .5s ease .7s; }
  .js .app-lights span { transition: background-color .3s ease, box-shadow .3s ease; }
  .js .app-lights .is-green span { transition-delay: 1.2s; }
  .js .app-lights .is-amber span { transition-delay: 1.55s; }
  .js .app-lights .is-red span { transition-delay: 1.9s; }
  .js [data-app]:not(.is-in) .app-photo { transform: scale(1.04); opacity: .4; }
  .js [data-app]:not(.is-in) .app-phone { transform: translateY(56px) rotate(-4deg); opacity: 0; }
  .js [data-app]:not(.is-in) .app-lights { transform: translateY(20px); opacity: 0; }
  .js [data-app]:not(.is-in) .app-lights span { background: #CFC5BF; box-shadow: 0 0 0 4px transparent; }
  .js [data-app].is-in .app-phone { animation: app-float 4s ease-in-out 1.5s infinite alternate; }
}
@keyframes app-float { to { transform: translateY(-6px); } }

@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.25fr; gap: 72px; } }

.form { background: var(--white); border-radius: 16px; padding: 24px 16px; display: grid; gap: 18px; }
@media (min-width: 600px) { .form { padding: 32px; } }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.field label span { color: var(--red); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 2px solid #A9A39F; border-radius: 8px; padding: 11px 12px; min-height: 48px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--red); }
.err { color: var(--red); font-size: .9rem; font-weight: 600; margin: 6px 0 0; }
.send-row { display: grid; gap: 12px; }
@media (min-width: 600px) { .send-row { grid-template-columns: 1fr 1fr; } }
.form-status { margin: 0; font-weight: 600; min-height: 1.6em; }
.form-status.ok { color: #1D6B2F; }
.form-status.ko { color: var(--red); }
.form-note-warn { background: #FFF3CD; padding: 12px; border-radius: 8px; margin: 0; }
.form-t { font-size: 1.5rem; margin: 0; }
.form-sub { margin: -10px 0 0; color: var(--muted); }
.opt, .field label .opt { font-weight: 400; color: var(--muted); }
/* Opciones de un toque: radios y casillas reales con forma de pastilla */
.chips-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips-set legend { font-weight: 700; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 2px solid #A9A39F; font-weight: 600; font-size: .95rem; color: var(--ink); background: var(--white);
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input[type="checkbox"]:checked + span::before { content: "✓"; margin-right: 6px; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .chip span { transition: none; } }
/* Vista previa del mensaje, como una burbuja de chat */
.wa-preview { display: none; }
.js .wa-preview { display: block; background: #E7F3EA; border-radius: 12px 12px 12px 2px; padding: 12px 14px; font-size: .95rem; color: #183D24; }
.wa-preview p { margin: 0; white-space: pre-line; }
.form-legal { font-size: .84rem; color: var(--muted); margin: 0; }
.form-legal a { color: var(--ink); }

/* WhatsApp: verde oscuro para que el texto blanco se lea bien (5,6:1) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wa-ico { width: 1.25em; height: 1.25em; flex: none; }
.btn-wa { background: #157A3F; color: var(--white); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-wa:hover { background: #0F5F30; }
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 18px 0 14px; border-radius: 999px; background: #157A3F; color: var(--white);
  font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(31,20,15,.35);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.wa-float .wa-ico { width: 26px; height: 26px; }
.wa-float.is-on, .no-js .wa-float { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:hover { background: #0F5F30; }
.wa-float:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 599px) { .wa-float { padding: 0; width: 56px; justify-content: center; } .wa-float-t { display: none; } }
@media (prefers-reduced-motion: reduce) { .wa-float { transition: none; } }
@media print { .wa-float { display: none; } }

/* Aviso de cookies: informativo, no bloquea la página */
.notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 45; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  max-width: 560px; padding: 14px 16px; border-radius: 12px; background: var(--white); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(31,20,15,.25); font-size: .92rem;
}
.notice[hidden] { display: none; }
.notice p { margin: 0; flex: 1 1 260px; }
.notice a { color: var(--ink); font-weight: 700; }
.has-notice .wa-float { bottom: calc(var(--notice-h, 0px) + 28px); }
@media print { .notice { display: none; } }

/* Pie */
.site-footer { background: var(--ink); color: var(--muted-dark); padding: 48px 0; font-size: .92rem; }
.footer-in { display: grid; gap: 16px; }
.footer-in p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { color: var(--white); display: inline-block; padding: 6px 0; }

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* Páginas legales */
.legal { padding: calc(var(--header-h) + 48px) 0 80px; background: var(--white); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 1.5em; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }
.legal th { width: 36%; }
.pending { background: #FFF3CD; color: #5A4300; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.draft-note { background: var(--concrete); border-left: 4px solid var(--red); padding: 14px 16px; border-radius: 6px; }
.legal ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
