:root{
  --green:#0B6B3A;
  --green-dark:#064a29;
  --lime:#B7E539;
  --light:#f5f8f6;
  --text:#173126;
  --white:#ffffff;
  --shadow:0 12px 30px rgba(0,0,0,.12);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  color:var(--text);
  background:#fff;
}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}
.topbar{
  background:var(--green-dark);
  color:#fff;
  text-align:center;
  padding:10px 16px;
  font-size:14px;
}
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:16px 5%;
  background:#fff;
  position:sticky;
  top:0;
  z-index:10;
  box-shadow:0 2px 12px rgba(0,0,0,.06);
}
.logo img{width:290px;max-width:55vw}
nav{display:flex;gap:20px;flex-wrap:wrap}
nav a{font-weight:700;color:var(--green-dark)}
.hero{
  min-height:720px;
  padding:70px 5%;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:42px;
  align-items:center;
  background:
    linear-gradient(90deg,rgba(3,64,35,.93),rgba(11,107,58,.78)),
    url('https://images.unsplash.com/photo-1551836022-d5d88e9218df?q=80&w=1600&auto=format&fit=crop') center/cover;
  color:white;
}
.hero-text{position:relative;z-index:2}
.mex-badge{
  display:inline-block;
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.4);
  padding:9px 14px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
}
.hero h1{font-size:56px;line-height:1.05;margin:20px 0}
.hero h1 span{display:block;color:var(--lime)}
.hero p{font-size:19px;line-height:1.7}
.hero-badges{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0}
.badge,.benefit{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.25);
  padding:10px 14px;
  border-radius:12px;
}
.hero-btn{
  display:inline-block;
  background:var(--lime);
  color:var(--green-dark);
  font-weight:900;
  padding:16px 22px;
  border-radius:12px;
  margin:10px 0;
}
.ssl-text{margin-top:16px;font-size:14px}
.stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin-top:28px;
}
.stat{background:rgba(255,255,255,.1);padding:18px;border-radius:14px;text-align:center}
.stat h2{margin:0;color:var(--lime)}
.stat p{margin:6px 0 0;font-size:14px}
.form-card{
  background:#fff;
  color:var(--text);
  padding:28px;
  border-radius:20px;
  box-shadow:var(--shadow);
}
.form-card h2{color:var(--green);margin-top:0}
form{display:grid;gap:14px}
input,select,textarea{
  width:100%;
  padding:14px 15px;
  border:1px solid #cdd8d1;
  border-radius:10px;
  font:inherit;
}
button{
  border:0;
  background:var(--green);
  color:#fff;
  padding:15px;
  border-radius:10px;
  font-weight:900;
  cursor:pointer;
}
button:disabled{opacity:.65;cursor:not-allowed}
.secure-note{font-size:13px;text-align:center;color:#547060}
#successMessage,#errorMessage{
  padding:12px;
  border-radius:10px;
  margin-bottom:14px;
}
#successMessage{background:#e9f8ee;color:#13652f}
#errorMessage{background:#fdecec;color:#8b1c1c}
.trust,.steps,.reviews,.security-section,.phone-section{
  padding:70px 5%;
}
.trust{background:var(--light)}
.trust-grid,.steps-grid,.reviews-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}
.trust-card,.step,.review{
  background:#fff;
  padding:24px;
  border-radius:16px;
  box-shadow:0 8px 22px rgba(0,0,0,.07);
}
.phone-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:45px;
  align-items:center;
}
.phone-grid img{
  border-radius:20px;
  box-shadow:var(--shadow);
}
.phone-section .benefit{
  color:var(--green-dark);
  background:#eef7f1;
  border:0;
  margin:10px 0;
}
.steps{text-align:center;background:#fff}
.step-number{
  width:44px;height:44px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--green);color:#fff;font-weight:900;margin:0 auto 12px;
}
.reviews{background:var(--light)}
.reviews-header{text-align:center;margin-bottom:30px}
.reviews-grid{grid-template-columns:repeat(3,1fr)}
.review img{
  width:86px;height:86px;border-radius:50%;object-fit:cover;margin-bottom:14px;
}
.security-section{text-align:center}
.security-logos{
  display:flex;justify-content:center;gap:20px;flex-wrap:wrap;
}
.security-badge{
  padding:18px 24px;border:1px solid #d8e3dc;border-radius:14px;background:#fff;
  font-weight:800;color:var(--green-dark);
}
footer{
  background:var(--green-dark);
  color:#fff;
  padding:42px 5%;
  text-align:center;
}
.footer-logo{display:flex;justify-content:center;align-items:center;gap:10px}
.footer-logo img{width:38px;height:38px;border-radius:8px}
footer a{text-decoration:underline}
#cookiePopup{
  position:fixed;left:20px;right:20px;bottom:20px;
  background:#fff;border-radius:14px;box-shadow:var(--shadow);
  padding:16px;display:flex;align-items:center;justify-content:space-between;gap:16px;
  z-index:30;
}
#cookiePopup button{width:auto;padding:10px 18px}
@media(max-width:900px){
  .hero{grid-template-columns:1fr;padding-top:45px}
  .hero h1{font-size:42px}
  .trust-grid,.steps-grid{grid-template-columns:repeat(2,1fr)}
  .reviews-grid{grid-template-columns:1fr}
  .phone-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  header{flex-direction:column;align-items:flex-start}
  nav{gap:12px}
  .hero h1{font-size:35px}
  .stats{grid-template-columns:1fr}
  .trust-grid,.steps-grid{grid-template-columns:1fr}
  #cookiePopup{flex-direction:column;align-items:stretch}
}

