/* ============================================
   NESEN STUDIO — responsive.css
   Mobile-first progressive enhancement
   Breakpoints: 480 · 768 · 1024 · 1440
   ============================================ */

/* ─── BASE MOBILE (320px+) ─── */
.nav-links { display: none; }
.hamburger { display: flex; }

:root {
  --logo-height: var(--logo-height-sm);
  --footer-logo-height: 88px;
  --nav-height: 96px;
}

.cta-group { flex-direction: column; align-items: stretch; }
.cta-group .btn-primary,
.cta-group .btn-ghost { width: 100%; }

.contact-grid { display: flex; flex-direction: column; }
.contact-grid .contact-info { order: -1; }

.section-header { margin-bottom: clamp(1.75rem, 5vw, 3.25rem); }

.footer-grid { grid-template-columns: 1fr; gap: 20px; }
.footer-bottom { flex-direction: column; align-items: flex-start; }
.footer-legal { flex-wrap: wrap; gap: 12px; }

.metrics-row { grid-template-columns: repeat(2, 1fr); }

.process-steps::before { display: none; }

.page-hero { padding-block: clamp(2.75rem, 7vw, 4.5rem); }

.about-photo { max-height: 360px; }

.mobile-menu {
  width: min(100vw, 320px);
  right: calc(-1 * min(100vw, 320px));
}

.nav-actions .nav-controls { display: none; }
.mobile-menu-utils { display: flex; }

/* Homepage hero — centered on all screen sizes */
body.page-home .hero-content { text-align: center; }
body.page-home .hero-eyebrow { text-align: center; }
body.page-home .hero-sub { margin-inline: auto; }
body.page-home .hero-meta,
body.page-home .cta-group { justify-content: center; }
body.page-home .terminal { width: 100%; max-width: 680px; margin-inline: auto; }

/* ─── SMALL PHONES+ (480px) ─── */
@media (min-width: 480px) {
  .form-2col { grid-template-columns: 1fr 1fr; }

  .metrics-row-4 { grid-template-columns: repeat(2, 1fr); }

  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }

  .info-grid {
    grid-template-columns: minmax(7rem, 10rem) 1fr;
    gap: 10px 20px;
  }

  .info-grid span:nth-child(odd) { margin-top: 0; }

  .cta-group { flex-direction: row; align-items: center; }
  .cta-group .btn-primary,
  .cta-group .btn-ghost { width: auto; }

  .mobile-menu {
    width: 300px;
    right: -320px;
  }
}

/* ─── TABLETS+ (768px) ─── */
@media (min-width: 768px) {
  :root {
    --logo-height: 100px;
    --footer-logo-height: 88px;
    --nav-height: 112px;
  }

  .nav-links { display: flex; }
  .hamburger { display: none; }

  .nav-actions .nav-controls { display: flex; }
  .mobile-menu-utils { display: none; }

  .logo { max-width: none; }

  #hero { min-height: 100vh; min-height: 100dvh; }

  .services-bento { grid-template-columns: repeat(2, 1fr); }

  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }

  .metrics-row { grid-template-columns: repeat(4, 1fr); }
  .metrics-row-2 { grid-template-columns: repeat(2, 1fr); }

  .tools-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .about-grid,
  .process-2col { grid-template-columns: 1fr 1fr; }

  .contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
  }

  .contact-grid .contact-info { order: 0; }

  .process-steps::before { display: block; }

  .about-photo { max-height: 480px; }

  /* Homepage hero — centered on desktop only */
  body.page-home #hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  body.page-home .hero-content {
    margin-inline: auto;
    text-align: center;
  }

  body.page-home .hero-sub { margin-inline: auto; }

  body.page-home .hero-meta,
  body.page-home .cta-group { justify-content: center; }

  body.page-home .terminal {
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
  }
}

/* ─── LAPTOPS+ (1024px) ─── */
@media (min-width: 1024px) {
  :root { --container: 1100px; }

  .services-bento { grid-template-columns: repeat(3, 1fr); }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }

  .metrics-row-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ─── LARGE DESKTOPS (1440px) ─── */
@media (min-width: 1440px) {
  :root { --container: 1200px; }

  .hero-content { max-width: 44rem; }
}

/* ─── TERMINAL: hide on very small screens ─── */
@media (max-width: 479px) {
  .terminal { display: none; }
  .tag { white-space: normal; }
}

/* ─── TOUCH DEVICES ─── */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; }
  .btn-primary:hover { transform: none; box-shadow: none; }
  .btn-ghost:hover { transform: none; }
  .contact-link:hover { transform: none; }
  .nav-cta:hover { transform: none; }
  .service-card:hover { background: var(--bg-card); }
  .process-step:hover .step-num {
    border-color: var(--border-card);
    background: var(--bg-card);
    box-shadow: none;
  }
}

/* ─── LANDSCAPE PHONES ─── */
@media (max-width: 767px) and (orientation: landscape) {
  #hero { min-height: auto; }
  section { padding-block: clamp(2.5rem, 6vw, 3.25rem); }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu { transition-duration: 0.01ms; }
}
