/* ==========================================================
   GEOLESSA – Minería y ambiente
   Verde #3EAD72 · Café #605F54 · Café 2 #948879
   Gris fondos #f0f1f4 · Texto #6a7c8f · Poppins
   ========================================================== */
:root {
  --verde: #3ead72;
  --verde-osc: #2b8a58;
  --cafe: #605f54;
  --cafe-2: #948879;
  --gris: #f0f1f4;
  --texto: #6a7c8f;
  --oscuro: #2b2a24;
  --blanco: #fff;
  --fuente: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ancho: 1320px; /* mismo ancho que el encabezado */
  --curva: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16.5px/1.75 var(--fuente); color: var(--texto); background: var(--blanco); }
main { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; color: var(--cafe); line-height: 1.15; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.saltar { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--verde); color: #fff; padding: 10px 16px; border-radius: 6px; }
.saltar:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; }
.envoltura { max-width: var(--ancho); margin: 0 auto; padding: 0 24px; }

/* ---------- Tipografía ---------- */
.etiqueta { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--verde); }
.etiqueta::before { content: ''; width: 30px; height: 2px; background: currentColor; }
.etiqueta--clara { color: #9fe0bd; }
.titulo { font-size: clamp(30px, 4vw, 50px); font-weight: 700; letter-spacing: -1px; }
.titulo span { color: var(--verde); }
.titulo--claro { color: #fff; }
.seccion__intro { font-size: 17.5px; max-width: 640px; }

/* ---------- Botones ---------- */
.boton { display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; border: 0; border-radius: 999px; background: var(--verde); color: #fff; font: 600 15px/1 var(--fuente); text-decoration: none; cursor: pointer; position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 10px 24px rgba(62, 173, 114, .3); transition: transform .35s var(--curva), box-shadow .35s; }
.boton::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--verde-osc); transform: translateX(-101%); transition: transform .45s var(--curva); }
.boton:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(62, 173, 114, .4); }
.boton:hover::before { transform: none; }
.boton svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s; }
.boton:hover svg { transform: translateX(4px); }
.boton--chico { padding: 11px 22px; font-size: 14px; box-shadow: none; }
.boton--grande { padding: 19px 38px; font-size: 16px; }
.boton--blanco { background: #fff; color: var(--verde-osc); box-shadow: 0 14px 30px rgba(0, 0, 0, .15); }
.boton--blanco::before { background: var(--cafe); }
.boton--blanco:hover { color: #fff; }

/* ---------- Encabezado ---------- */
.cab { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .4s, box-shadow .4s, transform .45s var(--curva); }
.cab__in { max-width: var(--ancho); margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: padding .4s; }
.cab__logo { position: relative; display: block; width: 190px; flex: none; transition: width .4s; }
.cab__logo img { width: 100%; height: auto; transition: opacity .4s; }
.cab__logo-color { position: absolute; inset: 0; opacity: 0; }
.menu { display: flex; align-items: center; gap: 34px; }
.menu ul { display: flex; gap: 30px; }
.menu ul a { position: relative; padding: 6px 0; color: #fff; font-weight: 500; font-size: 15px; text-decoration: none; transition: color .3s; }
.menu ul a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--verde); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--curva); }
.menu ul a:hover::after, .menu ul a.activo::after { transform: scaleX(1); transform-origin: left; }
.cab__boton { display: none; }
/* Sobre la foto, el menú lleva sombra para leerse bien en la parte clara de la imagen */
.cab:not(.con-fondo) .menu ul a { text-shadow: 0 1px 10px rgba(30, 40, 50, .55); }
.cab.con-fondo { background: rgba(255, 255, 255, .97); box-shadow: 0 8px 30px rgba(43, 42, 36, .08); }
.cab.con-fondo .cab__in { padding-top: 12px; padding-bottom: 12px; }
.cab.con-fondo .cab__logo { width: 160px; }
.cab.con-fondo .cab__logo-blanco { opacity: 0; }
.cab.con-fondo .cab__logo-color { opacity: 1; }
.cab.con-fondo .menu ul a { color: var(--cafe); }
.cab.con-fondo .menu ul a.activo { color: var(--verde); }
.cab.escondido { transform: translateY(-100%); }
.progreso { position: fixed; top: 0; left: 0; z-index: 60; width: 100%; height: 3px; background: linear-gradient(90deg, var(--verde), var(--cafe-2)); transform-origin: left; transform: scaleX(0); }

