/* ============================================================
   SURCONECTA (SCA) — Design tokens
   ============================================================ */
:root {
  --blue-900: #071C3C;
  --blue-800: #0B2E5C;
  --blue-700: #0E4C8A;
  --blue-600: #1568B8;
  --blue-500: #2C7FD1;
  --green-600: #6FA82A;
  --green-500: #8CC63F;
  --green-400: #A6D666;
  --ink: #0B1220;
  --ink-soft: #46526B;
  --bg: #F6F9FC;
  --bg-alt: #EEF3F8;
  --white: #FFFFFF;
  --border: #E1E8F0;

  --font-head: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --shadow-sm: 0 2px 10px rgba(11, 46, 92, 0.08);
  --shadow-md: 0 10px 30px rgba(11, 46, 92, 0.12);
  --shadow-lg: 0 20px 60px rgba(11, 46, 92, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--blue-900); }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.1em; margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue-700); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; border-radius: 8px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-family: var(--font-head);
  border-radius: 999px;
  border: 1.5px solid transparent;
  padding: 12px 22px;
  font-size: 0.95rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.btn-accent {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: var(--blue-900);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 16px 0;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { height: 40px; width: auto; transition: height .3s ease; }
.site-header.is-scrolled .brand-logo { height: 34px; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.94rem;
  color: #fff;
  position: relative;
  padding: 4px 0;
  transition: color .25s ease;
}
.site-header.is-scrolled .main-nav a { color: var(--blue-900); }
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--green-500);
  transition: width .25s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions .btn-primary { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease, background .25s ease;
}
.site-header.is-scrolled .nav-toggle span { background: var(--blue-900); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 0 80px;
  background: radial-gradient(ellipse at 20% 0%, #0F3F73 0%, var(--blue-900) 55%, #050f22 100%);
  overflow: hidden;
  color: #fff;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.9; }
.hero-grid { width: 100%; height: 100%; }
.grid-lines path { stroke-dasharray: 6 900; animation: dash-flow 9s linear infinite; }
.grid-lines path:nth-child(2) { animation-delay: -3s; }
.grid-lines path:nth-child(3) { animation-delay: -6s; }
@keyframes dash-flow {
  to { stroke-dashoffset: -1800; }
}
.grid-nodes circle { animation: node-pulse 2.6s ease-in-out infinite; }
.grid-nodes circle:nth-child(odd) { animation-delay: .6s; }
@keyframes node-pulse {
  0%, 100% { opacity: .5; r: 3; }
  50% { opacity: 1; r: 5; }
}

.hero-inner { position: relative; z-index: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #DCEBFF;
  margin-bottom: 24px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 4px rgba(140,198,63,0.25);
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  max-width: 16ch;
  margin-bottom: 24px;
}
.text-accent { color: var(--green-500); }

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.78);
  max-width: 640px;
  margin-bottom: 36px;
}

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

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 20px;
}
.scroll-cue span {
  display: block;
  width: 4px; height: 8px;
  background: var(--green-500);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}
@keyframes scroll-cue-move {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ============================================================
   Stats bar (floating over hero)
   ============================================================ */
.stats-bar {
  position: relative;
  z-index: 5;
  margin-top: -70px;
  padding: 0 0 40px;
}
.stats-bar-inner {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-block {
  text-align: center;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}
.stat-block:last-child { border-right: none; }
.stat-block-value {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--blue-700);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-block-value .stat-number { color: inherit; }
.stat-block-label { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; line-height: 1.35; }
.stat-block-feature { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.stat-block-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(140,198,63,0.15);
  color: var(--green-600);
}
.stat-block-icon svg { width: 22px; height: 22px; }

/* ============================================================
   Sections general
   ============================================================ */
.section { padding: 110px 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.section-lead { font-size: 1.08rem; }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 12px;
}
.eyebrow-light { color: var(--green-500); }

/* ============================================================
   Nosotros
   ============================================================ */
.nosotros { background: var(--white); }
.nosotros-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.nosotros-text p { font-size: 1.02rem; }
.location-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-alt);
  color: var(--blue-700);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 999px;
  margin-top: 8px;
}

.pillars { display: grid; gap: 20px; }
.pillar-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); background: #fff; }
.pillar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: #fff;
  margin-bottom: 16px;
}
.pillar-icon svg { width: 24px; height: 24px; }
.pillar-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pillar-card p { font-size: 0.92rem; margin-bottom: 0; }

/* ============================================================
   Servicios
   ============================================================ */
.servicios { background: var(--bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.service-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.service-num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--border);
}
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-alt);
  color: var(--blue-700);
}
.service-icon svg { width: 22px; height: 22px; }
.service-card-green .service-icon { background: rgba(140,198,63,0.15); color: var(--green-600); }
.service-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.service-card > p { font-size: 0.93rem; margin-bottom: 18px; }

