/* =========================================================
   ANDES SOLUCIONES INTEGRALES S.A. — Hoja de estilos
   ========================================================= */

:root{
  --blue-900:#001f47;
  --blue-800:#00306e;
  --blue-700:#003e8f;
  --blue-600:#004aac;   /* azul de marca */
  --blue-500:#1b63c9;
  --blue-100:#e7f0fb;

  --grey-900:#2b2b2b;
  --grey-700:#5c5c5c;
  --grey-500:#8b8b8b;
  --grey-300:#cccccc;   /* gris de marca */
  --grey-200:#e9e9e9;
  --grey-100:#f4f5f7;

  --white:#ffffff;

  --font-head:'Poppins', 'Segoe UI', sans-serif;
  --font-body:'Inter', 'Segoe UI', sans-serif;

  --radius-sm:8px;
  --radius-md:14px;
  --radius-lg:22px;

  --shadow-sm:0 2px 10px rgba(0,20,60,.06);
  --shadow-md:0 10px 30px rgba(0,20,60,.10);
  --shadow-lg:0 20px 50px rgba(0,20,60,.18);

  --transition:.35s cubic-bezier(.22,.61,.36,1);
  --header-h:78px;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--grey-900);
  background:var(--white);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{list-style:none;margin:0;padding:0;}
button{font-family:inherit;cursor:pointer;}
h1,h2,h3,h4,h5{font-family:var(--font-head);font-weight:700;line-height:1.2;margin:0 0 .5em;color:var(--blue-900);}
p{margin:0 0 1em;color:var(--grey-700);}
.container{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
}

/* ===== Preloader ===== */
#preloader{
  position:fixed;inset:0;z-index:9999;
  background:linear-gradient(135deg,var(--blue-700),var(--blue-900));
  display:flex;align-items:center;justify-content:center;
  transition:opacity .5s ease, visibility .5s ease;
}
#preloader.hide{opacity:0;visibility:hidden;}
.loader-logo img{width:180px;height:auto;animation:pulse 1.1s ease-in-out infinite;}
@keyframes pulse{0%,100%{transform:scale(1);opacity:1;}50%{transform:scale(1.15);opacity:.6;}}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55em;
  padding:.9em 1.7em;
  border-radius:999px;
  font-weight:600;
  font-size:.98rem;
  border:2px solid transparent;
  transition:transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space:nowrap;
}
.btn i{font-size:1.05em;}
.btn-primary{
  background:var(--blue-600);
  color:var(--white);
  box-shadow:0 10px 24px rgba(0,74,172,.35);
}
.btn-primary:hover{background:var(--blue-700);transform:translateY(-2px);box-shadow:0 14px 30px rgba(0,74,172,.4);}
.btn-ghost{
  background:transparent;
  color:var(--blue-900);
  border-color:var(--grey-300);
}
.btn-ghost:hover{border-color:var(--blue-600);color:var(--blue-600);transform:translateY(-2px);}
.btn-whatsapp{
  background:#25D366;
  color:var(--white);
  padding:.7em 1.3em;
  font-size:.92rem;
  box-shadow:0 8px 18px rgba(37,211,102,.35);
}
.btn-whatsapp:hover{background:#1ebd5a;transform:translateY(-2px);}
.btn-block{width:100%;}

/* ===== Header ===== */
.site-header{
  position:fixed;top:0;left:0;right:0;z-index:1000;
  height:var(--header-h);
  display:flex;align-items:center;
  background:transparent;
  transition:background var(--transition), box-shadow var(--transition), height var(--transition);
}
.site-header.scrolled{
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(8px);
  box-shadow:var(--shadow-sm);
  height:68px;
}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:24px;
}
.brand{display:flex;align-items:center;gap:12px;}
.brand-logo{height:50px;width:auto;display:block;transition:opacity var(--transition);}
/* Header: white logo over the transparent/dark hero, dark logo once the header turns white on scroll */
.brand-logo--dark{display:none;}
.site-header.scrolled .brand-logo--light{display:none;}
.site-header.scrolled .brand-logo--dark{display:block;}

/* Footer: always on a dark background, always the white logo */
.footer-brand .brand-logo{height:50px;}

