/* ═══════════════════════════════════════════════════════════
   SOULUARTE — SHARED MOBILE STYLES
   Loaded by all 5 pages. Targets 375–768px.
══════════════════════════════════════════════════════════════ */

/* ─── HAMBURGER BUTTON ───────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: #111111;
  transition: transform 300ms ease, opacity 300ms ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── FULL-SCREEN NAV OVERLAY ────────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #FAFAFA;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 32px;
  opacity: 0;
  transition: opacity 250ms ease;
}
.nav-overlay.open {
  display: flex;
  opacity: 1;
}
.nav-overlay ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.nav-overlay ul li {
  border-bottom: 1px solid #E5E5E5;
}
.nav-overlay ul li:first-child {
  border-top: 1px solid #E5E5E5;
}
.nav-overlay ul li a {
  display: flex;
  align-items: center;
  min-height: 64px;
  font-family: 'Fraunces', serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #111111;
  text-decoration: none;
}
.nav-overlay ul li a.active {
  color: #6B6B6B;
}
.nav-overlay-wordmark {
  position: absolute;
  top: 28px;
  left: 24px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: #111111;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-overlay-close {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-overlay-close::before,
.nav-overlay-close::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 1px;
  background: #111;
}
.nav-overlay-close::before { transform: rotate(45deg); }
.nav-overlay-close::after  { transform: rotate(-45deg); }

@media (max-width: 768px) {
  /* ─── HEADER ─────────────────────────────────────────── */
  .site-nav { display: none !important; }
  .nav-hamburger { display: flex; }

  /* ─── SPACING TOKENS ─────────────────────────────────── */
  :root {
    --px: 24px;
    --section-gap: clamp(31px, 4.9vw, 46px);
  }

  /* ─── FOOTER ─────────────────────────────────────────── */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* ─── TOUCH TARGETS ──────────────────────────────────── */
  .text-link,
  .footer-links a,
  .site-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* ─── IMAGES ─────────────────────────────────────────── */
  img { max-width: 100%; }

  /* ══════════════════════════════════════════════════════
     INDEX.HTML
  ══════════════════════════════════════════════════════ */
  .hero-inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .hero-right { order: 2 !important; }
  .hero-left  { order: 1 !important; }
  .hero-artwork { aspect-ratio: 4/3 !important; }

  .hero-headline {
    font-size: clamp(40px, 11vw, 56px) !important;
  }
  .series-title,
  .portals h2,
  .studio-headline {
    font-size: clamp(32px, 9vw, 44px) !important;
  }

  .series-body {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .series-mosaic {
    grid-template-columns: 1fr 1fr !important;
  }
  .mosaic-item:first-child {
    grid-column: 1 !important;
    grid-row: auto !important;
    margin-top: 0 !important;
  }
  .mosaic-item:nth-child(2) { grid-column: 2 !important; grid-row: auto !important; }
  .mosaic-item:nth-child(3) { grid-column: 1 / -1 !important; grid-row: auto !important; }

  .portals-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }
  .studio-inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* ══════════════════════════════════════════════════════
     OBRAS.HTML
  ══════════════════════════════════════════════════════ */
  /* Buriti image becomes a full-width strip divider between intro & grid */
  .hero-right:has(> .hero-img) {
    order: 2 !important;
    width: calc(100% + 2 * var(--px)) !important;
    max-width: none !important;
    margin-left: calc(-1 * var(--px)) !important;
    margin-right: calc(-1 * var(--px)) !important;
  }
  .hero-img {
    width: 100% !important;
    height: 40vw !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  .hero-caption { display: none !important; }

  .craft-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* Shop grid: one full-width column, like every other gallery */
  .works-grid {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
    row-gap: 40px !important;
  }
  .work-name { font-size: 15px !important; }
  .work-latin { font-size: 12px !important; }

  .order-cols {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .order-title { font-size: clamp(24px, 8vw, 36px) !important; }

  /* ══════════════════════════════════════════════════════
     LIVE-PAINTING.HTML
  ══════════════════════════════════════════════════════ */
  .service-block,
  .service-block.flip {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .service-block .service-text { order: 1 !important; }
  .service-block .service-visual { order: 2 !important; }
  .service-block.flip .service-text { order: 1 !important; }
  .service-block.flip .service-visual { order: 2 !important; }

  .what-cols {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .how-title,
  .what-headline {
    font-size: clamp(26px, 8vw, 36px) !important;
  }
  .cta-headline {
    font-size: clamp(32px, 10vw, 48px) !important;
  }

  /* ══════════════════════════════════════════════════════
     THE-ARTIST.HTML
  ══════════════════════════════════════════════════════ */
  .hero {
    grid-template-columns: 1fr !important;
    padding-top: 80px !important;
  }
  .hero-portrait { min-height: 70vw !important; }
  .hero-right { padding: 40px 24px !important; }
  .hero-headline { font-size: clamp(40px, 11vw, 56px) !important; }

  .studio-inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .contact-cols {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .contact-title {
    font-size: clamp(24px, 8vw, 36px) !important;
  }

  /* ══════════════════════════════════════════════════════
     PROJECTS.HTML
  ══════════════════════════════════════════════════════ */
  .project-block.img-left,
  .project-block.img-right {
    grid-template-columns: 1fr !important;
    grid-template-areas: "text" "img" !important;
    gap: 28px !important;
    padding: 32px 0 !important;
  }
  .project-block.img-left .proj-img  { grid-area: img !important; }
  .project-block.img-left .proj-text { grid-area: text !important; }
  .project-block.img-right .proj-img  { grid-area: img !important; }
  .project-block.img-right .proj-text { grid-area: text !important; }
  .proj-img img, .proj-img .ph { aspect-ratio: 3/2 !important; }

  .hero-headline {
    font-size: clamp(38px, 11vw, 52px) !important;
  }
  .proj-title { font-size: clamp(24px, 7vw, 32px) !important; }

  .closing-title { font-size: clamp(28px, 9vw, 40px) !important; }
  .closing-links { flex-direction: column; gap: 20px !important; }

  /* Hero sub / generic sub */
  .hero-sub { font-size: 18px !important; }

  /* ══════════════════════════════════════════════════════
     PROJECT DETAIL PAGES (project-*.html)
  ══════════════════════════════════════════════════════ */
  .detail-hero {
    min-height: 0 !important;
    padding-top: 120px !important;
  }
  .dh-title {
    font-size: clamp(38px, 11vw, 60px) !important;
    max-width: 100% !important;
  }
  .dh-intro { font-size: 18px !important; }

  .detail-body-inner p { font-size: 18px !important; }

  /* Gallery collapses to a single editorial column.
     Every child spans the row (numbered classes vary per page, up to g13),
     and images keep their natural ratio so they fill the screen width. */
  .gallery { grid-template-columns: 1fr !important; }
  .gallery > * { grid-column: 1 / -1 !important; }
  .gallery .gimg img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
  .gallery .ph { aspect-ratio: 3/2 !important; }

  .detail-cta-title { font-size: clamp(26px, 8vw, 38px) !important; }
  .detail-cta-links { flex-direction: column; gap: 18px !important; }
  .detail-cta-sep { display: none !important; }

  /* ── Hero image blocks: no double side padding on phones ── */
  .hero-right:has(> .hero-img-wrap) { padding-left: 0 !important; padding-right: 0 !important; }
  .hero-img-wrap { width: 100% !important; }
}

/* ─── VERY NARROW (375px) ────────────────────────────────── */
@media (max-width: 390px) {
  .works-grid {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
  }
  .work-name  { font-size: 13px !important; }
}
