/* ============================================================
   PROYECTOS — la flota con la composición de Vexta Control (/plantas,
   LENGUAJE_VISUAL §5-§10): escena grafito sobre la página clara, mapa
   satelital protagonista a la izquierda, columna de tarjetas a la
   derecha y los destacados como tarjetas de planta abajo.
   ============================================================ */
.vp {
  --vp-tinta: #F2F3F1; --vp-tinta-2: #A4A8A6; --vp-tinta-3: #6B7073;
  --vp-linea: rgba(255,255,255,.075); --vp-verde: #4BD07A; --vp-naranja: #FF8A3D; --vp-azul: #8FB3D9;
  padding: 120px 20px 96px;
  background: var(--bg, #F4F4F2);
}
.vp-inner { max-width: min(1480px, 100%); margin: 0 auto; }
.vp-head { max-width: 780px; margin: 0 auto 36px; text-align: center; }
.vp-eti { font-size: 13px; color: #6B7073; margin-bottom: 14px; }
.vp-titulo { font-size: clamp(2.3rem, 5vw, 4.4rem); font-weight: 200; letter-spacing: -0.05em; line-height: 1.02; color: #121314; text-wrap: balance; }
.vp-desc { margin: 18px auto 0; max-width: 52ch; font-size: 15.5px; line-height: 1.6; color: #55595C; text-wrap: balance; }

.vp-escena {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 10px;
  padding: 10px; border-radius: 30px; color: var(--vp-tinta); color-scheme: dark;
  background: radial-gradient(120% 90% at 100% 0%, #1A1C1E 0%, #0E0F10 45%, #08090A 100%);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.05);
}
.vp-num { font-weight: 200; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--vp-tinta); white-space: nowrap; }
.vp-num .d { color: var(--vp-tinta-3); }
.vp-num .u { font-size: 12px; letter-spacing: 0; color: var(--vp-tinta-2); margin-left: .5em; font-weight: 400; }
.vp-num--xl { font-size: clamp(44px, 4.4vw, 62px); }
.vp-num--l  { font-size: clamp(38px, 3.4vw, 52px); }
.vp-num--m  { font-size: clamp(30px, 2.5vw, 40px); }

/* — el mapa — */
.vp-mapa { position: relative; min-height: 680px; border-radius: 24px; overflow: hidden; background: #0b0d0c; isolation: isolate; }
.vp-mapa .vp-gl { position: absolute; inset: 0; } /* gana a .mapboxgl-map {position:relative} */
.vp-gl .mapboxgl-canvas { outline: none; }
.vp-velo { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(180deg, rgba(8,9,10,.78) 0%, rgba(8,9,10,0) 24%),
    linear-gradient(0deg,   rgba(8,9,10,.6)  0%, rgba(8,9,10,0) 26%),
    radial-gradient(130% 100% at 45% 50%, rgba(8,9,10,0) 58%, rgba(8,9,10,.5) 100%); }
.vp-loader { position: absolute; inset: 0; z-index: 3; display: none; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; color: var(--vp-tinta-2); }
.vp-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: #fff; animation: vp-gira .9s linear infinite; }

.vp-barra { position: absolute; z-index: 2; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; pointer-events: none; }
.vp-barra > * { pointer-events: auto; }
.vp-glass-pill, .vp-logo, .vp-nav, .vp-chip {
  background: rgba(20,21,22,.5); border: 1px solid rgba(255,255,255,.13);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.vp-logo { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--vp-tinta); }
.vp-nav { display: inline-flex; padding: 3px; border-radius: 999px; }
.vp-nav button { font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  color: var(--vp-tinta-2); background: none; border: 0; cursor: pointer; transition: color .2s, background .2s; }
.vp-nav button:hover { color: var(--vp-tinta); }
.vp-nav button.on { background: linear-gradient(180deg, #3A3C3E, #26282A); color: var(--vp-tinta); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.vp-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.vp-dot--residencial { background: #fff; }
.vp-dot--comercial { background: var(--vp-azul); }
.vp-dot--industrial { background: var(--vp-naranja); }
.vp-dot--aislado { background: #7DD3A0; }
.vp-hora { display: inline-flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: var(--vp-tinta-2); }
.vp-vivo { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--vp-verde); }
.vp-vivo::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--vp-verde); animation: vp-ping 1.2s cubic-bezier(0,0,.2,1) infinite; }
.vp-escena-ttl { position: absolute; z-index: 2; top: 66px; left: 22px; margin: 0; font-size: clamp(34px, 3.4vw, 54px); font-weight: 200; letter-spacing: -0.045em; color: var(--vp-tinta); pointer-events: none; }
.vp-chips { position: absolute; z-index: 2; top: calc(66px + clamp(34px, 3.4vw, 54px) + 30px); left: 22px; display: flex; gap: 8px; pointer-events: none; }
.vp-chip { font-size: 11.5px; color: var(--vp-tinta-2); padding: 6px 12px; border-radius: 999px; }

/* controles de Mapbox en vidrio */
.vp-gl .mapboxgl-ctrl-group { background: rgba(20,21,22,.55); border: 1px solid rgba(255,255,255,.13); border-radius: 999px; box-shadow: none;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow: hidden; }
.vp-gl .mapboxgl-ctrl-group button { width: 34px; height: 34px; }
.vp-gl .mapboxgl-ctrl-group button + button { border-top-color: rgba(255,255,255,.1); }
.vp-gl .mapboxgl-ctrl-icon { filter: invert(1) opacity(.8); }
.vp-gl .mapboxgl-ctrl-bottom-left { left: 8px; bottom: 6px; }
.vp-gl .mapboxgl-ctrl-logo { opacity: .55; transform: scale(.85); transform-origin: left bottom; }
.vp-gl .mapboxgl-ctrl-attrib.mapboxgl-compact { background: rgba(20,21,22,.5); }

/* foco que gira sobre el destacado elegido (Marker de Mapbox) */
.vp-foco { width: 0; height: 0; pointer-events: none; }
.vp-foco .radio { position: absolute; left: -62px; top: -62px; width: 124px; height: 124px; border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,.6); background: radial-gradient(circle, rgba(255,255,255,.1), rgba(255,255,255,.02) 70%);
  animation: vp-gira 40s linear infinite; }
.vp-foco .nucleo { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: #161816; background: rgba(235,238,236,.88); box-shadow: 0 6px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.9);
  animation: vp-nucleo 2.6s ease-in-out infinite; }

.vp-pin { width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  border: 4px solid #fff; background: rgba(10,10,10,.65); box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 4px 14px rgba(0,0,0,.5); }
.vp-pin::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #fff; animation: vp-latido 2.8s ease-out infinite; pointer-events: none; }
.vp-pin.is-oculto { display: none; }
@keyframes vp-latido { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.8); opacity: 0; } }

/* vidrio */
.vp-vidrio { background: rgba(30,34,32,.46); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,.13); border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
  padding: 16px 18px; color: var(--vp-tinta); }
.vp-iris { position: relative; }
.vp-iris::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; mix-blend-mode: screen; opacity: .75;
  background:
    radial-gradient(40% 70% at 0% 85%,  rgba(70,140,255,.36), transparent 70%),
    radial-gradient(35% 60% at 100% 90%, rgba(255,140,60,.32), transparent 70%),
    radial-gradient(30% 50% at 100% 0%,  rgba(120,255,200,.14), transparent 70%);
  animation: vp-iris 7s ease-in-out infinite; }
.vp-flecha { position: absolute; top: 13px; right: 14px; width: 22px; height: 22px; display: grid; place-items: center; color: var(--vp-tinta-2); }
.vp-card-ttl { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--vp-tinta); padding-right: 24px; }
.vp-card-sub { font-size: 11.5px; color: var(--vp-tinta-3); margin: 2px 0 12px; }

