/* ========================================================================
   RP CONNECT — CAPA DE MOVIMIENTO (motion layer)
   No altera la paleta: solo usa blanco, negro y el azul de marca existente.
   Archivo adicional; styles.css permanece intacto.
   ======================================================================== */

/* ---------- 1. LÁMPARA DEL CURSOR --------------------------------------- */
.rp-lamp,
.rp-lamp-hot {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity .45s ease;
  will-change: transform, opacity;
}
.rp-lamp {
  width: 820px; height: 820px;
  margin: -410px 0 0 -410px;
  background: radial-gradient(circle closest-side,
      rgba(255,255,255,.95) 0%,
      rgba(255,255,255,.62) 26%,
      rgba(255,255,255,.26) 48%,
      rgba(255,255,255,0) 72%);
  mix-blend-mode: soft-light;
}
.rp-lamp-hot {
  width: 300px; height: 300px;
  margin: -150px 0 0 -150px;
  z-index: 9999;
  background: radial-gradient(circle closest-side,
      rgba(255,255,255,.55) 0%,
      rgba(255,255,255,.18) 40%,
      rgba(255,255,255,0) 70%);
  mix-blend-mode: overlay;
}
/* Sobre fondo claro la lámpara es tenue: no lava los textos.
   Sobre las zonas oscuras (hero, foto de campo) abre todo el haz. */
body.rp-lamp-on .rp-lamp { opacity: .30; }
body.rp-lamp-on .rp-lamp-hot { opacity: .30; }
body.rp-lamp-on.rp-lamp-dark .rp-lamp { opacity: 1; }
body.rp-lamp-on.rp-lamp-dark .rp-lamp-hot { opacity: 1; }

/* Haz de luz sobre las zonas oscuras (hero / foto de campo) */
.rp-beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .5s ease;
  mix-blend-mode: screen;
  background: radial-gradient(520px 520px at var(--bx, 50%) var(--by, 50%),
      rgba(255,255,255,.30) 0%,
      rgba(255,255,255,.14) 30%,
      rgba(255,255,255,.08) 52%,
      rgba(255,255,255,0) 74%);
}
.rp-beam-active .rp-beam { opacity: 1; }

/* ---------- 2. DATOS EN MOVIMIENTO (canvas) ---------------------------- */
.rp-data-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  display: block;
}
.hero-enterprise .hero-content { position: relative; z-index: 3; }
.hero-enterprise .hero-caption { position: absolute; z-index: 3; }
.proof-band .wrap-wide,
.institutional-cta .wrap-wide,
.energy-balance-section .wrap-wide,
.page-hero .wrap-wide,
.page-hero .wrap { position: relative; z-index: 2; }
.proof-band,
.institutional-cta,
.page-hero,
.field-photo,
.utility-strip,
.energy-balance-section { position: relative; overflow: hidden; }

/* Barrido de telemetría en el borde superior de las bandas */
.rp-scan {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}
.rp-scan::before {
  content: "";
  position: absolute;
  top: 0; left: -34%;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, rgba(193,130,52,0), rgba(193,130,52,.95), rgba(193,130,52,0));
  animation: rp-scan-run 5.4s linear infinite;
}
@keyframes rp-scan-run { to { left: 100%; } }

/* ---------- 3. PIEZAS ILUMINADAS POR EL CURSOR ------------------------- */
.rp-lit { position: relative; isolation: isolate; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease, border-color .45s ease; }
.rp-lit::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(240px 240px at var(--mx, 50%) var(--my, 50%),
      rgba(193,130,52,.20) 0%,
      rgba(193,130,52,.07) 38%,
      rgba(193,130,52,0) 70%);
}
.rp-lit.rp-near::after { opacity: 1; }
.offer-card.rp-lit.rp-near,
.card.rp-lit.rp-near,
.metric.rp-lit.rp-near,
.contact-option.rp-lit.rp-near,
.faq details.rp-lit.rp-near {
  transform: translateY(-4px);
  border-color: #d8b483;
  box-shadow: 0 18px 44px rgba(120,80,30,.20);
}
.offer-card { transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease; }
.offer-card .offer-image { transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter .6s ease; will-change: transform; }
.offer-card.rp-near .offer-image { transform: scale(1.055); filter: brightness(1.07); }

