/* ============================================
   BAJA DESERT SOLAR — Hoja de estilos principal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital@1&display=swap');

:root{
  /* Paleta derivada del logo */
  --navy: #18324F;        /* fondo header/footer, texto fuerte */
  --navy-2: #234567;      /* navy un tono más claro, para degradados */
  --blue: #3A6EA5;        /* azul de marca (texto del logo) */
  --blue-deep: #2A5685;
  --blue-light: #8FB0DB;  /* ola clara */
  --sun: #F2A93D;         /* sol — acento principal */
  --sun-deep: #DD7E33;    /* borde del sol / degradado */
  --sun-pale: #FBD79B;
  --green: #5C8C3E;       /* cactus */
  --sand: #F7F2E9;        /* fondo cálido */
  --sand-2: #EFE7D7;
  --white: #FFFFFF;
  --ink: #182230;
  --ink-soft: #4B5563;
  --line: rgba(24,50,79,0.12);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Source Serif 4', serif;

  --container: 1180px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(24,50,79,0.08);
  --shadow-strong: 0 18px 40px rgba(24,50,79,0.16);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
p{ margin: 0 0 1em; color: var(--ink-soft); }
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section{ padding: 96px 0; }
@media (max-width: 720px){ section{ padding: 64px 0; } }

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--blue-deep);
  margin-bottom: .6em;
}
.eyebrow::before{
  content:"";
  width: 22px; height: 2px;
  background: var(--sun);
  display:inline-block;
}

/* Visually-hidden helper */
.visually-hidden{
  position:absolute; width:1px; height:1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  display: inline-flex;
  align-items:center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{
  background: linear-gradient(135deg, var(--sun) 0%, var(--sun-deep) 100%);
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(221,126,51,0.35);
}
.btn-primary:hover{ box-shadow: 0 14px 30px rgba(221,126,51,0.45); }
.btn-ghost{
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-ghost:hover{ background: rgba(255,255,255,0.12); }
.btn-outline{
  background: transparent;
  border-color: var(--blue);
  color: var(--blue-deep);
}
.btn-outline:hover{ background: rgba(58,110,165,0.08); }

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top:0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand img{ height: 46px; width:auto; }
.brand-text{
  font-family: var(--font-display);
  color: var(--white);
  font-weight:700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  line-height:1.1;
}
.brand-text span{
  display:block;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight:400;
  font-size: .72rem;
  color: var(--blue-light);
  letter-spacing: 0;
}

.main-nav ul{
  display:flex;
  gap: 8px;
  align-items:center;
}
.main-nav a{
  color: rgba(255,255,255,0.85);
  font-family: var(--font-display);
  font-weight:500;
  font-size: .95rem;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.main-nav a:hover{ background: rgba(255,255,255,0.08); color: var(--white); }
.main-nav a.active{
  background: rgba(242,169,61,0.16);
  color: var(--sun);
}
.header-actions{ display:flex; align-items:center; gap:14px; }
.header-phone{
  display:flex; align-items:center; gap:8px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: .92rem;
  white-space: nowrap;
}
.header-phone svg{ flex-shrink:0; }

.nav-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding: 8px;
  color: var(--white);
}
.nav-toggle svg{ width:26px; height:26px; }

@media (max-width: 940px){
  .header-phone{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .main-nav{
    position:absolute;
    top: 100%; left:0; right:0;
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    max-height:0;
    overflow:hidden;
    transition: max-height .28s ease;
  }
  .main-nav.open{ max-height: 360px; }
  .main-nav ul{
    flex-direction:column;
    align-items:stretch;
    padding: 8px 24px 20px;
    gap:4px;
  }
  .main-nav a{ display:block; padding: 12px 16px; }
}

/* ---------- Hero (signature: horizonte / onda de calidad de energía) ---------- */
.hero{
  position:relative;
  overflow:hidden;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 38%, var(--sun-deep) 78%, var(--sun) 100%);
  color: var(--white);
  padding-top: 110px;
  padding-bottom: 0;
}
.hero-inner{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items:center;
  padding-bottom: 70px;
}
.hero h1{
  color: var(--white);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  margin-bottom: .5em;
}
.hero h1 em{
  font-style:italic;
  font-family: var(--font-accent);
  color: var(--sun);
  font-weight:400;
}
.hero p.lead{
  color: rgba(255,255,255,0.86);
  font-size: 1.12rem;
  max-width: 540px;
}
.hero-actions{ display:flex; gap: 14px; margin-top: 28px; flex-wrap:wrap; }
.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .85rem;
  margin-bottom: 22px;
}
.hero-badge .dot{ width:7px; height:7px; border-radius:50%; background: var(--sun); }

.hero-art{ position:relative; z-index:2; }
.hero-art svg{ width:100%; height:auto; }

.wave-divider{
  position:relative;
  width:100%;
  display:block;
  margin-top: -2px;
}
.wave-divider svg{ width:100%; display:block; }
.wave-line{
  fill:none;
  stroke: rgba(255,255,255,0.55);
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-dasharray: 6 10;
  animation: dashMove 6s linear infinite;
}
@keyframes dashMove{ to{ stroke-dashoffset: -160; } }

@media (max-width: 860px){
  .hero-inner{ grid-template-columns: 1fr; padding-bottom: 40px; }
  .hero-art{ order:-1; max-width: 320px; margin: 0 auto; }
}

/* ---------- Stat strip ---------- */
.stat-strip{
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.stat-strip .container{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 36px 24px;
}
.stat{ text-align:center; }
.stat strong{
  display:block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--blue-deep);
}
.stat span{ font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 720px){
  .stat-strip .container{ grid-template-columns: 1fr; gap:18px; }
}

/* ---------- Section headers ---------- */
.section-head{ max-width: 680px; margin-bottom: 48px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* ---------- Services grid ---------- */
.services-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px){ .services-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px){ .services-grid{ grid-template-columns: 1fr; } }

.service-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-strong); }
.service-icon{
  width:52px; height:52px;
  border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--sun-pale), var(--sun));
  margin-bottom: 18px;
}
.service-icon svg{ width:26px; height:26px; color: var(--navy); }
.service-card h3{ font-size: 1.12rem; margin-bottom:.4em; }
.service-card p{ font-size: .95rem; margin-bottom: 0; }
.service-card.featured{
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue-deep) 100%);
  border-color: transparent;
}
.service-card.featured h3, .service-card.featured p{ color: var(--white); }
.service-card.featured p{ color: rgba(255,255,255,0.78); }
.service-card.featured .service-icon{ background: rgba(255,255,255,0.14); }
.service-card.featured .service-icon svg{ color: var(--sun); }

