/* =========================
   Variables y base
========================= */

:root {
  --yellow: #ffd200;
  --yellow-strong: #f5c400;
  --black: #070807;
  --white: #ffffff;
  --muted: #d8d8d8;

  --header-height: 72px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;

  width: 100%;
  overflow-x: hidden;

  color: var(--white);
  background: var(--black);

  font-family: "Poppins", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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


/* =========================
   Header
========================= */

.site-header {
  position: fixed;
  z-index: 20;

  inset: 0 0 auto;

  min-height: var(--header-height);

  background: rgba(5, 7, 7, 0.96);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(10px);
}


/* =========================
   Header inner MOBILE
========================= */

.header-inner {
  min-height: var(--header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  width: min(100% - 32px, var(--container));
}


/* =========================
   Logo
========================= */

.brand {
  display: inline-flex;
  align-items: center;

  gap: 10px;

  width: auto;

  flex-shrink: 0;
}

.brand-icon {
  width: 48px;
  height: 48px;

  flex-shrink: 0;

  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;

  line-height: 1;
}

.brand-text strong {
  color: #ffffff;

  font-size: 1.08rem;
  font-weight: 700;

  letter-spacing: -0.03em;

  white-space: nowrap;
}

.brand-text strong span {
  color: var(--yellow);
}

.brand-text small {
  margin-top: 6px;

  color: #b8b8b8;

  font-size: 0.48rem;
  font-weight: 600;

  letter-spacing: 0.12em;

  text-transform: uppercase;

  white-space: nowrap;
}


/* =========================
   Botón hamburguesa
   SOLO MOBILE
========================= */

.menu-toggle {
  position: relative;
  z-index: 30;

  width: 42px;
  height: 42px;

  display: flex;
  flex-direction: column;
  flex-shrink: 0;

  justify-content: center;
  align-items: center;

  gap: 6px;

  padding: 0;

  color: var(--white);

  background: transparent;

  border: 0;

  cursor: pointer;
}

.menu-toggle span {
  display: block;

  width: 25px;
  height: 2px;

  background: currentColor;

  border-radius: 2px;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}


/* =========================
   Animación hamburguesa
========================= */

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* =========================
   Navegación MOBILE
========================= */

.main-nav {
  position: absolute;

  top: var(--header-height);

  left: 0;
  right: 0;

  display: flex;
  flex-direction: column;

  gap: 0;

  padding: 0 16px;

  background: rgba(5, 7, 7, 0.98);

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  max-height: 0;

  overflow: hidden;

  opacity: 0;

  pointer-events: none;

  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    padding 0.35s ease;
}


/* =========================
   Navegación abierta MOBILE
========================= */

.main-nav.open {
  max-height: 320px;

  padding-top: 12px;
  padding-bottom: 12px;

  opacity: 1;

  pointer-events: auto;
}


/* =========================
   Links del menú MOBILE
========================= */

.main-nav a {
  position: relative;

  flex: 0 0 auto;

  padding: 15px 4px;

  color: #d8d8d8;

  font-size: 0.84rem;
  font-weight: 500;

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.main-nav a:last-child {
  border-bottom: 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--yellow);
}


/* En mobile no usamos la línea amarilla */

.main-nav a.active::after {
  display: none;
}


/* =========================
   Hero
========================= */

.hero {
  position: relative;
  min-height: 100svh;
  padding-top: var(--header-height);
  overflow: hidden;
  background-color: #070807;
  background-image: url("assets/imagen_background.png");
  background-repeat: no-repeat;

  /* La imagen se adapta a la altura útil del dispositivo */
  background-size: auto 100svh;
  /* Ajuste de encuadre */
  background-position: 76% top;
}


/* =========================
   Oscurecimiento del fondo
========================= */

.hero-overlay {
  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      90deg,
      rgba(3, 4, 4, 0.98) 0%,
      rgba(3, 4, 4, 0.88) 38%,
      rgba(3, 4, 4, 0.34) 70%,
      rgba(3, 4, 4, 0.18) 100%
    ),
    linear-gradient(
      0deg,
      rgba(3, 4, 4, 0.56),
      transparent 45%
    );
}


/* =========================
   Contenido hero
========================= */

.hero-content {
  position: relative;
  z-index: 1;

  min-height: calc(
    100svh - var(--header-height)
  );

  display: flex;
  flex-direction: column;

  justify-content: flex-start;

  gap: 28px;

  padding-block: 28px 20px;
}

.hero-copy {
  max-width: 610px;
}


/* =========================
   Eyebrow
========================= */

.eyebrow {
  margin: 0 0 12px;

  color: var(--yellow);

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.12em;

  text-transform: uppercase;
}


/* =========================
   Título principal
========================= */

.hero h1 {
  max-width: 760px;

  margin: 0;

  font-size: clamp(
    1.5rem,
    9vw,
    4.3rem
  );

  line-height: 1.08;

  letter-spacing: -0.045em;

  font-weight: 800;
}

.hero h1 span {
  display: block;

  color: var(--yellow);
}


/* =========================
   Descripción
========================= */

.hero-description {
  max-width: 575px;

  margin: 22px 0 0;

  color: #ededed;

  font-size: clamp(
    0.92rem,
    2.5vw,
    1.05rem
  );

  line-height: 1.75;
}


/* =========================
   Botones
========================= */

.hero-buttons {
  display: flex;
  flex-direction: column;

  gap: 12px;

  margin-top: 30px;
}

.button {
  min-height: 50px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 10px;

  padding: 13px 20px;

  border: 1px solid transparent;

  border-radius: 9px;

  font-size: 0.84rem;
  font-weight: 600;

  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button svg {
  width: 19px;
  height: 19px;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.45;

  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Botón principal */

.button-primary {
  color: #111;

  background: var(--yellow);
}

.button-primary:hover {
  background: #ffe04a;
}


/* Botón secundario */

.button-secondary {
  color: var(--white);

  background: rgba(8, 8, 8, 0.28);

  border-color: rgba(255, 255, 255, 0.82);
}

.button-secondary:hover {
  color: var(--yellow);

  border-color: var(--yellow);
}


/* =========================
   Beneficios
========================= */

.benefits {
  display: grid;

  grid-template-columns: 1fr;

  gap: 14px;
}

.benefit {
  display: flex;

  align-items: center;

  gap: 12px;

  min-width: 0;
}

.benefit-icon {
  flex: 0 0 43px;

  width: 43px;
  height: 43px;

  display: grid;

  place-items: center;

  border: 1px solid rgba(
    255,
    210,
    0,
    0.28
  );

  border-radius: 10px;

  color: var(--yellow);

  background: rgba(
    8,
    8,
    8,
    0.72
  );
}

.benefit-icon svg {
  width: 24px;
  height: 24px;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.55;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit h2 {
  margin: 0 0 3px;

  font-size: 0.75rem;

  font-weight: 600;
}

.benefit p {
  margin: 0;

  color: #bdbdbd;

  font-size: 0.62rem;
}


/* =========================
   Secciones futuras
========================= */

.placeholder-section {
  min-height: 40vh;

  display: grid;

  place-items: center;

  padding: 90px 0;

  color: #222;

  background: #f4f4f2;
}

.placeholder-section:nth-of-type(odd) {
  background: #ecece8;
}

.placeholder-section h2 {
  margin: 0;

  font-size: 2rem;
}


/* =========================
   TABLET
========================= */

@media (min-width: 640px) {

  .hero-buttons {
    flex-direction: row;

    align-items: center;
  }

  .button {
    min-width: 190px;
  }

  .benefits {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );

    gap: 24px;
  }
}


/* =========================
   DESKTOP
========================= */

@media (min-width: 900px) {

  :root {
    --header-height: 78px;
  }


  /* =========================
     Header desktop
  ========================= */

  .header-inner {
    display: grid;

    grid-template-columns:
      190px
      1fr
      auto;

    align-items: center;
  }


  /* =========================
     Logo desktop
  ========================= */

  .brand {
    width: 156px;
    min-width: 0;
    max-width: calc(100% - 58px);
  }

  .brand-icon {
    width: 54px;
    height: 54px;
  }

  .brand-text strong {
    font-size: 1.2rem;
  }

  .brand-text small {
    font-size: 0.52rem;
  }


  /* =========================
     Ocultar hamburguesa
  ========================= */

  .menu-toggle {
    display: none;
  }


  /* =========================
     Navegación desktop
  ========================= */

  .main-nav {
    position: static;

    display: flex;
    flex-direction: row;

    justify-content: center;

    gap: 46px;

    padding: 0;

    background: transparent;

    border: 0;

    max-height: none;

    overflow: visible;

    opacity: 1;

    pointer-events: auto;
  }

  .main-nav a {
    padding:
      28px
      0
      24px;

    font-size: 0.78rem;

    border-bottom: 0;
  }

  .main-nav a.active::after {
    content: "";

    display: block;

    position: absolute;

    left: 0;
    right: 0;

    bottom: 14px;

    height: 2px;

    background: var(--yellow);
  }


  /* =========================
     Hero desktop
  ========================= */

  .hero {
    padding-top: var(--header-height);

    background-size: cover;
    background-position: center center;
  }

  .hero-content {
    min-height:
      calc(
        100svh -
        var(--header-height)
      );

    justify-content: space-between;
    gap: 46px;

    padding-block:
      clamp(
        72px,
        10vh,
        120px
      )
      34px;
  }

  .eyebrow {
    display: none;
  }

  .hero h1 {
    font-size:
      clamp(
        3.1rem,
        5.7vw,
        5.25rem
      );
  }

  .hero-description {
    max-width: 540px;
  }

  .benefits {
    max-width: 800px;
  }
}


/* =========================
   Pantallas grandes
========================= */

@media (min-width: 1200px) {

  .hero-overlay {
    background:
      linear-gradient(
        90deg,
        rgba(3, 4, 4, 0.98) 0%,
        rgba(3, 4, 4, 0.88) 33%,
        rgba(3, 4, 4, 0.22) 59%,
        rgba(3, 4, 4, 0.06) 100%
      ),
      linear-gradient(
        0deg,
        rgba(3, 4, 4, 0.48),
        transparent 45%
      );
  }

  .benefits {
    gap: 42px;
  }
}

/* =========================
   AJUSTE FINAL SOLO MOBILE
   Acerca los beneficios a los botones
   sin modificar la versión de escritorio
========================= */

@media (max-width: 899px) {

  .hero-content {
    justify-content: flex-start;
    gap: 14px;
    padding-block: 28px 14px;
  }

  .benefits {
    margin-top: 0;
    gap: 10px;
  }

}

