/* Large desktop keeps the five-card mockup row. */

@media (max-width: 1200px) {
  .site-nav ul {
    gap: 18px;
  }

  .site-nav a {
    font-size: 0.86rem;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .category-row {
    gap: 16px;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    width: 100%;
  }
}

/* Tablet landscape and small laptops: hamburger + five compact cards. */
@media (max-width: 1100px) {
  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    min-height: 80px;
    gap: 12px;
  }

  .brand img {
    width: 64px;
    height: 64px;
  }

  .header-tools {
    width: auto;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 80px;
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(17, 17, 17, 0.08);
    padding: 12px 24px 20px;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0;
  }

  .site-nav a {
    display: block;
    padding: 14px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav li:last-child a {
    border-bottom: 0;
  }

  .search-toggle {
    margin-left: auto;
  }

  .hero {
    min-height: 62vh;
    background-position: 68% center;
  }

  .hero-copy {
    padding: 48px 0 150px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 5.4vw, 3.4rem);
  }

  .categories {
    margin-top: -100px;
  }

  .category-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 980px;
    margin-inline: auto;
    gap: 12px;
    justify-content: center;
  }

  .category-card span {
    min-height: 60px;
    font-size: 0.68rem;
    padding: 10px 6px;
  }

  .page-hero {
    min-height: 280px;
    background-position: 68% center;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
  }
}

/* Tablet portrait: two centered card columns. */
@media (max-width: 900px) {
  .hero {
    min-height: 58vh;
  }

  .hero-copy {
    padding: 40px 0 130px;
  }

  .categories {
    margin-top: -72px;
  }

  .category-row {
    grid-template-columns: repeat(2, minmax(180px, 280px));
    justify-content: center;
    gap: 18px;
    max-width: none;
  }

  .category-card span {
    min-height: 68px;
    font-size: 0.78rem;
    padding: 12px 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }

  .page-content {
    padding: 40px 0 64px;
  }
}

/* Phones */
@media (max-width: 700px) {
  .wrap {
    width: min(var(--max), calc(100% - 32px));
  }

  .header-inner {
    min-height: 72px;
  }

  .site-nav {
    top: 72px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .brand-text {
    font-size: 0.78rem;
  }

  .hero {
    min-height: 70vh;
    align-items: flex-end;
    background-position: 72% center;
  }

  .hero-copy {
    padding: 36px 0 120px;
    max-width: none;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 2.5rem);
  }

  .hero .lede {
    font-size: 0.98rem;
    max-width: none;
  }

  .btn {
    padding: 13px 18px;
  }

  .categories {
    margin-top: -56px;
    padding-bottom: 48px;
  }

  .category-row {
    grid-template-columns: minmax(0, 320px);
    justify-content: center;
    gap: 16px;
  }

  .category-card span {
    min-height: 64px;
    font-size: 0.82rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid > :first-child {
    grid-column: auto;
  }

  .site-footer {
    padding: 40px 0 24px;
  }

  .search-panel form {
    flex-direction: column;
  }

  .search-panel button {
    width: 100%;
  }

  .page-hero {
    min-height: 220px;
  }

  .page-hero-copy {
    padding: 36px 0 28px;
  }

  .page-content h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 400px) {
  .brand-text {
    font-size: 0.7rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }
}
