/* ==========================================================================
   Creator Studio AI — Responsive rules
   ========================================================================== */

@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: 1.2fr repeat(2, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .main-nav a.nav-optional { display: none; }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-grid > .card:first-child { position: static; }
  .tool-grid.even { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet & below: the sidebar becomes a slide-in drawer */
@media (max-width: 1023px) {
  .menu-btn { display: inline-grid; }
  .main-nav { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: min(320px, 86vw);
    z-index: 300; transform: translateX(-105%); transition: transform 0.3s var(--ease);
    background: var(--surface-solid); box-shadow: var(--shadow-lg); border-right: 1px solid var(--border);
  }
  .app .drawer-head { display: flex; }
  .sidebar-mobile-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero { padding-top: 40px; }
  .hero-visual { max-width: 620px; margin: 0 auto; width: 100%; }
  .featured-grid { grid-template-columns: minmax(0, 1fr); }
  .featured-grid .feature-card { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 22px; }
  .featured-grid .feature-card .fc-art { grid-row: span 4; margin: 0; height: 100%; min-height: 160px; }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .site-header { padding: 0 12px; gap: 10px; }
  .brand small { display: none; }
  .header-actions .btn { display: none; }
  .content { padding: 20px 16px 48px; }
  .section { padding: 52px 0; }
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .featured-grid .feature-card { display: flex; }
  .featured-grid .feature-card .fc-art { height: 140px; min-height: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .page-hero { flex-direction: column; gap: 14px; }
  .page-hero .hero-icon { width: 48px; height: 48px; border-radius: 14px; }
  .card { padding: 18px; }
  .hero-facts { gap: 20px; }
  .float-chip.fc-1 { left: 0; top: -24px; }
  .float-chip.fc-2 { left: 0; bottom: 30px; }
  .float-chip.fc-3 { right: 0; }
  .mock-window { transform: none; }
  .cta-band { padding: 40px 20px; border-radius: 22px; }
  .tools-toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .toast-stack { right: 12px; left: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .modal-body, .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 2.2rem; }
  .btn-lg { height: 48px; padding: 0 20px; }
  .hero .btn-row .btn { flex: 1; }
}

@media print {
  .site-header, .sidebar, .site-footer, .related, .toast-stack { display: none !important; }
  .app { display: block; }
  body { background: #fff; color: #000; }
}
