:root {
  --navy: #0b1f36;
  --navy2: #0f2d4d;
  --blue: #1d4f91;
  --green: #2f7a22;
  --green-h: #25641b;
  --green2: #7cc95a;
  --ink: #0e1b2a;
  --mu: #556578;
  --bg: #f4f7fa;
  --card: #fff;
  --ln: #dde5ee;
}
* {
  box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
::selection {
  background: #cdeec0;
  color: var(--ink);
}
body {
  margin: 0;
  font:
    16px/1.55 system-ui,
    'Segoe UI',
    Roboto,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a {
  color: inherit;
}
img {
  display: block;
}
.w {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ln);
}
header .w {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 12px;
}
.wm {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--blue);
}
.wm b {
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.01em;
  display: block;
}
.wm .en {
  color: var(--green);
}
.wm small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mu);
}
nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
}
nav a {
  text-decoration: none;
  color: var(--mu);
}
nav a:hover {
  color: var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 20px;
  border: 0;
}
.btn:hover,
nav a.btn:hover {
  background: var(--green-h);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}
/* Botón de WhatsApp del encabezado (ícono + texto; en celular queda solo el ícono). */
.wa-h {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
}
nav a.wa-h {
  color: var(--ink);
}
.wa-h svg {
  width: 20px;
  height: 20px;
  color: #1a8a4a;
  flex: none;
}
@media (max-width: 860px) {
  header nav a:not(.btn):not(.wa-h) {
    display: none;
  }
  header nav {
    gap: 6px;
  }
  .wa-h {
    width: 44px;
    height: 44px;
    justify-content: center;
    border: 1px solid var(--ln);
    border-radius: 10px;
  }
  .wa-h span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  header .btn {
    padding: 10px 14px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  header .wm small {
    display: none;
  }
  header .wm b {
    font-size: 1.3rem;
    white-space: nowrap;
  }
  header .wm img {
    width: 34px;
    height: auto;
  }
}
@media (max-width: 430px) {
  header .w {
    gap: 8px;
  }
  header .wm {
    gap: 7px;
  }
  header .wm b {
    font-size: 1.05rem;
  }
  header .wm img {
    width: 30px;
  }
  header .btn {
    padding: 10px;
  }
}
@media (max-width: 370px) {
  header .wm span {
    display: none;
  }
}
.btn {
  white-space: nowrap;
}
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(
      90deg,
      rgba(8, 22, 40, 0.92) 0%,
      rgba(8, 22, 40, 0.78) 40%,
      rgba(8, 22, 40, 0.25) 75%,
      rgba(8, 22, 40, 0.1) 100%
    ),
    url('https://images.unsplash.com/flagged/photo-1566838616838-c3a720672aad?w=1920&q=72&auto=format&fit=crop')
      center 70% / cover no-repeat,
    var(--navy);
}
@media (max-width: 860px) {
  .hero {
    background:
      linear-gradient(
        180deg,
        rgba(8, 22, 40, 0.88),
        rgba(8, 22, 40, 0.7) 60%,
        rgba(8, 22, 40, 0.45)
      ),
      url('https://images.unsplash.com/flagged/photo-1566838616838-c3a720672aad?w=900&q=70&auto=format&fit=crop')
        60% 70% / cover no-repeat,
      var(--navy);
  }
}
.credit {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
}
.credit a {
  color: inherit;
}
.hero .w {
  display: grid;
  grid-template-columns: minmax(0, 640px);
  align-items: center;
  min-height: min(86vh, 720px);
  padding-top: 72px;
  padding-bottom: 80px;
  position: relative;
}
@media (max-width: 860px) {
  .hero .w {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 64px;
  }
}
.hero h1 {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hero h1 span {
  color: #9fdc7c;
}
.hero p.lead {
  font-size: 1.15rem;
  color: #d3e1f0;
  max-width: 34em;
  margin: 0 0 26px;
}
.ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.chips {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 30px;
  font-size: 0.92rem;
  color: #d3e1f0;
}
.chips span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chips i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9fdc7c;
}
section {
  padding: 80px 0;
}
.head {
  max-width: 700px;
  margin-bottom: 40px;
}
.head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 10px;
  text-wrap: balance;
}
.head p {
  color: var(--mu);
  margin: 0;
  font-size: 1.05rem;
  text-wrap: pretty;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--ln);
  border-radius: 16px;
  padding: 24px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
