/* =========================================================
   AVANZAR INVERSIONES Y FINANZAS — Hoja de estilos
   Para cambiar colores o tipografías, edita SOLO el bloque :root
   ========================================================= */
:root {
  /* Colores de marca (tomados de los diseños de Canva) */
  --c-cyan:  #02b9f2;   /* azul claro del logo */
  --c-teal:  #1387ad;   /* azul de títulos y textos */
  --c-blue:  #0d5ec2;   /* azul de acento (botones, iconos) */
  --c-navy:  #08283d;   /* azul oscuro para fondos y texto principal */
  --c-ink:   #17313f;   /* texto de lectura */
  --c-mist:  #eef8fc;   /* fondo suave */
  --c-white: #ffffff;
  --c-line:  #d3e6ef;

  /* Tipografías (Google Fonts, se cargan en index.html) */
  --f-title: "Montserrat", "Segoe UI", Arial, sans-serif;
  --f-body:  "Open Sans", "Segoe UI", Arial, sans-serif;

  --radius: 6px;
  --max: 1160px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.65; color: var(--c-ink); background: var(--c-white); }
img, svg { max-width: 100%; display: block; }
a { color: var(--c-blue); }
h1, h2, h3 { font-family: var(--f-title); color: var(--c-navy); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }

:focus-visible { outline: 3px solid var(--c-cyan); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--c-navy); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--mist { background: var(--c-mist); }
.section__head { max-width: 720px; margin-bottom: 2.6rem; }
.section__head p { color: #3d5766; }

/* ---------- Botones ---------- */
.btn { display: inline-block; font-family: var(--f-title); font-weight: 700; font-size: 1rem; text-decoration: none; padding: .95rem 1.7rem; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn--primary { background: var(--c-cyan); color: var(--c-navy); }
.btn--primary:hover { background: #fff; }
.btn--blue { background: var(--c-blue); color: #fff; }
.btn--blue:hover { background: var(--c-navy); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-line); }
.header__in { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--c-navy); }
.brand img { height: 46px; width: auto; }
.brand b { display: block; font-family: var(--f-title); font-weight: 800; font-size: 1.35rem; letter-spacing: .08em; line-height: 1; }
.brand small { display: block; font-family: var(--f-title); font-size: .62rem; letter-spacing: .14em; margin-top: .25rem; color: #3d5766; }
.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a { font-family: var(--f-title); font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--c-navy); }
.nav a:hover { color: var(--c-blue); }
.nav .btn { padding: .65rem 1.2rem; color: #fff; }
.nav .btn:hover { color: #fff; }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 3px; background: var(--c-navy); margin: 6px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--c-navy) 0%, #0b3b5c 60%, var(--c-teal) 130%); padding: clamp(4rem, 9vw, 7.5rem) 0 0; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero p.lead { font-size: 1.2rem; color: #d8eef8; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: end; position: relative; z-index: 1; }
.hero__text { padding-bottom: clamp(3rem, 7vw, 5.5rem); }

/* Barras que suben: eco del edificio del logo */
.bars { display: flex; align-items: flex-end; justify-content: flex-end; gap: clamp(.5rem, 1.4vw, 1.1rem); height: clamp(260px, 38vw, 470px); }
.bars i { display: block; width: clamp(14px, 2.6vw, 34px); background: linear-gradient(180deg, var(--c-cyan), var(--c-teal)); transform-origin: bottom; animation: rise 1.1s cubic-bezier(.2,.8,.2,1) both; }
.bars i:nth-child(1) { height: 38%; animation-delay: .05s; }
.bars i:nth-child(2) { height: 52%; animation-delay: .15s; }
.bars i:nth-child(3) { height: 66%; animation-delay: .25s; }
.bars i:nth-child(4) { height: 82%; animation-delay: .35s; background: var(--c-blue); width: clamp(34px, 6vw, 78px); }
.bars i:nth-child(5) { height: 100%; animation-delay: .45s; width: clamp(8px, 1.4vw, 16px); }
.bars i:nth-child(6) { height: 92%; animation-delay: .55s; width: clamp(8px, 1.4vw, 16px); opacity: .7; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Indicadores ---------- */
.stats { background: var(--c-white); border-bottom: 1px solid var(--c-line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 2rem 1.4rem; border-left: 1px solid var(--c-line); }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-family: var(--f-title); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); color: var(--c-teal); line-height: 1; }
.stat span { display: block; margin-top: .55rem; font-size: .95rem; color: #3d5766; }
.stats__note { font-size: .82rem; color: #5b7482; padding: 0 0 1.4rem; margin: 0; max-width: none; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.service { background: #fff; border: 1px solid var(--c-line); border-top: 4px solid var(--c-cyan); border-radius: var(--radius); padding: 1.8rem 1.6rem; }
.service:nth-child(3n+2) { border-top-color: var(--c-teal); }
.service:nth-child(3n) { border-top-color: var(--c-blue); }
.service svg { width: 34px; height: 34px; stroke: var(--c-blue); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; }
.service p { margin: 0; font-size: .98rem; color: #3d5766; }

/* ---------- Proceso (secuencia real) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-top: 3.4rem; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--c-navy); color: #fff; font-family: var(--f-title); font-weight: 800; display: grid; place-items: center; }
.steps li::after { content: ""; position: absolute; top: 1.3rem; left: 3.2rem; right: -1.6rem; height: 2px; background: var(--c-line); }
.steps li:last-child::after { display: none; }
.steps p { font-size: .98rem; color: #3d5766; margin: 0; }

/* ---------- Por qué Avanzar ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.why li { padding-left: 1.9rem; position: relative; }
.why li::before { content: ""; position: absolute; left: 0; top: .45rem; width: 12px; height: 12px; background: var(--c-cyan); border-radius: 2px; transform: rotate(45deg); }
.why li b { font-family: var(--f-title); color: var(--c-navy); }
.panel { background: var(--c-navy); color: #fff; border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 3rem); }
.panel h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.panel p { color: #cfe6f2; }

/* ---------- Sectores ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .7rem; padding: 0; margin: 0; list-style: none; }
.chips li { font-family: var(--f-title); font-weight: 600; font-size: .95rem; padding: .6rem 1.1rem; border: 1px solid var(--c-teal); color: var(--c-teal); border-radius: 999px; background: #fff; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--c-line); padding: 1.1rem 0; }
.faq summary { font-family: var(--f-title); font-weight: 700; font-size: 1.08rem; color: var(--c-navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--c-blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .8rem 0 0; color: #3d5766; }

/* ---------- Contacto ---------- */
.contact { background: linear-gradient(135deg, var(--c-navy), #0b3b5c); color: #fff; }
.contact h2 { color: #fff; }
.contact__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); }
.contact p { color: #cfe6f2; }
.contact dl { margin: 1.6rem 0 0; display: grid; gap: 1rem; }
.contact dt { font-family: var(--f-title); font-weight: 700; font-size: .85rem; color: var(--c-cyan); }
.contact dd { margin: 0; }
.contact dd a { color: #fff; }
form { background: #fff; color: var(--c-ink); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1rem; }
label { font-family: var(--f-title); font-weight: 600; font-size: .9rem; color: var(--c-navy); display: grid; gap: .35rem; }
input, textarea { font: inherit; padding: .8rem .9rem; border: 1px solid #aac7d4; border-radius: var(--radius); background: #fff; color: var(--c-ink); width: 100%; }
input:focus, textarea:focus { outline: 3px solid var(--c-cyan); border-color: var(--c-teal); }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.msg { padding: .8rem 1rem; border-radius: var(--radius); font-weight: 600; display: none; }
.msg.ok { background: #e3f6ec; color: #145a32; display: block; }
.msg.error { background: #fdeaea; color: #8a1c1c; display: block; }
.form-note { font-size: .82rem; color: #5b7482; margin: 0; }

/* ---------- Pie ---------- */
.footer { background: #061e2f; color: #a9c4d3; padding: 3rem 0 1.6rem; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer h3 { color: #fff; font-size: 1rem; }
.footer a { color: #a9c4d3; text-decoration: none; display: block; padding: .15rem 0; }
.footer a:hover { color: var(--c-cyan); }
.footer .brand { color: #fff; margin-bottom: .8rem; }
.footer .brand small { color: #a9c4d3; }
.legal { padding-top: 1.4rem; font-size: .8rem; line-height: 1.55; }
.legal p { max-width: none; margin-bottom: .5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.4rem; }
  .steps li:nth-child(2)::after { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--c-line); }
}
@media (max-width: 820px) {
  .burger { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: var(--header-h); background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.2rem; border-bottom: 1px solid var(--c-line); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--c-line); }
  .nav .btn { margin-top: 1rem; text-align: center; border: 0; }
  .hero__grid, .why, .contact__grid { grid-template-columns: 1fr; }
  .bars { height: 200px; justify-content: flex-start; }
  .hero__text { padding-bottom: 2rem; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .services, .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .brand small { display: none; }
  .hero__actions .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bars i { animation: none; }
}