/* Fila de datos: pulso que recorre el borde inferior */
.utility-item,
.industry-list a,
.list li { position: relative; overflow: hidden; }
.utility-item::after,
.industry-list a::after {
  content: "";
  position: absolute;
  left: -40%; bottom: 0;
  width: 40%; height: 2px;
  background: linear-gradient(90deg, rgba(193,130,52,0), rgba(193,130,52,.95), rgba(193,130,52,0));
  opacity: 0;
}
.utility-item:hover::after,
.industry-list a:hover::after { opacity: 1; animation: rp-row-run 1.15s linear infinite; }
@keyframes rp-row-run { from { left: -40%; } to { left: 100%; } }

/* Números y cifras con latido de dato vivo */
.proof-stat b::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 9px;
  border-radius: 50%;
  background: #0967c9;
  vertical-align: middle;
  animation: rp-pulse 2.4s ease-in-out infinite;
}
@keyframes rp-pulse {
  0%, 100% { opacity: .25; transform: scale(.82); }
  50%      { opacity: 1;   transform: scale(1.12); }
}
.proof-stat { transition: background .4s ease, transform .4s ease; }
.proof-stat:hover { background: rgba(255,255,255,.7); transform: translateY(-2px); }

/* ---------- 4. ENTRADA AL HACER SCROLL -------------------------------- */
[data-rp-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .85s cubic-bezier(.2,.7,.2,1), transform .85s cubic-bezier(.2,.7,.2,1);
}
[data-rp-reveal].rp-in { opacity: 1; transform: none; }
[data-rp-reveal].rp-d1 { transition-delay: .09s; }
[data-rp-reveal].rp-d2 { transition-delay: .18s; }
[data-rp-reveal].rp-d3 { transition-delay: .27s; }

/* Hero: entrada y respiración lenta de la fotografía */
.hero-enterprise .eyebrow,
.hero-enterprise h1,
.hero-enterprise .lead,
.hero-enterprise .btn,
.hero-caption {
  animation: rp-hero-in 1.15s cubic-bezier(.2,.7,.2,1) both;
}
.hero-enterprise h1 { animation-delay: .1s; }
.hero-enterprise .lead { animation-delay: .2s; }
.hero-enterprise .btn { animation-delay: .3s; }
.hero-caption { animation-delay: .45s; }
@keyframes rp-hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero-enterprise { animation: rp-drift 36s ease-in-out infinite alternate; }
@keyframes rp-drift {
  from { background-position: center center, 46% 42%; }
  to   { background-position: center center, 54% 42%; }
}

/* Botones y enlaces: respuesta más viva sin cambiar color */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.28), rgba(255,255,255,0));
  transform: skewX(-18deg);
  opacity: 0;
}
.btn:hover::after { opacity: 1; animation: rp-sheen .85s ease forwards; }
.btn-ghost:hover::after { background: linear-gradient(100deg, rgba(193,130,52,0), rgba(193,130,52,.22), rgba(193,130,52,0)); }
@keyframes rp-sheen { to { left: 115%; } }
.offer-body a span,
.text-link span,
.btn span { transition: transform .3s ease; display: inline-block; }
.offer-body a:hover span,
.text-link:hover span,
.btn:hover span { transform: translateX(5px); }

.nav-links a { position: relative; }
.nav-links a::before {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: 0;
  height: 3px;
  background: #0967c9;
  transition: left .3s ease, right .3s ease;
}
.nav-links a:hover::before { left: 0; right: 0; }

/* ---------- 5. ACCESIBILIDAD / MÓVIL ---------------------------------- */
@media (hover: none), (pointer: coarse) {
  .rp-lamp, .rp-lamp-hot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-lamp, .rp-lamp-hot, .rp-beam, .rp-data-canvas, .rp-scan { display: none !important; }
  .hero-enterprise { animation: none; }
  .hero-enterprise .eyebrow,
  .hero-enterprise h1,
  .hero-enterprise .lead,
  .hero-enterprise .btn,
  .hero-caption { animation: none; }
  [data-rp-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .proof-stat b::after { animation: none; opacity: .8; }
}


/* ========================================================================
   FOTOGRAFÍA SELECCIONADA — solo ubicación de imágenes.
   No altera estructura, textos ni paleta: mantiene los mismos degradados
   y fondos que ya definía styles.css.
   ======================================================================== */

/* Portada */
.hero-enterprise {
  background:
    linear-gradient(90deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.80) 44%, rgba(0,0,0,.30) 78%, rgba(0,0,0,.14) 100%),
    url("assets/fotos/hero/01-36566099.webp") center 46%/cover no-repeat;
}

