/* ==========================================================
   PayGoal – réplica estática de paygoal.io
   ========================================================== */

:root {
  --navy: #171c52;
  --blue: #4254ff;
  --green: #00d1b5;
  --pink: #ff0096;
  --grey: #e6e6e6;
  --grey-light: #f3f3f3;
  --white: #ffffff;

  --font-display: "Antonio", "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Rational", system-ui, sans-serif;  /* Rational es licenciada: Manrope como reemplazo */
  --font-plex: "IBM Plex Sans", system-ui, sans-serif;

  --container: 1240px;
  --header-h: 90px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  display: block;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 18px;
}
.eyebrow--green { color: var(--green); font-weight: 600; font-size: 11px; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  transition: box-shadow .3s ease, height .3s ease;
}
.header.is-scrolled { box-shadow: 0 0 20px rgba(0, 0, 0, .1); height: 72px; }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header__logo img { height: 34px; width: auto; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav__item { position: relative; font-size: 13px; font-weight: 600; transition: color .2s; }
.nav__item > a, .nav > a { padding: 10px 0; display: inline-block; }
.nav a:hover, .nav a.is-active { color: var(--green); }

.nav__submenu {
  position: absolute; top: 100%; left: -20px;
  list-style: none; margin: 0; padding: 14px 0;
  min-width: 180px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
  border-radius: 6px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .25s ease;
}
.nav__submenu a { display: block; padding: 8px 20px; font-weight: 500; }
.nav__item--dropdown:hover .nav__submenu { opacity: 1; visibility: visible; transform: none; }

.header__burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.header__burger span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  margin-top: var(--header-h);
  position: relative;
  background: var(--grey);
  height: 640px;
  overflow: visible;
}
.hero::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0;
  width: 42%;
  background: url("../img/Fondo-banner.webp") right center / cover no-repeat;
}
.hero__inner { position: relative; height: 100%; display: flex; align-items: center; }
.hero__text { position: relative; z-index: 2; max-width: 300px; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--blue);
  font-size: 70px;
  line-height: 1;
  margin-bottom: 36px;
}
.hero__lead { font-size: 15px; margin-bottom: 18px; }

.pill {
  display: block; width: max-content;
  padding: 8px 18px;
  border: 2px solid var(--navy);
  border-radius: 30px;
  font-family: var(--font-plex);
  letter-spacing: .05em;
  font-size: 14px;
  transition: background .2s, color .2s;
}

.hero__phone {
  position: absolute;
  left: 34%;
  top: 30px;
  width: 360px;
  z-index: 1;
}

/* ---------- Servicios ---------- */
.services { padding: 120px 0 110px; background: var(--white); }
.services__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.services__graphic { display: flex; justify-content: center; }

.stack { position: relative; width: 300px; height: 300px; margin-right: 60px; }
.stack > span {
  position: absolute;
  width: 180px; height: 200px;
  border: 1.5px solid var(--green);
  border-radius: 16px;
  background: var(--white);
}
.stack > span:nth-child(1) { left: 0;    top: 0; }
.stack > span:nth-child(2) { left: 20px; top: 20px; }
.stack > span:nth-child(3) { left: 40px; top: 40px; }
.stack > span:nth-child(4) { left: 60px; top: 60px; }
.stack > span:nth-child(5) { left: 80px; top: 80px; }
.stack__labels {
  position: absolute; left: 110px; top: 115px;
  display: flex; flex-direction: column; gap: 22px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.stack__labels strong { font-weight: 600; }

.services__title { color: var(--blue); font-size: 48px; line-height: 1.1; margin-bottom: 40px; }
.services__item { max-width: 360px; margin-bottom: 40px; font-size: 14px; }

/* ---------- Números ---------- */
.numbers {
  position: relative;
  padding: 50px 0 80px;
  color: var(--white);
  background:
    linear-gradient(193deg, var(--navy) 16%, rgba(23, 28, 82, 0) 73%),
    url("../img/Ondas-1-1.svg") center bottom / 100% auto no-repeat,
    var(--navy);
  background-color: #262b78;
  overflow: hidden;
}
.numbers__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.numbers__title { font-size: 48px; line-height: 1.15; padding-top: 40px; }
.numbers__title span { color: var(--green); }
.numbers__list { display: flex; flex-direction: column; gap: 32px; max-width: 450px; margin-left: auto; width: 100%; }

.stat {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  backdrop-filter: blur(2px);
}
.stat img { width: 20px; height: 20px; filter: brightness(0) saturate(100%) invert(62%) sepia(91%) saturate(1500%) hue-rotate(130deg); }
.stat__label { font-size: 13px; line-height: 1.4; }
.stat__value { color: var(--green); font-size: 40px; line-height: 1; white-space: nowrap; }
.stat__value small { font-size: 22px; }
.stat__value b { font-weight: 400; }
.stat__value em { font-style: normal; }

/* ---------- Clientes ---------- */
.clients {
  padding: 140px 0 90px;
  background: url("../img/Ondas-1-1.svg") center -120px / 110% auto no-repeat;
}
.clients__title { font-size: 28px; line-height: 1.4; margin-bottom: 26px; }
.clients__tag {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--green);
  font-size: 16px;
  letter-spacing: .02em;
  margin-bottom: 60px;
}
.clients__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 60px;
  align-items: center;
  justify-items: center;
}
.clients__grid img {
  max-height: 46px; max-width: 160px; width: auto;
  filter: grayscale(1);
  opacity: .85;
  transition: filter .3s, opacity .3s, transform .3s;
}
.clients__grid img:hover { filter: none; opacity: 1; transform: scale(1.05); }

