/* =========================================================================
   Rutia Logistics · Hoja de estilos principal
   Concepto: la web es una ruta. La carretera del símbolo de la R une la
   portada, el flujograma y el contacto. Cabecera, portada, colaboradores y
   pie van siempre en azul marino de marca; el resto sigue el tema (claro u
   oscuro) del visitante.

   Índice
   1. Variables (colores, tipografía, medidas)
   2. Base y accesibilidad
   3. Utilidades y botones
   4. Cabecera y menú
   5. Portada
   6. Servicios
   7. Flujograma (Cómo funciona)
   8. Empresas y clientes
   9. Colaboradores
   10. Perfil de empresa (Nosotros)
   11. Contacto y formulario
   12. Pie de página
   14. Redes sociales
   15. Página "Trabaja con nosotros"
   15b. Mapa de cobertura
   16. Efectos e interactividad
   17. Movimiento reducido
   ========================================================================= */

/* 1. Variables -------------------------------------------------------- */
:root {
  /* Marca (iguales en ambos temas) */
  --navy: #082B6F;
  --navy-deep: #051D4D;
  --blue: #1264D8;
  --cyan: #08B9E8;
  --on-navy: #FFFFFF;
  --on-navy-muted: #B9CAE8;
  --navy-line: rgba(255, 255, 255, 0.16);

  /* Tema claro */
  --bg: #FFFFFF;
  --bg-alt: #EEF4FB;
  --surface: #FFFFFF;
  --heading: #082B6F;
  --fg: #172033;
  --fg-muted: #46546E;
  --line: #D3DEEE;
  --accent: #1264D8;
  --accent-fg: #FFFFFF;
  --accent-soft: #DCE9FB;
  --focus: #1264D8;
  --danger: #B42318;
  --shadow: 0 10px 30px rgba(8, 43, 111, 0.08);
  /* Sombras con el tono azul de la marca: en reposo y al pasar el ratón */
  --shadow-sm: 0 1px 2px rgba(8, 43, 111, 0.06), 0 6px 16px rgba(8, 43, 111, 0.06);
  --shadow-lg: 0 4px 8px rgba(8, 43, 111, 0.06), 0 18px 40px rgba(18, 100, 216, 0.16);

  /* Tipografía y medidas */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
  --header-h: 72px;
  --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061739;
    --bg-alt: #0A2152;
    --surface: #0D2A62;
    --heading: #FFFFFF;
    --fg: #E6EEFA;
    --fg-muted: #AEBFDA;
    --line: #1E3C78;
    --accent: #08B9E8;
    --accent-fg: #051D4D;
    --accent-soft: #123677;
    --focus: #08B9E8;
    --danger: #FF9A8F;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(8, 185, 232, 0.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #061739;
  --bg-alt: #0A2152;
  --surface: #0D2A62;
  --heading: #FFFFFF;
  --fg: #E6EEFA;
  --fg-muted: #AEBFDA;
  --line: #1E3C78;
  --accent: #08B9E8;
  --accent-fg: #051D4D;
  --accent-soft: #123677;
  --focus: #08B9E8;
  --danger: #FF9A8F;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(8, 185, 232, 0.14);
  color-scheme: dark;
}

/* 2. Base y accesibilidad --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus, section[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 100;
  padding: 12px 20px; border-radius: 999px;
  background: var(--cyan); color: var(--navy-deep); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3. Utilidades y botones --------------------------------------------- */
.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--gutter); }
section[id] { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }

.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
.h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.15; font-weight: 700;
  color: var(--heading); letter-spacing: -0.01em;
}
.lead { font-size: 1.0625rem; color: var(--fg-muted); max-width: 62ch; }
.sub-title { font-size: 1.15rem; font-weight: 600; color: var(--heading); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: 0.95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 44px; padding: 8px 20px; font-size: 0.9rem; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-ghost { border-color: var(--line); color: var(--heading); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.on-navy .btn-primary { background: var(--cyan); color: var(--navy-deep); }
.on-navy .btn-ghost { border-color: var(--navy-line); color: var(--on-navy); }
.on-navy .btn-ghost:hover { border-color: var(--cyan); }
.on-navy :focus-visible { outline-color: var(--cyan); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* 4. Cabecera y menú -------------------------------------------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--navy); color: var(--on-navy);
  border-bottom: 1px solid var(--navy-line);
}
.header-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; border-radius: 8px; }
.brand img { display: block; height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; gap: 28px; }
.nav-list a {
  position: relative; display: inline-block; padding-block: 8px;
  text-decoration: none; font-size: 0.9rem; font-weight: 500; color: var(--on-navy-muted);
}
.nav-list a:hover, .nav-list a.is-active { color: var(--on-navy); }
.nav-list a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--cyan);
}
.nav-cta { min-height: 42px; padding: 8px 20px; }
.menu-btn {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px;
  background: transparent; border: 1px solid var(--navy-line); border-radius: 999px;
  color: var(--on-navy); font-weight: 500; font-size: 0.9rem; cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; content: "";
}
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -5px; }
.menu-icon::after { position: absolute; top: 5px; }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1);
    flex-direction: column; align-items: stretch; gap: 16px; padding: 8px var(--gutter) 24px;
    background: var(--navy); border-bottom: 1px solid var(--navy-line);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--navy-line); font-size: 1rem; }
  .nav-list a.is-active::after { display: none; }
}
@media (max-width: 380px) { .brand img { height: 36px; } }

/* 5. Portada ---------------------------------------------------------- */
.hero {
  background: radial-gradient(120% 90% at 85% 10%, #0E3C93 0%, var(--navy) 45%, var(--navy-deep) 100%);
  color: var(--on-navy);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(48px, 8vw, 104px);
}
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero .lead { color: var(--on-navy-muted); }
.hero-services { margin-top: 28px; font-size: 0.85rem; color: var(--on-navy-muted); display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hero-services li { display: inline-flex; align-items: center; gap: 8px; }
.hero-services li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
/* R del logotipo en 3D: la cara frontal y 12 capas detrás dan el grosor */
.r3d { position: relative; width: 100%; max-width: 540px; aspect-ratio: 5 / 4; justify-self: end; display: grid; place-items: center; perspective: 1100px; }
.r3d-glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(8, 185, 232, 0.35), transparent 72%); filter: blur(18px); }
.r3d-stage { position: relative; width: 100%; aspect-ratio: 194.83 / 111; transform-style: preserve-3d; transform: rotateX(10deg) rotateY(-18deg); animation: r3dTilt 9s ease-in-out infinite; }
.r3d-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.r3d-layer { transform: translateZ(calc(var(--i) * -2.6px)); }
.r3d-face { transform: translateZ(0); filter: drop-shadow(0 0 14px rgba(8, 185, 232, 0.35)); }
.r3d-dash { animation: r3dDash 2.2s ease-in-out infinite; animation-delay: calc(var(--d) * 0.28s); }
.r3d-shine { animation: r3dShine 5.5s ease-in-out infinite; }
.r3d-shadow { position: absolute; bottom: 7%; left: 20%; right: 20%; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent); filter: blur(6px); animation: r3dShadow 9s ease-in-out infinite; }
@keyframes r3dTilt {
  0%, 100% { transform: rotateX(12deg) rotateY(-26deg) translateY(0); }
  50% { transform: rotateX(4deg) rotateY(20deg) translateY(-14px); }
}
@keyframes r3dShadow { 0%, 100% { transform: scaleX(1); opacity: 0.9; } 50% { transform: scaleX(0.82); opacity: 0.6; } }
@keyframes r3dDash { 0%, 100% { opacity: 0.7; } 35% { opacity: 1; } }
@keyframes r3dShine { 0% { transform: translateX(0) skewX(-18deg); } 55%, 100% { transform: translateX(320px) skewX(-18deg); } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .r3d { justify-self: center; max-width: 440px; }
}

/* 6. Servicios -------------------------------------------------------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--accent-soft); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card .icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.3rem; font-weight: 600; color: var(--heading); line-height: 1.25; }
.card p { color: var(--fg-muted); }
.tag {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-muted);
}
.ticks { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; }
.ticks li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.4' fill='none' stroke='%231264D8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
/* En escritorio, las tres tarjetas comparten filas: títulos, textos y listas quedan alineados */
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
  .card { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 16px; }
}