/* ===== Animaciones profesionales ===== */
body{
  overflow-x:hidden;
}

header{
  transition:padding .3s ease, box-shadow .3s ease, background-color .3s ease;
}

header.header-compact{
  padding-top:10px;
  padding-bottom:10px;
  box-shadow:0 8px 28px rgba(0,0,0,.11);
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(12px);
}

.logo img{
  transition:transform .35s ease, filter .35s ease;
}

.logo img:hover{
  transform:scale(1.025);
  filter:drop-shadow(0 8px 16px rgba(6,74,41,.18));
}

nav a{
  position:relative;
  transition:color .25s ease, transform .25s ease;
}

nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  width:100%;
  height:2px;
  border-radius:999px;
  background:var(--lime);
  transform:scaleX(0);
  transform-origin:center;
  transition:transform .28s ease;
}

nav a:hover{
  color:var(--green);
  transform:translateY(-1px);
}

nav a:hover::after{
  transform:scaleX(1);
}

.hero{
  position:relative;
  overflow:hidden;
  background-attachment:fixed;
}

.hero::before,
.hero::after{
  content:"";
  position:absolute;
  border-radius:50%;
  pointer-events:none;
  filter:blur(2px);
  opacity:.2;
}

.hero::before{
  width:320px;
  height:320px;
  right:-90px;
  top:-110px;
  background:radial-gradient(circle,var(--lime),transparent 68%);
  animation:floatOrb 9s ease-in-out infinite;
}

