/* Leo's World — responsive rules (loaded last) */

@media (max-width: 1000px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { columns: 2; }
  .creation-grid, .moment-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 20px 18px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-hover);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; font-size: 15px; }

  .hero { padding-top: 44px; }
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { max-width: 16ch; }
  .hero__visual { max-width: 640px; }
  .hero__visual img { transform: none; }
  .hero__visual::before { inset: 8px -6px -8px 8px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1140px); }
  .site-header__inner { min-height: 64px; }
  .brand-link { font-size: 17px; }

  .hero { padding: 34px 0 20px; }
  .hero h1 { font-size: 34px; margin-top: 14px; }
  .hero__lead { font-size: 15px; }
  .hero__cn { font-size: 13px; margin-bottom: 22px; }
  .hero__actions .btn { flex: 1 1 160px; }
  .sticker { font-size: 11px; padding: 6px 11px; }
  .sticker--one { top: -10px; right: 8px; }
  .sticker--two { bottom: -10px; left: 4px; }

  .section { padding: 40px 0; }
  .section__head { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 20px; }

  .category-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .category-card { min-height: 164px; padding: 16px; }
  .category-card__icon { width: 40px; height: 40px; font-size: 19px; }
  .category-card h3 { font-size: 15px; margin-top: 14px; }
  .category-card p { font-size: 12px; }

  .work-grid { columns: 1; }
  .creation-grid, .moment-grid { grid-template-columns: 1fr; }

  .filters { gap: 8px; }
  .chip { padding: 0 13px; font-size: 12px; }
  .filters__count { flex-basis: 100%; margin-left: 0; }

  .note-card { padding: 26px 24px; }
  .note-card h2 { font-size: 24px; }

  .page-hero { padding-top: 36px; }

  .lightbox { padding: 14px; }
  .lightbox__close { top: 8px; right: 8px; }
  .lightbox__nav {
    width: 40px; height: 40px; font-size: 20px;
    top: auto; bottom: 18px; transform: none;
  }
  .lightbox__nav--prev { left: calc(50% - 52px); }
  .lightbox__nav--next { right: calc(50% - 52px); }
  .lightbox__caption { padding-bottom: 54px; }

  .modal { padding: 12px; }
  .modal__panel { padding: 22px 18px; max-height: 90vh; }
  .modal__title { font-size: 22px; }
  .modal__gallery { grid-template-columns: repeat(2, 1fr); }

  .back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }

  .site-footer__inner { align-items: flex-start; }
  .site-footer__meta { text-align: left; }
}
