/* ============================================================
   ENERDISE — Energía y Diseño Eléctrico S. de R.L.
   Paleta: carbón #14181D · amarillo eléctrico #F7B500 · blanco
   ============================================================ */

:root {
  --carbon: #14181D;
  --carbon-2: #1D232B;
  --carbon-3: #2A323C;
  --amarillo: #F7B500;
  --amarillo-claro: #FFD34D;
  --blanco: #FFFFFF;
  --gris-bg: #F4F5F7;
  --gris-borde: #E3E6EA;
  --texto: #2A323C;
  --texto-suave: #5B6672;
  --texto-claro: #B9C2CC;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(20, 24, 29, 0.10);
  --font-titulos: "Sora", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-cuerpo: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-cuerpo);
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.65;
  font-size: 16.5px;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-titulos); line-height: 1.18; color: var(--carbon); }

h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; margin-bottom: 0.6em; }
h3 { font-size: 1.15rem; font-weight: 700; }

.container { width: min(1180px, 92%); margin: 0 auto; }

.centered { text-align: center; }

.eyebrow {
  font-family: var(--font-titulos);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #B8860B;
  margin-bottom: 0.9em;
}
.eyebrow.centered { text-align: center; }
.section-dark .eyebrow { color: var(--amarillo); }

.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-dark { background: var(--carbon); }
.section-dark h2, .section-dark h3 { color: var(--blanco); }
.section-dark p { color: var(--texto-claro); }

.section-intro {
  max-width: 760px;
  margin: 0 auto 3em;
  text-align: center;
  color: var(--texto-suave);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-titulos);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-accent {
  background: var(--amarillo);
  color: var(--carbon);
  box-shadow: 0 6px 20px rgba(247, 181, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.btn-accent:hover { background: var(--amarillo-claro); }
.btn-accent::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: translateX(-220%) skewX(-18deg);
  animation: destello 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes destello {
  0%, 72% { transform: translateX(-220%) skewX(-18deg); }
  88%, 100% { transform: translateX(320%) skewX(-18deg); }
}

.btn-ghost {
  background: transparent;
  color: var(--blanco);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover { border-color: var(--blanco); background: rgba(255,255,255,0.08); }

.btn-dark { background: var(--carbon); color: var(--blanco); }
.btn-dark:hover { background: var(--carbon-3); }

.btn-full { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(20, 24, 29, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease;
}
.header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.35); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 48px; width: auto; display: block; }
.brand-logo-footer { height: 64px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--texto-claro);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--amarillo); }
.nav .nav-cta { color: var(--carbon); padding: 10px 22px; font-size: 0.9rem; }
.nav .nav-cta:hover { color: var(--carbon); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--blanco);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -34% 0 0 0;
  background-size: cover;
  background-position: center 35%;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(13,16,20,0.92) 0%, rgba(13,16,20,0.72) 45%, rgba(13,16,20,0.35) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 150px 0 90px; max-width: 760px; margin-left: max(calc((100% - 1180px) / 2), 4%); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-titulos);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amarillo);
  background: rgba(247, 181, 0, 0.12);
  border: 1px solid rgba(247, 181, 0, 0.4);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.bolt-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amarillo);
  box-shadow: 0 0 12px var(--amarillo);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.7rem);
  font-weight: 800;
  color: var(--blanco);
  margin-bottom: 0.45em;
}
.hero h1 em { font-style: normal; color: var(--amarillo); }

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: rgba(255,255,255,0.86);
  max-width: 620px;
  margin-bottom: 2em;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats { background: var(--amarillo); padding: 38px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-titulos);
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  font-weight: 800;
  color: var(--carbon);
  line-height: 1.05;
}
.stat-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(20, 24, 29, 0.75);
}