/* ---------- Casos ---------- */
.cases { padding: 70px 0 90px; }
.cases__title { font-size: 34px; margin-bottom: 40px; }
.cases__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 50px; }
.case { border-bottom: 2px solid var(--pink); padding-bottom: 36px; font-size: 13px; line-height: 1.55; }
.case img {
  width: 20px; height: 20px; margin-bottom: 18px;
  filter: brightness(0) saturate(100%) invert(18%) sepia(98%) saturate(6000%) hue-rotate(315deg);
}

/* ---------- Productos ---------- */
.products { background: var(--grey-light); padding: 50px 0 80px; }
.products__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 50px; }
.product {
  position: relative;
  min-height: 420px;
  padding: 0 22px 26px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 14px;
  background-color: var(--grey);
  background-size: cover;
  background-position: center top;
  color: var(--blue);
  font-size: 13px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.product:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(23, 28, 82, .12); }
.product__title {
  position: absolute; top: -30px; left: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 56px;
  line-height: .95;
  color: var(--blue);
}
.product p { max-width: 250px; margin-bottom: 30px; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 12px; justify-content: center;
  align-self: flex-start;
  min-width: 140px;
  padding: 8px 26px;
  border: 1.5px solid var(--blue);
  border-radius: 30px;
  color: var(--blue);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-outline--light { border-color: var(--white); color: var(--white); }
.btn-outline--light:hover { background: var(--white); color: var(--blue); }

/* ---------- Blog ---------- */
.blog { padding: 70px 0 110px; }
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.post {
  position: relative;
  min-height: 420px;
  padding: 20px;
  border-radius: 8px;
  overflow: hidden;
  color: var(--white);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.post::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23, 28, 82, .75) 0%, rgba(66, 84, 255, .45) 100%);
  transition: background .3s;
}
.post:hover::before { background: linear-gradient(180deg, rgba(23, 28, 82, .9) 0%, rgba(66, 84, 255, .7) 100%); }
.post h3 { font-size: 22px; line-height: 1.2; margin-bottom: 14px; }
.post p { font-size: 12px; opacity: .9; }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  color: var(--white);
  background: var(--blue) url("../img/ola-fondo-azul-1.webp") center top / cover no-repeat;
  padding-top: 90px;
}

/* ---------- Footer ---------- */
.footer { padding: 60px 0 40px; }
.footer__inner { max-width: 900px; display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.footer__brand img { height: 22px; width: auto; margin-bottom: 16px; }
.footer__menus { display: flex; gap: 50px; }
.footer__menus ul { list-style: none; margin: 0; padding: 0; font-size: 12px; line-height: 1.6; }
.footer__menus li:first-child { margin-top: 0; }
.footer__menus ul:nth-child(2) { margin-top: 8px; }
.footer__menus a:hover { color: var(--green); }
.footer__badge { width: 46px; margin-top: 30px; }
.footer__social { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-top: 30px; }
.footer__social div { display: flex; gap: 14px; justify-content: center; margin-top: 10px; }
.footer__social svg { width: 18px; height: 18px; fill: var(--white); transition: fill .2s; }
.footer__social a:hover svg { fill: var(--green); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1000px) {
  .container { padding: 0 24px; }
  .hero { height: auto; padding: 60px 0 0; }
  .hero::before { width: 100%; opacity: .35; }
  .hero__inner { flex-direction: column; align-items: flex-start; }
  .hero__text { max-width: 420px; }
  .hero__phone { position: static; width: 280px; margin: 30px auto -40px; }
  .services__inner, .numbers__inner { grid-template-columns: 1fr; }
  .numbers__list { margin-left: 0; max-width: none; }
  .clients__grid { grid-template-columns: repeat(3, 1fr); }
  .cases__grid { grid-template-columns: repeat(2, 1fr); }
  .products__grid, .blog__grid { grid-template-columns: 1fr; gap: 50px; }
  .blog__grid { gap: 16px; }
}

@media (max-width: 860px) {
  .header__burger { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 6px;
    padding: 20px 24px 30px;
    background: var(--white);
    box-shadow: 0 20px 30px rgba(0, 0, 0, .08);
    transform: translateY(-120%);
    transition: transform .35s ease;
    z-index: -1;
  }
  .nav.is-open { transform: none; }
  .nav__item { font-size: 16px; }
  .nav__submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 10px; }
  .header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 600px) {
  .hero__title { font-size: 54px; }
  .services__title, .numbers__title { font-size: 38px; }
  .stack { transform: scale(.85); }
  .stat { grid-template-columns: 20px 1fr; }
  .stat__value { grid-column: 1 / -1; }
  .clients__grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .cases__grid { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; }
}

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