/* ═══════════════════════════════════════
   MOBILE — global phone/tablet overrides
   Loaded last; wins specificity battles.
═══════════════════════════════════════ */

/* ── BURGER (hidden ≥769px) ─────────────── */
.nav-burger {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin: -10px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 101;
}
.nav-burger__box { position: relative; width: 22px; height: 14px; display: block; }
.nav-burger__box span {
  position: absolute; left: 0; right: 0; height: 1.5px;
  background: var(--c-ink); transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-burger__box span:nth-child(1) { top: 0; }
.nav-burger__box span:nth-child(2) { top: 6.5px; }
.nav-burger__box span:nth-child(3) { top: 13px; }
.nav-open .nav-burger__box span:nth-child(1) { top: 6.5px; transform: rotate(45deg); }
.nav-open .nav-burger__box span:nth-child(2) { opacity: 0; }
.nav-open .nav-burger__box span:nth-child(3) { top: 6.5px; transform: rotate(-45deg); }

/* ═══════════ TABLET (≤900px) ═══════════ */
@media (max-width: 900px) {
  .hero-bottom {
    grid-template-columns: 1fr !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    margin-top: 60px !important;
    gap: 32px;
  }
  .hero-bottom__img:first-child { width: 100% !important; }
  .hero-bottom__phrase { padding: 0 !important; }
  .hero-bottom__phrase .fragment-text { font-size: clamp(26px, 6vw, 36px) !important; }

  .series-body {
    padding: 60px 24px 0 24px !important;
    max-width: 100% !important;
  }
  .series-body__fragment-after {
    padding: 56px 0 0 0 !important;
    justify-content: flex-start !important;
  }
  .series-body__fragment-after .fragment-text {
    font-size: clamp(32px, 8vw, 54px) !important;
    text-align: left !important;
  }

  .year-section { padding: 48px 24px 0 !important; }
  .year-section:first-of-type { padding-top: 56px !important; }
  .year-section + .year-section { padding-top: 72px !important; }

  .marathon-section { padding: 48px 24px 0 !important; }
  .marathon-triptych { grid-template-columns: 1fr !important; }

  .works-grid, .works-grid--3col {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .work-item--span2 { grid-column: auto !important; }
  .work-item--span2 .work-img-wrap { aspect-ratio: 4/3 !important; }

  .series-hero-split {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }
  .series-hero-split__left {
    padding: 24px 24px 48px 24px !important;
  }
  .series-hero-split__right { aspect-ratio: 4/3; }
}

/* ═══════════ PHONE (≤640px) ═══════════ */
@media (max-width: 640px) {

  html { font-size: 15px; }

  /* ── NAV — burger ── */
  .site-nav { padding: 16px 20px !important; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; }

  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--c-base);
    padding: 72px 24px 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px !important;
    transform: translateY(-110%);
    transition: transform .32s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    z-index: 100;
  }
  .nav-open .nav-links { transform: translateY(0); }
  .nav-links a {
    font-size: 14px !important;
    letter-spacing: 0.18em;
    color: var(--c-ink) !important;
    padding: 6px 0;
  }

  /* ── GLOBAL ── */
  .container, .container--narrow { padding: 0 20px !important; }
  .section { padding: 72px 0 !important; }
  .section--l { padding: 56px 0 !important; }
  .section--m { padding: 40px 0 !important; }

  /* ── HERO SPLIT (index) ── */
  .hero-split {
    grid-template-columns: 1fr !important;
    padding-top: 64px !important;
    min-height: auto !important;
  }
  .hero-split__left { padding: 24px 20px 36px !important; }
  .hero-split__right { aspect-ratio: 4/5; height: auto !important; }
  .fragment-text.hero-split__fragment {
    font-size: 28px !important;
    line-height: 1.3 !important;
    margin-bottom: 24px !important;
  }

  /* ── STATEMENT ── */
  .statement-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .statement-label { margin-bottom: 20px !important; }
  .statement-body p {
    font-size: 15px !important;
    line-height: 1.65 !important;
    margin-bottom: 16px !important;
  }
  .statement-link { margin-top: 32px !important; font-size: 10px !important; }
  /* strip inline padding-top:200px on statement sections */
  .section[style*="padding-top: 200px"],
  .section[style*="padding-top:200px"] {
    padding-top: 64px !important;
    padding-bottom: 48px !important;
  }

  /* ── FRAGMENT TEXT ── */
  .fragment-text {
    font-size: clamp(28px, 7vw, 36px) !important;
    line-height: 1.2 !important;
  }
  .fragment-zone,
  .fragment-zone--right,
  .fragment-zone--center {
    padding: 56px 20px 0 !important;
  }
  .fragment-zone--right {
    justify-content: flex-start !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
  }
  .fragment-zone--right img {
    width: clamp(160px, 46vw, 220px) !important;
  }

  /* ── SERIES STACK (projects on index) ── */
  .series-stack-section { padding: 48px 0 72px !important; overflow: hidden; }
  .series-stack-label { padding: 0 20px 36px !important; display: block !important; }
  .series-stack-title {
    font-size: clamp(48px, 14vw, 72px) !important;
  }
  .series-stack {
    padding-left: 20px !important;
    padding-right: 20px !important;
    gap: 36px !important;
    align-items: stretch !important;
  }
  .series-stack__item,
  .series-stack__item--1,
  .series-stack__item--2,
  .series-stack__item--3,
  .series-stack__item--4,
  .series-stack__item--5,
  .series-stack__item--6 {
    width: 100% !important;
    height: auto !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    align-self: stretch !important;
  }
  .series-stack__item--label-left {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  .series-stack__item--center.series-stack__item--flip,
  .series-stack__item--center {
    flex-direction: column !important;
    align-self: stretch !important;
    margin-left: 0 !important;
  }
  .stack-label-left { padding-top: 0 !important; }
  .stack-label-left__name { font-size: 22px !important; }
  .stack-label-left__year { font-size: 10px !important; }
  .series-stack__item--1 .stack-label-left__img,
  .series-stack__item--2 .stack-label-left__img,
  .series-stack__item--3 .stack-label-left__img,
  .series-stack__item--4 .stack-label-left__img,
  .series-stack__item--5 .stack-label-left__img,
  .series-stack__item--6 .stack-label-left__img {
    width: 100% !important;
  }
  .series-stack__item--label-over { margin-right: 0 !important; }
  .stack-label-over__img img {
    width: 100% !important;
    max-width: 100% !important;
  }
  .stack-label-over__text { position: static !important; margin-bottom: 10px; }

  /* ── SERIES PAGE ── */
  .series-page { padding-top: 56px !important; }
  .breadcrumb { margin-bottom: 24px !important; font-size: 9px !important; }
  .series-title {
    font-size: clamp(42px, 11vw, 64px) !important;
    white-space: normal !important;
  }
  .series-subtitle { margin-top: 14px !important; font-size: 10px !important; }
  .series-intro { font-size: 16px !important; line-height: 1.7 !important; }
  .series-intro--lead { font-size: 19px !important; line-height: 1.5 !important; }
  .series-medium { font-size: 9px !important; margin-top: 32px !important; }

  /* ── EXHIBITIONS ── */
  .exh-row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    padding: 20px 0 !important;
  }
  .exh-row > *:last-child { display: block !important; margin-top: 4px; }
  .exh-year { font-size: 10px !important; }
  .exh-title { font-size: 17px !important; }
  .exh-page-list .exh-row { grid-template-columns: 1fr !important; }

  /* ── GALLERY GRIDS ── */
  .exh-gallery-grid {
    grid-template-columns: 1fr !important;
    padding: 0 20px !important;
    margin: 40px auto !important;
    gap: 16px !important;
  }

  /* ── CIUDAD HERO ── */
  .ciudad-hero { grid-template-columns: 1fr !important; gap: 24px !important; padding: 0 20px !important; }
  .ciudad-posters { grid-template-columns: 1fr !important; gap: 24px !important; padding: 0 20px !important; }

  /* generic 2-col collapses on pages using inline grids */
  .ciudad-hero + * [style*="grid-template-columns: 1fr auto 1fr"],
  [style*="grid-template-columns: 1fr auto 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    text-align: left !important;
  }

  /* ── FOOTER ── */
  .site-footer { padding: 48px 20px !important; }
  .footer-brand { font-size: 18px !important; }
  .footer-col a { font-size: 14px !important; }

  /* ── PULL QUOTE ── */
  .pull-quote { padding: 64px 0 !important; }
  .pull-quote__text { font-size: clamp(22px, 6vw, 30px) !important; line-height: 1.3 !important; }

  /* ── SECTION HEADER ── */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
  }
  .section-header__label { font-size: clamp(36px, 11vw, 52px) !important; }

  /* ── IMG TAP TARGETS ── */
  a, button, .lb-thumb { -webkit-tap-highlight-color: transparent; }

  /* ── LIGHTBOX safe for mobile ── */
  .lb-overlay { padding: 20px !important; }

  /* ── Hide ultra-wide decorative side images ── */
  .series-body__side-img { display: none !important; }

  /* ── Any inline grid with explicit 2+ fr collapses to 1 ── */
  [style*="grid-template-columns: 1fr 1fr"]:not(.exh-gallery-grid):not(.ciudad-posters) {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  [style*="grid-template-columns: 1.25fr 1fr"],
  [style*="grid-template-columns: 1.75fr 1fr"],
  [style*="grid-template-columns: 1.7fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* ── Any inline width constrained element full-width ── */
  [style*="width: min(720px"],
  [style*="width: min(900px"],
  [style*="width: min(1000px"],
  [style*="width: min(1100px"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ── Prevent horizontal page scroll from decorative overflow ── */
  html, body { overflow-x: hidden; max-width: 100vw; }
}

/* ═══════════ SMALL PHONE (≤380px) ═══════════ */
@media (max-width: 380px) {
  .series-title { font-size: 38px !important; }
  .fragment-text.hero-split__fragment { font-size: 24px !important; }
}
