/* Secciones - AgroBlock Landing */
/* Header, Hero y demás bloques */

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

.header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background-color: rgba(245, 245, 245, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 17, 23, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding-top: var(--spacing-base);
  padding-bottom: var(--spacing-base);
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  transition: color 0.2s;
}

.header__logo:hover {
  color: var(--color-accent);
}

/* ============================================
   Nav mobile: overlay fullscreen oscuro
   ============================================ */
.nav--mobile {
  position: fixed;
  top: 64px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 64px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: #0f1117;
  transform: translateY(-110%);
  visibility: hidden;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.35s;
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav--mobile.is-open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.nav--mobile .nav__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 24px;
  flex: 1;
}

.nav--mobile .nav__item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav--mobile .nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  transition: color 0.2s;
  text-decoration: none;
}

.nav--mobile .nav__link::after {
  content: "→";
  font-size: 1.1rem;
  color: #22c55e;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}

.nav--mobile .nav__link:hover {
  color: #22c55e;
}

.nav--mobile .nav__link:hover::after {
  opacity: 1;
  transform: translateX(4px);
}

/* Footer del menú mobile */
.nav__mobile-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}

.nav__mobile-footer .badge {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.nav__mobile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: linear-gradient(to bottom, #22c55e, #16a34a);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav__mobile-cta:hover {
  opacity: 0.9;
}

/* ============================================
   Nav desktop: dentro del header, solo ≥768px
   ============================================ */
.nav--desktop {
  display: none;
}

/* Badge desktop */
.header__badge--desktop {
  display: none;
}

@media (min-width: 768px) {
  /* Ocultar nav mobile en desktop */
  .nav--mobile {
    display: none !important;
  }

  /* Mostrar nav desktop */
  .nav--desktop {
    display: flex;
    align-items: center;
  }

  .nav--desktop .nav__list {
    display: flex;
    flex-direction: row;
    gap: calc(var(--spacing-base) * 4);
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav--desktop .nav__link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
    padding: 0;
  }

  .nav--desktop .nav__link:hover {
    color: var(--color-accent);
  }

  /* Mostrar badge en desktop */
  .header__badge--desktop {
    display: inline-flex;
  }
}

/* ============================================
   Header oscuro al abrir nav mobile
   ============================================ */
.header--nav-open {
  background-color: #0f1117 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.header--nav-open .header__logo,
.header--nav-open .header__menu-toggle {
  color: #ffffff;
}

.header--nav-open .header__menu-icon,
.header--nav-open .header__menu-icon::before,
.header--nav-open .header__menu-icon::after {
  background-color: #ffffff;
}

.header--nav-open .header__logo-img {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
  height: 30px;
}

/* ============================================
   Hamburger toggle
   ============================================ */
.header__menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
  transition: background-color 0.2s;
}

@media (min-width: 768px) {
  .header__menu-toggle {
    display: none;
  }
}

.header__menu-toggle:hover {
  background-color: var(--color-bg-card);
}

.header__menu-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  transition: background-color 0.2s;
}

.header__menu-icon::before,
.header__menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.25s, background-color 0.2s;
}

.header__menu-icon::before { top: -7px; }
.header__menu-icon::after  { top:  7px; }

/* Hamburger → X verde cuando abierto */
.header__menu-toggle[aria-expanded="true"] .header__menu-icon {
  background-color: transparent;
}

.header__menu-toggle[aria-expanded="true"] .header__menu-icon::before {
  transform: translateY(7px) rotate(45deg);
  background-color: #22c55e;
}

.header__menu-toggle[aria-expanded="true"] .header__menu-icon::after {
  transform: translateY(-7px) rotate(-45deg);
  background-color: #22c55e;
}

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

.hero {
  padding-top: calc(var(--spacing-base) * 6);
  padding-bottom: calc(var(--spacing-base) * 8);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-base) * 6);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(var(--spacing-base) * 3);
}

.hero__tagline {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.02em;
}

.hero__description {
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-base);
}

.hero__preview {
  width: 100%;
}

.hero__preview-placeholder {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-card);
  border: 1px dashed rgba(15, 17, 23, 0.15);
  border-radius: var(--radius-lg);
}

.hero__preview-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* lg: 1024px - Hero 2 columnas en desktop */
@media (min-width: 1024px) {
  .hero {
    padding-top: calc(var(--spacing-base) * 10);
    padding-bottom: calc(var(--spacing-base) * 12);
  }

  .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: calc(var(--spacing-base) * 8);
  }

  .hero__content {
    flex: 1;
    min-width: 0;
  }

  .hero__preview {
    flex: 1;
    min-width: 0;
  }

  .hero__preview-placeholder {
    min-height: 360px;
  }
}

/* ============================================
   Section (genérico)
   ============================================ */

.section {
  padding-top: calc(var(--spacing-base) * 8);
  padding-bottom: calc(var(--spacing-base) * 8);
}

.section__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 calc(var(--spacing-base) * 5);
  text-align: center;
}

/* ============================================
   La app (hoy) - Grid de 6 módulos
   ============================================ */

.section--app-modules .section__title {
  text-align: center;
}

.modules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing-base) * 3);
}

/* sm: 640px - Grid 2 columnas */
@media (min-width: 640px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* lg: 1024px - Grid 3 columnas en desktop */
@media (min-width: 1024px) {
  .modules-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-base) * 4);
  }
}

/* ============================================
   ¿Cómo funciona? - Nueva versión con imagen
   ============================================ */

.how-it-works__header {
  text-align: center;
  margin-bottom: calc(var(--spacing-base) * 6);
}

.how-it-works__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 calc(var(--spacing-base) * 2);
}

.how-it-works__subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.how-it-works__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing-base) * 6);
  align-items: center;
}

.how-it-works__diagram {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(230, 235, 240, 0.8) 0%,
    rgba(220, 228, 235, 0.9) 100%
  );
  border-radius: var(--radius-lg);
  border: 1px solid rgba(22, 163, 74, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.how-it-works__image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius-md);
  filter: brightness(1.05) contrast(1.1);
}

.how-it-works__info {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-base) * 4);
  justify-content: center;
}

.info-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: calc(var(--spacing-base) * 2);
}

.info-card__dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.35);
}

.info-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 calc(var(--spacing-base) * 0.5);
}

.info-card__description {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* sm: 640px - nada especial para info-cards */

/* md: 768px - nada especial para info-cards */

/* lg: 1024px - Layout de 2 columnas: diagrama + info al lado */
@media (min-width: 1024px) {
  .how-it-works__content {
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-base) * 8);
  }

  .how-it-works__image {
    max-width: none;
  }

  .how-it-works__info {
    gap: calc(var(--spacing-base) * 4);
  }
}

/* ============================================
   Estado del proyecto - Barras de progreso
   ============================================ */

.section--project-status .section__title {
  text-align: center;
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-base) * 4);
  margin-bottom: calc(var(--spacing-base) * 6);
  margin-left: auto;
  margin-right: auto;
}

.section__cta {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================
   Próximamente - Chips
   ============================================ */

.section--coming-soon .section__title {
  text-align: center;
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-base);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding-top: calc(var(--spacing-base) * 6);
  padding-bottom: calc(var(--spacing-base) * 6);
  border-top: 1px solid rgba(15, 17, 23, 0.08);
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}