/* ---------- Two column feature ---------- */
.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items:center;
}
@media (max-width: 860px){ .split{ grid-template-columns:1fr; gap:32px; } }
.split.reverse .split-art{ order: 2; }

.checklist li{
  display:flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
  font-weight:500;
}
.checklist li:last-child{ border-bottom:none; }
.checklist svg{ flex-shrink:0; color: var(--green); margin-top:2px; }

/* ---------- Process timeline ---------- */
.process{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position:relative;
}
@media (max-width: 860px){ .process{ grid-template-columns: 1fr; gap: 28px; } }
.process-step{
  position:relative;
  padding: 0 22px;
  text-align:left;
}
.process-step:not(:last-child)::after{
  content:"";
  position:absolute;
  top: 22px;
  right: -6px;
  width: 0; height:0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--sun);
}
@media (max-width: 860px){ .process-step:not(:last-child)::after{ display:none; } }
.process-num{
  font-family: var(--font-display);
  font-size: .82rem;
  color: var(--white);
  background: var(--blue);
  width: 44px; height:44px;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 16px;
  font-weight:700;
}
.process-step h3{ font-size: 1.05rem; }
.process-step p{ font-size: .92rem; }

/* ---------- CTA band ---------- */
.cta-band{
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue-deep) 100%);
  color: var(--white);
  border-radius: 22px;
  padding: 56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 32px;
  flex-wrap:wrap;
}
.cta-band h2{ color:var(--white); margin-bottom: .3em; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-band p{ color: rgba(255,255,255,0.78); margin:0; max-width: 460px; }
@media (max-width: 720px){ .cta-band{ padding: 36px 28px; } }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--navy);
  color: rgba(255,255,255,0.78);
  padding-top: 64px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 860px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-brand img{ height: 50px; margin-bottom: 14px; }