/* 7. Flujograma ------------------------------------------------------- */
.flow-scroll { overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scrollbar-width: thin; }
.flow { position: relative; min-width: 540px; padding-top: 56px; }
.flow-steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.flow-track {
  position: absolute; top: calc(56px + 28px - 4px); left: calc(100% / 10); right: calc(100% / 10);
  height: 8px; border-radius: 999px; background: var(--line);
}
.flow-progress {
  position: absolute; top: 0; bottom: 0; left: 0; width: var(--p, 0%);
  border-radius: inherit; overflow: hidden;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width .8s cubic-bezier(.65, 0, .35, 1);
}
.flow-progress::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0 10px, transparent 10px 20px);
  animation: lane 0.9s linear infinite;
}
@keyframes lane { to { background-position: 20px 0; } }
.flow-courier {
  position: absolute; top: -76px; left: var(--p, 0%); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  transition: left .8s cubic-bezier(.65, 0, .35, 1);
}
.flow-courier::after {
  content: ""; width: 0; height: 0; margin-top: -1px;
  border: 7px solid transparent; border-top-color: var(--accent); border-bottom: 0;
}
.pin {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg); box-shadow: 0 8px 18px rgba(8, 43, 111, 0.28);
}
.pin svg { width: 22px; height: 22px; }
.flow.is-moving .pin { animation: bob .4s ease-in-out 2; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.step {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 0 2px 6px; background: none; border: 0; border-radius: 12px; cursor: pointer; text-align: center;
}
.step .num {
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums;
  background: var(--surface); color: var(--heading); border: 3px solid var(--line);
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .2s ease, box-shadow .3s ease;
}
.step .name { font-weight: 600; font-size: 0.92rem; color: var(--heading); }
.step:hover .num { border-color: var(--accent); }
.step.done .num { border-color: var(--accent); color: var(--accent); }
.step[aria-selected="true"] .num {
  background: var(--accent); border-color: var(--accent); color: var(--accent-fg);
  transform: scale(1.06); box-shadow: 0 0 0 6px var(--accent-soft);
}
.flow-hint { display: none; margin-top: 4px; font-size: 0.8rem; color: var(--fg-muted); }
.flow-panel {
  margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 40px;
}
.flow-panel.enter > * { animation: panelIn .45s ease both; }
.flow-panel.enter > *:nth-child(2) { animation-delay: .08s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }
.flow-panel h3 { font-size: 1.35rem; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.flow-panel p { color: var(--fg-muted); }
.flow-panel .btn { margin-top: 20px; }
.kicker { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.facts { display: flex; flex-direction: column; gap: 14px; }
.facts div { border-left: 3px solid var(--accent); padding-left: 14px; }
.facts dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.facts dd { margin-top: 2px; font-weight: 500; color: var(--fg); }
@media (max-width: 820px) {
  .flow-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .flow-hint { display: block; }
}

/* 8. Empresas y clientes ---------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split .section-head { margin-bottom: 28px; }
.benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 36px; }
.benefit { border-top: 3px solid var(--accent); padding-top: 18px; }
.benefit h3 { font-size: 1.05rem; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.benefit p { font-size: 0.95rem; color: var(--fg-muted); }
.clients { margin-top: clamp(56px, 8vw, 96px); padding-top: clamp(32px, 5vw, 48px); border-top: 1px solid var(--line); text-align: center; }
.client-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 24px; }
.client {
  flex: 1 1 160px; max-width: 210px; min-height: 104px; padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.client-name { font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--heading); line-height: 1.3; }
.client-sector { font-size: 0.8rem; color: var(--fg-muted); }
.client-logo { display: block; max-width: 150px; max-height: 48px; width: auto; height: auto; object-fit: contain; }
.onboard-title { margin-top: clamp(56px, 8vw, 96px); }
.onboard { counter-reset: paso; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.onboard li {
  counter-increment: paso; background: var(--bg-alt); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.onboard li::before {
  content: counter(paso); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px;
  background: var(--accent); color: var(--accent-fg); font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.onboard strong { font-weight: 600; color: var(--heading); }
.onboard span { font-size: 0.95rem; color: var(--fg-muted); }
.section-alt .onboard li { background: var(--surface); }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) { .onboard { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .benefits { grid-template-columns: minmax(0, 1fr); } }

/* 9. Colaboradores ---------------------------------------------------- */
.riders {
  position: relative; overflow: hidden; color: var(--on-navy);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.riders .h2 { color: var(--on-navy); margin-block: 14px 18px; }
.riders .eyebrow { color: var(--cyan); }
.riders .lead { color: var(--on-navy-muted); }
.riders-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.watermark { position: absolute; right: -40px; bottom: -30px; width: min(60vw, 420px); opacity: 0.07; pointer-events: none; }
.promises li { position: relative; padding: 20px 0 20px 28px; border-top: 1px solid var(--navy-line); }
.promises li:last-child { border-bottom: 1px solid var(--navy-line); }
.promises li::before { content: ""; position: absolute; left: 0; top: 30px; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); }
.promises h3 { font-weight: 600; font-size: 1.05rem; }
.promises p { color: var(--on-navy-muted); font-size: 0.95rem; }
@media (max-width: 860px) { .riders-grid { grid-template-columns: minmax(0, 1fr); } }

/* 10. Perfil de empresa (Nosotros) ----------------------------------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 48px); align-items: stretch; }
.profile-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px;
  padding: clamp(28px, 4vw, 48px); border-radius: calc(var(--radius) + 6px); color: var(--on-navy);
  background: radial-gradient(120% 100% at 100% 0%, #0E3C93 0%, var(--navy) 50%, var(--navy-deep) 100%);
}
.profile-card::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 28px solid rgba(8, 185, 232, 0.12); pointer-events: none;
}
.profile-card .eyebrow { color: var(--cyan); }
.profile-card .h2 { color: var(--on-navy); }
.profile-intro { color: var(--on-navy-muted); font-size: 1.0625rem; }
.profile-card { justify-content: center; }
.profile-card .btn { align-self: flex-start; margin-top: 8px; }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pillar {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.pillar:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.pillar-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 4px;
  background: var(--accent-soft); color: var(--accent);
}
.pillar-icon svg { width: 26px; height: 26px; }
.pillar h3 { font-size: 1.15rem; font-weight: 600; color: var(--heading); line-height: 1.3; }
.pillar p { font-size: 0.95rem; color: var(--fg-muted); }
.pillar .pillar-gain { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; color: var(--accent); }
.stats {
  position: relative; overflow: hidden; margin-top: clamp(32px, 5vw, 56px); padding: clamp(24px, 4vw, 44px);
  border-radius: calc(var(--radius) * 1.5); color: var(--on-navy);
  background: radial-gradient(120% 140% at 100% 0%, rgba(8, 185, 232, 0.22) 0%, transparent 55%), linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.stats::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000);
}
.stats > * { position: relative; z-index: 1; }
.stats-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(20px, 3vw, 32px); }
.stats .eyebrow { color: var(--cyan); }
.stats-title { margin-top: 6px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.2; color: var(--on-navy); }
.live-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; color: var(--on-navy); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--navy-line);
}
.live-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #2EE59D; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #2EE59D; animation: livePulse 1.8s ease-out infinite; }
@keyframes livePulse { from { transform: scale(1); opacity: .7; } to { transform: scale(2.8); opacity: 0; } }
.stat-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 20px; min-width: 0;
  border-radius: var(--radius); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--navy-line);
  transition: transform .25s ease, background-color .25s ease, border-color .25s ease;
}
.stat:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.1); border-color: rgba(8, 185, 232, 0.55); }
.stat-live { border-color: rgba(8, 185, 232, 0.45); background: linear-gradient(160deg, rgba(8, 185, 232, 0.18), rgba(255, 255, 255, 0.05)); }
.stat-icon { width: 44px; height: 44px; margin-bottom: 8px; border-radius: 12px; display: grid; place-items: center; color: #FFFFFF; background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.stat-icon svg { width: 24px; height: 24px; }
.stat-num {
  font-size: clamp(2.1rem, 3.6vw, 2.9rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #FFFFFF 0%, #9FE7FA 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-num.bump { animation: statBump .5s ease; }
@keyframes statBump { 40% { transform: translateY(-3px); filter: brightness(1.4); } }
.stat-label { font-size: 0.98rem; font-weight: 600; color: var(--on-navy); }
.stat-note { font-size: 0.84rem; color: var(--on-navy-muted); }
.stat-today { font-weight: 600; color: #2EE59D; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .stat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stat-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .pillars { grid-template-columns: minmax(0, 1fr); }
}

/* 11. Contacto y formulario ------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-info .h2 { margin-block: 14px 18px; }
.contact-list { display: grid; gap: 20px; margin-top: 32px; }
.contact-list dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.contact-list dd { font-weight: 500; color: var(--fg); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.email-row a { color: var(--heading); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.copy-btn {
  min-height: 36px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--heading); font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); }
.phone-row a { color: var(--heading); font-weight: 600; text-underline-offset: 3px; }
.next-steps { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.next-list { counter-reset: siguiente; display: grid; gap: 16px; margin-top: 16px; }
.next-list li { counter-increment: siguiente; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; }
.next-list li::before {
  content: counter(siguiente); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums;
}
.next-list strong { font-weight: 600; color: var(--heading); }
.next-list span { font-size: 0.92rem; color: var(--fg-muted); }

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 36px); display: flex; flex-direction: column; gap: 24px;
  counter-reset: bloque;
}
.form-intro { font-size: 0.85rem; color: var(--fg-muted); margin-top: -8px; }
.form-block { border: 0; margin: 0; padding: 24px 0 0; min-width: 0; border-top: 1px solid var(--line); counter-increment: bloque; }
/* La leyenda flota para no quedar cortada por el borde superior del bloque */
.block-title { float: left; width: 100%; display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 16px; font-weight: 600; font-size: 1rem; color: var(--heading); }
.block-title::before {
  content: counter(bloque); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent); color: var(--accent-fg); font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.form-block > .block-grid, .form-block > .field { clear: both; }
.block-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.block-grid .full { grid-column: 1 / -1; }
/* Sin campo "Empresa", el nombre ocupa toda la fila y correo y teléfono quedan emparejados */
.form[data-tipo="repartidor"] .block-grid > .field:first-child { grid-column: 1 / -1; }
.req { color: var(--danger); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .choice-set legend { font-size: 0.875rem; font-weight: 600; color: var(--heading); }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.error { font-size: 0.82rem; font-weight: 500; color: var(--danger); }
.choice-set { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.choice-set legend { padding: 0; margin-bottom: 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font-size: 0.9rem; font-weight: 500; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.choice:hover span { border-color: var(--accent); }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-set[aria-invalid="true"] .choice span { border-color: var(--danger); }
.consent { display: flex; align-items: flex-start; gap: 12px; font-size: 0.9rem; font-weight: 400 !important; color: var(--fg) !important; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); cursor: pointer; }
.consent a { color: var(--heading); font-weight: 600; text-underline-offset: 3px; }
.form-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.form-msg { width: 100%; padding: 14px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--heading); font-size: 0.92rem; }
.form-msg.is-error { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .block-grid { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { width: 100%; }
}

/* 12. Pie de página --------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); padding-block: 56px 32px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand img { height: 44px; width: auto; display: block; margin-bottom: 16px; }
.slogan { letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.75rem; font-weight: 500; color: var(--on-navy); }
.footer-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-navy); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--on-navy); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--navy-line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; font-size: 0.82rem;
}
.legal-list { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.proto-note { width: 100%; opacity: 0.8; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* 14. Redes sociales ------------------------------------------------- */
/* Iconos: Font Awesome Free (licencia CC BY 4.0, fontawesome.com) */
.social { display: flex; flex-wrap: wrap; gap: 10px; }
.social a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--navy-line); color: var(--on-navy);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.social a:hover { background: var(--cyan); border-color: var(--cyan); color: var(--navy-deep); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-brand .social { margin-top: 20px; }
.social-light a { border-color: var(--line); color: var(--heading); background: var(--surface); }
.social-light a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.contact-aside { margin-top: 14px; color: var(--fg-muted); }
.contact-aside a, .faq-grid .lead a { color: var(--heading); font-weight: 600; text-underline-offset: 3px; }

/* 15. Página "Trabaja con nosotros" ---------------------------------- */
.page-hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); margin-block: 14px 22px; }
.page-hero .eyebrow { color: var(--cyan); }
.hero-card {
  padding: clamp(24px, 3vw, 32px); border-radius: calc(var(--radius) + 6px);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--navy-line);
}
.hero-card-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.hero-points { display: grid; gap: 18px; margin-top: 18px; }
.hero-points li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; }
.hero-points li::before {
  content: ""; grid-row: span 2; width: 28px; height: 28px; border-radius: 50%;
  background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M8.5 14.5l3.5 3.5 7.5-8' fill='none' stroke='%23051D4D' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/28px no-repeat;
}
.hero-points strong { font-weight: 600; color: var(--on-navy); }
.hero-points span { font-size: 0.92rem; color: var(--on-navy-muted); }
.perk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan {
  display: flex; flex-direction: column; gap: 16px; padding: 32px 28px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.plan:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.plan-hours { display: flex; align-items: baseline; gap: 10px; }
.plan-num { font-size: 3.5rem; font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.plan-unit { font-size: 1rem; font-weight: 600; color: var(--heading); }
.plan > p { color: var(--fg-muted); }
.plan .btn { margin-top: auto; }
.reqs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.reqs li { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--bg-alt); min-width: 0; }
.reqs h3 { font-size: 1.05rem; font-weight: 600; color: var(--heading); }
.reqs p { font-size: 0.95rem; color: var(--fg-muted); }
.onboard-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 20px;
  list-style: none; cursor: pointer; font-weight: 600; color: var(--heading); border-radius: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.faq details p { padding: 0 20px 18px; color: var(--fg-muted); }
@media (max-width: 960px) {
  .perk-grid, .reqs, .onboard-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans, .faq-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .perk-grid, .reqs, .onboard-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Preguntas frecuentes en el pie de página */
.footer-faq { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 24px 48px; padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--navy-line); }
.footer-faq-title { font-size: 1.4rem; font-weight: 700; color: var(--on-navy); }
.footer-faq-lead { margin-top: 8px; }
.footer-faq-lead a { color: var(--on-navy); font-weight: 600; }
.faq-dark details { background: rgba(255, 255, 255, 0.04); border-color: var(--navy-line); box-shadow: none; }
.faq-dark summary { color: var(--on-navy); font-size: 0.95rem; min-height: 48px; }
.faq-dark summary::after { color: var(--cyan); }
.faq-dark summary:focus-visible { outline-color: var(--cyan); }
.faq-dark details p { color: var(--on-navy-muted); font-size: 0.92rem; }
@media (max-width: 860px) { .footer-faq { grid-template-columns: minmax(0, 1fr); } }

/* 15b. Mapa de cobertura ---------------------------------------------- */
.coverage-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.coverage-info .h2 { margin-block: 14px 18px; }
.coverage-hint { margin-top: 24px; font-size: 0.85rem; color: var(--fg-muted); }
.city-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.city-btn {
  min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--heading); font-size: 0.88rem; font-weight: 500; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.city-btn:hover, .city-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); transform: translateY(-1px); }
