/* ==========================================================================
   layout.css — Estructura: header, navegación, hero, secciones, grids, footer
   Mobile-first: los estilos base son para 360px; se amplía con min-width.
   ========================================================================== */

/* ---------- Header sticky (fondo sólido, sin blur) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1) var(--s2);
  min-height: var(--header-h);
}

/* ---------- Navegación ---------- */
.nav {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  width: 100%;
  padding-block: var(--s1) var(--s2);
}

/* Con JS: panel desplegable bajo el header en móvil */
.js .nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: var(--s2) var(--gutter) var(--s3);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.js .nav.is-open {
  display: flex;
}

@media (min-width: 48em) {
  .nav,
  .js .nav,
  .js .nav.is-open {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    width: auto;
    padding: 0;
    background: none;
    border: 0;
    gap: var(--s1);
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--s6) var(--s8);
  background:
    radial-gradient(60% 50% at 90% 0%, rgba(124, 58, 237, 0.22), transparent 70%),
    radial-gradient(45% 40% at 0% 0%, rgba(192, 38, 211, 0.12), transparent 70%);
}

.hero__grid {
  display: grid;
  gap: var(--s5);
  align-items: center;
}

.hero__copy {
  min-width: 0;
}

.hero__sub {
  margin-top: var(--s2);
  color: var(--text-main);
  font-size: var(--fs-lead);
  font-weight: 600;
}

.hero__text {
  max-width: 36rem;
  margin-top: var(--s2);
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s4);
}

@media (min-width: 40em) {
  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

@media (min-width: 64em) {
  .hero {
    padding-block: var(--s8) var(--s10);
  }

  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--s6);
  }
}

/* ---------- Secciones ---------- */
.section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.section__head {
  max-width: 42rem;
  margin: 0 auto var(--s6);
  text-align: center;
}

.section__title {
  margin-top: var(--s1);
  font-size: var(--fs-h2);
  font-weight: 800;
}

.section__lead {
  margin-top: var(--s2);
  color: var(--text-muted);
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 36em) {
  .grid--cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 48em) {
  .grid--steps,
  .grid--features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .grid--cats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Franja de diferenciales ---------- */
.features {
  padding-block: var(--s4);
  background: var(--bg-surface);
  border-block: 1px solid var(--border-subtle);
}

/* ---------- Footer ---------- */
.footer {
  padding-block: var(--s5);
  background: var(--bg-footer);
  border-top: 1px solid var(--border-subtle);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  text-align: center;
}

.footer__copy {
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s1) var(--s3);
}

@media (min-width: 48em) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