.main-nav ul{display:flex;gap:2rem;}
.nav-link{
  position:relative;
  font-weight:500;
  font-size:.95rem;
  color:var(--white);
  padding:.4em 0;
  transition:color var(--transition);
}
.site-header.scrolled .nav-link{color:var(--grey-900);}
.nav-link::after{
  content:'';position:absolute;left:0;bottom:-2px;width:0;height:2px;
  background:var(--blue-500);transition:width var(--transition);
}
.site-header.scrolled .nav-link::after{background:var(--blue-600);}
.nav-link:hover,.nav-link.active{color:#bcd4f5;}
.site-header.scrolled .nav-link:hover,.site-header.scrolled .nav-link.active{color:var(--blue-600);}
.nav-link:hover::after,.nav-link.active::after{width:100%;}

.header-cta{display:flex;align-items:center;gap:16px;}

.nav-toggle{
  display:none;flex-direction:column;gap:5px;
  background:none;border:none;padding:6px;
}
.nav-toggle span{
  width:24px;height:2px;background:var(--white);border-radius:2px;transition:var(--transition);
}
.site-header.scrolled .nav-toggle span{background:var(--blue-900);}
.nav-toggle.open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.nav-toggle.open span:nth-child(2){opacity:0;}
.nav-toggle.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ===== Hero ===== */
.hero{
  position:relative;
  min-height:100vh;
  min-height:100svh;
  display:flex;flex-direction:column;justify-content:center;
  padding-top:var(--header-h);
  overflow:hidden;
  color:var(--white);
}
/* On shorter viewports (typical laptops), don't force a full 100vh box —
   let the hero fit its own content so the stats bar always stays on screen
   instead of being pinned past the fold of an artificially tall hero. */
@media (max-height:920px){
  .hero{min-height:auto;}
}
.hero-bg{
  position:absolute;inset:0;
  background-size:cover;background-position:center;
  transform:scale(1.05);
  filter:saturate(1.05);
}
.hero-overlay{
  position:absolute;inset:0;
  background:
    linear-gradient(120deg, rgba(0,20,50,.92) 0%, rgba(0,42,95,.86) 40%, rgba(0,74,172,.55) 100%);
}
.hero::after{
  content:'';position:absolute;right:-10%;top:-10%;width:60%;height:60%;
  background:radial-gradient(circle, rgba(255,255,255,.06), transparent 70%);
  pointer-events:none;
}
.hero-content{position:relative;z-index:2;padding-top:2.2rem;padding-bottom:1.8rem;max-width:820px;}
.eyebrow{
  text-transform:uppercase;letter-spacing:3px;font-size:.78rem;font-weight:600;
  color:#8fc0ff;margin-bottom:.9rem;
}
.hero h1{
  color:var(--white);
  font-size:clamp(1.9rem, 4vw, 3.1rem);
  font-weight:800;
  margin-bottom:.8rem;
}
.hero h1 span{color:#7fb4ff;}
.hero-sub{
  color:rgba(255,255,255,.85);
  font-size:1.08rem;
  max-width:640px;
  margin-bottom:1.5rem;
}
.hero-actions{display:flex;gap:1rem;flex-wrap:wrap;}
.hero .btn-ghost{color:var(--white);border-color:rgba(255,255,255,.35);}
.hero .btn-ghost:hover{border-color:var(--white);color:var(--white);background:rgba(255,255,255,.08);}

.hero-stats{position:relative;z-index:2;margin-top:auto;}
.hero-stats-grid{
  display:grid;grid-template-columns:repeat(4,1fr);
  border-top:1px solid rgba(255,255,255,.18);
  padding:1.1rem 0;
}
.stat{text-align:center;border-right:1px solid rgba(255,255,255,.15);}
.stat:last-child{border-right:none;}
.stat-number{font-family:var(--font-head);font-size:clamp(1.6rem,3vw,2.4rem);font-weight:800;color:var(--white);}
.stat-suffix{font-family:var(--font-head);font-size:1.4rem;font-weight:800;color:var(--white);}
.stat p{margin:.3rem 0 0;font-size:.82rem;color:rgba(255,255,255,.75);text-transform:uppercase;letter-spacing:1px;}

/* ===== Sections ===== */
.section{padding:6.5rem 0;}
.section-alt{background:var(--grey-100);}
.section-dark{
  background:linear-gradient(135deg,var(--blue-900),var(--blue-700));
  color:var(--white);
}
.section-eyebrow{
  text-transform:uppercase;letter-spacing:3px;font-size:.78rem;font-weight:700;
  color:var(--blue-600);margin-bottom:.7rem;
}
.section-eyebrow--light{color:#8fc0ff;}
.text-light{color:var(--white);}
.text-light-70{color:rgba(255,255,255,.78);}
.section-head{max-width:680px;margin:0 auto 3.2rem;text-align:center;}
.section-head h2{font-size:clamp(1.7rem,3vw,2.4rem);}
.section-desc{font-size:1.05rem;color:var(--grey-700);}

.split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4.5rem;
  align-items:center;
}
.split--reverse .split-media{order:2;}
.split--reverse .split-text{order:1;}
.split-text h2{font-size:clamp(1.7rem,3vw,2.3rem);}
.pill-row{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.5rem;}
.pill{
  display:inline-flex;align-items:center;gap:.5em;
  background:var(--blue-100);color:var(--blue-700);
  padding:.5em 1.1em;border-radius:999px;font-size:.86rem;font-weight:600;
}

/* Media stack (Nosotros) */
.media-stack{position:relative;padding:1.5rem 2.5rem 2.5rem 0;}
.media-card{
  position:relative;margin:0;border-radius:var(--radius-md);overflow:hidden;
  box-shadow:var(--shadow-md);
}
.media-card img{height:280px;width:100%;object-fit:cover;}
.media-card--top{width:82%;}
.media-card--bottom{
  width:65%;margin-top:-4rem;margin-left:auto;
  border:6px solid var(--white);
}
.media-card--bottom img{height:200px;}
.media-card figcaption{
  position:absolute;left:0;right:0;bottom:0;
  padding:1rem 1.2rem;
  background:linear-gradient(0deg, rgba(0,20,50,.85), transparent);
  color:var(--white);display:flex;flex-direction:column;
}
.media-card figcaption strong{font-family:var(--font-head);font-size:1rem;}
.media-card figcaption span{font-size:.78rem;color:rgba(255,255,255,.8);}

/* Frame photo (por que elegirnos) */
.frame-photo{
  position:relative;border-radius:var(--radius-lg);overflow:hidden;
  box-shadow:var(--shadow-lg);
}
.frame-photo::before{
  content:'';position:absolute;inset:0;
  background:linear-gradient(0deg, rgba(0,20,50,.35), transparent 50%);
  z-index:1;
}
.frame-photo img{height:420px;object-fit:cover;width:100%;}

/* ===== Cards / Servicios ===== */
.cards-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:2rem;
}
.service-card{
  background:var(--white);
  border-radius:var(--radius-md);
  overflow:hidden;
  box-shadow:var(--shadow-sm);
  transition:transform var(--transition), box-shadow var(--transition);
}
.service-card:hover{transform:translateY(-8px);box-shadow:var(--shadow-lg);}
.service-img{height:200px;overflow:hidden;}
.service-img img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease;}
.service-card:hover .service-img img{transform:scale(1.08);}
.service-body{padding:1.8rem;position:relative;}
.service-icon{
  position:absolute;top:-28px;left:1.8rem;
  width:52px;height:52px;border-radius:14px;
  background:var(--blue-600);color:var(--white);
  display:flex;align-items:center;justify-content:center;
  font-size:1.3rem;box-shadow:0 10px 20px rgba(0,74,172,.35);
}
.service-body h3{font-size:1.15rem;margin-top:1.4rem;}
.service-body p{margin-bottom:0;font-size:.94rem;}

