/* =========================================================
   WeedSeg AI — Responsive Rules
   ========================================================= */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; margin: 0 auto; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .weed-grid { grid-template-columns: repeat(3, 1fr); }
  .tech-grid { grid-template-columns: 1fr; }
  .research-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detect-layout { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav-links { position: fixed; top: var(--nav-height); left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 4px;
    border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all 0.2s ease; }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; }
  .nav-actions .btn-primary { display: none; }
  .nav-toggle { display: flex; }

  .section { padding: 56px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .weed-grid { grid-template-columns: repeat(2, 1fr); }
  .library-grid { grid-template-columns: repeat(2, 1fr); }

  /* How It Works — vertical workflow on mobile */
  .workflow { flex-direction: column; align-items: stretch; overflow: visible; }
  .workflow-step { width: 100%; }
  .workflow-arrow { transform: rotate(90deg); padding: 6px 0; align-self: center; }

  .detect-preview { grid-template-columns: 1fr; }
  .detect-arrow { transform: rotate(90deg); }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .weed-grid { grid-template-columns: 1fr 1fr; }
  .library-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
