/* =============================================================
   MasConnect — Landing
   Stack: HTML + CSS puro, sin frameworks. Mobile-first.
   Fuentes: Source Sans 3 (títulos/UI) + Roboto (cuerpo)
   ============================================================= */

/* ----- Tokens ---------------------------------------------- */
:root {
  --c-yellow: #FBBE3B;
  --c-yellow-soft: #FAB951;
  --c-yellow-tint: #FFF6E0;
  --c-black: #1C1C1C;
  --c-black-deep: #0f0f0f;
  --c-text: #1a1a1a;
  --c-text-muted: #4a4a4a;
  --c-text-inverse: #ffffff;
  --c-bg: #ffffff;
  --c-bg-soft: #f7f7f7;
  --c-border: #e6e6e6;
  --c-border-dark: #2a2a2a;

  --radius-pill: 999px;
  --radius-card: 14px;
  --radius-btn: 4px;

  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);

  --container-max: 1728px;
  /* (1728 - 1424) / 2 = 152px de padding lateral en el ancho de referencia */
  --container-pad: clamp(24px, 8.8vw, 152px);

  --ff-heading: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --t-fast: 150ms ease;
  --t-base: 250ms ease;
}

/* ----- Reset mínimo --------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--ff-heading);
}

:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----- Layout helpers ------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ----- Botones -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--ff-body);
  /* Roboto */
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-btn);
  transition: transform var(--t-fast), background var(--t-base), color var(--t-base), box-shadow var(--t-base);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--dark {
  background: var(--c-black);
  color: #ffffff;
}

.btn--dark:hover {
  background: #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn--yellow {
  background: var(--c-yellow);
  color: var(--c-black);
  padding: 14px 38px;
  font-weight: 700;
}

.btn--yellow:hover {
  background: #956516;
  box-shadow: 0 6px 18px rgba(149, 101, 22, 0.35);
}

/* Tamaños específicos por contexto (specs Figma) */
.nav__cta {
  font-size: 16px;
  color: var(--c-yellow);
}

.hero__cta {
  font-size: 18px;
  padding: 10px 16px;
  color: #ffffff;
}

/* ----- Pills (badges) ------------------------------------- */
.pill {
  display: inline-block;
  padding: 6px 16px;
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

.pill--light {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-black);
}

.pill--outline {
  background: transparent;
  color: var(--c-yellow);
  border: 1px solid var(--c-yellow);
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  /* Alto referencia Figma: 932px. Se adapta proporcional al viewport. */
  min-height: clamp(620px, 54vw, 932px);
  background-image: url('assets/hero.jpg');
  background-size: cover;
  background-position: center right;
  background-color: var(--c-yellow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      var(--c-yellow-soft) 0%,
      var(--c-yellow-soft) 28%,
      rgba(250, 185, 81, 0.85) 45%,
      rgba(249, 168, 37, 0) 78%);
  pointer-events: none;
}

/* --- Nav (header alineado al mismo container que el resto) --- */
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 134px;
}

.nav__brand img {
  width: clamp(96px, 9vw, 130px);
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* --- Bloque de texto del hero (contenido a ~596px) --- */
.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: flex-start;
  /* Mínimo 116px de separación entre el logo (nav) y el badge/título */
  padding-block: clamp(116px, 7vw, 160px) clamp(60px, 6vw, 110px);
}

/* La línea vertical va como elemento decorativo independiente,
   alineada al mismo eje X que el logo y el contenido. */
.hero__text {
  position: relative;
  max-width: 596px;
  width: 100%;
}

.hero__text::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 8px;
  left: -16px;
  width: 2px;
  background: var(--c-black);
}

.hero__title {
  font-family: var(--ff-heading);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--c-black);
  margin-bottom: 28px;
}