/* ===== Cobertura ===== */
.map-wrap{position:relative;max-width:380px;margin:0 auto;}
.map-img{width:100%;filter:drop-shadow(0 20px 30px rgba(0,74,172,.25));}
.map-pin{
  position:absolute;color:#08c534;font-size:1.4rem;
  filter:drop-shadow(0 4px 6px rgba(0,0,0,.25));
  animation:bob 2.4s ease-in-out infinite;
}
.map-pin--2{animation-delay:.4s;color:#08c534;}
.map-pin--2{animation-delay:.4s;color:#f2a900;}
.map-pin--3{animation-delay:.8s;color:var(--blue-900);}
@keyframes bob{0%,100%{transform:translateY(0);}50%{transform:translateY(-8px);}}

.coverage-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem;margin-top:2rem;}
.coverage-card{
  background:var(--white);
  border:1px solid var(--grey-200);
  border-radius:var(--radius-md);
  padding:1.4rem 1.3rem;
  transition:transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.coverage-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md);border-color:transparent;}
.coverage-card h4{
  display:flex;align-items:center;gap:.6em;
  font-size:.98rem;color:var(--blue-700);margin-bottom:.8rem;
}
.coverage-card li{
  font-size:.88rem;color:var(--grey-700);padding:.28rem 0;
  border-top:1px dashed var(--grey-200);
}
.coverage-card li:first-child{border-top:none;}