@media (max-width: 900px) {
  .cab__in { padding: 14px 20px; }
  .cab__logo, .cab.con-fondo .cab__logo { width: 150px; }
  .cab__boton { display: grid; gap: 6px; width: 48px; height: 48px; place-content: center; border: 0; border-radius: 50%; background: var(--verde); cursor: pointer; position: relative; z-index: 2; }
  .cab__boton span { display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff; transition: transform .35s, opacity .35s; }
  .menu-abierto .cab__boton span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-abierto .cab__boton span:nth-child(2) { opacity: 0; }
  .menu-abierto .cab__boton span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .menu { position: fixed; inset: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 34px; padding: 100px 32px 40px; background: var(--oscuro); clip-path: circle(0 at calc(100% - 44px) 38px); transition: clip-path .7s var(--curva); }
  .menu-abierto { overflow: hidden; }
  .menu-abierto .menu { clip-path: circle(150% at calc(100% - 44px) 38px); }
  .menu-abierto .cab { transform: none !important; }
  .menu-abierto .progreso { opacity: 0; }
  .menu ul { flex-direction: column; gap: 8px; }
  .menu ul a, .cab.con-fondo .menu ul a { color: #fff; font-size: clamp(30px, 9vw, 42px); font-weight: 700; letter-spacing: -1px; }
  .menu ul a::after { display: none; }
  .menu ul a.activo, .cab.con-fondo .menu ul a.activo { color: var(--verde); }
  .menu li { opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .5s var(--curva); }
  .menu-abierto .menu li { opacity: 1; transform: none; }
  .menu-abierto .menu li:nth-child(2) { transition-delay: .06s; }
  .menu-abierto .menu li:nth-child(3) { transition-delay: .12s; }
  .menu-abierto .menu li:nth-child(4) { transition-delay: .18s; }
  .menu .boton--chico { padding: 15px 30px; font-size: 16px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 140px 0 110px; overflow: hidden; color: #fff; background: var(--oscuro); }
.hero__foto { position: absolute; inset: -6% 0; z-index: -2; }
.hero__foto img { width: 100%; height: 100%; object-fit: cover; animation: acercar 14s ease-out both; }
@keyframes acercar { from { transform: scale(1.15); } }
/* Degradado gris azulado (tono de #6a7c8f, más oscuro) */
.hero__capa { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(46, 57, 68, .9) 0%, rgba(61, 74, 87, .62) 40%, rgba(106, 124, 143, .18) 70%, rgba(106, 124, 143, 0) 100%), linear-gradient(0deg, rgba(46, 57, 68, .55) 0%, transparent 35%); }
.hero__in { max-width: var(--ancho); width: 100%; margin: 0 auto; padding: 0 24px; }
.hero__titulo { max-width: 1000px; margin-bottom: 26px; font-size: clamp(34px, 6vw, 78px); font-weight: 800; line-height: 1.04; letter-spacing: -1px; text-transform: uppercase; color: #fff; }
.hero__titulo .linea { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__titulo .entrada-linea { display: inline-block; }
.hero__verde { color: var(--verde); }
.hero__texto { max-width: 620px; font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.75; color: rgba(255, 255, 255, .86); margin-bottom: 36px; }
.hero__bajar { position: absolute; left: 50%; bottom: 32px; width: 28px; height: 46px; margin-left: -14px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 18px; }
.hero__bajar span { position: absolute; left: 50%; top: 8px; width: 4px; height: 9px; margin-left: -2px; border-radius: 2px; background: #fff; animation: rueda 1.8s ease-in-out infinite; }
@keyframes rueda { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(15px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Cinta ---------- */
.cinta { background: var(--verde); color: #fff; padding: 20px 0; overflow: hidden; }
.cinta__pista { display: flex; width: max-content; animation: cinta 36s linear infinite; }
.cinta span { display: inline-flex; align-items: center; gap: 46px; padding: 0 23px; font-size: clamp(17px, 1.6vw, 22px); font-weight: 600; white-space: nowrap; }
.cinta span::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--cafe); }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(80px, 10vw, 130px) 0; }
.seccion--gris { background: var(--gris); }
.seccion__cabeza { max-width: 760px; margin-bottom: 56px; }
.seccion__cabeza--centro { margin-left: auto; margin-right: auto; text-align: center; }
.seccion__cabeza--centro .seccion__intro { margin: 0 auto; }

/* Servicios */
.servicios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.servicio { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 40px rgba(43, 42, 36, .08); transition: transform .5s var(--curva), box-shadow .5s; }
.servicio::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--verde); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--curva); }
.servicio:hover { transform: translateY(-10px); box-shadow: 0 26px 60px rgba(43, 42, 36, .16); }
.servicio:hover::after { transform: scaleX(1); }
.servicio__foto { aspect-ratio: 800 / 640; overflow: hidden; }
.servicio__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--curva); }
.servicio:hover .servicio__foto img { transform: scale(1.08); }
.servicio__cuerpo { position: relative; padding: 34px 26px 30px; flex: 1; }
.servicio__num { position: absolute; top: -26px; right: 22px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--verde); color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 8px 20px rgba(62, 173, 114, .4); transition: background .4s, transform .5s var(--curva); }
.servicio:hover .servicio__num { background: var(--cafe); transform: rotate(-10deg) scale(1.08); }
.servicio h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.servicio p { margin: 0; font-size: 15px; line-height: 1.7; }

