:root{
  --navy:#000F9F;
  --navy-dark:#000a6e;
  --coral:#FF6C37;
  --pink:#FFB5BB;
  --amber:#F6A016;
  --cream:#F7F6F0;
  --ink:#12131A;
  --ink-soft:#4B4D5C;
  --white:#FFFFFF;
  --radius-sm:10px;
  --radius-md:18px;
  --radius-lg:28px;
  --container:1200px;
  --shadow:0 20px 45px rgba(0,15,80,0.10);
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--ink);
  background:var(--cream);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{
  font-family:'Poppins','Inter',sans-serif;
  font-weight:600;
  color:var(--navy);
  line-height:1.15;
  margin:0 0 0.6em;
}
p{margin:0 0 1em; color:var(--ink-soft);}
a{color:inherit; text-decoration:none;}
img{max-width:100%; display:block;}
.container{max-width:var(--container); margin:0 auto; padding:0 24px;}
.section{padding:96px 0;}
.section-tight{padding:56px 0;}
.eyebrow{
  display:inline-block;
  font-size:13px;
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--coral);
  margin-bottom:14px;
}
.lead{font-size:19px; color:var(--ink-soft); max-width:640px;}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:14px 28px;
  border-radius:999px;
  font-weight:600;
  font-size:15px;
  border:2px solid transparent;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover{transform:translateY(-2px);}
.btn-primary{background:var(--navy); color:var(--white);}
.btn-primary:hover{box-shadow:0 12px 24px rgba(0,15,159,0.28);}
.btn-outline{background:transparent; border-color:var(--navy); color:var(--navy);}
.btn-outline:hover{background:var(--navy); color:var(--white);}
.btn-white{background:var(--white); color:var(--navy);}
.btn-white:hover{box-shadow:0 12px 24px rgba(0,0,0,0.18);}

/* Header */
.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(247,246,240,0.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(0,15,159,0.08);
  transform:translateY(0);
  transition:transform .35s ease;
}
.site-header.header-hide{transform:translateY(-100%);}
.scroll-progress{
  position:fixed; top:0; left:0; height:3px; width:100%; z-index:200;
  background:var(--coral); transform:scaleX(0); transform-origin:left;
  will-change:transform;
}
.back-to-top{
  position:fixed; right:22px; bottom:22px; z-index:150;
  width:46px; height:46px; border-radius:50%;
  background:var(--navy); color:var(--white);
  display:flex; align-items:center; justify-content:center;
  border:none; cursor:pointer; font-size:18px;
  opacity:0; transform:translateY(12px) scale(.9);
  transition:opacity .3s ease, transform .3s ease, background .2s ease;
  pointer-events:none;
}
.back-to-top.show{opacity:1; transform:translateY(0) scale(1); pointer-events:auto;}
.back-to-top:hover{background:var(--coral);}
@media(prefers-reduced-motion:reduce){
  .site-header, .back-to-top, .scroll-progress{transition:none;}
}
.nav-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 24px;
}
.brand{display:flex; align-items:center; gap:10px;}
.brand img{height:34px; width:auto;}
.brand-mark{height:42px; width:42px; border-radius:50%; transition:transform .3s ease;}
.brand:hover .brand-mark{transform:rotate(-8deg) scale(1.05);}
.nav-links{
  display:flex; align-items:center; gap:30px;
  list-style:none; margin:0; padding:0;
}
.nav-links a{
  position:relative;
  font-size:14.5px; font-weight:500; color:var(--ink);
  padding:6px 2px;
  transition:color .2s ease;
}
.nav-links a::after{
  content:'';
  position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background:var(--coral); border-radius:2px;
  transform:scaleX(0); transform-origin:left;
  transition:transform .25s ease;
}
.nav-links a:hover, .nav-links a.active{color:var(--navy);}
.nav-links a:hover::after, .nav-links a.active::after{transform:scaleX(1);}
.nav-cta{display:none;}
@media(min-width:900px){.nav-cta{display:inline-flex;}}
.menu-toggle{
  display:flex; background:none; border:none; cursor:pointer; padding:8px;
}
@media(min-width:900px){.menu-toggle{display:none;}}
.menu-toggle span{width:22px;height:2px;background:var(--navy);position:relative;}
.menu-toggle span::before,.menu-toggle span::after{content:'';position:absolute;left:0;width:22px;height:2px;background:var(--navy);}
.menu-toggle span::before{top:-7px;}
.menu-toggle span::after{top:7px;}
.nav-links{display:none;}
@media(min-width:900px){.nav-links{display:flex;}}
.nav-links.open{
  display:flex; position:absolute; top:100%; left:0; right:0;
  flex-direction:column; background:var(--white); padding:20px 24px; gap:16px;
  box-shadow:var(--shadow);
}