.hero::after{
  width:260px;
  height:260px;
  left:-100px;
  bottom:-80px;
  background:radial-gradient(circle,#fff,transparent 70%);
  animation:floatOrb 12s ease-in-out infinite reverse;
}

.hero-text,
.form-card{
  position:relative;
  z-index:2;
}

.hero-text > *{
  opacity:0;
  transform:translateY(24px);
  animation:heroEnter .75s cubic-bezier(.2,.7,.2,1) forwards;
}

.hero-text > *:nth-child(1){animation-delay:.08s}
.hero-text > *:nth-child(2){animation-delay:.18s}
.hero-text > *:nth-child(3){animation-delay:.28s}
.hero-text > *:nth-child(4){animation-delay:.38s}
.hero-text > *:nth-child(5){animation-delay:.48s}
.hero-text > *:nth-child(6){animation-delay:.58s}
.hero-text > *:nth-child(7){animation-delay:.68s}

.form-card{
  opacity:0;
  transform:translateX(34px) scale(.985);
  animation:formEnter .9s .32s cubic-bezier(.2,.75,.2,1) forwards;
}

.mex-badge{
  animation:pulseBorder 3s ease-in-out infinite;
}

.hero h1 span{
  display:block;
  background:linear-gradient(90deg,var(--lime),#e8ff94,var(--lime));
  background-size:200% auto;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  animation:shineText 4s linear infinite;
}

.hero-btn,
button{
  position:relative;
  overflow:hidden;
  transition:transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.hero-btn::before,
button::before{
  content:"";
  position:absolute;
  top:-40%;
  left:-120%;
  width:45%;
  height:180%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent);
  transform:skewX(-20deg);
  transition:left .65s ease;
}

.hero-btn:hover,
button:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 28px rgba(0,0,0,.2);
  filter:saturate(1.08);
}

.hero-btn:hover::before,
button:hover::before{
  left:135%;
}

.badge,
.stat,
.trust-card,
.step,
.review,
.security-badge,
.form-card{
  transition:transform .32s cubic-bezier(.2,.7,.2,1),
             box-shadow .32s ease,
             border-color .32s ease;
}

.badge:hover{
  transform:translateY(-4px);
  background:rgba(255,255,255,.19);
}

.stat:hover,
.trust-card:hover,
.step:hover,
.review:hover,
.security-badge:hover{
  transform:translateY(-8px);
  box-shadow:0 18px 38px rgba(4,62,34,.14);
}

.form-card:focus-within{
  transform:translateY(-4px);
  box-shadow:0 22px 48px rgba(0,0,0,.2);
}

input,
select,
textarea{
  transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--green);
  box-shadow:0 0 0 4px rgba(11,107,58,.12);
  transform:translateY(-1px);
}

.step-number{
  transition:transform .3s ease, box-shadow .3s ease;
}

.step:hover .step-number{
  transform:rotate(6deg) scale(1.1);
  box-shadow:0 8px 18px rgba(11,107,58,.28);
}

.review img{
  transition:transform .35s ease, box-shadow .35s ease;
}

.review:hover img{
  transform:scale(1.08) rotate(-2deg);
  box-shadow:0 12px 24px rgba(0,0,0,.18);
}

.footer-logo img{
  animation:softPulse 3.5s ease-in-out infinite;
}

/* Aparición al desplazarse */
.reveal{
  opacity:0;
  transform:translateY(34px);
  transition:
    opacity .75s cubic-bezier(.2,.7,.2,1),
    transform .75s cubic-bezier(.2,.7,.2,1);
  will-change:opacity,transform;
}

.reveal.reveal-left{
  transform:translateX(-42px);
}

.reveal.reveal-right{
  transform:translateX(42px);
}

.reveal.is-visible{
  opacity:1;
  transform:translate(0,0);
}

.reveal-delay-1{transition-delay:.08s}
.reveal-delay-2{transition-delay:.16s}
.reveal-delay-3{transition-delay:.24s}
.reveal-delay-4{transition-delay:.32s}

@keyframes heroEnter{
  to{opacity:1;transform:translateY(0)}
}

@keyframes formEnter{
  to{opacity:1;transform:translateX(0) scale(1)}
}

@keyframes floatOrb{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(18px,24px,0) scale(1.08)}
}

@keyframes pulseBorder{
  0%,100%{box-shadow:0 0 0 0 rgba(183,229,57,0)}
  50%{box-shadow:0 0 0 7px rgba(183,229,57,.12)}
}

@keyframes shineText{
  to{background-position:200% center}
}

@keyframes softPulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.06)}
}

@media (max-width:900px){
  .hero{background-attachment:scroll}
}

@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
  }

  .reveal,
  .hero-text > *,
  .form-card{
    opacity:1 !important;
    transform:none !important;
  }
}

/* AvanzaFi brand asset adjustments */
.logo img {
  width: min(330px, 78vw);
  height: auto;
  object-fit: contain;
}
.privacy-logo {
  width: min(360px, 82vw);
  height: auto;
  object-fit: contain;
}