.map-wrap {
  margin: 0; padding: clamp(12px, 2vw, 24px); border-radius: calc(var(--radius) + 6px);
  background: radial-gradient(120% 100% at 30% 20%, var(--surface), var(--bg-alt)); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.coverage.section-alt .map-wrap { background: radial-gradient(120% 100% at 30% 20%, var(--surface), var(--bg)); }
.spain-map { display: block; width: 100%; height: auto; overflow: visible; }
.map-neighbors { fill: var(--line); opacity: 0.45; }
.map-spain { fill: var(--surface); stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 6px 14px rgba(8, 43, 111, 0.12)); }
.map-routes path { stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 4 6; opacity: 0.55; animation: route 1.6s linear infinite; }
@keyframes route { to { stroke-dashoffset: -20; } }
.city { cursor: pointer; }
.city-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; transition: transform .2s ease; }
.city-hub .city-dot { fill: var(--navy); stroke: var(--cyan); stroke-width: 3; }
.city-pulse { fill: var(--cyan); opacity: 0; transform-box: fill-box; transform-origin: center; animation: cityPulse 2.8s ease-out infinite; animation-delay: calc(var(--d, 0) * 0.25s); }
@keyframes cityPulse { 0% { opacity: 0.55; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.city-label { font-family: var(--font); font-size: 12.5px; font-weight: 600; fill: var(--heading); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; transition: fill .2s ease; }
.city-hub .city-label { font-size: 14px; font-weight: 700; }
.city:hover .city-dot, .city.is-active .city-dot { transform: scale(1.5); }
.city:hover .city-label, .city.is-active .city-label { fill: var(--accent); }
.city.is-active .city-pulse { animation-duration: 1.2s; }
@media (max-width: 960px) { .coverage-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .city-label { font-size: 15px; } .city-hub .city-label { font-size: 17px; } }

/* 15d. Páginas legales y aviso de datos ------------------------------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn:disabled { opacity: .7; cursor: progress; }
.data-info { margin-top: 10px; font-size: 0.8rem; line-height: 1.55; color: var(--fg-muted); }
.data-info a { color: var(--heading); text-underline-offset: 3px; }
.legal-list a { color: inherit; text-underline-offset: 3px; }
.legal-list a:hover, .legal-list a[aria-current="page"] { color: var(--cyan); }
.legal-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: var(--on-navy); }
.legal-hero .eyebrow { color: var(--cyan); }
.legal-hero h1 { margin-top: 10px; color: var(--on-navy); }
.legal-hero .lead { margin-top: 12px; color: var(--on-navy-muted); max-width: 60ch; }
.legal-doc { max-width: 820px; }
.legal-doc h2 { margin: 40px 0 12px; font-size: 1.25rem; font-weight: 600; color: var(--heading); }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc p, .legal-doc li { line-height: 1.7; color: var(--fg); }
.legal-doc p + p { margin-top: 12px; }
.legal-doc ul { margin: 12px 0; padding-left: 20px; list-style: disc; display: grid; gap: 6px; }
.legal-doc ul.legal-data { list-style: none; padding: 20px 24px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line); }
.legal-doc a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-table-wrap { margin: 12px 0; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.legal-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
.legal-table th, .legal-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.55; }
.legal-table th { background: var(--bg-alt); color: var(--heading); font-weight: 600; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-updated { margin-top: 40px; font-size: 0.88rem; color: var(--fg-muted) !important; }
/* Datos de empresa pendientes: se ven resaltados hasta sustituirlos */
mark.dato-pendiente { padding: 1px 6px; border-radius: 6px; background: #FFE58A; color: #3D2E00; font-weight: 600; }

/* 16. Efectos e interactividad --------------------------------------- */
/* 16.1 Sombras y profundidad */
.card, .pillar, .plan, .client, .flow-panel, .faq details, .reqs li, .onboard li { box-shadow: var(--shadow-sm); }
.site-header { transition: box-shadow .3s ease, background-color .3s ease; }
.site-header.scrolled { box-shadow: 0 10px 30px rgba(5, 29, 77, 0.35); }

/* 16.2 Al pasar el ratón: la tarjeta se eleva y su borde se ilumina con el degradado del logotipo */
.card, .pillar, .plan, .client, .reqs li { position: relative; transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease, border-color .3s ease; }
.card::before, .pillar::before, .plan::before, .client::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease;
}
.card:hover, .pillar:hover, .plan:hover, .client:hover, .reqs li:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before, .pillar:hover::before, .plan:hover::before, .client:hover::before { opacity: 1; }
.card .icon, .pillar-icon { transition: background .3s ease, color .3s ease, transform .4s cubic-bezier(.2, .7, .2, 1); }
.card:hover .icon, .pillar:hover .pillar-icon, .reqs li:hover .pillar-icon {
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #FFFFFF; transform: translateY(-2px) rotate(-6deg);
}
.clock-hand { transform-box: view-box; transform-origin: 12px 12px; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.card:hover .clock-hand, .pillar:hover .clock-hand { transform: rotate(360deg); }

/* Botón principal: un destello lo recorre y aparece una flecha */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s ease;
}
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary::after { content: "→"; display: inline-block; max-width: 0; margin-left: -10px; opacity: 0; overflow: hidden; transition: max-width .3s ease, margin .3s ease, opacity .3s ease; }
.btn-primary:hover::after { max-width: 1.2em; margin-left: 0; opacity: 1; }
.btn-ghost:hover { background: rgba(18, 100, 216, 0.06); }
.on-navy .btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* Menú: el subrayado se desliza al pasar por cada enlace */
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--cyan);
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav-list a:hover::after, .nav-list a.is-active::after { transform: scaleX(1); }

/* 16.3 Secciones que aparecen al llegar a ellas (solo con JavaScript activo) */
.js-reveal .reveal:not(.stagger) { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js-reveal .reveal.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.js-reveal .reveal.in:not(.stagger), .js-reveal .reveal.stagger.in > * { opacity: 1; transform: none; }

/* 16.4 La R sigue al ratón y un halo de luz sigue al cursor en las zonas azules */
.r3d-tilt {
  position: relative; width: 88%; transform-style: preserve-3d;
  transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)); transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(8, 185, 232, 0.18), transparent 60%);
  opacity: var(--spot, 0); transition: opacity .4s ease;
}