/* Hero */
.hero{
  position:relative;
  padding:64px 0 100px;
  overflow:hidden;
}
.hero-grid{
  display:grid; gap:48px; align-items:center;
  grid-template-columns:1fr;
}
@media(min-width:960px){.hero-grid{grid-template-columns:1.05fr 0.95fr;}}
.hero h1{font-size:clamp(32px,4.4vw,52px); letter-spacing:-0.01em;}
.hero-media{
  position:relative; border-radius:var(--radius-lg); overflow:hidden;
  box-shadow:var(--shadow);
  aspect-ratio:4/3;
}
.hero-media img{
  width:100%; height:100%; object-fit:cover;
  animation:kenburns 16s ease-in-out infinite alternate;
}
@keyframes kenburns{
  0%{transform:scale(1) translate(0,0);}
  100%{transform:scale(1.09) translate(-1%, -1%);}
}
@media(prefers-reduced-motion:reduce){.hero-media img{animation:none;}}
.hero-badge{
  position:absolute; left:20px; bottom:20px;
  background:rgba(255,255,255,0.94);
  border-radius:var(--radius-sm);
  padding:14px 18px;
  display:flex; gap:14px; align-items:center;
  box-shadow:var(--shadow);
}
.hero-badge strong{display:block; font-family:'Poppins'; color:var(--navy); font-size:20px;}
.hero-badge strong .count-up{color:inherit; font-size:inherit; font-family:inherit; font-weight:inherit;}
.hero-badge > div > span{font-size:12.5px; color:var(--ink-soft);}
.hero-cta-row{display:flex; gap:16px; flex-wrap:wrap; margin-top:32px;}
.hero-dots{position:absolute; inset:0; pointer-events:none; z-index:-1;}

/* Pillars / cards grid */
.grid-4{
  display:grid; gap:22px;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}
.pillar-card{
  position:relative; overflow:hidden;
  background:var(--navy); color:var(--white);
  border-radius:var(--radius-md);
  padding:32px 26px;
  min-height:230px;
  display:flex; flex-direction:column; justify-content:flex-end;
  transition:transform .25s ease, box-shadow .25s ease;
}
.pillar-card::before{
  content:''; position:absolute; inset:0;
  background-size:cover; background-position:center;
  transform:scale(1.02); transition:transform .5s ease;
}
.pillar-card::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,15,80,0.35), rgba(0,10,50,0.86));
}
.pillar-card:hover{transform:translateY(-6px); box-shadow:var(--shadow);}
.pillar-card:hover::before{transform:scale(1.08);}
.pillar-card .icon,.pillar-card h3,.pillar-card p,.pillar-card .pillar-link{position:relative; z-index:1;}
.pillar-card .icon{
  width:46px;height:46px; border-radius:50%;
  background:rgba(255,255,255,0.18);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:18px; font-size:20px;
}
.pillar-card h3{color:var(--white); font-size:17px; margin-bottom:10px;}
.pillar-card p{color:rgba(255,255,255,0.88); font-size:14.5px; margin:0;}
.pillar-card .pillar-link{
  display:inline-flex; align-items:center; gap:6px;
  margin-top:14px; font-size:13px; font-weight:600; color:var(--white);
}
.pillar-card:nth-child(1)::before{background-image:url('../img/temas/eficiencia-operativa.jpg');}
.pillar-card:nth-child(2)::before{background-image:url('../img/temas/reduccion-costos.jpg');}
.pillar-card:nth-child(3)::before{background-image:url('../img/temas/sostenibilidad.jpg');}
.pillar-card:nth-child(4)::before{background-image:url('../img/temas/cumplimiento-normativo.jpg');}

/* Metrics band */
.metrics-band{
  background:var(--navy);
  color:var(--white);
  border-radius:var(--radius-lg);
  padding:56px 40px;
  display:grid; gap:32px;
  grid-template-columns:1fr;
  align-items:center;
}
@media(min-width:860px){.metrics-band{grid-template-columns:1fr 1fr 1fr; padding:64px;}}
.metrics-band > div:last-child{align-self:end; text-align:right;}
@media(max-width:859px){.metrics-band > div:last-child{text-align:left;}}
.metric{}
.metric .num{
  font-family:'Poppins'; font-size:clamp(48px,6.4vw,68px); font-weight:600;
  color:var(--amber);
}
.metric p{color:rgba(255,255,255,0.9); font-size:18px; font-weight:500; margin:10px 0 0;}
.metric-source{font-size:12px; color:rgba(255,255,255,0.55); margin-top:6px;}

