/*
  Generación Industrial | Tarifas de Luz
  Dirección visual: el esquema unifilar (como lo dibuja un ingeniero) es el elemento memorable;
  el formulario se presenta como una placa de características que el visitante completa.
  Color con significado: amarillo = gas y acción principal; verde = solo WhatsApp; azul = enlaces y líneas técnicas.
  Tipografía: GI Heros (derivada de TeX Gyre Heros) y su versión condensada para titulares y rótulos.
*/

@font-face { font-family: "GI Heros"; src: url("/assets/fonts/heros-subset-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "GI Heros"; src: url("/assets/fonts/heros-subset-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "GI Heros Cn"; src: url("/assets/fonts/heros-cn-subset-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "GI Heros Cn"; src: url("/assets/fonts/heros-cn-subset-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #17212B;
  --ink-soft: #4A5864;
  --paper: #F5F7F8;
  --steel-band: #E8ECEF;
  --plate: #DFE5E9;
  --plate-edge: #AEBAC3;
  --rule: #CCD5DB;
  --field-bg: #FBFCFD;
  --field-border: #7F8D98;
  --gas: #F2B705;
  --gas-line: #A47800;
  --gas-soft: rgba(242, 183, 5, 0.2);
  --line: #23637F;
  --wa: #25D366;
  --on-accent: #17212B;
  --danger: #B3261E;
  --danger-soft: #FBEAE8;
  --footer-bg: #17212B;
  --footer-ink: #D9E1E7;
  --font: "GI Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-cn: "GI Heros Cn", "Helvetica Neue", "Arial Narrow", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
  --radius: 4px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E6ECF1;
    --ink-soft: #A7B4BE;
    --paper: #121B23;
    --steel-band: #17222B;
    --plate: #1B2731;
    --plate-edge: #34444F;
    --rule: #2A3843;
    --field-bg: #0E161D;
    --field-border: #66747F;
    --gas-line: #F2B705;
    --gas-soft: rgba(242, 183, 5, 0.14);
    --line: #86BCD8;
    --danger: #FF8F86;
    --danger-soft: #3B201E;
    --footer-bg: #0C1318;
    --footer-ink: #C9D3DA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E6ECF1; --ink-soft: #A7B4BE; --paper: #121B23; --steel-band: #17222B; --plate: #1B2731; --plate-edge: #34444F;
  --rule: #2A3843; --field-bg: #0E161D; --field-border: #66747F; --gas-line: #F2B705; --gas-soft: rgba(242, 183, 5, 0.14);
  --line: #86BCD8; --danger: #FF8F86; --danger-soft: #3B201E; --footer-bg: #0C1318; --footer-ink: #C9D3DA; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--line); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--line); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 {
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: clamp(2.35rem, 8.4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
@media (min-width: 900px) { h1 { max-width: 14ch; } }
h2 {
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.65rem);
  line-height: 1.04;
  max-width: 20ch;
  margin-bottom: 28px;
  text-wrap: balance;
}
h3 { font-size: 1.125rem; line-height: 1.3; margin-bottom: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 50; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px;
  border: 0; border-radius: var(--radius);
  font-family: var(--font-cn); font-weight: 700; font-size: 1.08rem; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; line-height: 1.1; text-align: center;
}
.btn-primary { background: var(--gas); color: var(--on-accent); }
.btn-primary:hover { background: #E0A800; }
.btn-wa { background: var(--wa); color: var(--on-accent); }
.btn-wa:hover { background: #1FBE5B; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 1rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.65; cursor: progress; }

/* Cabecera */
.site-header { border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark text { font-family: var(--font-cn); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-cn); font-weight: 700; font-size: 1.12rem; }
.brand-by { font-size: 0.82rem; color: var(--ink-soft); }

/* Portada */
.hero { padding: 36px 0 24px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 64px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}
.lede { font-size: 1.16rem; line-height: 1.5; color: var(--ink); max-width: 36em; margin-top: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.cta-row .btn { flex: 1 1 220px; }
@media (min-width: 560px) { .cta-row .btn { flex: 0 0 auto; } }
.sectors { color: var(--ink-soft); font-size: 0.98rem; max-width: 34em; margin: 0; }

.hero-figure { margin: 0; }
.unifilar { display: block; width: 100%; height: auto; }
.unifilar .u-line path, .unifilar .u-line circle, .unifilar .u-line rect { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.unifilar .u-line rect[width="14"] { fill: var(--paper); }
.unifilar .u-bus { stroke: var(--ink); stroke-width: 7; }
.unifilar .u-gen { fill: var(--gas-soft); stroke: var(--gas-line); stroke-width: 3.5; }
.unifilar .u-feed { fill: none; stroke: var(--gas-line); stroke-width: 4.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: energize 1.3s 0.35s cubic-bezier(0.3, 0.7, 0.2, 1) forwards; }
.unifilar .u-gas rect { fill: var(--paper); stroke: var(--gas-line); stroke-width: 3; }
.unifilar .u-pipe { fill: none; stroke: var(--gas-line); stroke-width: 3; stroke-dasharray: 9 6; }
.unifilar .u-valve { stroke: var(--gas-line); stroke-width: 3; }
.unifilar .u-g { font-family: var(--font-cn); font-weight: 700; font-size: 24px; fill: var(--ink); }
.unifilar .u-label { font-family: var(--font-cn); font-weight: 700; font-size: 21px; fill: var(--ink); }
.unifilar .u-sub { font-family: var(--font); font-size: 16px; fill: var(--ink-soft); }
@keyframes energize { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .unifilar .u-feed { animation: none; stroke-dashoffset: 0; } }
.hero-figure figcaption { font-size: 0.95rem; color: var(--ink-soft); margin-top: 12px; max-width: 34em; }

/* Secciones */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.section-steel { background: var(--steel-band); }
.body-l { font-size: 1.16rem; line-height: 1.5; }
.note { color: var(--ink-soft); font-size: 0.98rem; max-width: 60ch; margin: 28px 0 0; }

.needs { list-style: none; margin: 0; padding: 0; display: grid; }
@media (min-width: 760px) { .needs { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.need { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--rule); }
.need p { margin: 0; color: var(--ink-soft); }
.glyph { width: 56px; height: 56px; }
.glyph circle, .glyph path { fill: none; stroke: var(--ink); stroke-width: 2.2; }
.glyph text { font-family: var(--font-cn); font-weight: 700; font-size: 12px; fill: var(--ink); stroke: none; }
.glyph .dash { stroke-dasharray: 4 3; }
.glyph .heat { stroke: var(--gas-line); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.steps li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; padding-bottom: 26px; }
.steps li::before { content: ""; position: absolute; left: 20px; top: 40px; bottom: 0; width: 2px; background: var(--ink); }
.steps li:last-child::before { display: none; }
.steps p { margin: 6px 0 0; font-size: 1.08rem; max-width: 30ch; }
.step-n {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 2px solid var(--ink); background: var(--paper); border-radius: 50%;
  font-family: var(--font-cn); font-weight: 700; font-size: 1.2rem;
}
.section-steel .step-n { background: var(--steel-band); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .steps li { grid-template-columns: 1fr; padding-bottom: 0; }
  .steps li::before { left: 42px; right: -24px; top: 20px; bottom: auto; width: auto; height: 2px; }
  .steps p { margin-top: 4px; }
}

.two-col { display: grid; gap: 8px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 5fr 7fr; gap: 56px; } }
.roles { margin: 28px 0; }
.roles > div { border-top: 1px solid var(--rule); padding: 14px 0 10px; }
.roles dt { font-family: var(--font-cn); font-weight: 700; font-size: 1.08rem; }
.roles dd { margin: 2px 0 0; color: var(--ink-soft); }
.disclosure { border-left: 4px solid var(--gas-line); padding-left: 14px; color: var(--ink-soft); font-size: 0.97rem; max-width: 60ch; margin: 0; }

.faq-wrap { max-width: 860px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 18px 44px 18px 0; font-weight: 700; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-family: var(--font-cn); font-size: 1.7rem; font-weight: 400; color: var(--ink-soft); }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 64ch; color: var(--ink-soft); padding-bottom: 8px; }

/* Formulario como placa de características */
.form-section { background: var(--steel-band); }
.form-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 980px) { .form-grid { grid-template-columns: 4fr 7fr; gap: 56px; } .form-intro { position: sticky; top: 32px; } }
.form-intro p { max-width: 34em; }
.wa-alt { margin: 14px 0 0; }
.wa-alt a { font-weight: 700; }

.plate {
  position: relative;
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: 6px;
  padding: 28px 18px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
@media (min-width: 560px) { .plate { padding: 36px 36px 30px; } }
.rivet { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFFFFF 0 18%, #A8B3BB 40%, #6E7A84 100%); }
.r1 { top: 10px; left: 10px; } .r2 { top: 10px; right: 10px; } .r3 { bottom: 10px; left: 10px; } .r4 { bottom: 10px; right: 10px; }
.plate-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 22px; }
.plate-title { font-family: var(--font-cn); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.02em; margin: 0; }
.plate-step { font-family: var(--font-cn); color: var(--ink-soft); margin: 0; }

.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend, .more summary { display: block; font-family: var(--font-cn); font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; padding: 0; }
.opt { font-family: var(--font); font-weight: 400; font-size: 0.86rem; color: var(--ink-soft); margin-left: 4px; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 50px; padding: 11px 12px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: 3px;
}
textarea { min-height: 96px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--line); outline-offset: 1px; border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.error { color: var(--danger); font-size: 0.93rem; margin: 6px 0 0; }
.hint { color: var(--ink-soft); font-size: 0.9rem; margin: 6px 0 0; }
.hint-check { color: var(--ink); border-left: 3px solid var(--gas); padding-left: 10px; }
.power-row { display: grid; grid-template-columns: 1fr 108px; gap: 8px; }
.choices { display: grid; gap: 8px; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }
.choices label {
  display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 12px;
  background: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: 3px; cursor: pointer; font-size: 1rem;
}
.choices label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--gas-soft); }
.choices input, .check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; margin: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; font-size: 0.98rem; cursor: pointer; }
.check input { margin-top: 2px; }
.field-pair { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .field-pair { grid-template-columns: 1fr 1fr; } }
.more { border-top: 1px solid var(--plate-edge); border-bottom: 1px solid var(--plate-edge); margin: 6px 0 18px; }
.more summary { cursor: pointer; padding: 14px 0; margin: 0; }
.more-body { padding: 4px 0 6px; }
.notice { font-size: 0.93rem; color: var(--ink-soft); margin: 8px 0 6px; }
.consent { font-size: 0.95rem; margin: 10px 0 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.actions .btn-primary { flex: 1 1 240px; }
@media (min-width: 560px) { .actions .btn-primary { flex: 0 0 auto; } }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-banner { background: var(--danger-soft); border-left: 4px solid var(--danger); padding: 12px 14px; margin: 0 0 18px; color: var(--ink); }
.success { outline: none; }
.success-code { font-size: 1.05rem; margin: 6px 0 14px; }
.success-code strong { display: block; font-family: var(--font-cn); font-size: 1.75rem; letter-spacing: 0.05em; margin-top: 2px; }
.success .btn { margin: 6px 10px 6px 0; }

/* Escenarios: qué conviene según la operación */
.section-lede { font-size: 1.14rem; line-height: 1.5; max-width: 62ch; margin: -8px 0 30px; }
.scenarios { list-style: none; margin: 0; padding: 0; }
.scenario { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-top: 1px solid var(--rule); }
.scenario:last-child { border-bottom: 1px solid var(--rule); }
.scenario h3 { font-family: var(--font-cn); font-size: 1.28rem; line-height: 1.15; }
.scenario h3 a { color: var(--ink); text-decoration-color: var(--gas-line); text-decoration-thickness: 2px; }
.scenario h3 a:hover { text-decoration-thickness: 3px; }
.scenario-facts { margin: 10px 0 0; display: grid; gap: 8px; }
.scenario-facts dt { font-family: var(--font-cn); font-weight: 700; font-size: 0.95rem; color: var(--ink-soft); }
.scenario-facts dd { margin: 0; }
@media (min-width: 900px) {
  .scenario-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; align-items: start; }
  .scenario-facts { margin: 0; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; }
}

/* Páginas por situación */
.lp-hero { padding-bottom: 16px; }
@media (min-width: 900px) { .lp-hero h1 { max-width: 16ch; } }
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1000px) { .options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.option { background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--ink); border-radius: var(--radius); padding: 20px 20px 18px; }
.option-gas { border-top-color: var(--gas); }
.option h3 { font-family: var(--font-cn); font-size: 1.3rem; line-height: 1.15; margin-bottom: 10px; }
.option p { margin: 0 0 10px; }
.option p:last-child { margin-bottom: 0; }
.option .when { color: var(--ink-soft); font-size: 0.97rem; }
.option .when strong { color: var(--ink); font-family: var(--font-cn); }
.data-list { list-style: none; margin: 0 0 8px; padding: 0; max-width: 62ch; }
.data-list li { position: relative; border-top: 1px solid var(--rule); padding: 12px 0 12px 30px; }
.data-list li:last-child { border-bottom: 1px solid var(--rule); }
.data-list li::before { content: ""; position: absolute; left: 3px; top: 19px; width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 2px; }
.fact-note { border-left: 4px solid var(--line); padding-left: 14px; max-width: 64ch; margin: 28px 0 0; }
.unifilar .u-solar rect, .unifilar .u-solar path, .unifilar .u-bat rect, .unifilar .u-bat path { fill: none; stroke: var(--line); stroke-width: 2.5; }
.unifilar .u-brk { fill: var(--paper) !important; }
.unifilar .u-heat path { fill: none; stroke: var(--gas-line); stroke-width: 3; }
.unifilar .u-off circle, .unifilar .u-off path { stroke-dasharray: 7 5; }
.unifilar .u-thin { stroke-dasharray: 3 4; }

/* Páginas legales */
.legal-main { padding: 48px 0 72px; }
.legal-wrap { max-width: 760px; }
.legal-wrap h1 { max-width: none; font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 8px; }
.legal-wrap h2 { font-size: 1.45rem; max-width: none; margin: 36px 0 10px; }
.legal-wrap ul { padding-left: 1.2em; }
.legal-wrap li { margin-bottom: 8px; }
.updated { color: var(--ink-soft); font-size: 0.92rem; margin-top: 32px; }

/* Pie */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 48px 0 120px; font-size: 0.97rem; }
@media (min-width: 900px) { .site-footer { padding-bottom: 56px; } }
.site-footer a { color: #FFFFFF; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr; gap: 64px; } }
.footer-brand { font-family: var(--font-cn); font-weight: 700; font-size: 1.2rem; color: #FFFFFF; }
.footer-h { font-family: var(--font-cn); font-weight: 700; color: #FFFFFF; margin-bottom: 8px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 8px; }
.legal { color: #AFC0CB; font-size: 0.9rem; }

/* Barra fija en móvil */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--rule);
  transition: transform 0.2s ease;
}
.mobile-bar .btn { min-height: 48px; }
.mobile-bar.is-hidden { transform: translateY(110%); }
@media (prefers-reduced-motion: reduce) { .mobile-bar { transition: none; } }
@media (min-width: 900px) { .mobile-bar { display: none; } }
.page-legal .mobile-bar { display: none; }