/* Tarjetas de capacidades */
.offer-systems .offer-image { background-image: url("assets/fotos/hero/06-32529341-m.webp"); }
.offer-solar   .offer-image { background-image: url("assets/fotos/hero/028-foto-px9893731-m.webp"); }
.offer-service .offer-image { background-image: url("assets/fotos/seguridad/10-3862132-m.webp"); }

/* Banda "Del campo a la decisión" */
.field-photo {
  background: url("assets/fotos/hero/022-foto-px17585996.webp") center/cover no-repeat;
}


/* Cabeceras de página interna: imagen a la derecha, fondo y texto sin cambios */
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(44%, 640px);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 38%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 38%, #000 100%);
  pointer-events: none;
  z-index: 1;
}
.pg-servicio   .page-hero::after { background-image: url("assets/fotos/servicio/039-render-pb6873014.webp"); }
.pg-tecnologia .page-hero::after { background-image: url("assets/fotos/tecnologia/034-foto-px18379732.webp"); }
.pg-seguridad  .page-hero::after { background-image: url("assets/fotos/hero/033-ilustracion-pb3243375.webp"); }
.pg-index .page-hero::after,
body:not(.pg-servicio):not(.pg-tecnologia):not(.pg-seguridad) .page-hero::after { display: none; }

/* Sección de consola en Tecnología: visualización de datos como fondo */
.pg-tecnologia main > section:nth-of-type(3) { position: relative; overflow: hidden; }
.pg-tecnologia main > section:nth-of-type(3)::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(60%, 860px);
  background: url("assets/fotos/tecnologia/046-ilustracion-pb9982563.webp") center/cover no-repeat;
  opacity: .18;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  pointer-events: none;
  z-index: 0;
}
.pg-tecnologia main > section:nth-of-type(3) .wrap { position: relative; z-index: 2; }

@media (max-width: 860px) {
  .page-hero::after { width: 100%; opacity: .13; -webkit-mask-image: none; mask-image: none; }
  .pg-tecnologia main > section:nth-of-type(3)::before { width: 100%; opacity: .10; -webkit-mask-image: none; mask-image: none; }
}


/* ========================================================================
   MISMO LENGUAJE QUE LA PORTADA
   Cabeceras fotográficas con degradado negro, luz cálida en la imagen y
   un único acento ámbar. Nada de gris apagado, nada de azul suelto.
   ======================================================================== */
