/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 1024px) and (min-width: 769px) {
  .catalog-split {
    grid-template-columns: 38% 62%;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-nav { font-size: 28px; padding: 16px; }
}

@media (max-width: 768px) {
  :root { --section-padding: 16px; }

  /* Mobile: the top dock (see bottom-dock.css) IS the header — drop the old
     logo bar, the hamburger button and its slide-out menu entirely. */
  nav,
  .hamburger,
  .nav-links,
  .nav-overlay {
    display: none !important;
  }
  section { padding: 80px var(--section-padding); }
  #hero { padding: 0; }
  .hero-marquee { bottom: 8%; }
  .contact-grid,
  .contact-page-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-fullpage,
  .contact-fullpage,
  .booking-fullpage { padding: 120px var(--section-padding) 60px; }
  .about-glass-panel,
  .contact-glass-panel,
  .booking-glass-panel { padding: 36px var(--section-padding); }
  /* the section is a sticky 100vh panel, so body padding can't protect it:
     reserve room at its own bottom for the fixed dock */
  #portfolio { padding: 40px var(--section-padding) calc(88px + env(safe-area-inset-bottom, 0px)); }
  .gallery-header,
  .blog-header,
  .neptune-header {
    padding: 120px var(--section-padding) 40px;
    /* use ~2/3+ of the row so long titles/subtitles don't wrap so early */
    max-width: none;
  }
  .gallery-page-title,
  .blog-page-title,
  .neptune-title { font-size: clamp(24px, 7.2vw, 32px); }
  .masonry-grid { gap: 6px; padding: 0 8px 80px; }
  .masonry-column { gap: 6px; }
  .lightbox-close {
    top: 12px; right: 12px; font-size: 24px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.6);
  }
  .lightbox-close:focus-visible {
    outline: none;
  }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-nav { font-size: 28px; padding: 12px; }
  /* Phones keep a proportional cap: 100vh overstates the visible area while the
     URL bar is up, and the controls are ~18% of a short viewport anyway. */
  :root { --lightbox-max-h: 65vh; }
  #pottery-grid { gap: 6px; } /* stays 3 across; tighter gutters on phones */
  footer { flex-direction: column; gap: 12px; text-align: center; }

  /* Catalog split → stacked on mobile */
  .catalog-split {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 50vh auto;
    height: auto;
  }
  .catalog-left {
    padding: 80px 24px 24px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    order: 1;
    justify-content: flex-start;
    display: contents;
  }
  .catalog-list {
    flex: 0 1 auto;
    justify-content: flex-start;
    order: 1;
    padding: 80px 24px 0;
  }
  .catalog-map-inline {
    order: 4;
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  .catalog-right { order: 3; min-height: 50vh; }
  .catalog-right-info { bottom: 0; left: 0; right: 0; padding: 48px 20px 16px; }
  .catalog-right-overlay {
    background: linear-gradient(
      to top,
      transparent 0%,
      rgba(24,24,27,0.6) 100%
    );
  }
  .catalog-cover-title { font-size: 26px; margin-bottom: 8px; }
  .catalog-cover-meta { margin-bottom: 0; }
  .catalog-corner-index { display: none; }
  .catalog-item { padding: 10px 12px; }
  .catalog-cover-group {
    column-count: unset !important;
    display: flex;
    gap: 4px;
    padding: 4px;
  }
  .catalog-cover-img {
    flex: 1;
    min-width: 0;
    height: 100%;
    object-fit: cover;
  }
  .catalog-cover-img:nth-child(n+3) { display: none; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 55vw; max-width: 260px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    flex-direction: column;
    padding: 88px 24px 40px;
    gap: 0;
    transition: right 0.3s ease;
    box-shadow: var(--elev-2);
    border-left: var(--glass-border);
    border-right: none;
    z-index: var(--z-drawer);
    align-items: stretch;
    overflow-y: auto;
  }

  .nav-links > a,
  .nav-links .nav-dropdown-trigger {
    font-size: 11px;
    letter-spacing: 0.2em;
    padding: 10px 0;
    display: block;
    width: 100%;
    text-align: right;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links > .nav-dropdown {
    text-align: right;
    flex-direction: column;
    align-items: flex-end;
  }

  .nav-links > .nav-dropdown .nav-dropdown-trigger {
    border-bottom: none;
    padding: 14px 0;
  }

  .nav-links.open { right: 0; }

  .nav-dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    margin: 0 0 10px 0;
    min-width: auto;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transform: none;
  }

  .nav-links .nav-dropdown-menu a {
    padding: 8px 0;
    padding-right: 12px;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--text-mid);
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links .nav-dropdown-menu a:hover {
    color: var(--accent);
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 930;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 480px) {
  .contact-link-val { font-size: 18px; }
  .catalog-split {
    grid-template-rows: auto auto 50vh auto;
  }
  .catalog-left { padding: 16px; }
  .catalog-item { padding: 10px 8px; }
  .catalog-item-title { font-size: 14px; }
  .catalog-right-info { bottom: 0; left: 0; right: 0; padding: 40px 16px 12px; }
  .catalog-cover-title { font-size: 22px; }
}
