/* ========================================
   LAYOUT SYSTEM
   Containers, Sections, Grid
   ======================================== */

main {
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  /* Fullscreen sections for scroll snapping */
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Cambiado de center a flex-start */
  align-items: center;
  padding: 60px 24px 50px; /* Optimizado para aprovechar todo el viewport */
  position: relative;
  overflow-y: auto; /* Allow internal scroll if content exceeds viewport */
  overflow-x: hidden;
  width: 100%;
}

.section::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(135, 157, 2, 0.12);
  border-radius: 40px;
  opacity: 0;
  transform: scale(0.98);
  transition: var(--transition-long);
  pointer-events: none;
}

.section:is(:hover, :focus-within)::after {
  opacity: 1;
  transform: scale(1);
}

.section:nth-child(odd) {
  background: linear-gradient(
      135deg,
      rgba(135, 157, 2, 0.05),
      rgba(11, 11, 11, 0.9)
    ),
    var(--color-bg);
}

.section:nth-child(even) {
  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.7),
    rgba(10, 10, 10, 0.98)
  );
}

.section__heading {
  max-width: 720px;
  margin: 0 auto 18px; /* Reducido para estar más cerca del contenido */
  text-align: center;
}

.section__heading h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.4rem); /* Reducido */
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin-bottom: 0;
}

.section__heading .eyebrow {
  display: block;
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  font-weight: 500;
  min-height: 1.2em; /* Evitar layout shift durante typing */
  position: relative;
}

/* Cursor effect for eyebrow typing */
.section__heading .eyebrow::after {
  content: '_';
  color: var(--color-primary);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  opacity: 0; /* Hidden by default */
}

.eyebrow.typing::after {
  opacity: 1; /* Show during typing */
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .section {
    padding: 50px 20px 40px; /* Ajustado para mobile */
    min-height: 100vh; /* Solo min-height, no height fijo */
    height: auto; /* Permitir que se expanda si es necesario */
    /* Ensure content fits or scrolls internally */
    overflow-y: visible;
    overflow-x: hidden;
  }

  .section__heading {
    margin-bottom: 16px;
  }

  .section__heading h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .section__heading .eyebrow {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 16px 30px; /* Más compacto en mobile pequeño */
    min-height: 100vh;
    height: auto;
  }

  .section__heading {
    margin-bottom: 14px;
  }

  .section__heading h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
  }

  .section__heading .eyebrow {
    font-size: 0.65rem;
  }
}