:root {
  --amb: #d2913f;
  --amb-claro: #e8b264;
  --amb-oscuro: #a9咖;
}
:root { --amb-oscuro: #8a5717; }

/* Cabecera de cada página interna, con la estructura del landing */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 440px;
  padding: 96px 0 !important;
  color: #fff;
  background: #0b0d10 !important;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pg-img, none) center 50%/cover no-repeat;
  filter: grayscale(1) sepia(.62) saturate(2.1) hue-rotate(-6deg) contrast(1.06) brightness(1.04);
  z-index: 0;
}
.page-hero::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 0;
  width: auto !important;
  opacity: 1 !important;
  background: linear-gradient(90deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.80) 42%, rgba(0,0,0,.36) 76%, rgba(0,0,0,.18) 100%) !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  z-index: 1;
  pointer-events: none;
}
.page-hero h1 { color: #fff !important; }
.page-hero .lead,
.page-hero .sub,
.page-hero p:not(.crumbs):not(.kicker):not(.eyebrow) { color: rgba(255,255,255,.88) !important; }
.page-hero .crumbs { color: rgba(255,255,255,.62) !important; }
.page-hero .kicker,
.page-hero .eyebrow,
.page-hero .label { color: var(--amb-claro) !important; }
.page-hero .wrap, .page-hero .wrap-wide { position: relative; z-index: 3; }

.pg-servicio   { --pg-img: url("assets/fotos/servicio/039-render-pb6873014.webp"); }
.pg-tecnologia { --pg-img: url("assets/fotos/tecnologia/034-foto-px18379732.webp"); }
.pg-seguridad  { --pg-img: url("assets/fotos/hero/033-ilustracion-pb3243375.webp"); }
.pg-activos    { --pg-img: url("assets/fotos/hero/04-236089.webp"); }
.pg-empresa    { --pg-img: url("assets/fotos/hero/02-18468536.webp"); }
.pg-conversemos{ --pg-img: url("assets/fotos/hero/03-12809142.webp"); }
.pg-gracias    { --pg-img: url("assets/fotos/hero/10-25537595.webp"); }

/* Luz cálida común a toda la fotografía del sitio */
.offer-image,
.field-photo,
.page-hero {
  filter: none;
}
.offer-image {
  filter: saturate(1.12) sepia(.16) hue-rotate(-8deg) contrast(1.05) brightness(1.03);
}
.field-photo {
  filter: saturate(1.12) sepia(.16) hue-rotate(-8deg) contrast(1.05) brightness(1.03);
}
.offer-card.rp-near .offer-image {
  filter: saturate(1.22) sepia(.12) hue-rotate(-8deg) contrast(1.07) brightness(1.09);
}
.pg-tecnologia main > section:nth-of-type(3)::before {
  filter: grayscale(1) sepia(.62) saturate(2.1) hue-rotate(-6deg) contrast(1.06) brightness(1.04);
  opacity: .16;
}

/* Acento único: ámbar donde antes había azul suelto */
.eyebrow-blue,
.proof-intro .eyebrow,
.field-copy .eyebrow,
.institutional-cta .eyebrow,
.label,
.utility-item > span,
.industry-list span,
.offer-body a,
.text-link,
.asset a,
.price,
footer a:hover,
.crumbs a,
.kicker { color: var(--amb-oscuro) !important; }
.proof-stat b::after { background: var(--amb); }
.nav-links a::before { background: var(--amb-oscuro); }
.energy-balance-points li::before { background: var(--amb-oscuro); }
.rp-scan::before {
  background: linear-gradient(90deg, rgba(210,145,63,0), rgba(210,145,63,.9), rgba(210,145,63,0));
}
.num { background: #14181d; color: #f0c78a; }
.tag-med { background: rgba(210,145,63,.16); color: #9a6a1f; }

/* Bandas claras: un punto de calidez, sin oscurecerlas */
.proof-band { background: #f7f4ef; }
.institutional-cta { background: #f2ece3; }
.energy-balance { background: #f7f4ef; border-left-color: #14181d; }
.utility-contact { background: #f7f2ea; }
.utility-item:hover { background: #faf6f0; }
.industry-list a:hover { background: #faf6f0; }
.proof-stat:hover { background: rgba(255,255,255,.75); }

@media (max-width: 860px) {
  .page-hero { min-height: 360px; padding: 72px 0 !important; }
}


/* Contacto y acuse: su cabecera contiene el formulario, así que conserva el
   lienzo claro original para no comprometer la lectura de los campos. */
.pg-conversemos .page-hero,
.pg-gracias .page-hero {
  display: block;
  min-height: 0;
  padding: 72px 0 48px !important;
  color: inherit;
  background: var(--brand-soft) !important;
}
.pg-conversemos .page-hero::before,
.pg-gracias .page-hero::before,
.pg-conversemos .page-hero::after,
.pg-gracias .page-hero::after { display: none !important; }
.pg-conversemos .page-hero h1,
.pg-gracias .page-hero h1 { color: #112b3c !important; }
.pg-conversemos .page-hero .lead,
.pg-conversemos .page-hero .sub,
.pg-conversemos .page-hero p:not(.crumbs):not(.kicker):not(.eyebrow),
.pg-gracias .page-hero .lead,
.pg-gracias .page-hero p:not(.crumbs):not(.kicker):not(.eyebrow) { color: #526873 !important; }
.pg-conversemos .page-hero .crumbs,
.pg-gracias .page-hero .crumbs { color: #667a85 !important; }
.pg-conversemos .page-hero .kicker,
.pg-gracias .page-hero .kicker { color: var(--amb-oscuro) !important; }


/* ========================================================================
   SELECTOR DE IDIOMA
   ES y EN a la vista; el resto en un desplegable sobrio.
   ======================================================================== */
.langsel { display: flex; align-items: center; gap: 2px; }
.langsel-pill {
  display: inline-flex; align-items: center;
  padding: 7px 9px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
  color: #5b6870; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.langsel-pill:hover { color: var(--brand-black, #050505); }
.langsel-pill.is-on { color: var(--brand-black, #050505); border-bottom-color: var(--amb-oscuro, #a96f22); }
.langsel-more { position: relative; margin-left: 6px; }
.langsel-more > summary {
  list-style: none; cursor: pointer;
  padding: 7px 10px;
  border: 1px solid #d3d8dc; border-radius: 2px;
  font-size: 12px; font-weight: 700; color: #3b464d;
  white-space: nowrap; transition: border-color .2s, color .2s;
}
.langsel-more > summary::-webkit-details-marker { display: none; }
.langsel-more > summary::after { content: " ▾"; font-size: 10px; color: #8b969d; }
.langsel-more[open] > summary,
.langsel-more > summary:hover { border-color: var(--amb-oscuro, #a96f22); color: var(--brand-black, #050505); }
.langsel-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 168px; padding: 6px;
  background: #fff; border: 1px solid #d3d8dc;
  box-shadow: 0 16px 38px rgba(18,40,54,.16);
}
.langsel-menu a {
  display: block; padding: 9px 11px;
  font-size: 13px; color: #33404a;
  transition: background .18s, color .18s;
}
.langsel-menu a:hover { background: #f6f1e9; color: var(--brand-black, #050505); }
.langsel-menu a.is-on { color: var(--amb-oscuro, #a96f22); font-weight: 800; }

@media (max-width: 1120px) { .langsel-more > summary { padding: 7px 8px; } }
@media (max-width: 560px) {
  .langsel { display: flex; }
  .langsel-more > summary { font-size: 0; padding: 7px 9px; }
  .langsel-more > summary::after { content: "▾"; font-size: 11px; }
}


/* Imágenes ligeras en pantallas pequeñas */
@media (max-width: 860px) {
  .pg-empresa { --pg-img: url("assets/fotos/hero/02-18468536-m.webp"); }
  .offer-solar   .offer-image { background-image: url("assets/fotos/hero/028-foto-px9893731-m.webp"); }
  .pg-conversemos { --pg-img: url("assets/fotos/hero/03-12809142-m.webp"); }
  .pg-seguridad  .page-hero::after { background-image: url("assets/fotos/hero/033-ilustracion-pb3243375-m.webp"); }
  .pg-seguridad { --pg-img: url("assets/fotos/hero/033-ilustracion-pb3243375-m.webp"); }
  .pg-activos { --pg-img: url("assets/fotos/hero/04-236089-m.webp"); }
  .offer-systems .offer-image { background-image: url("assets/fotos/hero/06-32529341-m.webp"); }
  .pg-gracias { --pg-img: url("assets/fotos/hero/10-25537595-m.webp"); }
  .offer-service .offer-image { background-image: url("assets/fotos/seguridad/10-3862132-m.webp"); }
  .pg-servicio   .page-hero::after { background-image: url("assets/fotos/servicio/039-render-pb6873014-m.webp"); }
  .pg-servicio { --pg-img: url("assets/fotos/servicio/039-render-pb6873014-m.webp"); }
  .pg-tecnologia .page-hero::after { background-image: url("assets/fotos/tecnologia/034-foto-px18379732-m.webp"); }
  .pg-tecnologia { --pg-img: url("assets/fotos/tecnologia/034-foto-px18379732-m.webp"); }
}

/* Contraste de la leyenda del hero */
.hero-caption {
  text-shadow: 0 1px 2px rgba(0,0,0,.85), 0 0 22px rgba(0,0,0,.7);
  color: rgba(255,255,255,.9) !important;
}
.hero-enterprise::before {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events: none; z-index: 2;
}

.pg-404 { --pg-img: url("assets/fotos/hero/10-25537595.webp"); }
.pg-404 .hero-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top: 26px; }
.pg-404 .btn-ghost { border-color: rgba(255,255,255,.5); color:#fff; }
