/* ============================================================
   20. RESPONSIVE
   ============================================================ */


/* ============================================================
   TABLET — do 1050px
   ============================================================ */

@media (max-width: 1050px) {

  .nav-menu {
    gap: 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero-grid {
    gap: 40px;
  }

  .services-grid,
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}


/* ============================================================
   TABLET / MOBILE — do 850px
   ============================================================ */

@media (max-width: 850px) {

  /* ---------- Navigation ---------- */

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;

    top: 78px;
    right: 0;

    width: 100%;
    height: calc(100vh - 78px);

    padding: 50px 8%;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;

    background: rgba(255, 255, 255, 0.98);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    transform: translateX(100%);

    transition: transform 0.4s ease;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;

    gap: 25px;
  }

  .nav-links a {
    font-size: 25px;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-button {
    width: 100%;

    justify-content: center;

    padding: 16px;
  }


  /* ---------- Main grids ---------- */

  .hero-grid,
  .why-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }


  /* ---------- Hero ---------- */

  .hero-content {
    max-width: 700px;

    margin: 0 auto;

    text-align: center;
  }

  .hero-description {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;

    text-align: left;
  }

  .hero-visual {
    width: 100%;
    max-width: 700px;

    margin: 0 auto;
  }


  /* ---------- Why ---------- */

  .why-content {
    text-align: center;
  }

  .why-content .eyebrow {
    justify-content: center;
  }

  .why-content .btn {
    margin-top: 10px;
  }


  /* ---------- Demos ---------- */

  .demo-card-featured {
    grid-column: span 2;
  }


  /* ---------- Contact ---------- */

  .contact-info {
    text-align: center;
  }

  .contact-info .eyebrow {
    justify-content: center;
  }

  .contact-details {
    justify-content: center;
  }


  /* ---------- Reference ---------- */

  .reference-card {
    grid-template-columns: 1fr;
  }

  .reference-image {
    min-height: 400px;
  }

  .reference-content {
    padding: 45px 40px;
  }

}


/* ============================================================
   MOBILE — do 650px
   ============================================================ */

@media (max-width: 650px) {

  /* ---------- General ---------- */

  .section {
    padding: 50px 0;
  }


  /* ---------- Background ---------- */

  body::before {
    width: 400px;
    height: 400px;

    left: -280px;
  }

  body::after {
    width: 400px;
    height: 400px;

    right: -280px;
  }


  /* ---------- Hero ---------- */

  .hero {
    padding: 125px 0 75px;
  }

  .hero h1 {
    font-size: 43px;

    letter-spacing: -2px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-stats {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 10px;
  }

  .stat-divider {
    display: none;
  }

  .hero-stat {
    text-align: center;
  }


  /* ---------- Browser ---------- */

  .hero-visual {
    padding: 10px 0;

    perspective: none;
  }

  .browser-window {
    transform: none !important;
  }

  .browser-window::before,
  .browser-window::after {
    display: none;
  }

  .browser-window:hover {
    transform: translateY(-5px) !important;
  }

  .floating-card {
    display: none;
  }

  .mock-nav {
    display: none;
  }

  .mock-hero {
    min-height: 220px;

    padding: 25px;
  }

  .mock-hero h3 {
    font-size: 23px;
  }

  .mock-features {
    grid-template-columns: 1fr;
  }


  /* ---------- Services ---------- */

  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-card {
    min-height: auto;
    padding: 28px 25px;
  }

  .service-number {
    margin-bottom: 18px;
  }

  .service-icon {
    margin-bottom: 18px;
  }

  .service-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
  }

  .service-card p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
  }

  .card-link {
    margin-top: auto;
  }


  /* ---------- Benefits ---------- */

  .benefits-grid {
    grid-template-columns: 1fr;
  }


  /* ---------- Demos ---------- */

  .demo-grid {
    grid-template-columns: 1fr;
  }

  .demo-card-featured {
    grid-column: span 1;
  }

  .demo-image {
    height: 260px;
  }

  .demo-info {
    padding: 25px;
  }

  .demo-info h3 {
    font-size: 20px;
  }

  .coming-soon {
    min-height: 320px;
  }


  /* ---------- Process ---------- */

  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-line {
    display: none;
  }


  /* ---------- Reference ---------- */

  .reference-section::before {
    width: 400px;
    height: 400px;

    right: -280px;
  }

  .reference-card {
    border-radius: 22px;
  }

  .reference-image {
    min-height: 250px;
  }

  .reference-badge {
    top: 18px;
    left: 18px;

    padding: 8px 12px;

    font-size: 9px;
  }

  .reference-content {
    padding: 35px 25px;
  }

  .reference-content h3 {
    font-size: 27px;

    letter-spacing: -1px;
  }

  .reference-content p {
    font-size: 13px;

    line-height: 1.7;
  }

  .reference-features {
    margin: 25px 0 30px;
  }

  .reference-content .btn {
    width: 100%;
  }


  /* ---------- About ---------- */

  .about-checks {
    grid-template-columns: 1fr;
  }

  .about-card-main {
    min-height: 330px;
  }

  .code-content {
    padding: 35px 22px;

    font-size: 11px;
  }


  /* ---------- Contact ---------- */

  .contact-form-wrapper {
    padding: 25px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }


  /* ---------- CTA ---------- */

  .cta-section {
    padding: 85px 0;
  }

  .cta-content h2 {
    letter-spacing: -2px;
  }


  /* ---------- Footer ---------- */

  .footer-top,
  .footer-bottom {
    flex-direction: column;

    gap: 25px;

    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;

    justify-content: center;
  }


  /* ---------- Decorative elements ---------- */

  .hero-content::before,
  .about-content::before,
  .contact-info::before {
    opacity: 0.2;
  }

  .hero::before {
    width: 400px;
    height: 400px;

    right: -250px;
  }

  .hero::after {
    width: 150px;
    height: 150px;

    left: -100px;
  }

}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}



/* ---------- Phone landscape ---------- */

@media (max-width: 850px) and (orientation: landscape) {

  .nav-menu {
    top: 78px;

    height: calc(100vh - 78px);

    padding: 25px 8%;

    overflow-y: auto;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a {
    font-size: 20px;
  }

  .nav-button {
    padding: 12px 16px;
  }
}