/* tarjeta de la planta destacada, pegada al punto (Marker de Mapbox) */
.vp-marca { width: 0; height: 0; }
.vp-planta { position: absolute; left: 76px; top: -52px; width: 236px; transition: opacity .35s; }
.vp-planta.is-oculta { opacity: 0; }
.vp-planta-nom { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; padding-right: 24px; line-height: 1.3; }
.vp-planta-sub { font-size: 11.5px; color: var(--vp-tinta-3); margin: 3px 0 12px; }
.vp-planta-pie { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--vp-tinta-3); }
.vp-planta-pie b { color: var(--vp-tinta); font-weight: 500; }
.vp-planta .vp-num .u { font-size: 12px; }

.vp-gen { position: absolute; z-index: 2; right: 16px; bottom: 16px; width: min(390px, 46%); }
.vp-gen .vp-num { margin: 8px 0 10px; font-size: clamp(36px, 3vw, 46px); }
.vp-barras { width: 100%; height: 70px; display: block; }
.vp-ejes { display: flex; justify-content: space-between; margin-top: 6px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 9.5px; color: var(--vp-tinta-3); }

/* — la columna de tarjetas — */
.vp-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vp-pildoras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vp-pildora { text-align: center; font-size: 12px; color: var(--vp-tinta-2); padding: 9px 8px; border-radius: 999px;
  border: 1px solid var(--vp-linea); background: linear-gradient(180deg, #1a1b1d, #121314); }
.vp-pildora b { color: var(--vp-tinta); font-weight: 500; margin-right: 3px; }
.vp-card { position: relative; border-radius: 22px; border: 1px solid var(--vp-linea); padding: 16px 18px;
  background: linear-gradient(180deg, #1C1D20 0%, #141517 55%, #101112 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.vp-estados { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vp-estado { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: end; column-gap: 10px; }
.vp-estado .vp-num { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.vp-estado-lbl { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--vp-tinta-2); margin-top: 10px; white-space: nowrap; }
.vp-ico { grid-column: 1; grid-row: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.vp-ico--ok { color: var(--vp-verde); background: rgba(75,208,122,.12); animation: vp-respira 3.2s ease-in-out infinite; }
.vp-ico--co2 { color: var(--vp-azul); background: rgba(143,179,217,.12); }
.vp-card > .vp-num { margin-top: 2px; }
.vp-sol { position: relative; height: 104px; margin: 14px 0 20px; }
.vp-sol svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vp-solpunto { position: absolute; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #FFE9B8 0%, #FFC870 70%); animation: vp-sol 3.6s ease-in-out infinite; display: none; }
.vp-solpunto.is-on { display: block; }
.vp-ejes--sol { position: absolute; left: 0; right: 0; bottom: -18px; margin: 0; }

.vp-tipos { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.vp-tipo { display: grid; grid-template-columns: 1fr auto; row-gap: 7px; font-size: 12.5px; color: var(--vp-tinta-2); }
.vp-tipo b { color: var(--vp-tinta); font-weight: 500; }
.vp-tipo span:last-of-type { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: var(--vp-tinta-3); align-self: center; }
.vp-tipo-barra { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.vp-tipo-barra i { display: block; height: 100%; border-radius: inherit; background: currentColor; transform-origin: left; animation: vp-crece 1.2s cubic-bezier(.2,.7,.2,1) both; }

/* — destacados: tarjetas de planta — */
.vp-destacados { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vp-fcard { position: relative; text-align: left; font: inherit; color: var(--vp-tinta); cursor: pointer; padding: 0; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--vp-linea); background: linear-gradient(180deg, #1C1D20 0%, #121315 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: border-color .25s, transform .25s; }
.vp-fcard:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); }
.vp-fcard.is-on { border-color: rgba(255,255,255,.4); }
.vp-fcard-img { position: relative; height: 128px; background-size: cover; background-position: center; filter: saturate(.85) brightness(.9); }
.vp-fcard-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,17,18,.55) 0%, rgba(16,17,18,0) 40%, rgba(16,17,18,.85) 100%); }
.vp-fcard-cab { position: absolute; z-index: 1; top: 12px; left: 14px; right: 40px; }
.vp-fcard-nom { font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.vp-fcard-fecha { margin-top: 3px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; color: rgba(242,243,241,.65); }
.vp-fcard .vp-flecha { z-index: 1; }
.vp-fcard-cuerpo { padding: 10px 14px 14px; }
.vp-fcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--vp-tinta-2); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--vp-linea); background: rgba(255,255,255,.03); }
.vp-tag .vp-vivo { width: 6px; height: 6px; }
.vp-fcard svg { display: block; width: 100%; height: 34px; margin-top: 10px; }

.vp-nota { margin: 16px auto 0; max-width: 70ch; text-align: center; font-size: 12px; color: #6B7073; line-height: 1.5; }

@keyframes vp-ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes vp-gira { to { transform: rotate(360deg); } }
@keyframes vp-nucleo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes vp-iris { 0%, 100% { opacity: .5; } 50% { opacity: .95; } }
@keyframes vp-sol { 0%, 100% { box-shadow: 0 0 18px rgba(255,200,112,.5); } 50% { box-shadow: 0 0 38px 6px rgba(255,200,112,.8); } }
@keyframes vp-respira { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 14px 1px rgba(75,208,122,.45); } }
@keyframes vp-crece { from { transform: scaleX(0); } }

@media (max-width: 1100px) {
  .vp-escena { grid-template-columns: minmax(0, 1fr); }
  .vp-mapa { min-height: 580px; }
  .vp-destacados { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .vp { padding: 96px 12px 72px; }
  .vp-head { margin-bottom: 24px; }
  .vp-escena { padding: 6px; border-radius: 24px; gap: 6px; }
  .vp-mapa { min-height: 600px; border-radius: 20px; }
  .vp-hora { display: none; }
  .vp-nav button { padding: 6px 9px; font-size: 11.5px; }
  .vp-nav button .vp-dot { display: none; }
  .vp-escena-ttl { font-size: 34px; top: 62px; left: 18px; }
  .vp-chips { top: 112px; left: 18px; }
  .vp-planta { width: 200px; padding: 13px 14px; left: -100px; top: 74px; }
  .vp-gen { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 14px 16px; }
  .vp-gen .vp-barras { height: 46px; }
  .vp-destacados { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .vp-fcard-img { height: 96px; }
  .vp-fcard-cuerpo { padding: 8px 10px 12px; }
  .vp-fcard svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vp *, .vp *::before, .vp *::after { animation: none !important; transition: none !important; }
}

/* popup de un punto anónimo */
.vp-popup .mapboxgl-popup-content { background: rgba(20,21,22,.82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.13); border-radius: 14px; padding: 10px 12px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.vp-popup .mapboxgl-popup-tip { display: none; }
.vp-pop { display: grid; gap: 2px; font-size: 11.5px; color: #A4A8A6; }
.vp-pop b { color: #F2F3F1; font-weight: 500; font-size: 12.5px; }
.vp-planta-num { font-size: 44px; }
.vp-planta-sub { color: var(--vp-tinta-2); }
@media (max-width: 640px) { .vp-planta-num { font-size: 36px; } }
.vp-fcard-img::after { background: linear-gradient(180deg, rgba(16,17,18,.78) 0%, rgba(16,17,18,.1) 50%, rgba(16,17,18,.85) 100%); }
.vp .fleet-page-cta .cta-green { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  background: #121314; color: #F2F3F1; font-weight: 500; text-decoration: none; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
.vp .fleet-page-cta .cta-green:hover { background: #26282A; }
@media (max-width: 640px) {
  .vp-logo { display: none; }
  .vp-barra { left: 10px; right: 10px; top: 12px; }
  .vp-nav button { padding: 6px 8px; font-size: 11px; }
  .vp-escena-ttl { top: 56px; }
  .vp-chips { top: 104px; }
  .vp-planta { left: 30px; top: -36px; width: 186px; padding: 12px 13px; }
  .vp-planta-nom { font-size: 12.5px; }
  .vp-planta-num { font-size: 32px; }
  .vp-planta-pie { font-size: 10px; }
  .vp-gen .vp-num { font-size: 32px; margin: 6px 0 8px; }
  .vp-gen .vp-barras { height: 36px; }
  .vp-fcard-nom { font-size: 12px; }
  .vp-fcard-fecha { display: none; }
}
.vp-planta-pie span { white-space: nowrap; }
@media (max-width: 640px) { .vp-planta-pie span:first-child { display: none; } }
