/* ============================================================
   RESPONSIVE — Mobile-first Audit
   Breakpoints: 480, 640, 768, 1024, 1280, 1440, 1920
   ============================================================ */

/* ---- 1440px+ wide screens ---- */
@media (min-width: 1440px) {
  :root { --gutter: 3rem; }
}

/* ---- 1280px and below ---- */
@media (max-width: 1280px) {
  /* services-grid handled by premium.css at each breakpoint */
  .case-grid        { grid-template-columns: repeat(2, 1fr); }
  .blog-grid        { grid-template-columns: repeat(2, 1fr); }
  .bento .bc-8      { grid-column: span 12; }
  .bento .bc-4      { grid-column: span 12; }
  .bento .bc-6      { grid-column: span 12; }
  .footer-grid      { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .cloud-grid       { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid     { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid .pillar-item:nth-child(3n) { border-right: 1px solid var(--border-default); }
  .pillars-grid .pillar-item:nth-child(2n) { border-right: none; }
}

/* ---- 1024px and below ---- */
@media (max-width: 1024px) {
  :root { --nav-h: 72px; }

  .hero-container  { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .hero-content    { max-width: 600px; margin: 0 auto; }
  .hero-desc       { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-actions    { justify-content: center; }
  .hero-trust      { justify-content: center; }
  .hero-visual     { height: 360px; max-width: 440px; margin: 0 auto; }

  .hfc-1 { left: 0; }
  .hfc-2 { right: 0; }
  .hfc-3 { left: 20px; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .metric-item:nth-child(2)::before { display: none; }

  .process-track { grid-template-columns: repeat(2, 1fr); }
  .process-track::before { display: none; }

  .feature-split {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .feature-split.reverse > *:first-child { order: unset; }
  .feature-split.reverse > *:last-child  { order: unset; }

  .feature-body { max-width: 100%; }

  .cta-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 2.5rem;
  }

  .cta-strip-actions { width: 100%; }
}

/* ---- 768px and below (tablet/phablet) ---- */
@media (max-width: 768px) {
  :root { --gutter: 1.25rem; --nav-h: 64px; }

  /* NAV */
  .mobile-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 800;
    border-top: 1px solid var(--border-default);
  }

  .nav-menu.open { transform: translateX(0); }

  .nav-item { width: 100%; }

  .nav-link {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--r-sm);
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    box-shadow: none;
    border: none;
    padding: 8px 0 8px 16px;
    background: var(--bg-warm);
    border-radius: var(--r-sm);
    display: none;
    margin-top: 4px;
  }

  .nav-item.dropdown.open .dropdown-menu { display: block; }

  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }

  /* Typography */
  h1 { font-size: clamp(1.85rem, 7vw, 2.5rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 2rem); }

  /* Hero */
  .hero { padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 3.5rem; min-height: auto; }
  .hero-container { gap: 2.5rem; }
  .hero-dash { width: 270px; padding: 18px; }
  .hero-visual { height: 300px; }

  /* Hide floating cards on mobile to reduce clutter */
  .hfc-3 { display: none; }

  /* Services — handled by premium.css responsive overrides */

  /* Metrics */
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-item + .metric-item::before { display: none; }
  .metrics-bar { padding: 36px 0; }

  /* Process */
  .process-track { grid-template-columns: 1fr; }

  /* Bento */
  .bento { grid-template-columns: 1fr; }
  .bento .bc-8, .bento .bc-4, .bento .bc-6 { grid-column: span 1; }

  /* Cloud */
  .cloud-grid { grid-template-columns: 1fr 1fr; }

  /* Pillars */
  .pillars-grid { grid-template-columns: 1fr 1fr; }

  /* Cases & Blogs */
  .case-grid  { grid-template-columns: 1fr; }
  .blog-grid  { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* CTA */
  .cta-strip { padding: 2rem; }
  .cta-strip-actions { flex-direction: column; width: 100%; }
  .cta-strip-actions .btn { width: 100%; justify-content: center; }

  /* Cookie */
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: var(--r-md) var(--r-md) 0 0;
  }

  /* Back to top */
  .back-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 0.825rem; }

  /* Form grid */
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ---- 480px and below (small phones) ---- */
@media (max-width: 480px) {
  :root { --gutter: 1rem; }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.55rem; }

  .hero-dash { width: 240px; }
  .hfc-1, .hfc-2 { display: none; }

  .metrics-grid { grid-template-columns: 1fr; row-gap: 24px; }
  .metric-item + .metric-item::before { display: none; }

  .cloud-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .pillars-grid .pillar-item { border-right: none !important; }

  .btn { padding: 10px 18px; font-size: 0.9rem; }

  .logo-img { height: 42px; max-height: 42px; }
  .footer-logo-img { height: 52px; max-height: 52px; }

  .footer-legal { gap: 14px; }
}

/* ---- Very narrow (320px) ---- */
@media (max-width: 360px) {
  h1 { font-size: 1.7rem; }
  .btn-lg { padding: 11px 20px; }
}

/* ---- Prevent horizontal scroll globally ---- */
html, body { max-width: 100%; overflow-x: hidden; }