.service-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--blue-600);
}
.service-toggle svg { width: 16px; height: 16px; transition: transform .25s ease; }
.service-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.service-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .35s ease, opacity .3s ease, margin-top .35s ease;
}
.service-detail > * { overflow: hidden; min-height: 0; }
.service-card[data-open="true"] .service-detail {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 16px;
}
.service-detail-inner { overflow: hidden; }
.service-detail p, .service-detail ul { font-size: 0.88rem; }
.service-detail ul { padding-left: 1.2em; }
.service-detail li { margin-bottom: 6px; }
.service-meta {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.83rem !important;
  margin-bottom: 0 !important;
}

/* ============================================================
   Process
   ============================================================ */
.process { background: var(--white); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.process-step {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 30px 24px;
  position: relative;
}
.process-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: var(--blue-900);
  font-family: var(--font-head);
  font-weight: 800;
  margin-bottom: 16px;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.process-step p { font-size: 0.9rem; margin-bottom: 0; }

/* ============================================================
   Proyectos / Cases
   ============================================================ */
.proyectos { background: var(--bg); }
.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.case-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.case-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  color: var(--green-500);
  margin-bottom: 18px;
}
.case-icon svg { width: 24px; height: 24px; }
.case-tag {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-600);
  margin-bottom: 6px;
}
.case-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.case-card p { font-size: 0.88rem; margin-bottom: 0; }

/* ============================================================
   Proyectos Fotovoltaicos
   ============================================================ */
.fv-section { background: var(--white); }

.fv-gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
  margin-bottom: 40px;
}
.fv-photo {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
}
.fv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fv-photo-large { grid-row: span 2; }
.fv-photo:not(.fv-photo-large) img { aspect-ratio: 4/3; }
.fv-photo-large img { min-height: 100%; aspect-ratio: auto; }
.fv-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(7,28,60,0.88) 0%, rgba(7,28,60,0) 100%);
  color: #fff;
  padding: 28px 18px 14px;
  font-size: 0.82rem;
  line-height: 1.4;
}
.fv-photo figcaption strong { display: block; font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 2px; }

.fv-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.fv-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.fv-card-accent { background: var(--blue-900); border-color: var(--blue-900); color: #fff; }
.fv-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--white);
  color: var(--blue-700);
  margin-bottom: 16px;
}
.fv-card-accent .fv-card-icon { background: rgba(255,255,255,0.1); color: var(--green-500); }
.fv-card-icon svg { width: 24px; height: 24px; }
.fv-card-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 8px;
}
.fv-card-accent .fv-card-tag { color: var(--green-500); }
.fv-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.fv-card-accent h3 { color: #fff; }
.fv-card p { font-size: 0.92rem; }
.fv-card-accent p { color: rgba(255,255,255,0.75); }
.fv-card ul { margin: 0; padding-left: 1.2em; font-size: 0.88rem; }
.fv-card li { margin-bottom: 8px; }
.fv-card-accent li { color: rgba(255,255,255,0.85); }

.fv-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 16px;
}
.fv-cta h3 { color: #fff; font-size: 1.25rem; margin-bottom: 6px; }
.fv-cta p { color: rgba(255,255,255,0.75); margin: 0; }

.fv-credit { font-size: 0.74rem; color: var(--ink-soft); opacity: 0.7; margin: 0; }

.service-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--green-600);
}

/* ============================================================
   Clientes
   ============================================================ */
