/* ══════════════════════════════════════════════
   MOBILE & RESPONSIVE OVERRIDES
   Loaded after styles.css — desktop-first overrides.
   ══════════════════════════════════════════════ */

/* ───────── Tablet ≤1024px ───────── */
@media (max-width: 1024px) {
  :root {
    --section-pad: clamp(64px, 10vw, 120px);
  }

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

  .feature-row { gap: 56px; }

  .cta-inner { gap: 56px; }
}

/* ───────── Tablet narrow / large phone ≤900px ───────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 72px;
  }
  .feature-row.reverse .feature-visual { order: 0; }

  .security-inner {
    flex-direction: column;
    gap: 48px;
    align-items: stretch;
  }
  .security-visual { flex: none; width: 100%; }

  .cta-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .form-card { padding: 32px 24px; }
}

/* ───────── Phone ≤768px ───────── */
@media (max-width: 768px) {
  :root {
    --section-pad: clamp(56px, 14vw, 96px);
  }

  .container { padding: 0 20px; }

  /* Nav */
  .nav { padding: 14px 0; }
  .nav.scrolled { padding: 10px 0; }
  .nav-inner { padding: 0 20px; }
  .nav-logo img { height: 32px; }
  .nav-logo span { font-size: 1.1rem; }
  /* Hide brand text on small screens, keep logo */
  .nav-logo span { display: none; }

  /* Hero */
  .hero {
    padding: 110px 20px 60px;
    min-height: auto;
  }
  .hero-eyebrow {
    margin-bottom: 28px;
    font-size: 0.7rem;
    padding: 6px 16px;
    letter-spacing: 0.1em;
  }
  .hero h1 { margin-bottom: 20px; }
  .hero-sub { margin-bottom: 36px; }
  .hero-cta-group {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .hero-cta-group .btn-cta,
  .hero-cta-group .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
  }
  .hero-scroll { display: none; }

  /* How-it-works */
  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .steps::before { display: none; }
  .step {
    text-align: left;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  .step-num { font-size: 2.8rem; flex-shrink: 0; }
  .step-num::after { display: none; }
  .step h3 { margin-top: 0; }

  /* Trust mockup — simplify on mobile */
  .trust-mockup-body {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
    min-height: 0;
  }
  .mockup-sidebar { display: none; }
  .mockup-header-row { flex-wrap: wrap; gap: 10px; }
  .mockup-stat-card { min-width: calc(50% - 5px); }
  .mockup-chart { padding: 14px; gap: 6px; }
  .mockup-bar:nth-child(n+9) { display: none; }

  /* Features — smaller numbers, tighter spacing */
  .feature-num { font-size: 3.5rem; }
  .feature-visual { aspect-ratio: 5/4; }
  .feature-visual-inner { padding: 20px; }

  /* Problems */
  .problems-header { margin-bottom: 48px; }
  .problem-card { padding: 32px 24px; }

  /* Headers tighter */
  .features-header,
  .how-header { margin-bottom: 56px; }

  /* CTA features */
  .cta-features li { font-size: 0.9rem; }

  /* Footer */
  .footer { padding: 32px 0; }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .footer-right {
    flex-direction: column;
    gap: 8px;
  }

  /* Mobile menu typography */
  .nav-mobile-overlay { gap: 28px; }
  .nav-mobile-overlay a { font-size: 1.6rem; }
  .nav-mobile-overlay .btn-cta {
    font-size: 0.875rem;
    padding: 14px 32px;
  }
}

/* ───────── Small phone ≤600px ───────── */
@media (max-width: 600px) {
  .problems-grid { grid-template-columns: 1fr; }

  .hero { padding: 100px 16px 48px; }
  .container { padding: 0 16px; }

  /* Larger touch targets */
  .btn-cta,
  .btn-secondary {
    min-height: 48px;
    padding: 14px 24px;
  }

  .form-submit { min-height: 52px; }

  .form-group input {
    padding: 14px 14px;
    font-size: 1rem; /* Prevents iOS zoom on focus */
  }

  /* Form card edge-to-edge feel */
  .form-card { padding: 28px 20px; }
  .form-card h3 { font-size: 1.4rem; }

  /* Section labels & titles */
  .section-label { font-size: 0.7rem; letter-spacing: 0.18em; }

  /* Security nodes */
  .security-node {
    padding: 14px 16px;
    font-size: 0.8rem;
  }
  .security-badge {
    font-size: 0.75rem;
    padding: 10px 16px;
    margin-top: 24px;
  }

  /* Trust mockup — collapse stat cards */
  .mockup-stat-card { min-width: 100%; }
  .mockup-bar:nth-child(n+7) { display: none; }

  /* Feature visuals stay readable */
  .feature-visual-inner { padding: 16px; }

  /* Reduce hero glow on small screens for perf */
  .hero-bg::after {
    width: 400px;
    height: 400px;
    filter: blur(60px);
  }
  .hero-bg::before { background-size: 60px 60px; }
}

/* ───────── Very small phone ≤380px ───────── */
@media (max-width: 380px) {
  .hero h1 { font-size: 2.1rem; }
  .hero-eyebrow {
    font-size: 0.65rem;
    padding: 5px 12px;
  }
  .nav-logo img { height: 28px; }
  .problem-card { padding: 24px 20px; }
}

/* ───────── Landscape phones — keep hero compact ───────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 20px 60px;
  }
  .hero-eyebrow { margin-bottom: 16px; }
  .hero h1 { margin-bottom: 14px; font-size: 2rem; }
  .hero-sub { margin-bottom: 24px; }
  .hero-scroll { display: none; }
}

/* ───────── Pointer-coarse touch tweaks ───────── */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover lift on touch — looks broken after tap */
  .problem-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
  }
  .problem-card:hover::before { opacity: 0; }
  .btn-cta:hover { transform: none; }

  /* Touch-friendly nav links */
  .nav-links a,
  .footer-right a {
    padding: 8px 0;
  }
}