/* Nosotros */
.nosotros { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.nosotros__media { position: relative; }
.nosotros__foto { border-radius: 24px; overflow: hidden; aspect-ratio: 670 / 701; box-shadow: 0 30px 70px rgba(43, 42, 36, .18); }
.nosotros__foto img { width: 100%; height: 100%; object-fit: cover; }
.nosotros__texto > p { font-size: 16.5px; }
.pilares { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 32px; }
.pilares li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--cafe); font-weight: 600; font-size: 14px; box-shadow: 0 6px 16px rgba(43, 42, 36, .06); }
.pilares li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* Cifras */
.cifras { position: relative; isolation: isolate; overflow: hidden; padding: clamp(90px, 11vw, 140px) 0; color: rgba(255, 255, 255, .82); background: var(--cafe); }
.cifras__foto { position: absolute; inset: -12% 0; z-index: -1; background: linear-gradient(rgba(96, 95, 84, .9), rgba(66, 65, 57, .93)), url(../img/mineria-y-tierras.webp) center / cover no-repeat; }
.cifras__lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cifra { padding: 42px 24px; text-align: center; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(4px); transition: transform .5s var(--curva), background .4s; }
.cifra:hover { transform: translateY(-8px); background: rgba(255, 255, 255, .1); }
.cifra__num { margin: 0 0 6px; font-size: clamp(54px, 6.5vw, 80px); font-weight: 800; line-height: 1; letter-spacing: -2px; color: #fff; }
.cifra__num span { color: #fff; }
.cifra__num { color: var(--verde); }
.cifra__texto { margin: 0; font-size: 17px; font-weight: 500; color: #d8d3cb; }

/* CTA */
.cta { position: relative; overflow: hidden; padding: clamp(80px, 9vw, 120px) 0; background: linear-gradient(120deg, var(--verde) 0%, var(--verde-osc) 100%); color: rgba(255, 255, 255, .9); }
.cta::before, .cta::after { content: ''; position: absolute; border-radius: 50%; border: 70px solid rgba(255, 255, 255, .06); pointer-events: none; }
.cta::before { width: 520px; height: 520px; right: -160px; top: -240px; }
.cta::after { width: 360px; height: 360px; left: -170px; bottom: -220px; }
.cta__in { position: relative; display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px 70px; align-items: center; }
.cta .etiqueta { color: #e6fff1; }
.cta__texto p:last-child { font-size: 17.5px; margin: 0; }
.cta__accion { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.cta__correo { color: #fff; font-weight: 600; font-size: 18px; text-decoration: none; border-bottom: 2px solid rgba(255, 255, 255, .4); padding-bottom: 2px; transition: border-color .3s; }
.cta__correo:hover { border-color: #fff; }

/* Pie */
.pie { background: var(--oscuro); color: rgba(255, 255, 255, .7); font-size: 15px; }
.pie__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 40px; }
.pie__in img { width: 180px; }
.pie nav { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.pie nav a { text-decoration: none; transition: color .3s; }
.pie nav a:hover { color: var(--verde); }
.pie__legal { margin: 0; padding: 20px 24px; text-align: center; font-size: 13.5px; border-top: 1px solid rgba(255, 255, 255, .08); }

/* ---------- WhatsApp + aviso ---------- */
.wa { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; place-items: center; width: 60px; height: 60px; border: 0; border-radius: 50%; background: #25d366; color: #fff; cursor: pointer; box-shadow: 0 10px 25px rgba(0, 0, 0, .25); transition: transform .3s var(--curva); }
.wa:hover { transform: scale(1.08); }
.wa svg { width: 32px; height: 32px; }
.wa::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: onda 2.4s ease-out infinite; }
@keyframes onda { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

.aviso { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.aviso[hidden] { display: none; }
.aviso__fondo { position: absolute; inset: 0; background: rgba(43, 42, 36, .6); backdrop-filter: blur(4px); animation: aparecer .3s ease both; }
.aviso__caja { position: relative; width: min(440px, 100%); padding: 44px 34px 34px; text-align: center; background: #fff; border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: subir .5s var(--curva) both; }
.aviso__caja h2 { font-size: 24px; font-weight: 700; }
.aviso__caja p { font-size: 15.5px; }
.aviso__caja a { color: var(--verde-osc); font-weight: 600; }
.aviso__caja .boton { margin-top: 8px; }
.aviso__icono { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 50%; background: rgba(62, 173, 114, .12); color: var(--verde); }
.aviso__icono svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.aviso__cerrar { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--gris); color: var(--cafe); cursor: pointer; transition: background .3s, transform .3s; }
.aviso__cerrar:hover { background: #e3e5ea; transform: rotate(90deg); }
.aviso__cerrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(30px) scale(.96); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .servicios { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nosotros, .cta__in { grid-template-columns: 1fr; }
  .nosotros__foto { aspect-ratio: 4 / 3; }
    .nosotros__texto { margin-top: 20px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .servicios, .cifras__lista { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .hero__capa { background: linear-gradient(180deg, rgba(46, 57, 68, .78) 0%, rgba(61, 74, 87, .7) 60%, rgba(46, 57, 68, .88) 100%); }
  .hero__titulo { letter-spacing: -1px; }
  .cifra { padding: 32px 20px; }
  .pie__in { flex-direction: column; align-items: flex-start; }
}

/* ---------- Animaciones ---------- */
.js .entrada { animation: entrar 1.1s var(--d, 0s) var(--curva) both; }
.js .entrada-linea { animation: linea 1.1s var(--d, 0s) var(--curva) both; }
@keyframes entrar { from { opacity: 0; transform: translateY(30px); } }
@keyframes linea { from { transform: translateY(110%); } }
.js [data-animar] { transition: opacity .95s var(--d, 0s) var(--curva), transform .95s var(--d, 0s) var(--curva), clip-path 1.3s var(--d, 0s) var(--curva); }
.js [data-animar]:not(.visible) { opacity: 0; transform: translateY(40px); }
.js [data-animar="foto"] { clip-path: inset(0 0 0 0 round 24px); }
.js [data-animar="foto"]:not(.visible) { opacity: 1; transform: none; clip-path: inset(0 0 100% 0 round 24px); }
.js [data-animar="foto"] img { transition: transform 1.8s var(--curva); }
.js [data-animar="foto"]:not(.visible) img { transform: scale(1.2); }
.js .servicio.visible, .js .cifra.visible { transition: transform .5s var(--curva), box-shadow .5s, background .4s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .entrada, .js .entrada-linea, .hero__foto img { animation: none; }
  .js [data-animar], .js [data-animar] img { transition: none !important; opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .cinta__pista, .hero__bajar span, .wa::after { animation: none; }
}