/* 17. Movimiento reducido --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .r3d-stage { transform: rotateX(8deg) rotateY(-16deg); }
}

/* 18. Versión 2: portada, cifras, el reto, para quién, WhatsApp ------- */
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan);
}
.hero-kicker::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--cyan); }
.hero { padding-bottom: clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); }
.hero-points { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-points li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; color: var(--on-navy);
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--navy-line);
}
.hero-points li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23051D4D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Cifras: tarjeta que se superpone a la portada */
.stats-band { position: relative; z-index: 2; margin-top: calc(clamp(40px, 6vw, 72px) * -1); padding-bottom: clamp(16px, 3vw, 32px); }
.stats-band .stats { margin-top: 0; box-shadow: 0 24px 60px rgba(5, 29, 77, 0.28); }

/* El reto: antes y después */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.compare-col { border-radius: calc(var(--radius) * 1.3); padding: clamp(24px, 3.5vw, 40px); }
.compare-col h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; margin-bottom: 20px; }
.compare-col ul { display: grid; gap: 14px; }
.compare-col li { display: flex; gap: 12px; align-items: flex-start; }
.compare-col li svg { width: 22px; height: 22px; flex: none; margin-top: 2px; padding: 3px; border-radius: 50%; }
.compare-before { background: var(--surface); border: 1px solid var(--line); }
.compare-before h3 { color: var(--fg-muted); }
.compare-before li { color: var(--fg-muted); }
.compare-before li svg { color: var(--fg-muted); background: var(--bg-alt); }
.compare-after { color: var(--on-navy); background: radial-gradient(120% 140% at 100% 0%, rgba(8, 185, 232, 0.22) 0%, transparent 55%), linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); box-shadow: var(--shadow-lg); }
.compare-after h3 { color: var(--cyan); }
.compare-after li svg { color: var(--navy-deep); background: var(--cyan); }
@media (max-width: 760px) { .compare { grid-template-columns: minmax(0, 1fr); } }

