/* =========================================================
   Portal Inglosa × Leadit
   Estilos de la página. Colores, tipografía, radios, sombras y
   movimiento salen de colors_and_type.css (tokens oficiales de
   Leadit); aquí solo se usan, no se redefinen.
   ========================================================= */

/* --- Poppins self-hosted (subset latino) ----------------------
   Misma familia que los tokens. Se declaran después, así que
   tienen prioridad: el sitio no depende de Google Fonts. */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/poppins-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/poppins-latin-900-normal.woff2') format('woff2');
}

/* --- Layout variables ---------------------------------------- */
:root {
  --gutter: 20px;
  --header-h: 76px;
  --overlap: 56px;          /* cuánto se montan las tarjetas sobre el hero */
  --container: 1200px;
}
@media (min-width: 640px) {
  :root { --gutter: 32px; --header-h: 92px; --overlap: 72px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 48px; --header-h: 108px; --overlap: 132px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--fg-1);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

::selection { background: var(--blue-500); color: var(--white); }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* =========================================================
   HEADER · co-branding Inglosa × Leadit
   ========================================================= */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  animation: fade-in var(--dur-slow) var(--ease-out) both;
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.cobrand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Los logos del cliente siempre van sobre blanco. */
.cobrand__client {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 7px 16px 7px 9px;
  background: var(--white);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-xl);
}
.cobrand__client img { width: auto; height: 30px; }

.cobrand__x {
  font-weight: var(--fw-light);
  font-size: 18px;
  line-height: 1;
  color: var(--fg-on-dark-2);
}

.cobrand__leadit { width: auto; height: 26px; flex: none; }

.header-badge {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px 8px 13px;
  border: 1px solid var(--border-on-dark);
  border-radius: var(--r-pill);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-regular);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--fg-on-dark-1);
  background: rgba(5, 10, 54, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.header-badge svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 640px) {
  .cobrand { gap: 16px; }
  .cobrand__client { padding: 9px 20px 9px 11px; }
  .cobrand__client img { height: 36px; }
  .cobrand__x { font-size: 22px; }
  .cobrand__leadit { height: 30px; }
  .header-badge { display: inline-flex; }
}
@media (min-width: 1024px) {
  .cobrand { gap: 20px; }
  .cobrand__client { padding: 11px 24px 11px 13px; }
  .cobrand__client img { height: 44px; }
  .cobrand__x { font-size: 26px; }
  .cobrand__leadit { height: 34px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: calc(var(--overlap) + 48px);
  color: var(--fg-on-dark-1);
  background: var(--blue-900);
  background-image: var(--grad-brand-deep);
}

/* Foto de fondo (Higgsfield). El overlay de abajo le da el brillo
   azul Leadit del lado del texto y garantiza el contraste. */
.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__media { z-index: -2; }
.hero__media img {
  object-fit: cover;
  object-position: 50% 100%;
}

/* Overlay de contraste: fuerte donde va el texto, se abre hacia la derecha. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    var(--grad-hero-ghost),
    radial-gradient(ellipse 90% 60% at 0% 35%, rgba(11, 36, 243, 0.38), rgba(11, 36, 243, 0) 70%),
    linear-gradient(180deg, rgba(5, 10, 54, 0.66) 0%, rgba(5, 10, 54, 0.74) 55%, rgba(5, 10, 54, 0.4) 100%);
}

.hero__content { position: relative; }

.hero__eyebrow {
  margin-bottom: var(--space-4);
  animation: rise var(--dur-med) var(--ease-out) 80ms both;
}

.hero__title {
  font-weight: var(--fw-black);
  font-size: clamp(32px, 9.2vw, 46px);   /* "Tus herramientas." cabe en una línea desde 360 px */
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(5, 10, 54, 0.45);
  animation: rise var(--dur-med) var(--ease-out) 140ms both;
}
.hero__title-line { display: block; }
.hero__title .highlight {
  padding: 0.02em 0.16em 0.1em;
  margin-top: 0.06em;
  border-radius: 6px;
  text-shadow: none;
}