/* Services */
.service-card{
  background:var(--white); border-radius:var(--radius-md);
  padding:30px 26px; box-shadow:0 1px 0 rgba(0,15,159,0.06);
  border:1px solid rgba(0,15,159,0.08);
  transition:box-shadow .25s ease, transform .25s ease;
}
.service-card{transform-style:preserve-3d; will-change:transform;}
.service-card:hover{box-shadow:var(--shadow);}
.service-num{
  font-family:'Poppins'; color:var(--pink); font-size:34px; font-weight:600; margin-bottom:6px;
}
.service-card h3{font-size:18px;}
.service-card p{font-size:14.5px; margin:0;}

/* Projects gallery */
.gallery{
  display:grid; gap:18px;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
.gallery-item{
  position:relative; border-radius:var(--radius-md); overflow:hidden;
  aspect-ratio:4/3; box-shadow:0 1px 0 rgba(0,15,159,0.06);
  transform-style:preserve-3d; will-change:transform;
  transition:transform .2s ease;
}
.gallery-item img{width:100%; height:100%; object-fit:cover; transition:transform .5s ease;}
.gallery-item:hover img{transform:scale(1.06);}
.gallery-caption{
  position:absolute; left:0; right:0; bottom:0;
  padding:18px 16px 14px;
  background:linear-gradient(0deg, rgba(0,10,60,0.82), rgba(0,10,60,0));
  color:var(--white);
}
.gallery-caption strong{display:block; font-size:14.5px; font-family:'Poppins'; font-weight:500;}
.gallery-caption span{font-size:12px; color:rgba(255,255,255,0.75);}

/* Testimonials */
.testi-card{
  background:var(--white); border-radius:var(--radius-md);
  padding:28px 26px; border:1px solid rgba(0,15,159,0.08);
}
.testi-card p{font-size:15px; color:var(--ink); font-style:italic;}
.testi-card .who{font-size:13.5px; color:var(--coral); font-weight:600; font-style:normal;}

/* CTA band */
.cta-band{
  background:var(--coral); color:var(--white);
  border-radius:var(--radius-lg);
  padding:64px 40px;
  text-align:center;
}
.cta-band h2{color:var(--white);}
.cta-band p{color:rgba(255,255,255,0.9); max-width:560px; margin-left:auto; margin-right:auto;}

/* Footer */
.site-footer{background:#0a0d33; color:rgba(255,255,255,0.75); padding:60px 0 28px;}
.footer-grid{
  display:grid; gap:32px;
  grid-template-columns:1fr;
}
@media(min-width:760px){.footer-grid{grid-template-columns:1.3fr 1fr 1fr;}}
.footer-grid h4{color:var(--white); font-size:14px; text-transform:uppercase; letter-spacing:.06em;}
.footer-grid ul{list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px;}
.footer-grid a{font-size:14px; color:rgba(255,255,255,0.75);}
.footer-grid a:hover{color:var(--amber);}
.footer-bottom{
  margin-top:40px; padding-top:24px; border-top:1px solid rgba(255,255,255,0.1);
  display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; font-size:13px;
}

/* Reveal on scroll */
.reveal{opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease;}
.reveal.in{opacity:1; transform:translateY(0);}
.grid-4.reveal.in > *,
.gallery.reveal.in > *{animation:fadeUp .6s ease both;}
.grid-4.reveal.in > *:nth-child(1),.gallery.reveal.in > *:nth-child(1){animation-delay:.02s;}
.grid-4.reveal.in > *:nth-child(2),.gallery.reveal.in > *:nth-child(2){animation-delay:.12s;}
.grid-4.reveal.in > *:nth-child(3),.gallery.reveal.in > *:nth-child(3){animation-delay:.22s;}
.grid-4.reveal.in > *:nth-child(4),.gallery.reveal.in > *:nth-child(4){animation-delay:.32s;}
.grid-4.reveal.in > *:nth-child(5),.gallery.reveal.in > *:nth-child(5){animation-delay:.42s;}
.grid-4.reveal.in > *:nth-child(6),.gallery.reveal.in > *:nth-child(6){animation-delay:.52s;}
@keyframes fadeUp{from{opacity:0; transform:translateY(18px);} to{opacity:1; transform:translateY(0);}}

/* Hero entrance (plays on load, independent of scroll) */
.hero-title, .hero .lead, .hero-cta-row, .hero .eyebrow{
  animation:heroIn .8s ease both;
}
.hero .eyebrow{animation-delay:.05s;}
.hero-title{animation-delay:.15s;}
.hero .lead{animation-delay:.28s;}
.hero-cta-row{animation-delay:.4s;}
.hero-media{animation:heroInMedia .9s ease .2s both;}
@keyframes heroIn{from{opacity:0; transform:translateY(16px);} to{opacity:1; transform:translateY(0);}}
@keyframes heroInMedia{from{opacity:0; transform:translateY(24px) scale(.98);} to{opacity:1; transform:translateY(0) scale(1);}}
.hero-badge{animation:badgePop .5s ease .9s both;}
@keyframes badgePop{from{opacity:0; transform:translateY(10px) scale(.9);} to{opacity:1; transform:translateY(0) scale(1);}}

/* Section heading */
.section-head{max-width:640px; margin:0 auto 48px;}
.section-head.center{text-align:center; margin-left:auto; margin-right:auto;}

.tag-row{display:flex; flex-wrap:wrap; gap:10px; margin-top:8px;}
.tag{
  font-size:12.5px; font-weight:600; color:var(--navy);
  background:rgba(0,15,159,0.08); padding:6px 14px; border-radius:999px;
}

/* Page hero (interior pages) */
.page-hero{padding:56px 0 20px;}
.page-hero h1{font-size:clamp(30px,4vw,44px);}

/* Benefit bands (beneficios.html) */
.benefit-band{position:relative; padding:110px 0; background-size:cover; background-position:center;}
.benefit-overlay{position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,10,60,.5), rgba(0,10,60,.88));}
.benefit-content{position:relative; z-index:1; max-width:720px; margin:0 auto; padding:0 24px;}
.benefit-content h2{color:var(--white); font-size:clamp(26px,3.4vw,38px);}
.benefit-content p{color:rgba(255,255,255,.92); font-size:17px;}
.benefit-content .eyebrow{color:var(--amber);}
.benefit-content ul{margin:20px 0 0; padding-left:20px; color:rgba(255,255,255,.9);}
.benefit-content li{margin-bottom:8px;}