/* Tarjetas con página propia: toda la tarjeta es clickeable. */
.card h3 a {
  text-decoration: none;
}
.card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
}
.card:has(h3 a):hover {
  border-color: var(--blue);
  box-shadow: 0 6px 18px rgba(11, 31, 54, 0.08);
}
.card h3 a:focus-visible {
  outline: none;
}
.card h3 a:focus-visible::after {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
/* Tarjetas de soluciones con foto: la foto va arriba, nítida, y el texto abajo sobre azul oscuro. */
.card.foto {
  --banda: 170px;
  color: #fff;
  border-color: transparent;
  background: var(--navy2);
  padding-top: calc(var(--banda) + 4px);
  overflow: hidden;
}
.card.foto::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--banda);
  background:
    linear-gradient(180deg, rgba(15, 45, 77, 0) 60%, var(--navy2) 100%),
    var(--img) var(--pos, center) / cover no-repeat;
}
.card.foto .ico {
  display: none;
}
.card.foto p {
  color: #d3e1f0;
}
.card.foto .mas {
  color: #9fdc7c;
}
.card.foto:hover {
  border-color: #9fdc7c;
}
.card.foto h3 a:focus-visible::after {
  outline-color: #9fdc7c;
}
/* Foto de cada tarjeta (Unsplash, licencia libre; guardadas en /img/). */
.foto-hogar {
  --img: url('/img/hogar-tejas-720.jpg');
  --pos: center 45%;
}
.foto-pymes {
  --img: url('/img/pymes-techo-720.jpg');
  --pos: center 70%;
}
.foto-campo {
  --img: url('/img/campo-paneles-720.jpg');
  --pos: center 55%;
}
.foto-baterias {
  --img: url('/img/baterias-tablero-720.jpg');
  --pos: center 40%;
}
.foto-eficiencia {
  --img: url('/img/eficiencia-tablero-720.jpg');
  --pos: center 40%;
}
.foto-equipos {
  --img: url('/img/equipos-chapa-720.jpg');
  --pos: center 60%;
}
.card .mas {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
}
.card h3 {
  margin: 14px 0 6px;
  font-size: 1.12rem;
}
.card p {
  margin: 0;
  color: var(--mu);
  font-size: 0.95rem;
}
.ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e9f2fb;
  color: var(--blue);
}
.ico svg {
  width: 26px;
  height: 26px;
}
.ben {
  background: #fff;
  border-top: 1px solid var(--ln);
  border-bottom: 1px solid var(--ln);
}
.bl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 960px) {
  .bl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .bl {
    grid-template-columns: 1fr;
  }
}
/* Cada beneficio lleva arriba una foto relacionada (Unsplash, licencia libre; en /img/). */
.bl > div {
  --banda: 150px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--ln);
  border-radius: 16px;
  padding: calc(var(--banda) + 4px) 20px 22px;
}
.bl > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--banda);
  background: var(--img) var(--pos, center) / cover no-repeat;
}
.bl > div .ico {
  display: none;
}
.ben-ahorro {
  --img: url('/img/ben-ahorro-720.jpg');
  --pos: center 55%;
}
.ben-aumentos {
  --img: url('/img/ben-aumentos-720.jpg');
  --pos: 20% 45%;
}
.ben-cortes {
  --img: url('/img/ben-cortes-720.jpg');
  --pos: center 70%;
}
.ben-limpia {
  --img: url('/img/ben-limpia-720.jpg');
  --pos: center 50%;
}
.bl div b {
  display: block;
  font-size: 1.05rem;
  margin: 14px 0 4px;
}
.bl div p {
  margin: 0;
  color: var(--mu);
  font-size: 0.94rem;
}
.bl .ico {
  background: #e3f4dc;
  color: var(--green);
}
/* Los pasos van sobre azul, unidos por un cable como el del circuito. */
#como {
  background: var(--navy);
  color: #fff;
}
#como .head p,
#como .steps p {
  color: #c3d1e0;
}
#como + section {
  padding-top: 80px;
}
.steps {
  counter-reset: s;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding-right: 24px;
}
.steps li:before {
  content: counter(s);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border: 2px solid var(--green2);
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
.steps li:first-child:before,
.steps li:last-child:before {
  background: var(--green2);
  color: var(--navy);
}
.steps li:not(:last-child):after {
  content: '';
  position: absolute;
  top: 20px;
  left: 44px;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, #f5b82e 0 10px, transparent 10px 16px);
}
.steps b {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}
.steps p {
  margin: 0;
  font-size: 0.95rem;
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .steps li {
    min-height: 44px;
    padding: 0 0 32px 64px;
  }
  .steps li:last-child {
    padding-bottom: 0;
  }
  .steps li:before {
    position: absolute;
    top: 0;
    left: 0;
  }
  .steps li:not(:last-child):after {
    top: 44px;
    bottom: 0;
    left: 20px;
    right: auto;
    width: 4px;
    height: auto;
    background: repeating-linear-gradient(180deg, #f5b82e 0 10px, transparent 10px 16px);
  }
}
/* Bloques de lectura: alineados al mismo borde izquierdo que el resto, con ancho cómodo. */
.prose > *,
.faq > * {
  max-width: 760px;
}
.pt0 {
  padding-top: 0;
}
details {
  background: #fff;
  border: 1px solid var(--ln);
  border-radius: 12px;
  margin-bottom: 10px;
}
summary {
  cursor: pointer;
  padding: 16px 18px;
  min-height: 44px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary:after {
  content: '+';
  color: var(--blue);
  font-size: 1.3rem;
  line-height: 1;
}
details[open] summary:after {
  content: '–';
}
details p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--mu);
}
.cta {
  color: #fff;
  background: linear-gradient(160deg, var(--navy2), var(--blue));
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
}
.cta h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.cta p {
  color: #d3e1f0;
  margin: 0 auto 24px;
  max-width: 36em;
}
footer {
  padding: 36px 0 48px;
  color: var(--mu);
  font-size: 0.9rem;
}
footer .w {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
footer .wm b {
  font-size: 1.2rem;
}
.fnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  font-size: 0.9rem;
}
.fnav a {
  padding: 10px 6px;
  color: var(--mu);
  text-decoration: none;
}
.fnav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Anillo de foco: azul oscuro sobre fondos claros, verde claro sobre los bloques oscuros. */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.hero :focus-visible,
.ph :focus-visible,
.cta :focus-visible {
  outline-color: #9fdc7c;
}
@media (max-width: 480px) {
  .hero .ctas .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}
p,
li,
summary {
  text-wrap: pretty;
}
/* ===== Cómo funciona: circuito solar interactivo (#como-funciona, assets/js/circuito.js) ===== */
.circ-controles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.circ:not(.js) .circ-controles {
  visibility: hidden;
}
.circ-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #e6edf4;
  border-radius: 12px;
  padding: 4px;
}
.circ-seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--mu);
  cursor: pointer;
  touch-action: manipulation;
}
.circ-seg button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.circ-seg button[aria-pressed='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(11, 31, 54, 0.15);
}
.circ-seg-bat button[aria-pressed='true'] {
  background: var(--navy2);
  color: #fff;
}
.circ-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}
@media (max-width: 900px) {
  .circ-grid {
    grid-template-columns: 1fr;
  }
}
.circ-dibujo {
  background: #fff;
  border: 1px solid var(--ln);
  border-radius: 18px;
  padding: 10px;
}
.circ-svg {
  display: block;
  width: 100%;
  height: auto;
}
.circ-leyenda {
  list-style: none;
  margin: 0;
  padding: 8px 6px 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.84rem;
  color: var(--mu);
}
.circ-leyenda li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.circ-leyenda i,
.circ-num small i {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 2px;
}
.circ-num small i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.c-sol,
.n-sol small i {
  background: #f5b82e;
}
.c-ac,
.n-ac small i {
  background: #3fbf5a;
}
.c-bat,
.n-bat small i {
  background: #ff8a3d;
}
.c-red,
.n-red small i {
  background: #4f8fe0;
}
.circ-lado {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.circ-titulo {
  background: var(--navy2);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
}
.circ-titulo b {
  display: block;
  color: #9fdc7c;
  font-size: 1.1rem;
  margin-bottom: 2px;
}
.circ-titulo span {
  color: #d3e1f0;
}
.circ-ficha {
  background: #fff;
  border: 1px solid var(--ln);
  border-radius: 14px;
  padding: 16px 18px;
}
.circ-ficha h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
}
.circ-ficha p {
  margin: 6px 0 0;
  color: #33465a;
}
.circ-nums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.circ-num {
  background: #fff;
  border: 1px solid var(--ln);
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 0;
}
.circ-num small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mu);
  font-weight: 600;
  font-size: 0.82rem;
}
.circ-num strong {
  display: block;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 2px;
}
.circ-num span {
  font-size: 0.88rem;
  color: var(--mu);
}
.circ-num.off strong {
  color: #8796a6;
}
.circ-ej {
  font-size: 0.82rem;
  color: var(--mu);
  margin: -4px 0 0;
}
.circ-cierre {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  background: #eef7ea;
  border: 1px solid #cfe6c5;
  border-radius: 14px;
  padding: 16px 18px;
}
.circ-cierre p {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
}
.circ-nota {
  font-size: 0.8rem;
  color: var(--mu);
  margin: 14px 0 0;
  max-width: 80ch;
}
.circ-nota a {
  color: var(--blue);
}
/* Dibujo SVG */
.circ-svg .lbl {
  font:
    700 15px system-ui,
    'Segoe UI',
    sans-serif;
  fill: #1b2b3c;
  pointer-events: none;
}
.circ-svg .lbl.sm {
  font-size: 13px;
  font-weight: 600;
  fill: #4f5f72;
}
/* En celular el dibujo se achica a ~55 %: los rótulos se agrandan para que se lean (≈ 10–11 px reales). */
@media (max-width: 600px) {
  .circ-svg .lbl {
    font-size: 19px;
  }
  .circ-svg .lbl.sm {
    font-size: 17px;
  }
}
.circ-svg.noche .lbl.out {
  fill: #e6edf4;
}
.circ-svg.noche .lbl.sm.out {
  fill: #b9c8d8;
}
.circ-svg .cable {
  fill: none;
  stroke: #2d3138;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.circ-svg .flow {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 4 12;
  opacity: 0;
  transition: opacity 0.35s;
}
.circ-svg .flow.on {
  opacity: 1;
}
.circ-svg .flow.sol {
  stroke: #f5b82e;
}
.circ-svg .flow.ac {
  stroke: #3fbf5a;
}
.circ-svg .flow.grid {
  stroke: #4f8fe0;
}
.circ-svg .flow.bat {
  stroke: #ff8a3d;
}
@media (prefers-reduced-motion: no-preference) {
  .circ-svg .flow.on {
    animation: circ-run var(--spd, 0.9s) linear infinite;
  }
  .circ-svg .flow.rev {
    animation-direction: reverse;
  }
}
.circ-svg.en-pausa .flow {
  animation-play-state: paused;
}
@keyframes circ-run {
  to {
    stroke-dashoffset: -16;
  }
}
.circ-svg .comp {
  cursor: pointer;
  transition: opacity 0.4s;
}
/* El filtro CSS reemplaza la sombra del SVG: se repite la sombra y se suma el brillo verde. */
.circ-svg .comp:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.circ-svg .comp:hover .hl,
.circ-svg .comp.sel .hl {
  filter: drop-shadow(0 6px 7px rgba(11, 31, 54, 0.18)) drop-shadow(0 0 6px rgba(63, 191, 90, 0.9));
}
.circ-svg .gone,
.circ-svg.sin-bat .bat-cable {
  opacity: 0.12;
}
.circ-svg .bat-cable {
  transition: opacity 0.4s;
}
.circ-svg .gone .comp {
  pointer-events: none;
}
.circ-svg .cut {
  opacity: 0;
  transition: opacity 0.4s;
}
.circ-svg.corte .cut {
  opacity: 1;
}
.circ-svg.corte .meter {
  opacity: 0.45;
}
#circ-sky {
  transition: fill 0.6s;
}
#circ-sol,
#circ-luna,
#circ-nube,
#circ-estrellas {
  transition: opacity 0.6s;
}
/* En pantallas angostas el texto de los botones puede ocupar dos líneas. */
@media (max-width: 400px) {
  section .btn {
    white-space: normal;
    text-align: center;
  }
}