.hero__lead {
  max-width: 36ch;
  margin-top: var(--space-5);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--fg-on-dark-2);
  text-shadow: 0 1px 16px rgba(5, 10, 54, 0.6);
  animation: rise var(--dur-med) var(--ease-out) 200ms both;
}

@media (min-width: 640px) {
  .hero {
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: calc(var(--overlap) + 64px);
  }
  .hero::after {
    background:
      var(--grad-hero-ghost),
      radial-gradient(ellipse 58% 85% at 6% 42%, rgba(11, 36, 243, 0.42), rgba(11, 36, 243, 0) 70%),
      linear-gradient(90deg, rgba(5, 10, 54, 0.84) 0%, rgba(5, 10, 54, 0.74) 55%, rgba(9, 27, 168, 0.3) 85%, rgba(9, 27, 168, 0) 100%),
      linear-gradient(180deg, rgba(5, 10, 54, 0.45) 0%, rgba(5, 10, 54, 0) 32%, rgba(5, 10, 54, 0) 72%, rgba(5, 10, 54, 0.4) 100%);
  }
  .hero__media img { object-position: 100% 20%; }
  .hero__title { font-size: clamp(48px, 7vw, 60px); }
  .hero__lead { font-size: var(--fs-body-lg); }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: calc(var(--overlap) + 64px);
  }
  .hero::after {
    background:
      var(--grad-hero-ghost),
      radial-gradient(ellipse 58% 85% at 6% 42%, rgba(11, 36, 243, 0.42), rgba(11, 36, 243, 0) 70%),
      linear-gradient(90deg, rgba(5, 10, 54, 0.72) 0%, rgba(9, 27, 168, 0.36) 44%, rgba(9, 27, 168, 0) 72%),
      linear-gradient(180deg, rgba(5, 10, 54, 0.45) 0%, rgba(5, 10, 54, 0) 32%, rgba(5, 10, 54, 0) 72%, rgba(5, 10, 54, 0.4) 100%);
  }
  .hero__media img { object-position: 100% 18%; }
  .hero__title { font-size: clamp(60px, 3.2vw + 26px, 72px); }
  .hero__lead { margin-top: var(--space-6); font-size: 20px; }
}

/* =========================================================
   ACCESOS · las tres tarjetas
   ========================================================= */
.access {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--overlap));
}

.access__grid {
  display: grid;
  gap: var(--space-4);
}
.access__grid > li { animation: rise var(--dur-med) var(--ease-out) both; }
.access__grid > li:nth-child(1) { animation-delay: 260ms; }
.access__grid > li:nth-child(2) { animation-delay: 320ms; }
.access__grid > li:nth-child(3) { animation-delay: 380ms; }

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100%;
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: var(--space-4);
  row-gap: var(--space-5);
  align-items: start;
  padding: var(--space-5);
  color: var(--fg-1);
  text-decoration: none;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

/* Regla superior azul → blanco que se dibuja al pasar el cursor. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-rule);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-slow) var(--ease-out);
}

/* Numeral fantasma (recurso de marca). Va en CSS y con texto
   alternativo vacío: es decoración, no contenido. */
.card::after {
  content: attr(data-num);
  content: attr(data-num) / "";
  display: none;
  position: absolute;
  z-index: -1;
  right: 0.08em;
  bottom: -0.24em;
  font-weight: var(--fw-black);
  font-size: 152px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(11, 36, 243, 0.05);
  pointer-events: none;
}

.card__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  color: var(--blue-500);
  background: rgba(11, 36, 243, 0.08);
}
.card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Punto "en línea" junto a Leadit: único uso del verde en las tarjetas. */
.card__live {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-whatsapp);
  box-shadow: 0 0 0 3px var(--white);
}

.card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card__eyebrow {
  font-weight: var(--fw-bold);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-brand);
}