.footer-brand p{ font-size: .92rem; max-width: 320px; }
.footer-col h4{ color: var(--white); font-size: .95rem; margin-bottom: 14px; }
.footer-col ul li{ margin-bottom: 10px; font-size: .92rem; }
.footer-col a:hover{ color: var(--sun); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center;
  padding: 22px 0; font-size: .82rem; flex-wrap:wrap; gap:10px;
}
.social-row{ display:flex; gap:10px; }
.social-row a{
  width: 36px; height:36px;
  border-radius:50%;
  background: rgba(255,255,255,0.08);
  display:flex; align-items:center; justify-content:center;
  transition: background .18s ease;
}
.social-row a:hover{ background: var(--sun); color: var(--navy); }

/* ---------- Reveal on scroll ---------- */
.reveal{ opacity:0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  .wave-line{ animation:none; }
  html{ scroll-behavior:auto; }
}

/* ---------- Page hero (sub-pages) ---------- */
.page-hero{
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-deep) 100%);
  color: var(--white);
  padding: 92px 0 70px;
  position:relative;
  overflow:hidden;
}
.page-hero h1{ color:var(--white); font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero p{ color: rgba(255,255,255,0.8); max-width: 560px; }
.breadcrumb{
  font-size:.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
  font-family: var(--font-display);
}
.breadcrumb a:hover{ color: var(--sun); }

/* ---------- Generic content blocks ---------- */
.card{
  background: var(--white);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.values-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 980px){ .values-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .values-grid{ grid-template-columns: 1fr; } }

.value-card{ text-align:left; }
.value-card .service-icon{ background: linear-gradient(135deg, var(--blue-light), var(--blue)); }
.value-card .service-icon svg{ color: var(--white); }

/* ---------- Contact page ---------- */
.contact-grid{
  display:grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 44px;
  align-items:start;
}
@media (max-width: 940px){ .contact-grid{ grid-template-columns: 1fr; } }

.contact-info-card{
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 36px;
}
.contact-info-card h3{ color: var(--white); }
.contact-row{
  display:flex; gap:14px; align-items:flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.contact-row:last-child{ border-bottom:none; }
.contact-row svg{ flex-shrink:0; color: var(--sun); margin-top:3px; }
.contact-row strong{ display:block; font-family: var(--font-display); font-size:.85rem; color: var(--blue-light); margin-bottom:2px; }
.contact-row a, .contact-row span{ color: rgba(255,255,255,0.92); }

.form-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-row{ margin-bottom: 18px; }
.form-row label{
  display:block;
  font-family: var(--font-display);
  font-size: .88rem;
  margin-bottom: 6px;
  color: var(--navy);
}
.form-row input, .form-row textarea, .form-row select{
  width:100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: .96rem;
  background: var(--sand);
  color: var(--ink);
  transition: border-color .18s ease;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus{
  border-color: var(--blue);
  outline:none;
}
.form-grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px){ .form-grid-2{ grid-template-columns:1fr; } }
.form-note{ font-size: .85rem; color: var(--ink-soft); margin-top: 10px; }
.form-success{
  display:none;
  background: rgba(92,140,62,0.12);
  border: 1px solid var(--green);
  color: #2f4a1f;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: .92rem;
}
.form-success.show{ display:block; }

.map-wrap{
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-top: 28px;
}
.map-wrap iframe{ width:100%; height: 320px; border:0; display:block; }

/* ---------- Galería de proyectos ---------- */
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 980px){ .gallery-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .gallery-grid{ grid-template-columns: 1fr; } }
.gallery-item{
  position:relative;
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.gallery-item.tall{ aspect-ratio: 3/4; }
.gallery-item img{
  width:100%; height:100%;
  object-fit: cover;
  display:block;
  transition: transform .4s ease;
}
.gallery-item:hover img{ transform: scale(1.05); }
.gallery-caption{
  position:absolute;
  left:0; right:0; bottom:0;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(24,50,79,0) 0%, rgba(24,50,79,0.88) 100%);
  color: var(--white);
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight:500;
}

/* ---------- Foto dentro de tarjeta / split (reemplaza ilustración) ---------- */
.photo-frame{
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.photo-frame img{ width:100%; height:100%; object-fit:cover; display:block; }

.tag-pill{
  display:inline-block;
  background: rgba(58,110,165,0.1);
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: .78rem;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.lead-quote{
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--navy);
  border-left: 3px solid var(--sun);
  padding-left: 22px;
  margin: 32px 0;
}
.team-banner{
  background: var(--sand-2);
  border-radius: var(--radius);
  padding: 36px;
  display:flex;
  gap: 26px;
  align-items:center;
  flex-wrap:wrap;
}
.team-banner svg{ flex-shrink:0; }
