/* ============================================================
   GRAB - Responsive Breakpoints
   ============================================================ */

/* ── 768px: Tablet & smaller ─────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 1.25rem 2.5rem;
    min-height: 50vh;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .hero-sub { font-size: 0.88rem; }

  .info-card {
    flex-direction: column;
    gap: 0.85rem;
  }

  .info-thumb-wrap {
    width: 100%;
    min-width: unset;
    max-height: 200px;
  }

  .info-details { gap: 0.3rem; }
  .info-section { padding: 0 1.25rem 1.5rem; }

  .formats-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 0.55rem;
  }

  .history-section {
    padding: 0 1.25rem;
    margin-bottom: 2rem;
  }

  .sites-section {
    padding: 0 1.25rem;
    margin-bottom: 3rem;
  }

  .progress-section {
    padding: 1.5rem 1.25rem 3rem;
  }

  .batch-section { padding: 1.5rem 1.25rem 2.5rem; }
  .batch-header { flex-direction: column; align-items: flex-start; }
  .batch-header-right { width: 100%; justify-content: flex-start; }
}

/* ── 480px: Mobile ────────────────────────────────────────── */
@media (max-width: 480px) {
  .header-inner { padding: 0 1rem; height: 48px; }

  .hero {
    padding: 2.5rem 1rem 1.75rem;
    min-height: 42vh;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .hero-badge {
    font-size: 0.68rem;
    padding: 0.2rem 0.6rem;
    margin-bottom: 1.1rem;
  }

  .hero-sub { font-size: 0.82rem; }

  .input-row {
    flex-direction: column;
    border-radius: var(--radius-md);
    align-items: stretch;
  }

  .input-icon { display: none; }

  .url-input {
    padding: 0.8rem 0.9rem;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
  }

  .fetch-btn {
    margin: 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 0.75rem 1rem;
  }

  .input-wrap { margin-top: 1.5rem; }

  .info-thumb-wrap { max-height: 160px; }
  .info-title { font-size: 0.95rem; }
  .info-section { padding: 0 1rem 1.5rem; }

  .formats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .format-quality { font-size: 1.15rem; }

  .progress-section { padding: 1rem 1rem 2.5rem; }

  .progress-card {
    padding: 1.25rem 1.15rem 1.4rem;
  }

  .ring-wrap { width: 96px; height: 96px; }
  .progress-ring { width: 96px; height: 96px; }
  .ring-percent { font-size: 1.15rem; }

  .progress-stats { gap: 0.4rem; }
  .stat-val { font-size: 0.72rem; }

  .history-section { padding: 0 1rem; margin-bottom: 1.5rem; }
  .history-item { gap: 0.6rem; padding: 0.5rem 0.7rem; }
  .history-thumb-wrap { width: 46px; height: 33px; }
  .history-title { font-size: 0.78rem; }

  .sites-section { padding: 0 1rem; margin-bottom: 2.5rem; }
  .sites-title { font-size: 1.1rem; }
  .site-badge { font-size: 0.75rem; padding: 0.25rem 0.65rem 0.25rem 0.45rem; }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: unset;
  }

  .footer { padding: 1.5rem 1rem; }
  .footer-terms { font-size: 0.7rem; }

  .clip-inputs { flex-wrap: wrap; gap: 0.4rem; }
  .clip-duration-label { width: 100%; order: -1; margin-bottom: 0.25rem; }
  .clip-time-input { width: 60px; font-size: 0.72rem; }

  .batch-section { padding: 1rem 1rem 2rem; }
  .batch-header-right { flex-wrap: wrap; }
  .batch-item-thumb { width: 44px; height: 32px; }
  .batch-item-title { font-size: 0.78rem; }
}

/* ── 360px: Extra small ───────────────────────────────────── */
@media (max-width: 360px) {
  .hero-title { font-size: 1.6rem; }
  .hero-sub   { font-size: 0.75rem; }

  .formats-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .format-card { padding: 0.9rem; }
  .progress-card { padding: 1.1rem 0.9rem; }
  .sites-grid { gap: 0.35rem; }
  .logo-text { font-size: 1.1rem; }
}

/* ── Hover: no-hover devices ──────────────────────────────── */
@media (hover: none) {
  .format-card:hover { background: var(--surface); border-color: var(--border); }
  .fetch-btn:not(:disabled):hover { background: var(--accent); }
  .download-btn:hover { opacity: 1; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