/* ---------- Nosotros ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  margin-bottom: clamp(56px, 7vw, 90px);
}
.col-text h2 { max-width: 560px; }
.col-text p { color: var(--texto-suave); margin-bottom: 1em; }

.check-list { list-style: none; margin-top: 1.4em; }
.check-list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 0.8em;
  font-weight: 500;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--amarillo);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.col-media img {
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
}
.col-media figcaption {
  font-size: 0.85rem;
  color: var(--texto-suave);
  margin-top: 12px;
  text-align: center;
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: clamp(56px, 7vw, 90px);
}
.mv-card {
  background: var(--carbon);
  border-radius: var(--radio);
  padding: 38px 36px;
}
.mv-card h3 { color: var(--amarillo); font-size: 1.35rem; margin: 18px 0 10px; }
.mv-card p { color: var(--texto-claro); }
.mv-icon {
  width: 54px; height: 54px;
  border-radius: 12px;
  background: rgba(247, 181, 0, 0.14);
  display: grid;
  place-items: center;
}
.mv-icon svg { width: 28px; height: 28px; fill: var(--amarillo); }

.valores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: 2.2em;
}
.valor {
  border: 1.5px solid var(--gris-borde);
  border-top: 4px solid var(--amarillo);
  border-radius: var(--radio);
  padding: 28px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.valor:hover { transform: translateY(-5px); box-shadow: var(--sombra); }
.valor-num {
  font-family: var(--font-titulos);
  font-size: 0.95rem;
  font-weight: 800;
  color: #C49000;
}
.valor h4 { font-size: 1.12rem; margin: 6px 0 8px; }
.valor p { font-size: 0.93rem; color: var(--texto-suave); }

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.service {
  background: var(--carbon-2);
  border: 1px solid var(--carbon-3);
  border-radius: var(--radio);
  padding: 34px 30px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.service:hover { transform: translateY(-5px); border-color: rgba(247, 181, 0, 0.55); }
.service h3 { color: var(--blanco); margin: 20px 0 10px; font-size: 1.08rem; }
.service p { font-size: 0.93rem; }
.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--amarillo);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(247, 181, 0, 0.3);
}
.service-icon svg { width: 30px; height: 30px; fill: var(--carbon); }

/* ---------- Proyectos ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: clamp(56px, 7vw, 90px);
}
.project {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--sombra);
  background: var(--carbon);
}
.project img {
  width: 100%;
  aspect-ratio: 3 / 3.4;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.project:hover img { transform: scale(1.06); opacity: 0.55; }
.project figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 18px 16px;
  background: linear-gradient(to top, rgba(13,16,20,0.95) 25%, transparent);
}
.project h3 { color: var(--blanco); font-size: 0.98rem; line-height: 1.3; }
.project figcaption p { color: var(--amarillo); font-size: 0.8rem; font-weight: 600; margin-top: 4px; }

.design-feature {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(30px, 4vw, 56px);
  align-items: center;
  background: var(--gris-bg);
  border-radius: calc(var(--radio) + 6px);
  padding: clamp(28px, 4vw, 52px);
}
.design-media img { border-radius: var(--radio); box-shadow: var(--sombra); width: 100%; }
.design-text h3 { font-size: 1.45rem; margin-bottom: 0.7em; }
.design-text p { color: var(--texto-suave); margin-bottom: 1.1em; }
.design-text .btn { margin-top: 0.4em; }

/* ---------- Cinta CTA ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(70px, 10vw, 120px) 0;
}
.cta-bg {
  position: absolute;
  inset: -22% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.cta-overlay { position: absolute; inset: 0; background: rgba(13, 16, 20, 0.78); }
.cta-content { position: relative; z-index: 1; text-align: center; max-width: 720px; }
.cta-content h2 { color: var(--blanco); }
.cta-content p { color: rgba(255,255,255,0.85); margin-bottom: 2em; }

/* ---------- Contacto ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(30px, 4vw, 56px);
  margin-top: 3em;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--carbon-2);
  border: 1px solid var(--carbon-3);
  border-radius: var(--radio);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.contact-card:hover { border-color: rgba(247, 181, 0, 0.55); transform: translateY(-3px); }
.contact-card h3 { color: var(--blanco); font-size: 1rem; margin-bottom: 2px; }
.contact-card p { color: var(--amarillo); font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.contact-card small { color: var(--texto-claro); font-size: 0.82rem; }
.contact-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(247, 181, 0, 0.14);
  display: grid;
  place-items: center;
}
.contact-icon svg { width: 26px; height: 26px; fill: var(--amarillo); }

.contact-form {
  background: var(--blanco);
  border-radius: calc(var(--radio) + 4px);
  padding: clamp(26px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--font-titulos);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--carbon);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-cuerpo);
  font-size: 0.98rem;
  padding: 13px 16px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 10px;
  background: var(--gris-bg);
  color: var(--texto);
  resize: vertical;
  transition: border-color 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--amarillo);
  background: var(--blanco);
}
.form-buttons { display: flex; gap: 12px; }
.form-buttons .btn { flex: 1; padding-left: 14px; padding-right: 14px; white-space: nowrap; }

.form-note { font-size: 0.8rem; color: var(--texto-suave) !important; text-align: center; }

/* ---------- Redes sociales ---------- */
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--texto-claro);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 14px;
  border: 1px solid var(--carbon-3);
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-links a:hover { border-color: rgba(247, 181, 0, 0.55); color: var(--amarillo); }
.social-links svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.contact-card-social .social-links { margin-top: 10px; }
.footer-brand .social-links { margin-top: 18px; }
.footer-brand .social-links a { border-color: rgba(255, 255, 255, 0.14); }
.footer-brand .social-links a:hover { border-color: rgba(247, 181, 0, 0.55); }