.hero__title-accent {
  font-style: normal;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.hero__lead {
  font-family: var(--ff-body);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.5;
  max-width: 460px;
  color: var(--c-black);
  margin-bottom: 36px;
}

/* =============================================================
   BANNER
   ============================================================= */
.banner {
  background: var(--c-black);
  color: var(--c-text-inverse);
  padding-block: 36px;
  padding-inline: var(--container-pad);
  text-align: center;
}

.banner__text {
  font-family: var(--ff-heading);
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.banner .mas {
  color: var(--c-yellow);
  font-weight: 800;
}

.banner__dot {
  color: var(--c-yellow);
  margin-inline: 4px;
}

/* =============================================================
   MÓDULOS
   Fondo claro completo. Las cards usan margin-bottom negativo
   para extenderse hacia la sección oscura de Acceso Clientes,
   creando el efecto de "flotación" sobre el límite.
   ============================================================= */
.modules {
  background: var(--c-bg-soft);
  padding-block: clamp(60px, 8vw, 110px) 0;
}

.modules__title {
  font-family: var(--ff-heading);
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.modules__title-light {
  font-weight: 300;
}

.modules__lead {
  font-family: var(--ff-body);
  max-width: 580px;
  color: var(--c-text-muted);
  margin-bottom: 56px;
  font-size: clamp(15px, 1.3vw, 17px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  /* Las cards entran sólo ~100px en el área negra (los Accesos),
     dejando ~75% sobre blanco y ~25% sobre negro */
  margin-bottom: -100px;
  position: relative;
  z-index: 2;
}

.card {
  background: var(--c-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-base), box-shadow var(--t-base);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-bg-soft);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.card:hover .card__media img {
  transform: scale(1.04);
}

.card__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--c-yellow);
  color: var(--c-black);
  font-family: var(--ff-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.card__body {
  padding: 22px 24px 28px;
}

.card__title {
  font-family: var(--ff-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--c-black);
}

.card__desc {
  font-family: var(--ff-body);
  color: var(--c-text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* =============================================================
   ACCESO CLIENTES
   ============================================================= */
.access {
  position: relative;
  background: var(--c-black);
  color: var(--c-text-inverse);
  /* padding-top compensa el margin-bottom negativo de las cards (-100)
     y deja además ~180px de aire entre el final de las cards y el pill */
  padding-block: clamp(220px, 17vw, 280px) clamp(60px, 7vw, 100px);
  text-align: center;
  overflow: hidden;
}

/* Ellipse miscelanea: glow amarillo difuso en la esquina superior derecha,
   detrás del contenido. Decorativo. */
.access::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -40px;
  width: clamp(280px, 32vw, 446px);
  aspect-ratio: 446 / 696;
  background: url('assets/Ellipse%20miscelanea.svg') center / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}

.access>* {
  position: relative;
  z-index: 1;
}

.access__inner {
  max-width: 100%;
}

.access__title {
  font-family: var(--ff-heading);
  /* Spec Figma: 60px, 700, line-height 100%, una sola línea */
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 18px;
  color: #fff;
  white-space: nowrap;
}

.access__lead {
  font-family: var(--ff-body);
  color: #cfcfcf;
  margin: 0 auto 30px;
  max-width: 460px;
  font-size: clamp(14px, 1.2vw, 16px);
}

/* Spec Figma: 134x40, padding 10/16, radius 4, 18px */
.access__cta {
  width: 134px;
  height: 40px;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 22px;
}

.access__help {
  color: #9a9a9a;
  font-size: 13px;
}

.access__help a {
  color: var(--c-yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  background: var(--c-black);
  color: var(--c-text-inverse);
  padding-block: 60px 28px;
}

/* Logo a la izquierda, contactos a la derecha (no centrados ni en grid) */
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-bottom: 32px;
}

.footer__brand svg,
.footer__brand img {
  display: block;
}

.footer__contacts {
  display: flex;
  gap: clamp(32px, 5vw, 80px);
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
}

.footer__label img,
.footer__label svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer__value {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.footer__value:hover {
  color: var(--c-yellow);
}

.footer__divider {
  border: 0;
  border-top: 1px solid var(--c-border-dark);
  margin: 24px 0 18px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 32px;
}

.footer__copy {
  color: #8a8a8a;
  font-size: 12px;
}

.footer__legal {
  display: flex;
  gap: 28px;
}

.footer__legal a {
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d6d6d6;
  transition: color var(--t-fast);
}

.footer__legal a:hover {
  color: var(--c-yellow);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
  .hero {
    min-height: 620px;
  }

  .nav {
    height: 100px;
  }

  .hero__overlay {
    background: linear-gradient(to right,
        var(--c-yellow-soft) 0%,
        rgba(250, 185, 81, 0.92) 60%,
        rgba(249, 168, 37, 0.4) 100%);
  }

  .footer__top {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
  }

  .footer__contacts {
    justify-content: center;
    gap: 28px 40px;
  }

  .footer__contact {
    align-items: center;
  }

  /* En tablet/mobile, las cards no tienen overlap negativo */
  .modules {
    background: var(--c-bg-soft);
    padding-block: clamp(60px, 8vw, 110px);
  }

  .cards {
    margin-bottom: 0;
  }

  .access {
    padding-block: clamp(60px, 8vw, 100px);
  }

  .access__title {
    white-space: normal;
  }

  /* Mobile: contactos del footer apilados en una columna, todo centrado */
  .footer__contacts {
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }

  .footer__bottom {
    align-items: center;
    text-align: center;
  }

  .footer__legal {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  :root {
    --container-pad: 22px;
  }

  .hero {
    min-height: 560px;
  }

  .nav {
    height: 88px;
  }

  .hero__content {
    padding-block: 64px 56px;
  }

  .hero__text::before {
    left: -12px;
  }

  .nav__cta {
    padding: 8px 14px;
    font-size: 14px;
  }

  .hero__cta {
    font-size: 16px;
    padding: 12px 24px;
  }

  .banner {
    padding-block: 28px;
  }

  .banner__text {
    line-height: 1.4;
  }

  .cards {
    gap: 20px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__legal {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================
   PARALLAX (rama feature/parallax)
   El JS actualiza --parallax-y en función del scrollY.
   ============================================================= */
.hero {
  background-position: right calc(50% + var(--parallax-y, 0px));
  will-change: background-position;
}

@media (prefers-reduced-motion: reduce) {
  .hero {
    background-position: center right !important;
  }
}