/* ===== Por que elegirnos ===== */
.feature-list{display:flex;flex-direction:column;gap:1.5rem;margin-top:2rem;}
.feature-item{display:flex;gap:1rem;align-items:flex-start;}
.feature-check{
  flex-shrink:0;width:36px;height:36px;border-radius:50%;
  background:var(--blue-100);color:var(--blue-600);
  display:flex;align-items:center;justify-content:center;font-size:.9rem;
}
.feature-item h4{font-size:1.05rem;margin-bottom:.3rem;color:var(--blue-900);}
.feature-item p{font-size:.92rem;margin-bottom:0;}

/* ===== Tecnologia ===== */
.phone-frame{
  max-width:300px;margin:0 auto;
  border-radius:36px;
  padding:14px;
  background:linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.15);
  box-shadow:var(--shadow-lg);
}
.phone-frame img{border-radius:24px;}
.tech-list{display:flex;flex-direction:column;gap:1rem;margin-top:1.6rem;}
.tech-list li{
  display:flex;align-items:center;gap:.8em;
  color:rgba(255,255,255,.9);font-weight:500;font-size:.96rem;
}
.tech-list i{color:#7fb4ff;font-size:1.1rem;width:22px;text-align:center;}

/* ===== Clientes ===== */
.clients-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:1.4rem;
}
.client-logo{
  background:var(--white);
  border:1px solid var(--grey-200);
  border-radius:var(--radius-md);
  height:120px;
  display:flex;align-items:center;justify-content:center;
  padding:1.2rem;
  transition:transform var(--transition), box-shadow var(--transition);
}
.client-logo:hover{transform:translateY(-6px);box-shadow:var(--shadow-md);}
.client-logo img{max-height:100%;width:auto;max-width:100%;object-fit:contain;}
.clients-note{text-align:center;margin-top:2rem;color:var(--grey-500);font-style:italic;}

