/* solar-wizard.css — la página de Solar Wizard: qué es y sus proyectos en 3D.
 * Va encima de styles.css (cabecera, tipografía), como la calculadora. */

body.sw-body { background: #fffcf9; }
.sw-main { max-width: 1180px; margin: 0 auto; padding: 130px 24px 70px; }

.sw-hero { max-width: 860px; }
.sw-lockup { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sw-lockup img { width: 52px; height: 52px; border-radius: 14px; background: #fff; box-shadow: 0 2px 14px rgba(31, 39, 27, 0.08); padding: 6px; box-sizing: border-box; }
.sw-lockup b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 24px; letter-spacing: -0.02em; color: #1F271B; }
.sw-lockup small { display: block; font-size: 12px; color: #9aa0a6; letter-spacing: 0.06em; text-transform: uppercase; }
.sw-hero h1 {
  margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.08; letter-spacing: -0.03em; color: #1F271B;
}
.sw-lead { margin: 16px 0 0; font-size: 17px; line-height: 1.6; color: #4b5563; max-width: 70ch; }
.sw-pasos { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sw-pasos li { background: #fff; border-radius: 16px; padding: 14px 14px 16px; box-shadow: 0 2px 16px rgba(31, 39, 27, 0.05); }
.sw-pasos b { display: block; font-size: 14px; color: #1F271B; margin-bottom: 4px; }
.sw-pasos span { font-size: 12.5px; line-height: 1.45; color: #6b7280; }

.sw-proyectos { margin-top: 56px; }
.sw-proyectos h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 28px; letter-spacing: -0.02em; color: #1F271B; }
.sw-nota { margin: 6px 0 0; font-size: 14px; color: #6b7280; }
.sw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.sw-proy { margin: 0; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 2px 20px rgba(31, 39, 27, 0.06); display: flex; flex-direction: column; }
.sw-proy img { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; display: block; background: #e9e4dc; }
.sw-proy > div { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.sw-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #2aa79e; }
.sw-proy b { font-family: 'Space Grotesk', sans-serif; font-size: 19px; color: #1F271B; }
.sw-proy small { font-size: 12.5px; color: #6b7280; }
.sw-proy button {
  margin-top: 10px; align-self: flex-start; font: inherit; font-size: 14px; font-weight: 700;
  padding: 11px 18px; border-radius: 999px; border: none; background: #1F271B; color: #fff; cursor: pointer;
}
.sw-proy button:hover { background: #ff4500; }
.sw-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.sw-btn {
  display: inline-flex; padding: 15px 24px; border-radius: 999px; background: #ff4500; color: #fff;
  text-decoration: none; font-weight: 700; font-size: 15px; box-shadow: 0 8px 22px rgba(255, 69, 0, 0.28);
}
.sw-btn-2 { background: #fff; color: #1F271B; border: 1px solid #e4ded6; box-shadow: none; }

.sw-visor { position: fixed; inset: 0; z-index: 5000; background: #11151a; display: flex; flex-direction: column; }
.sw-visor[hidden] { display: none; }
.sw-visor-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; color: #fff; font-size: 15px; }
.sw-visor-bar button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: transparent; color: #fff; font-size: 24px; cursor: pointer; }
.sw-visor iframe { flex: 1; width: 100%; border: 0; }

/* ── Por dentro: vistas del programa en ventanas de app ─────────────────
   Los datos son los del proyecto de Barranquilla. solar-wizard.js pone los
   módulos y el mapa de sombras, y añade .sw-vivo cuando la ventana entra en
   pantalla: entonces se «ejecuta» (módulos, barras, curva). Con html.sw-anim
   las piezas esperan ocultas; sin JS se ven quietas y completas. */
.sw-cta-hero { margin-top: 22px; }
.sw-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #ff4500; margin-bottom: 6px; }
.sw-app { margin-top: 64px; }
.sw-app h2, .sw-demo h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 28px; letter-spacing: -0.02em; color: #1F271B; }
.sw-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.sw-win { margin: 0; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 20px rgba(31, 39, 27, 0.07); border: 1px solid #efe9e1; display: flex; flex-direction: column; }
.sw-win-ancha { grid-column: span 2; }
.sw-win-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #1F271B; color: #c9cfc6; font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; }
.sw-win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #48523f; flex: none; }
.sw-win-bar i:first-child { background: #ff5f4a; }
.sw-win-bar span { margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-win-cuerpo { padding: 14px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.sw-win svg { display: block; width: 100%; height: auto; }
.sw-win text { font-family: 'Satoshi', system-ui, sans-serif; }

/* Optimización */
.sw-opt { flex-direction: row; align-items: center; gap: 18px; }
.sw-opt svg { flex: 1.35; min-width: 0; }
.sw-cub { fill: #e9e4dc; stroke: #d6cfc4; }
.sw-retiro { fill: none; stroke: #b9b2a6; stroke-dasharray: 3 3; }
.sw-obst { fill: #cfc7bb; stroke: #a99f91; }
.sw-mods rect { fill: #24395f; stroke: #8fa6cf; stroke-width: 0.6; }
.sw-cota { font-size: 8px; fill: #9aa0a6; text-anchor: middle; }
.sw-rank { flex: 1; min-width: 0; }
.sw-rank-t b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 17px; color: #1F271B; }
.sw-rank-t small { font-size: 12px; color: #6b7280; }
.sw-rank ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sw-rank li, .sw-perd li { display: grid; grid-template-columns: minmax(0, 1fr) 46px; grid-template-areas: "n v" "b b"; gap: 3px 8px; align-items: center; font-size: 12.5px; color: #4b5563; }
.sw-rank li span, .sw-perd li span { grid-area: n; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-rank li em { font-style: normal; }
.sw-rank li b, .sw-perd li b { grid-area: v; text-align: right; font-family: 'Space Grotesk', sans-serif; color: #1F271B; }
.sw-rank li i, .sw-perd li i { grid-area: b; height: 6px; border-radius: 6px; background: #f1ece5; position: relative; overflow: hidden; }
.sw-rank li i::after, .sw-perd li i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: #c9c2b7; }
.sw-rank li.on { color: #1F271B; font-weight: 700; }
.sw-rank li.on i::after { background: linear-gradient(90deg, #ff4500, #f4a418); }
.sw-rank-pie { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: #6b7280; }

/* Sombras */
.sw-arco { fill: none; stroke: #f4a418; stroke-width: 1.4; stroke-dasharray: 3 4; }
.sw-sol { fill: #f8c84a; stroke: #fff; stroke-width: 2; }
.sw-rampa { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #6b7280; }
.sw-rampa i { flex: 1; height: 6px; border-radius: 6px; background: linear-gradient(90deg, #5b3a8c, #a2407a, #e2603f, #f49b2c, #f8c84a, #fbe38a); }

/* Pérdidas */
.sw-perd { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.sw-perd li { font-size: 12px; }
.sw-perd li b { font-size: 12px; color: #c2410c; }
.sw-perd li:first-child b { color: #1F271B; }
.sw-perd li i::after { background: #f4a418; }
.sw-perd li.fin { margin-top: 4px; padding-top: 6px; border-top: 1px solid #efe9e1; font-weight: 700; color: #1F271B; }
.sw-perd li.fin b { color: #2aa79e; font-size: 13.5px; }
.sw-perd li.fin i::after { background: #2aa79e; }

/* Unifilar */
.sw-uni text { font-size: 8.5px; font-weight: 700; fill: #1F271B; text-anchor: middle; }
.sw-uni text.s { font-size: 7.5px; font-weight: 500; fill: #6b7280; }
.sw-uni text.pie { font-size: 9px; font-weight: 500; fill: #6b7280; }
.sw-u-mod { fill: #24395f; stroke: #8fa6cf; stroke-width: 0.6; }
.sw-u-cad { fill: none; stroke-width: 2; stroke-linejoin: round; }
.sw-u-caja { fill: #f6f3ee; stroke: #8d95a1; stroke-width: 1; }
.sw-u-inv { fill: #eaf3fb; stroke: #4f7fe0; }
.sw-u-l { fill: none; stroke: #8d95a1; stroke-width: 2; }
.sw-u-ac { stroke: #1F271B; }

/* Finanzas */
.sw-f-cero { stroke: #c9c2b7; stroke-width: 1; stroke-dasharray: 3 3; }
.sw-f-area { fill: rgba(42, 167, 158, 0.12); }
.sw-f-linea { fill: none; stroke: #2aa79e; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sw-f-pto { fill: #ff4500; stroke: #fff; stroke-width: 2; }
.sw-f-tag { font-size: 11px; font-weight: 700; fill: #ff4500; }
.sw-f-tag2 { font-size: 11px; font-weight: 700; fill: #2aa79e; text-anchor: end; }
.sw-f-ejes text { font-size: 8.5px; fill: #9aa0a6; text-anchor: middle; }

/* La animación: sólo si el JS la pidió y el visitante no la rechaza. */
.sw-anim .sw-mods rect, .sw-anim .sw-calor rect { opacity: 0; transform: translateY(-6px); transform-box: fill-box; transition: opacity 0.35s ease, transform 0.35s ease; transition-delay: var(--d, 0ms); }
.sw-anim .sw-vivo .sw-mods rect, .sw-anim .sw-vivo .sw-calor rect { opacity: 1; transform: none; }
.sw-anim .sw-rank li i::after, .sw-anim .sw-perd li i::after { width: 0; transition: width 0.9s cubic-bezier(0.2, 0.7, 0.3, 1); transition-delay: var(--d, 300ms); }
.sw-anim .sw-vivo .sw-rank li i::after, .sw-anim .sw-vivo .sw-perd li i::after { width: var(--w); }
.sw-anim .sw-u-cad { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 0.9s ease; transition-delay: var(--d, 0ms); }
.sw-anim .sw-vivo .sw-u-cad { stroke-dashoffset: 0; }
.sw-anim .sw-f-linea { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s ease; }
.sw-anim .sw-vivo .sw-f-linea { stroke-dashoffset: 0; }
.sw-anim .sw-f-area, .sw-anim .sw-f-pto, .sw-anim .sw-f-tag, .sw-anim .sw-f-tag2 { opacity: 0; transition: opacity 0.6s ease 1.2s; }
.sw-anim .sw-vivo .sw-f-area, .sw-anim .sw-vivo .sw-f-pto, .sw-anim .sw-vivo .sw-f-tag, .sw-anim .sw-vivo .sw-f-tag2 { opacity: 1; }

/* La demo, para empresas */
.sw-demo {
  margin-top: 56px; padding: 30px 32px; border-radius: 24px; background: #1F271B; color: #e6e9e3;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: center;
}
.sw-demo h2 { color: #fff; }
.sw-demo p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.6; color: #c9cfc6; max-width: 60ch; }
.sw-demo ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sw-demo li { font-size: 14px; color: #e6e9e3; padding-left: 22px; position: relative; }
.sw-demo li::before { content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #ff4500; box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.25); }
.sw-demo-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sw-demo-cta small { font-size: 12.5px; color: #9aa39a; }

@media (max-width: 980px) {
  .sw-pasos { grid-template-columns: 1fr 1fr; }
  .sw-grid { grid-template-columns: 1fr; }
  .sw-bento { grid-template-columns: 1fr 1fr; }
  .sw-demo { grid-template-columns: 1fr; padding: 26px 22px; }
}
@media (max-width: 720px) {
  .sw-bento { grid-template-columns: 1fr; }
  .sw-win-ancha { grid-column: auto; }
  .sw-opt { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .sw-main { padding: 110px 16px 50px; }
  .sw-pasos { grid-template-columns: 1fr; }
}