/* Para quién */
.audience { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.aud {
  display: flex; flex-direction: column; gap: 10px; padding: 28px 24px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.aud:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.aud-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.aud-icon svg { width: 26px; height: 26px; }
.aud h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.3; color: var(--heading); }
.aud p { font-size: 0.95rem; color: var(--fg-muted); }
.integrator {
  margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 22px clamp(20px, 3vw, 32px); border-radius: var(--radius); color: var(--on-navy);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.integrator p:last-child { flex: 1 1 320px; }
.integrator-tag { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
@media (max-width: 1000px) { .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .audience { grid-template-columns: minmax(0, 1fr); } }

/* Preguntas frecuentes de empresas */
#preguntas { border-top: 1px solid var(--line); }
#preguntas .h2 { margin-block: 14px 18px; }
#preguntas .lead a { color: var(--heading); font-weight: 600; text-underline-offset: 3px; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px 0 16px; border-radius: 999px;
  background: #1F8F4E; color: #FFFFFF; font-weight: 600; font-size: 0.95rem; text-decoration: none;
  box-shadow: 0 10px 28px rgba(5, 29, 77, 0.3); transition: transform .2s ease, box-shadow .2s ease;
}
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(5, 29, 77, 0.36); }
.wa-float:focus-visible { outline-color: var(--cyan); }
@media (max-width: 560px) { .wa-float { padding: 0; width: 56px; justify-content: center; } .wa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .aud, .wa-float { transition: none; } .aud:hover, .wa-float:hover { transform: none; } }
@media (min-width: 961px) { .nav-list a, .nav-cta { white-space: nowrap; } }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.75rem); }
@media (max-width: 420px) { .stat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat { padding: 16px 14px; } }
@media (max-width: 860px) { .r3d { max-width: 300px; } }

/* 19. Lanzamiento: lo oculto con el atributo hidden no se muestra nunca */
[hidden] { display: none !important; }

/* v24: banda de 3 compromisos */
.stat-list.stat-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .stat-list.stat-list--3 { grid-template-columns: minmax(0, 1fr); } }
