/* ==========================================================================
   RESPONSIVE: all tablet and phone rules. Loaded last so these rules win.
   ========================================================================== */

/* ---------- tablet and below ---------- */
@media (max-width: 900px) {
  /* mobile menu */
  .nav-links,
  .nav .btn {
    display: none;
  }

  .burger {
    display: block;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    background: rgba(5, 6, 13, .98);
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle:checked ~ .nav-links > a,
  .nav-dropdown-button {
    justify-content: space-between;
    width: 100%;
    padding: 16px 4%;
    border-top: 1px solid var(--line);
  }

  /* the dropdown opens inside the mobile menu */
  .nav-menu {
    position: static;
    display: none;
    grid-template-columns: 1fr;
    width: auto;
    padding: 0 4% 10px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transform: none;
  }

  .nav-dropdown.is-open .nav-menu {
    display: grid;
  }

  /* sections */
  section {
    padding: 90px 0;
  }

  .stats {
    grid-template-columns: repeat(2, auto);
    gap: 28px 46px;
  }

  .filter-tabs {
    margin: -24px 0 30px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .contact-box {
    grid-template-columns: 1fr;
    padding: 32px 22px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- phones ---------- */
@media (max-width: 600px) {
  .project-card {
    width: 290px;
  }

  .project-card--web {
    width: 320px;
  }

  .project-stage {
    height: 310px;
  }

  .phone {
    --phone-width: 128px;
    border-radius: 21px;
  }

  .phone img {
    border-radius: 17px;
  }

  .laptop {
    width: 280px;
  }

  .chat-panel {
    right: 12px;
    bottom: 12px;
  }

  .chat-launcher {
    right: 14px;
    bottom: 14px;
    height: 52px;
    padding: 0 16px 0 13px;
    font-size: 14px;
  }

  .whatsapp-btn {
    right: 16px;
    bottom: 80px;
  }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01s !important;
    transition-duration: .01s !important;
  }

  /* projects stay still, and can be swiped instead */
  .projects-viewport {
    overflow-x: auto;
    cursor: auto;
    touch-action: auto;
  }

  .laptop-page.is-scrolling {
    animation: none;
  }
}
