/* =========================================================
   EVERINDATA — style.css
   Sistema de marca aplicado a la landing page principal
   ========================================================= */

:root {
  /* Colores corporativos */
  --ev-primary:     #1A3C6E;
  --ev-mid:         #2E6DB4;
  --ev-light:       #D6E4F7;
  --ev-pale:        #EBF3FB;
  --ev-dark:        #0F2854;

  /* Colores de producto */
  --sol-accent:     #F59E0B;
  --sol-light:      #FEF9EC;
  --risk-accent:    #DC2626;
  --urban-accent:   #059669;
  --risk-light:     #FEF2F2;
  --urban-light:    #ECFDF5;

  /* Texto */
  --ink:            #0F172A;
  --sub:            #334155;
  --muted:          #64748B;
  --border:         #E2E8F0;

  /* Tipografía */
  --font:           'Helvetica Neue', Arial, sans-serif;

  /* Espaciado base */
  --max-width:      1100px;
  --section-py:     80px;
  --border-radius:  10px;
}

/* ---------- Reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: #FFFFFF;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ev-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Foco visible siempre (accesibilidad) */
:focus-visible {
  outline: 2px solid var(--ev-mid);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--section-py) 0; }

@media (max-width: 900px) {
  section { padding: 56px 0; }
}
@media (max-width: 480px) {
  section { padding: 40px 0; }
}

.eyebrow {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ev-mid);
  margin-bottom: 14px;
}

.hero-logo { height: 180px; width: auto; max-width: 100%; display: block; margin-bottom: 32px; }
.product-logo { height: 65px; width: auto; display: block; margin-bottom: 20px; }

h1, h2 { color: var(--ev-dark); font-weight: 700; margin: 0 0 16px; }
h3 { color: var(--ev-dark); font-weight: 600; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 4.5vw, 52px); letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(26px, 3.4vw, 32px); letter-spacing: -0.01em; line-height: 1.2; }
h3 { font-size: 18px; }

p { color: var(--sub); margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--sub); max-width: 640px; }

.muted { color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 16px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--ev-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--ev-mid); transform: translateY(-1px); }
.btn-amber {
  background: var(--sol-accent);
  color: var(--ev-dark);
}
.btn-amber:hover { background: #e6910a; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ev-primary);
  border-color: var(--ev-primary);
}
.btn-ghost:hover { background: var(--ev-pale); }

