/* =========================================================
   IPCii · Hoja de estilos principal
   ========================================================= */

:root {
  --navy-900: #071c33;
  --navy-800: #0b2a4a;
  --navy-700: #123c66;
  --blue-500: #1f6fd1;
  --gold-500: #d4a437;
  --gold-400: #e6bc5c;

  --ink: #14212e;
  --muted: #5b6b7a;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(7, 28, 51, .06);
  --shadow: 0 18px 40px -18px rgba(7, 28, 51, .28);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", var(--font-body);

  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; color: var(--navy-900); }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

.text-accent { color: var(--gold-500); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 14px;
}
.eyebrow--light { color: var(--gold-400); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: .88rem; }
.btn--primary { background: var(--navy-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--shadow); }
.btn--ghost { border-color: var(--navy-800); color: var(--navy-800); }
.btn--ghost:hover { background: var(--navy-800); color: #fff; }
.btn--light { background: #fff; color: var(--navy-800); }
.btn--light:hover { background: var(--gold-400); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-800), var(--blue-500));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .02em;
  box-shadow: inset 0 -3px 0 var(--gold-500);
}
.brand__text { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--navy-900); }
.brand--light .brand__text { color: #fff; }

/* ---------- Encabezado ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: box-shadow .25s ease, background .25s ease;
}
.header.is-scrolled { box-shadow: 0 1px 0 var(--line), var(--shadow-sm); background: rgba(255, 255, 255, .96); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative;
  padding: 8px 12px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color .2s ease;
}
.nav__link:hover, .nav__link.is-active { color: var(--navy-800); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-500);
}
.nav__cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-h) + 64px) 0 88px;
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(31, 111, 209, .12), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(212, 164, 55, .12), transparent 60%),
    var(--bg);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero__title { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; letter-spacing: -.02em; }
.hero__lead { font-size: 1.12rem; color: var(--muted); max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 28px; }
.hero__pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__pills li {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--navy-700);
  background: #fff;
  border: 1px solid var(--line);
}

.hero__media { position: relative; }
.hero__image-link img {
  width: 100%;
  aspect-ratio: 11 / 9;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero__badge {
  position: absolute;
  left: -24px; bottom: 28px;
  display: flex; flex-direction: column;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold-500);
}
.hero__badge strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--navy-900); }
.hero__badge span { font-size: .82rem; color: var(--muted); }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section__title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.015em; }
.section__lead { color: var(--muted); font-size: 1.05rem; }
.section__head--light .section__title { color: #fff; }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.about__media img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow); }
.about__content > p { color: var(--muted); font-size: 1.05rem; }
.about__content strong { color: var(--navy-800); }

.pillars { display: grid; gap: 16px; margin-top: 28px; }
.pillar {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pillar:hover { border-color: transparent; box-shadow: var(--shadow); }
.pillar h3 { font-size: 1.05rem; margin-bottom: 4px; }
.pillar p { margin: 0; color: var(--muted); font-size: .95rem; }
.pillar__icon {
  flex: none;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(31, 111, 209, .1);
}
.pillar__icon svg { width: 24px; height: 24px; fill: var(--blue-500); }

/* ---------- Tarjetas de servicios ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.card:hover img { transform: scale(1.05); }
.card__body { padding: 22px 24px 26px; position: relative; background: #fff; }
.card__body h3 { font-size: 1.15rem; }
.card__body p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Metodología ---------- */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--navy-800), var(--gold-500));
}
.step__num {
  display: block;
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--navy-700);
  margin-bottom: 10px;
}
.step h3 { font-size: 1.12rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Impacto ---------- */
.impact { position: relative; color: #fff; overflow: hidden; }
.impact__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, rgba(7, 28, 51, .94), rgba(18, 60, 102, .86)),
    url("https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1800&q=70") center / cover no-repeat;
}
.impact__inner { position: relative; }
.impact__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.impact__item {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(4px);
  text-align: center;
}
.impact__item strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-400); margin-bottom: 6px; }
.impact__item span { color: rgba(255, 255, 255, .82); font-size: .95rem; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery img:hover { transform: scale(1.02); box-shadow: var(--shadow); }

/* ---------- CTA ---------- */
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 52px 56px;
  border-radius: 24px;
  background: linear-gradient(120deg, var(--navy-800), var(--blue-500));
  color: #fff;
  box-shadow: var(--shadow);
}
.cta h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta .btn { flex: none; }

/* ---------- Pie de página ---------- */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, .7); padding: 64px 0 28px; }
.footer__inner {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer__brand { max-width: 420px; }
.footer__brand p { margin-top: 14px; font-size: .95rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.footer__nav a { font-size: .95rem; transition: color .2s ease; }
.footer__nav a:hover { color: var(--gold-400); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 24px;
  font-size: .85rem;
}
.footer__bottom p { margin: 0; }
#pieFinal a { color: rgba(255, 255, 255, .55); font-size: .8rem; }
#pieFinal a:hover { color: #fff; }

/* ---------- Animación de aparición ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible, .no-io .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps, .impact__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px 16px 22px;
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__link { padding: 12px; font-size: 1rem; }
  .nav__link.is-active::after { display: none; }
  .nav__cta { margin: 10px 0 0; }

  .hero { padding-top: calc(var(--header-h) + 36px); }
  .hero__grid, .about { grid-template-columns: 1fr; gap: 40px; }
  .hero__badge { left: 16px; bottom: 16px; }
  .section { padding: 72px 0; }
  .cta { flex-direction: column; align-items: flex-start; padding: 40px 28px; }
}

@media (max-width: 600px) {
  .cards, .steps, .impact__grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