.clientes { background: var(--white); }
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 64px;
}
.client-logo {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.client-logo:hover { background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.client-logo img { max-width: 100%; max-height: 50px; width: auto; height: auto; object-fit: contain; }
.client-logo-dark { background: var(--blue-900); }
.client-logo-dark:hover { background: var(--blue-800); }

.why-us h3 { font-size: 1.4rem; margin-bottom: 28px; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 40px;
}
.why-item { display: flex; gap: 14px; align-items: flex-start; }
.why-check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: var(--blue-900);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.why-item strong { display: block; font-family: var(--font-head); color: var(--blue-900); margin-bottom: 4px; }
.why-item p { font-size: 0.88rem; margin-bottom: 0; }

/* ============================================================
   Sustentabilidad
   ============================================================ */
.sustentabilidad {
  background: radial-gradient(ellipse at 80% 20%, #103A67 0%, var(--blue-900) 60%, #050f22 100%);
  color: #fff;
}
.sustentabilidad-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
.sustentabilidad-text h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.sustentabilidad-text p { color: rgba(255,255,255,0.75); font-size: 1.02rem; }
.sust-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0 32px;
}
.sust-benefit {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.sust-benefit svg { width: 22px; height: 22px; color: var(--green-500); flex-shrink: 0; }
.sust-benefit p { margin: 0; font-size: 0.88rem; color: #fff; font-weight: 500; }
.sustentabilidad-graphic svg { width: 100%; height: auto; }

/* ============================================================
   Contacto
   ============================================================ */
.contacto { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.contact-card:not(.contact-card-static):hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--blue-700);
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-card strong { display: block; font-family: var(--font-head); font-size: 0.85rem; color: var(--blue-900); }
.contact-card p { margin: 0; font-size: 0.92rem; }
.map-embed { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.map-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: var(--blue-900);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(44,127,209,0.15);
}
.form-note { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }
.form-note a { color: var(--blue-600); font-weight: 600; }
.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(140,198,63,0.15);
  color: var(--green-600);
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
}
.form-success.is-visible { display: flex; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--blue-900); color: rgba(255,255,255,0.7); padding-top: 72px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-logo { height: 34px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.55); }
.footer-col h4 { color: #fff; font-size: 0.9rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.88rem; color: rgba(255,255,255,0.65); transition: color .2s ease; }
.footer-col a:hover { color: var(--green-500); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom-inner p { margin: 0; font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ============================================================
   Chat widget
   ============================================================ */
.chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 900; }
.chat-launcher {
  width: 62px; height: 62px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--green-500), var(--blue-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: transform .2s ease;
}
.chat-launcher:hover { transform: scale(1.06); }
.chat-launcher svg { width: 26px; height: 26px; position: absolute; transition: opacity .2s ease, transform .2s ease; }
.chat-launcher .icon-close { opacity: 0; transform: scale(0.5) rotate(-90deg); }
.chat-widget.is-open .chat-launcher .icon-chat { opacity: 0; transform: scale(0.5) rotate(90deg); }
.chat-widget.is-open .chat-launcher .icon-close { opacity: 1; transform: scale(1) rotate(0); }
.chat-launcher-pulse {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--green-500);
  animation: pulse-ring 2.4s ease-out infinite;
}
.chat-widget.is-open .chat-launcher-pulse { display: none; }
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: .8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.chat-panel {
  position: absolute;
  bottom: 78px; right: 0;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.chat-widget.is-open .chat-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-header {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  color: #fff;
  padding: 16px 18px;
  flex-shrink: 0;
}
.chat-header-logo { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.chat-header strong { display: block; font-family: var(--font-head); font-size: 0.95rem; }
.chat-header span { font-size: 0.74rem; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 5px; }
.chat-header span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-500); display: inline-block; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}
.chat-msg { max-width: 85%; font-size: 0.88rem; line-height: 1.5; padding: 10px 14px; border-radius: 14px; }
.chat-msg a { color: var(--blue-600); font-weight: 600; text-decoration: underline; }
.chat-msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--ink);
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; border-bottom-left-radius: 4px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); opacity: 0.5; animation: typing-bounce 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-quick-replies {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 18px 14px;
  background: var(--bg);
  flex-shrink: 0;
}
.chat-quick-replies:empty { display: none; }
.quick-reply {
  border: 1px solid var(--blue-500);
  background: #fff;
  color: var(--blue-600);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.quick-reply:hover { background: var(--blue-600); color: #fff; }

.chat-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.chat-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--bg);
}
.chat-input-row input:focus { outline: none; border-color: var(--blue-500); }
.chat-input-row button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--blue-600);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-input-row button svg { width: 18px; height: 18px; }
.chat-input-row button:hover { background: var(--blue-700); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .fv-gallery { grid-template-columns: 1fr 1fr; }
  .fv-photo-large { grid-row: span 1; grid-column: span 2; }
  .fv-photo-large img { aspect-ratio: 16/9; min-height: 0; }
}

@media (max-width: 900px) {
  .nosotros-grid, .contact-grid, .sustentabilidad-inner { grid-template-columns: 1fr; }
  .sustentabilidad-graphic { max-width: 280px; margin: 0 auto; order: -1; }
  .why-grid { grid-template-columns: 1fr; }
  .stats-bar-inner { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .stat-block { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
  .stat-block:nth-child(2n) { border-right: none; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 82vw);
    background: var(--blue-900);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { color: #fff !important; font-size: 1.1rem; }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary { display: none; }

  .services-grid, .cases-grid, .clients-grid, .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .fv-gallery { grid-template-columns: 1fr; }
  .fv-photo-large { grid-column: span 1; }
  .fv-photo-large img { aspect-ratio: 4/3; }
  .fv-compare { grid-template-columns: 1fr; }
  .fv-cta { flex-direction: column; align-items: flex-start; }
  .section { padding: 72px 0; }
  .hero { padding-top: 120px; }
  .sust-benefits { grid-template-columns: 1fr; }
  .chat-panel { width: calc(100vw - 32px); right: -12px; }
  .footer-inner { grid-template-columns: 1fr; }
  .stats-bar { margin-top: -40px; }
  .stats-bar-inner { grid-template-columns: 1fr; padding: 28px 24px; }
  .stat-block { border-bottom: 1px solid var(--border); padding-bottom: 18px; }
  .stat-block:last-child { border-bottom: none; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .grid-lines path, .grid-nodes circle, .scroll-cue span, .chat-launcher-pulse { animation: none !important; }
}
