/* EnerCom Solutions — Version2 */
:root {
  --navy: #0E2747;
  --navy-deep: #09182E;
  --ink: #0F172A;
  --text: #334155;
  --muted: #475569;
  --on-dark: #C7D2DF;
  --sun: #F5A524;
  --sun-soft: #FBC56A;
  --sun-text: #B45309;
  --paper: #F6F7F4;
  --line: #E5E7EB;
  --radius: 20px;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--ink); background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
a:hover { color: var(--sun-text); }
h1, h2, h3 { font-family: var(--display); margin: 0; color: var(--navy); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section--paper { background: var(--paper); }
.section--dark { background: var(--navy); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.stack { display: flex; flex-direction: column; gap: 56px; }

.eyebrow { color: var(--sun-text); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.section--dark .eyebrow, .hero .eyebrow { color: var(--sun-soft); }
.h2 { font-weight: 800; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -0.02em; }
.lead { color: var(--muted); max-width: 640px; }
.section--dark .lead { color: var(--on-dark); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head > div { max-width: 640px; }
.section-head--center { justify-content: center; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn--sun { background: var(--sun); color: var(--navy); }
.btn--sun:hover { background: #E8951A; color: var(--navy); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand img { height: 64px; width: auto; }
@media (max-width: 640px) { .brand img { height: 54px; } }
.nav { display: flex; align-items: center; gap: 28px; font-family: var(--display); font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; padding: 10px 0; }
.nav a[aria-current="page"] { color: var(--sun-text); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions .btn { white-space: nowrap; }
.wa-btn { gap: 8px; }
@media (max-width: 1240px) { .nav { gap: 20px; } }
section[id] { scroll-margin-top: 84px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; align-items: center; justify-content: center; cursor: pointer; color: var(--navy); }

@media (max-width: 1120px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(15,23,42,.08); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .site-header.is-open .nav { display: flex; }
}
@media (max-width: 440px) { .wa-btn span { display: none; } .wa-btn { width: 44px; padding: 0; } }

/* Hero */
.hero { color: #fff; background-image: linear-gradient(90deg, rgba(9,24,46,.92) 0%, rgba(9,24,46,.78) 45%, rgba(9,24,46,.25) 100%), url(../img/instalacion-enercom.jpg); background-size: cover; background-position: center right; }
.hero__body { padding: 112px 0 96px; max-width: 640px; display: flex; flex-direction: column; gap: 24px; }
.hero .badge { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: rgba(245,165,36,.16); color: var(--sun-soft); font-size: 14px; font-weight: 600; }
.hero h1 { color: #fff; font-weight: 800; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -0.02em; }
.hero p.hero__text { font-size: 19px; color: #DCE3EC; max-width: 540px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.stats { background: rgba(9,24,46,.88); border-top: 1px solid rgba(255,255,255,.12); }
.stats .container { padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.stat__num { font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--sun); }
.stat__label { color: #DCE3EC; font-size: 15px; }

/* Page hero (interior pages) */
.page-hero { background: var(--navy); color: #fff; padding: 88px 0 72px; }
.page-hero h1 { color: #fff; font-weight: 800; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.08; letter-spacing: -0.02em; max-width: 760px; }
.page-hero p { color: var(--on-dark); max-width: 620px; margin-top: 16px; font-size: 18px; }
.breadcrumb { font-size: 14px; color: var(--on-dark); margin-bottom: 16px; }
.breadcrumb a { color: var(--sun-soft); text-decoration: none; }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { padding: 32px; border-radius: var(--radius); background: var(--paper); display: flex; flex-direction: column; gap: 14px; }
.section--paper .card { background: #fff; }
.card h3 { font-size: 21px; }
.card p { color: var(--muted); font-size: 16px; }
.card__num { font-family: var(--display); font-weight: 800; color: var(--sun-text); font-size: 15px; }
.icon { width: 40px; height: 40px; color: var(--navy); }

/* Steps */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 2px solid rgba(255,255,255,.25); }
.steps li:first-child { border-top-color: var(--sun); }
.steps .step-num { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--sun); }
.steps h3 { font-size: 21px; }
.steps p { color: var(--on-dark); font-size: 16px; }

/* Diseño a la medida con tu recibo de CFE */
.bill-split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.bill-split > * { flex: 1 1 440px; min-width: 0; }
.bill-text { display: flex; flex-direction: column; gap: 20px; }
.bill-text > p { color: var(--muted); }
.bill-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; counter-reset: bill; }
.bill-list li { display: grid; grid-template-columns: 40px 1fr; gap: 4px 16px; counter-increment: bill; }
.bill-list li::before { content: counter(bill); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--navy); font-family: var(--display); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.bill-list strong { font-family: var(--display); color: var(--navy); font-size: 18px; }
.bill-list span { color: var(--muted); font-size: 16px; }
.bill-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.bill-visual { position: relative; padding: 0 0 124px; }
.bill { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 24px 48px rgba(14,39,71,.10); max-width: 440px; transform: rotate(-2deg); }
.bill__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed #CBD5E1; }
.bill__top strong { font-family: var(--display); color: var(--navy); font-size: 18px; }
.bill__top span { color: var(--muted); font-size: 13px; }
.bill__label { margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bill__bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin-top: 12px; }
.bill__bars i { flex: 1; border-radius: 6px 6px 2px 2px; background: #CBD5E1; }
.bill__bars i:last-child { background: var(--navy); }
.bill__rows { margin: 18px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 15px; }
.bill__rows dt { color: var(--muted); }
.bill__rows dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.bill-result { position: absolute; right: 0; bottom: 0; width: min(300px, 80%); padding: 22px 24px; border-radius: 18px; background: var(--navy); color: #fff; box-shadow: 0 20px 40px rgba(9,24,46,.25); }
.bill-result p { color: var(--on-dark); font-size: 14px; }
.bill-result strong { display: block; margin-top: 4px; font-family: var(--display); font-size: 22px; color: #fff; }
.bill-result em { font-style: normal; color: var(--sun); }
.bill-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.need-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.fine-print { text-align: center; color: var(--muted); font-size: 14px; }

/* About split */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split .text { display: flex; flex-direction: column; gap: 20px; }
.split .text p { color: var(--muted); }
.split img { width: 100%; height: 400px; object-fit: cover; border-radius: 24px; }

/* Testimonials */
.quote { margin: 0; padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 20px; }
.quote blockquote { margin: 0; font-size: 17px; color: #1E293B; flex-grow: 1; }
.quote figcaption { font-size: 15px; }
.quote figcaption strong { color: var(--navy); display: block; }
.quote figcaption span { color: var(--muted); }
.stars { color: var(--sun); letter-spacing: 2px; font-size: 18px; }

/* FAQ */
.faq-layout { display: flex; flex-wrap: wrap; gap: 48px; }
.faq-layout > :first-child { flex: 1 1 320px; }
.faq-list { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.faq-list details { background: #fff; border-radius: 16px; padding: 22px 26px; }
.section:not(.section--paper) .faq-list details { background: var(--paper); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--navy); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 26px; font-weight: 400; color: var(--sun-text); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin-top: 12px; color: var(--muted); }

/* Contact */
.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact__info { flex: 1 1 380px; display: flex; flex-direction: column; gap: 24px; }
.contact__info ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.contact__info li span { display: block; color: var(--on-dark); font-size: 14px; }
.contact__info li a, .contact__info li strong { color: #fff; font-weight: 600; font-size: 19px; text-decoration: none; }
.contact__info li a:hover { color: var(--sun-soft); }
.form { flex: 1 1 440px; min-width: 0; padding: 36px; border-radius: 24px; background: #fff; color: var(--ink); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; position: relative; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea { min-height: 48px; padding: 0 14px; border: 1px solid #CBD5E1; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: #fff; }
.form textarea { padding: 12px 14px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(245,165,36,.45); }
.form [aria-invalid="true"] { border-color: #B91C1C; }
.field-error { color: #B91C1C; font-size: 13px; font-weight: 500; }
.form-status { grid-column: 1 / -1; font-size: 15px; font-weight: 500; }
.form-status.ok { color: #166534; }
.form-status.err { color: #B91C1C; }
.form input[type="file"] { min-height: 0; padding: 10px; border-style: dashed; border-width: 2px; background: var(--paper); cursor: pointer; font-size: 15px; }
.form input[type="file"]::file-selector-button { margin-right: 14px; padding: 10px 16px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.form .optional { font-weight: 400; color: var(--muted); }
.form .hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* CTA band */
.cta-band { background: var(--sun); color: var(--navy); padding: 64px 0; }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { font-weight: 800; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.02em; }
.cta-band p { margin-top: 6px; font-size: 18px; color: #3B2A06; }
.cta-band .btn { background: var(--navy); color: #fff; }
.cta-band .btn:hover { background: var(--navy-deep); }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-dark); padding: 64px 0 32px; font-size: 15px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--sun-soft); }
.footer-brand { font-family: var(--display); font-weight: 800; font-size: 22px; color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }

/* WhatsApp floating button */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.wa-float:hover { color: #fff; background: #1EBE5A; }

.not-found { min-height: 60vh; display: flex; align-items: center; }

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero__body { padding: 72px 0 64px; }
  .form, .bill { padding: 24px; }
  .bill { transform: none; }
  .bill-result { position: static; width: auto; margin-top: -12px; }
  .bill-visual { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; color: #fff; }

/* Equipos y marcas */
.equip-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.equip { padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.equip__head { display: flex; align-items: center; gap: 14px; }
.equip__img { flex: none; width: 96px; height: 96px; border-radius: 18px; background: var(--paper); display: flex; align-items: center; justify-content: center; }
.equip__img img { width: 84px; height: 84px; }
.equip h3 { font-size: 20px; }
.equip p { color: var(--muted); font-size: 15px; }
.brands { margin: auto 0 0; padding: 16px 0 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; border-top: 1px solid var(--line); }
.brands li { height: 64px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; }
.brands img { max-width: 100%; max-height: 40px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 640px) { .equip-grid { grid-template-columns: 1fr; } }