.card__title {
  margin-top: 6px;
  font-weight: var(--fw-bold);
  font-size: 22px;
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
  color: var(--fg-1);
}

.card__desc {
  margin-top: var(--space-2);
  font-weight: var(--fw-light);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
}

.card__btn {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  line-height: 1;
  color: var(--white);
  background: var(--blue-500);
  border-radius: var(--r-pill);
  transition: background var(--dur-fast) var(--ease-out);
}
.card__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur-med) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.card:hover::before,
.card:focus-visible::before { transform: scaleX(1); }
.card:hover .card__btn { background: var(--blue-600); }
.card:hover .card__btn svg { transform: translateX(4px); }
.card:active { transform: translateY(-1px); }

.card:focus { outline: none; }
.card:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 4px;
  box-shadow: var(--shadow-focus), var(--shadow-xl);
}

/* Tablet: tarjetas horizontales, una debajo de otra. */
@media (min-width: 640px) {
  .access__grid { gap: var(--space-5); }
  .card {
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    column-gap: var(--space-6);
    padding: var(--space-6) var(--space-8);
  }
  .card__btn { grid-column: auto; min-height: 48px; padding: 0 24px; }
}

/* Desktop: tres columnas, las tarjetas son las protagonistas. */
@media (min-width: 1024px) {
  .access__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }
  .card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    row-gap: 28px;
    min-height: 296px;
    padding: 28px var(--space-8) var(--space-8);
  }
  .card__icon { width: 48px; height: 48px; }
  .card__title { font-size: var(--fs-h3); }
  .card__btn { justify-self: start; min-height: 48px; }
  .card::after { display: block; }
}

/* =========================================================
   MARCAS · franja secundaria, siempre sobre blanco
   ========================================================= */
.brands {
  padding: var(--space-12) 0 var(--space-12);
}

.brands__panel {
  padding: var(--space-6) var(--space-4) var(--space-2);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.brands__title {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
}

.brands__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--space-3);
}

.brands__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: var(--space-4);
}
.brands__item:nth-child(odd) { border-right: 1px solid var(--border); }
.brands__item:nth-child(n + 3) { border-top: 1px solid var(--border); }

/* Peso visual igualado a ojo: Hertz y Thrifty son más pesados,
   Carshop es el más ligero. Todos quedan por debajo de Inglosa. */
.brands__item img { width: auto; max-width: 100%; height: var(--logo-h); }
.brand--hertz   { --logo-h: 28px; }
.brand--dollar  { --logo-h: 31px; }
.brand--thrifty { --logo-h: 29px; }
.brand--carshop { --logo-h: 35px; }

@media (min-width: 768px) {
  .brands { padding: var(--space-16) 0 var(--space-16); }
  .brands__panel { padding: var(--space-8) var(--space-8) var(--space-4); }
  .brands__list { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--space-4); }
  .brands__item { min-height: 112px; }
  .brands__item:nth-child(n) { border-right: 0; border-top: 0; }
  .brands__item + .brands__item { border-left: 1px solid var(--border); }
  .brand--hertz   { --logo-h: 35px; }
  .brand--dollar  { --logo-h: 38px; }
  .brand--thrifty { --logo-h: 36px; }
  .brand--carshop { --logo-h: 44px; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
  padding-block: var(--space-6) var(--space-8);
  font-size: var(--fs-body-sm);
  color: var(--fg-2);
}

.powered {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: var(--r-sm);
  color: var(--fg-2);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.powered img { width: auto; height: 24px; }
.powered:hover { color: var(--fg-1); }
.powered:focus { outline: none; }
.powered:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

/* =========================================================
   MOVIMIENTO
   ========================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Aparición al hacer scroll (portal.js marca lo que arranca fuera de pantalla). */
.reveal.is-pending {
  opacity: 0;
  transform: translateY(20px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal.is-pending { opacity: 1; transform: none; }
}

@media print {
  .reveal.is-pending { opacity: 1; transform: none; }
}