/* ---------- Footer ---------- */
.footer { background: #0D1014; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(48px, 6vw, 72px) 0 40px;
}
.footer-brand p { color: var(--texto-claro); font-size: 0.92rem; margin-top: 16px; max-width: 300px; }
.footer h4 {
  color: var(--blanco);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-nav { display: flex; flex-direction: column; gap: 9px; }
.footer-nav a {
  color: var(--texto-claro);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.footer-nav a:hover { color: var(--amarillo); }
.footer-services p { color: var(--texto-claro); font-size: 0.92rem; margin-bottom: 9px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}
.footer-bottom p { color: #707A85; font-size: 0.83rem; text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 12, 15, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
}
.lightbox-caption { color: var(--blanco); margin-top: 16px; font-size: 0.95rem; text-align: center; }
.lightbox-close {
  position: absolute;
  top: 22px; right: 30px;
  background: none;
  border: none;
  color: var(--blanco);
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--amarillo); }

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45); }
.whatsapp-float svg { width: 32px; height: 32px; fill: #fff; }
.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.55);
  z-index: -1;
  animation: pulso-wa 2.4s ease-out infinite;
}
@keyframes pulso-wa {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.65); opacity: 0; }
}

/* ---------- Animación reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-accent::after { animation: none; }
  .whatsapp-float::before { animation: none; }
  .hero-bg, .cta-bg { transform: none !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1020px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .valores-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    top: 70px;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--carbon);
    width: min(320px, 86vw);
    height: calc(100vh - 70px);
    padding: 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
  }
  .nav.open { transform: translateX(0); }
  .nav a { padding: 10px 0; font-size: 1.05rem; width: 100%; }
  .nav .nav-cta { text-align: center; margin-top: 12px; padding: 14px 22px; }
  .nav-toggle { display: flex; }

  .hero-content { margin-left: 4%; }
  .two-col { grid-template-columns: 1fr; }
  .col-media { order: -1; }
  .col-media img { aspect-ratio: 16 / 11; }
  .mv-grid { grid-template-columns: 1fr; }
  .design-feature { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project img { aspect-ratio: 16 / 11; }
  .services-grid { grid-template-columns: 1fr; }
  .valores-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .form-buttons { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-logo { height: 40px; }
  .hero { min-height: 86vh; }
}