/* Timeline (proceso.html) */
.timeline{display:grid; gap:36px; max-width:760px; margin:0 auto;}
.timeline-step{display:flex; gap:22px; align-items:flex-start;}
.timeline-num{
  width:54px; height:54px; border-radius:50%; flex-shrink:0;
  background:var(--navy); color:var(--white);
  display:flex; align-items:center; justify-content:center;
  font-family:'Poppins'; font-weight:600; font-size:18px;
}
.timeline-step:nth-child(2) .timeline-num{background:var(--coral);}
.timeline-step:nth-child(3) .timeline-num{background:var(--amber); color:#3a2600;}
.timeline-step h3{margin-bottom:6px;}

/* Team (equipo.html) */
.team-card{
  background:var(--white); border-radius:var(--radius-md);
  padding:34px 30px; border:1px solid rgba(0,15,159,.08); text-align:center;
}
.avatar-circle{
  width:90px; height:90px; border-radius:50%; background:var(--navy); color:var(--white);
  display:flex; align-items:center; justify-content:center;
  font-family:'Poppins'; font-size:26px; font-weight:600; margin:0 auto 20px;
}
.team-card .role{color:var(--coral); font-weight:600; font-size:13.5px; margin-bottom:14px;}
.team-photo{width:220px; height:220px; border-radius:50%; object-fit:cover; margin:0 auto 20px; display:block;}

/* Contact page */
.contact-grid{display:grid; gap:40px; grid-template-columns:1fr;}
@media(min-width:860px){.contact-grid{grid-template-columns:1fr 1fr;}}
.contact-card{
  background:var(--white); border-radius:var(--radius-md);
  border:1px solid rgba(0,15,159,.08); padding:16px 20px;
  display:flex; align-items:center; gap:16px; margin-bottom:14px;
  transition:transform .2s ease, box-shadow .2s ease;
}
.contact-card:hover{transform:translateY(-3px); box-shadow:var(--shadow);}
.contact-card .icon{
  width:44px; height:44px; border-radius:50%; background:rgba(0,15,159,.08);
  display:flex; align-items:center; justify-content:center; font-size:18px; color:var(--navy); flex-shrink:0;
}
.contact-card strong{display:block; font-size:14px; color:var(--ink);}
.contact-card span{font-size:13px; color:var(--ink-soft);}

/* Project filter chips (proyectos.html) */
.filter-row{display:flex; flex-wrap:wrap; gap:10px; margin-bottom:32px;}
.filter-chip{
  font-size:13px; font-weight:600; color:var(--navy);
  background:rgba(0,15,159,0.06); border:1px solid rgba(0,15,159,.12);
  padding:8px 16px; border-radius:999px; cursor:pointer;
  transition:background .2s ease, color .2s ease;
}
.filter-chip:hover, .filter-chip.active{background:var(--navy); color:var(--white); border-color:var(--navy);}