/* ---------- Retícula de firma (elemento distintivo, sutil) ---------- */
.grid-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.coord-tick {
  position: absolute;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: var(--ev-dark);
  color: #fff;
  overflow: hidden;
  padding: 120px 0 100px;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { color: #fff; }
.hero .lede { color: var(--ev-light); }
.hero-cta { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }

.hero-proximos {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-proximo-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  font-size: 13px;
  transition: background 0.15s ease;
}
.hero-proximo-tag:hover { background: rgba(255,255,255,0.09); text-decoration: none; }
.hero-proximo-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.hero-proximo-name { font-weight: 700; }

@media (max-width: 900px) {
  .hero { padding: 96px 0 72px; }
}
@media (max-width: 480px) {
  .hero { padding: 80px 0 56px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; width: 100%; }
  .coord-tick { display: none; } /* decorativo: se oculta para no competir con el texto en pantallas muy pequeñas */
  .hero-logo { height: 100px; margin-bottom: 24px; } /* el logo grande se reduce en móvil para no desbordar */
}

/* ---------- PROBLEMA ---------- */
.problema {
  background: var(--ev-pale);
}
.problema .wrap p { max-width: 760px; }

/* ---------- PRODUCTO SOLARSCOUT ---------- */
.producto {
  background: var(--sol-light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.producto-header { max-width: 720px; margin-bottom: 48px; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.metric-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 28px 20px;
  text-align: center;
}
.metric-card .num {
  font-size: 36px;
  font-weight: 700;
  color: var(--sol-accent);
  line-height: 1.1;
}
.metric-card .label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.contexto-box {
  background: #fff;
  border-left: 4px solid var(--sol-accent);
  border-radius: 6px;
  padding: 20px 24px;
  margin-top: 24px;
}
.bajo-demanda {
  font-style: italic;
  color: var(--muted);
  margin-top: 16px;
  font-size: 15px;
}

@media (max-width: 720px) {
  .metric-grid { grid-template-columns: 1fr; }
}

/* ---------- DEMO KEPLER ---------- */
.demo { background: #fff; }
.demo-header { max-width: 720px; margin-bottom: 32px; }
.demo-map {
  width: 100%;
  height: 480px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--ev-pale);
}
.demo-map iframe { width: 100%; height: 100%; border: 0; }

.demo-table-wrap {
  margin-top: 32px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}
table.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.demo-table th, table.demo-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
table.demo-table th {
  background: var(--ev-pale);
  color: var(--ev-dark);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.demo-table tbody tr:hover { background: var(--sol-light); }

.punt-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.punt-muyalta { background: #DCFCE7; color: #15803D; }
.punt-alta    { background: #ECFDF5; color: #16A34A; }
.punt-media   { background: #FEF3C7; color: #B45309; }
.punt-baja    { background: #FEE2E2; color: #B91C1C; }

.toggle-table-btn { margin-top: 16px; }

.demo-cta {
  margin-top: 32px;
  background: var(--ev-pale);
  border-radius: var(--border-radius);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.demo-cta p { margin: 0; max-width: 520px; }

@media (max-width: 640px) {
  .demo-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .demo-cta .btn { justify-content: center; width: 100%; }
  .demo-map { height: 320px; } /* el mapa interactivo necesita menos altura en pantallas pequeñas */
}

/* ---------- CREDENCIALES ---------- */
.credenciales { background: var(--ev-pale); }
.credenciales .wrap p { max-width: 760px; }

/* ---------- PRÓXIMOS PRODUCTOS ---------- */
.proximos-intro { background: #fff; border-top: 1px solid var(--border); }

.producto-band {
  border-bottom: 1px solid var(--border);
}
.band-desc { font-size: 17px; margin: 0; max-width: 720px; }
.risk-band { background: var(--risk-light); }
.urban-band { background: var(--urban-light); }

.band-logo { height: 60px; width: auto; display: block; margin-bottom: 20px; }

.proximo-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.risk-band .proximo-badge { border-color: var(--risk-accent); color: var(--risk-accent); }
.urban-band .proximo-badge { border-color: var(--urban-accent); color: var(--urban-accent); }

/* ---------- PRECIOS ---------- */
.precios { background: #fff; }
.precios-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

@media (max-width: 640px) {
  .precios-header { align-items: flex-start; flex-direction: column; }
  .iva-toggle { align-self: flex-start; }
}
.iva-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--sub);
  background: var(--ev-pale);
  padding: 10px 16px;
  border-radius: 999px;
}
.iva-toggle input { width: 18px; height: 18px; accent-color: var(--ev-mid); cursor: pointer; }
.iva-toggle label { cursor: pointer; user-select: none; }

.capa-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ev-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.capa-desc { color: var(--muted); font-size: 15px; margin-bottom: 24px; max-width: 640px; }

.price-line { margin-bottom: 56px; }
.price-line h3 { margin-bottom: 4px; }
.price-line .subtitle { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.price-table-wrap { overflow-x: auto; }
table.price-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  overflow: hidden;
}
table.price-table th, table.price-table td {
  text-align: center;
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
table.price-table th:last-child, table.price-table td:last-child { border-right: none; }
table.price-table th {
  background: var(--ev-primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
table.price-table td { font-size: 16px; font-weight: 700; color: var(--ev-dark); }
table.price-table td.plan-label {
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
}

.delivery-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.precios-cta-row { margin-top: 20px; }

.precios-footnote {
  margin-top: 48px;
  background: var(--ev-pale);
  border-radius: var(--border-radius);
  padding: 24px 28px;
  text-align: center;
}
.precios-footnote p { margin: 0; }

/* ---------- CONTACTO ---------- */
.contacto { background: var(--ev-dark); color: #fff; }
.contacto h2 { color: #fff; }
.contacto .lede { color: var(--ev-light); }
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
@media (max-width: 720px) { .contacto-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ev-light); }
.field-hint { font-size: 12px; color: rgba(255,255,255,0.45); }
.field input, .field select, .field textarea {
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.4); }
.field input:focus, .field select:focus, .field textarea:focus {
  background: rgba(255,255,255,0.1);
}
.field select option { color: var(--ink); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ev-light);
}
.consent input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.consent a { color: #fff; text-decoration: underline; }

.form-footer {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-confirm {
  display: none;
  margin-top: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--border-radius);
  padding: 20px 24px;
}
.form-confirm.visible { display: block; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--ev-dark);
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  padding: 32px 0;
  font-size: 13px;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer a { color: rgba(255,255,255,0.75); }

@media (max-width: 640px) {
  footer .wrap { flex-direction: column; text-align: center; }
}
