/* ==========================================================================
   FACEBMI — Responsive rules
   Breakpoints: mobile (<576) · tablet (576–991) · laptop (992–1439)
                desktop (1440–2559) · 4K (2560+)
   ========================================================================== */

/* ---------------------------------------------------------------------- 
   Mobile — up to 575px
   ---------------------------------------------------------------------- */

   @media (max-width: 575.98px) {
  :root {
    --header-height: 72px;
    --footer-height: 48px;
  }

  .screen {
    padding: 0 20px;
  }

  .logo {
    font-size: 1rem;
  }

  .btn-scan {
    padding: 16px 44px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 280px;
  }

  .landing-body {
    gap: 26px;
  }

  .scanner-card {
    width: 82vw;
  }

  .result-card {
    width: 84vw;
    padding: 34px 22px;
  }

  .btn-retry {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .site-footer p {
    font-size: 0.65rem;
    text-align: center;
    padding: 0 12px;
  }

  .page-shell {
    padding-top: calc(var(--header-height) + 36px);
    padding-bottom: 72px;
  }

  .page-lead {
    margin-bottom: 44px;
  }

  .page-section {
    margin-bottom: 40px;
    padding-top: 28px;
  }

  .workflow-diagram {
    margin-bottom: 48px;
  }

  .workflow-step-marker {
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }

  .workflow-step-title {
    font-size: 0.85rem;
  }

  .workflow-connector {
    height: 32px;
    margin: 4px 0;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 24px 14px;
  }
}

/* ---------------------------------------------------------------------- 
   Tablet — 576px to 991px
   ---------------------------------------------------------------------- */
@media (min-width: 576px) and (max-width: 991.98px) {
  .scanner-card {
    width: min(360px, 60vw);
  }

  .result-card {
    width: min(360px, 60vw);
  }

  .btn-scan {
    padding: 18px 56px;
  }
}

/* ---------------------------------------------------------------------- 
   Laptop — 992px to 1439px  (default sizing already tuned here)
   ---------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1439.98px) {
  .scanner-card {
    width: 340px;
  }

  .result-card {
    width: 320px;
  }
}

/* ---------------------------------------------------------------------- 
   Desktop — 1440px to 2559px
   ---------------------------------------------------------------------- */
@media (min-width: 1440px) {
  :root {
    --header-height: 100px;
  }

  .status-text {
    font-size: 1.2rem;
  }

  .btn-scan {
    padding: 22px 72px;
    font-size: 1.15rem;
  }

  .scanner-card {
    width: 380px;
  }

  .result-card {
    width: 360px;
    padding: 52px 40px;
  }

  .result-category {
    font-size: 2.2rem;
  }

  .page-content {
    max-width: 820px;
  }
}

/* ---------------------------------------------------------------------- 
   4K and ultra-wide — 2560px+
   ---------------------------------------------------------------------- */
@media (min-width: 2560px) {
  html { font-size: 20px; }

  .scanner-card {
    width: 460px;
  }

  .result-card {
    width: 440px;
    padding: 64px 48px;
  }

  .btn-scan {
    padding: 28px 90px;
    font-size: 1.4rem;
  }

  .logo {
    font-size: 1.8rem;
  }

  .page-content {
    max-width: 960px;
  }
}

/* ---------------------------------------------------------------------- 
   Short-height screens (landscape phones) — keep everything visible
   ---------------------------------------------------------------------- */
@media (max-height: 480px) {
  :root {
    --header-height: 56px;
    --footer-height: 40px;
  }

  .scanner-card {
    aspect-ratio: 4 / 3;
    width: min(280px, 40vh);
  }

  .landing-body {
    gap: 16px;
  }
}

/* ---------------------------------------------------------------------- 
   Guard against horizontal overflow everywhere
   ---------------------------------------------------------------------- */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}