/* ==========================================================================
   INGENIOSS — Responsive
   Escritorio ≥1440 · Laptop 1024–1439 · Tablet 768–1023 · Móvil 320–767
   ========================================================================== */

/* ---------- Escritorio amplio ---------- */
@media (min-width: 1440px) {
  :root { --container: 1280px; }
}

/* ---------- Laptop ---------- */
@media (max-width: 1239px) {
  .nav-link { padding: .5rem .55rem; }
  .main-nav { gap: var(--space-3); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 60ch; }
}

/* ---------- Menú móvil (por debajo de laptop) ---------- */
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }

  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: var(--space-4);
    padding: var(--space-5) clamp(1rem, 4vw, 2rem) var(--space-6);
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(18, 58, 90, .35);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--dur), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: .95rem .25rem; font-size: var(--fs-base); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-link::after { display: none; }
  .nav-cta { min-height: 50px; font-size: var(--fs-sm); }
  body.nav-open { overflow: hidden; }

  /* Layouts de dos columnas pasan a una */
  .hero-grid, .about-grid, .fact-grid, .sup-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-disciplines { justify-content: center; }
  .hero-visual { max-width: 560px; width: 100%; margin-inline: auto; }

  .about-visual { order: 2; }
  .venn { max-width: 380px; }

  .spec-grid { grid-template-columns: 1fr 1fr; }
  .spec-grid > :last-child { grid-column: 1 / -1; }
  .spec-grid > :last-child .spec-media { aspect-ratio: 32 / 9; }

  .tech-grid, .acc-grid { grid-template-columns: 1fr 1fr; }

  .fact-mock { max-width: 640px; margin-inline: auto; width: 100%; }
  .sup-visual { max-width: 520px; margin-inline: auto; width: 100%; }

  .why-head { position: static; text-align: center; max-width: 640px; margin-inline: auto; }
  .why-head .kicker { justify-content: center; }
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
  :root { --header-h: 66px; }
  body { font-size: 1rem; }

  .brand-mascot { width: 40px; }
  .brand-wordmark { width: 108px; }
  .brand-tagline { font-size: .5625rem; letter-spacing: .1em; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-disciplines { flex-direction: column; align-items: stretch; }
  .hero-disciplines a { justify-content: flex-start; }
  .hero-visual { min-height: 0; aspect-ratio: 1 / 1.05; }
  .hv-terrain { width: 60%; bottom: 22%; }
  .hv-code { width: 78%; right: 0; }
  .hv-mascot { display: none; }
  .hv-blueprint { width: 92%; }

  .section-head { margin-bottom: var(--space-6); }
  .attr-grid, .fact-features, .sup-list, .why-list { grid-template-columns: 1fr; }

  .spec-grid, .tech-grid, .acc-grid { grid-template-columns: 1fr; }
  .spec-grid > :last-child .spec-media { aspect-ratio: 20 / 9; }

  .tech-foot { flex-direction: column; align-items: stretch; text-align: center; }

  .badge { margin-left: 0; display: flex; width: fit-content; }

  .mock-body { grid-template-columns: 44px 1fr; min-height: 0; }
  .mock-side span { width: 30px; height: 30px; }
  .mock-side img { width: 24px; }
  .mock-main { padding: .8rem; }
  .mock-kpis { grid-template-columns: 1fr 1fr; }
  .mock-kpi:last-child { display: none; }
  .mt-row { grid-template-columns: 1fr auto; }
  .mt-row span:nth-child(2) { display: none; }
  .mock-btn { padding: .35rem .55rem; }

  .acc-foot .btn, .cta-actions .btn, #productos .btn-lg, #soporte .btn-lg { width: 100%; }
  .cta-actions { flex-direction: column; }

  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { flex: 0 0 auto; width: 100%; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding-bottom: 5.5rem; }

  .fab-wa { right: 1rem; bottom: 1rem; width: 54px; height: 54px; }
  .to-top { right: 1.15rem; bottom: 4.9rem; width: 44px; height: 44px; }
}

/* ---------- Móvil pequeño ---------- */
@media (max-width: 380px) {
  .brand-tagline { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hv-pre { font-size: .5625rem; }
}