/* ===== Contacto ===== */
.contact-grid{
  display:flex;justify-content:center;
}
.contact-info{
  display:flex;flex-direction:column;gap:1rem;
  width:100%;max-width:560px;
}
.contact-row{
  display:flex;gap:1rem;align-items:flex-start;
  background:var(--white);
  border:1px solid var(--grey-200);
  border-radius:var(--radius-md);
  padding:1.1rem 1.3rem;
  transition:transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.contact-row:hover{transform:translateX(4px);box-shadow:var(--shadow-sm);border-color:var(--blue-100);}
.contact-row span:last-child{display:flex;flex-direction:column;font-size:.92rem;color:var(--grey-700);text-align:left;}
.contact-row strong{font-family:var(--font-head);font-size:.95rem;color:var(--blue-900);margin-bottom:.2rem;}
.contact-icon{
  flex-shrink:0;width:42px;height:42px;border-radius:12px;
  background:var(--blue-100);color:var(--blue-600);
  display:flex;align-items:center;justify-content:center;font-size:1.05rem;
}

/* ===== Footer ===== */
.site-footer{background:var(--blue-900);color:rgba(255,255,255,.8);padding-top:4rem;}
.footer-grid{
  display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:3rem;
  padding-bottom:3rem;border-bottom:1px solid rgba(255,255,255,.1);
}
.footer-brand p{color:rgba(255,255,255,.65);font-size:.92rem;margin-top:1rem;}
.footer-ruc{font-weight:600;color:rgba(255,255,255,.8) !important;}
.footer-col h5{color:var(--white);font-size:.95rem;text-transform:uppercase;letter-spacing:1px;margin-bottom:1.2rem;}
.footer-col ul{display:flex;flex-direction:column;gap:.7rem;}
.footer-col a{color:rgba(255,255,255,.7);font-size:.92rem;transition:color var(--transition);}
.footer-col a:hover{color:var(--white);}
.footer-col li{color:rgba(255,255,255,.7);font-size:.9rem;display:flex;align-items:center;gap:.6em;}
.footer-col li i{color:#7fb4ff;width:16px;}
.footer-bottom-inner{padding:1.4rem 0;text-align:center;font-size:.82rem;color:rgba(255,255,255,.5);}

/* ===== Floating buttons ===== */
.whatsapp-float{
  position:fixed;bottom:26px;right:26px;z-index:900;
  width:58px;height:58px;border-radius:50%;
  background:#25D366;color:var(--white);
  display:flex;align-items:center;justify-content:center;font-size:1.7rem;
  box-shadow:0 12px 26px rgba(37,211,102,.45);
  animation:floatPulse 2.6s ease-in-out infinite;
  transition:transform var(--transition);
}
.whatsapp-float:hover{transform:scale(1.08);}
@keyframes floatPulse{0%,100%{box-shadow:0 12px 26px rgba(37,211,102,.45);}50%{box-shadow:0 12px 34px rgba(37,211,102,.7);}}

.back-to-top{
  position:fixed;bottom:26px;right:96px;z-index:900;
  width:46px;height:46px;border-radius:50%;
  background:var(--white);color:var(--blue-700);
  border:1px solid var(--grey-200);
  display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow-sm);
  opacity:0;visibility:hidden;transform:translateY(10px);
  transition:opacity var(--transition), visibility var(--transition), transform var(--transition);
}
.back-to-top.show{opacity:1;visibility:visible;transform:translateY(0);}
.back-to-top:hover{background:var(--blue-600);color:var(--white);}

/* ===== Reveal animation ===== */
[data-reveal]{opacity:0;transform:translateY(28px);transition:opacity .8s ease, transform .8s ease;}
[data-reveal].in-view{opacity:1;transform:translateY(0);}

/* ===== Responsive ===== */
@media (max-width:1024px){
  .cards-grid{grid-template-columns:repeat(2,1fr);}
  .clients-grid{grid-template-columns:repeat(3,1fr);}
  .coverage-grid{grid-template-columns:1fr;}
  .split{gap:3rem;}
}

@media (max-width:860px){
  :root{--header-h:68px;}
  .hero-content{padding-top:1.4rem;padding-bottom:1.2rem;}
  .eyebrow{margin-bottom:.6rem;}
  .hero h1{font-size:clamp(1.6rem,6vw,2.3rem);margin-bottom:.6rem;}
  .hero-sub{margin-bottom:1.1rem;font-size:1rem;}
  .hero-actions{gap:.7rem;}
  .main-nav{
    position:fixed;top:var(--header-h);left:0;right:0;bottom:0;
    background:var(--white);
    display:flex;justify-content:flex-start;
    padding:2rem 24px;
    transform:translateX(100%);
    transition:transform var(--transition);
    z-index:999;
  }
  .main-nav.open{transform:translateX(0);}
  .main-nav ul{flex-direction:column;gap:1.4rem;width:100%;}
  .nav-link{color:var(--blue-900) !important;font-size:1.1rem;}
  .nav-toggle{display:flex;}
  .header-cta .btn-whatsapp span{display:none;}
  .header-cta .btn-whatsapp{padding:.7em;border-radius:50%;}

  .split,.split--reverse{grid-template-columns:1fr;}
  .split-media{order:1 !important;}
  .split-text{order:2 !important;}
  .hero-stats-grid{grid-template-columns:repeat(2,1fr);row-gap:1rem;padding:1rem 0;}
  .stat-number{font-size:1.7rem;}
  .stat:nth-child(odd){border-right:1px solid rgba(255,255,255,.15);}
  .stat:nth-child(even){border-right:none;}
  .cards-grid{grid-template-columns:1fr;}
  .clients-grid{grid-template-columns:repeat(2,1fr);}
  .media-stack{padding:1rem 1rem 2rem 0;}
}

@media (max-width:520px){
  .section{padding:4.5rem 0;}
  .footer-grid{grid-template-columns:1fr;gap:2.4rem;}
  .whatsapp-float{width:52px;height:52px;font-size:1.5rem;bottom:18px;right:18px;}
  .back-to-top{width:42px;height:42px;bottom:18px;right:82px;}
}

/* Extra-compact hero for small, short phone screens (e.g. iPhone SE) so the
   stats bar still lands inside the first view without needing a scroll. */
@media (max-width:480px) and (max-height:760px){
  :root{--header-h:60px;}
  .brand-logo{height:40px;}
  .hero-content{padding-top:.9rem;padding-bottom:.8rem;}
  .eyebrow{margin-bottom:.5rem;font-size:.68rem;}
  .hero h1{font-size:1.45rem;margin-bottom:.5rem;}
  .hero-sub{margin-bottom:.8rem;font-size:.92rem;}
  .hero-actions .btn{padding:.7em 1.3em;font-size:.88rem;}
  .hero-stats-grid{padding:.7rem 0;row-gap:.6rem;}
  .stat-number{font-size:1.4rem;}
  .stat-suffix{font-size:1.1rem;}
  .stat p{font-size:.68rem;}
}
