/* ═══════════════════════════════════════════════════════════
   responsive.css  —  mobile-first breakpoints
   Linked on every page right after the inline <style> block.
   Breakpoints: ≤768 px (phone), ≤1024 px (tablet)
═══════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════
   PAGE TRANSITIONS  —  global, applies to every page
   transitions.js adds/removes .is-visible / .is-leaving
══════════════════════════════════════════════════════════ */
body {
  opacity   : 0;
  transform : translateY(18px);
  transition: opacity   0.38s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
body.is-visible {
  opacity  : 1;
  transform: none;
}
body.is-leaving {
  opacity  : 0;
  transform: translateY(-14px);
  transition-duration        : 220ms;
  transition-timing-function : cubic-bezier(0.4, 0, 1, 1);
}


/* ══════════════════════════════════════════════════════════
   TOKENS — shrink margins and nav height on mobile
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --nav-h  : 58px;
    --margin : 20px;
    --strip-h: 210px;
  }
}


/* ══════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Switch from 3-col grid to flex */
  .nav__inner {
    display        : flex;
    align-items    : center;
    padding        : 0 var(--margin);
  }

  /* Hide both side link groups */
  .nav__left,
  .nav__right { display: none !important; }

  /* Logo left-aligned, burger right — no spacer needed */
  .nav__logo {
    flex            : 1;
    justify-content : flex-start;
  }
  .nav__logo svg {
    height   : 13px;
    width    : auto;
    max-width: calc(100vw - 100px); /* never wider than screen minus burger+padding */
  }

  /* ── Hamburger button (injected by mobile.js) */
  .nav__burger {
    flex-shrink    : 0;
    display        : flex;
    flex-direction : column;
    align-items    : center;
    justify-content: center;
    gap            : 5px;
    width : 44px;
    height: 44px;
    background: none;
    border    : none;
    cursor    : pointer;
    padding   : 0;
    position  : relative;
    z-index   : 210;
  }
  .nav__burger-line {
    display         : block;
    width           : 22px;
    height          : 1.5px;
    background      : #000;
    transition      : background 0.25s,
                      transform  0.32s cubic-bezier(0.22, 1, 0.36, 1),
                      opacity    0.22s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: center;
    transition      : transform  0.32s cubic-bezier(0.22, 1, 0.36, 1),
                      opacity    0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  /* White burger lines when nav is over a dark hero image */
  .nav--light .nav__burger-line { background: #fff; }

  /* When menu is open: nav bar goes solid white, lines go black */
  .nav:has(.nav__burger.is-open) {
    background: #fff !important;
    border-bottom: 1px solid transparent !important;
  }
  .nav:has(.nav__burger.is-open) .nav__burger-line { background: #000; }

  .nav__burger.is-open .nav__burger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .nav__burger.is-open .nav__burger-line:nth-child(2) {
    opacity  : 0;
    transform: scaleX(0.3);
  }
  .nav__burger.is-open .nav__burger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* ── Full-screen mobile menu (injected by mobile.js) */
  .nav__mobile-menu {
    position      : fixed;
    top           : var(--nav-h);
    left          : 0;
    right         : 0;
    bottom        : 0;
    z-index       : 199;
    background    : #fff;
    display       : flex;
    flex-direction: column;
    justify-content: flex-end;
    padding       : 0 var(--margin) 52px;
    opacity       : 0;
    transform     : translateY(-10px);
    pointer-events: none;
    transition    : opacity   0.38s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav__mobile-menu.is-open {
    opacity       : 1;
    transform     : translateY(0);
    pointer-events: auto;
  }

  /* Large serif links */
  .nav__mobile-links {
    display       : flex;
    flex-direction: column;
    gap           : 0;
  }
  .nav__mobile-links a {
    font-family    : 'Instrument Serif', Georgia, serif;
    font-size      : 52px;
    font-weight    : 400;
    line-height    : 1.1;
    color          : #000;
    text-decoration: none;
    display        : block;
    padding        : 6px 0;
    transition     : opacity 0.2s;
    /* stagger handled inline by mobile.js */
    opacity        : 0;
    transform      : translateY(14px);
  }
  .nav__mobile-menu.is-open .nav__mobile-links a {
    opacity  : 1;
    transform: translateY(0);
    transition: opacity   0.44s cubic-bezier(0.22, 1, 0.36, 1) var(--link-d, 0s),
                transform 0.44s cubic-bezier(0.22, 1, 0.36, 1) var(--link-d, 0s);
  }

  /* Lang switcher inside menu */
  .nav__mobile-lang {
    margin-top  : 32px;
    display     : flex;
    align-items : center;
    gap         : 4px;
    font-family : 'Instrument Sans', -apple-system, sans-serif;
    font-size   : 14px;
    color       : #000;
  }
  .nav__mobile-lang-btn {
    font-size  : 14px;
    font-weight: 400;
    color      : #000;
    background : none;
    border     : none;
    cursor     : pointer;
    padding    : 0;
    transition : opacity 0.2s;
  }
  .nav__mobile-lang-btn.is-active       { opacity: 1; }
  .nav__mobile-lang-btn:not(.is-active) { opacity: 0.25; }
  .nav__mobile-lang-sep { color: #000; opacity: 0.3; }
}


/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  footer {
    height : auto;
    padding: 44px 0;
  }
  .footer__inner {
    flex-direction : column;
    align-items    : flex-start;
    gap            : 32px;
  }
  .footer__brand svg {
    height   : 10px;
    max-width: 170px;
  }
  .footer__nav {
    flex-wrap: wrap;
    gap      : 16px 24px;
  }
  .footer__nav a { font-size: 13px; }
}


/* ══════════════════════════════════════════════════════════
   SHARED TYPOGRAPHY
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  h1 { font-size: 42px !important; }
  h2 { font-size: 30px !important; }

  .section-header {
    flex-direction: column;
    align-items   : flex-start;
    gap           : 14px;
  }
}


/* ══════════════════════════════════════════════════════════
   INDEX — HERO
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero {
    min-height     : 0;
    padding        : 48px var(--margin) 44px;
    align-items    : flex-start;
    text-align     : left;
    justify-content: flex-start;
  }
  .hero__title {
    font-size    : 42px !important;
    margin-bottom: 32px;
    max-width    : 100%;
  }
  .cta { font-size: 15px; }
}


/* ══════════════════════════════════════════════════════════
   INDEX — ABOUT BIOGRAPHY
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
    margin-top           : 80px;
    gap                  : 36px;
  }

  /* Photo first on mobile — reorder DOM columns */
  .about__body   { order: 2; }
  .about__sticky {
    order   : 1;
    position: static;      /* no more sticky; it's a normal flow block */
  }

  .about__photo {
    width     : 100%;
    max-height: 68svh;
    object-fit: cover;
    aspect-ratio: 3 / 4;
  }

  .about__body p {
    font-size    : 20px;
    margin-bottom: 18px;
    line-height  : 1.5;
  }
}


/* ══════════════════════════════════════════════════════════
   INDEX — BLOG POSTS
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .blog { margin-top: 80px; }

  /* Stack the two posts vertically on mobile */
  .home-blog-posts {
    grid-template-columns : 1fr;
    margin-top            : 40px;
    gap                   : 48px;
  }

  .home-blog__title   { font-size: 22px !important; }
  .home-blog__excerpt { font-size: 14px !important; }
}


/* ══════════════════════════════════════════════════════════
   INDEX — SHOP CAROUSEL
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .shop { margin-top: 80px; }

  .shop-item {
    flex  : 0 0 72vw;
    height: 72vw;
  }
}


/* ══════════════════════════════════════════════════════════
   INDEX — ARTWORKS CAROUSEL (mobile height)
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .artwork__img {
    height: 260px;   /* shorter on mobile so paintings don't overwhelm */
  }
}


/* ══════════════════════════════════════════════════════════
   HOME CAROUSELS — touch-velocity drag on mobile
   touch-action:pan-y lets JS touch handlers fire while
   the browser still handles vertical page scroll.
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .artworks__track {
    touch-action: pan-y;
    cursor      : default;
  }
  .shop__track {
    touch-action: pan-y;
    cursor      : default;
  }
  .shop__track.is-dragging { cursor: default; }
}


/* ══════════════════════════════════════════════════════════
   ARTWORKS PAGE
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .artwork-group { margin-top: 48px; }
  .artwork-group + .artwork-group { margin-top: 56px; }
  .artwork-group:last-child { margin-bottom: 72px; }

  .artwork-group__header {
    margin-bottom   : 18px;
    justify-content : space-between;
    align-items     : center;
    gap             : 12px;
  }
  .artwork-group__header h1 { font-size: 24px !important; }

  /* Mobile CTA: hide full label, show short one */
  .cta__label-full  { display: none; }
  .cta__label-short { display: inline; }

  /* Let the strip stay full-width, just shorter */
  .artwork-strip { touch-action: pan-y pinch-zoom; }

  /* More space above arrows so the strip doesn't overlap the tap target */
  .artwork-group__nav { margin-top: 24px; }

  /* Larger tap target — extra padding absorbs accidental strip taps */
  .strip-arrow {
    padding: 14px 10px;
    margin : -14px -10px; /* compensate so layout doesn't shift */
  }

  /* Smaller arrows */
  .strip-arrow svg { width: 30px; height: 8px; }
}


/* ══════════════════════════════════════════════════════════
   GROUP PAGE (single artwork series)
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .group-header {
    padding-top   : 40px;
    padding-bottom: 40px;
  }
  .group-header__title { font-size: 42px !important; }

  /* Flatten 3 columns into 1 */
  .group-grid {
    flex-direction: column;
    gap           : 0;
  }
  .group-col { width: 100%; }

  /* Cards: tighten spacing */
  .artwork-card { padding-bottom: 40px; }
  .artwork-card__title { font-size: 22px !important; }

  /* Bottom link */
  .group-bottom {
    padding: 64px var(--margin) 52px;
  }
  .group-bottom__link { font-size: 36px !important; }
}


/* ══════════════════════════════════════════════════════════
   EXHIBITIONS PAGE
   Mobile styles for the CV-style listing live inline in
   exhibitions.html (@media max-width: 860px).
══════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════
   BLOG LIST PAGE
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .blog-page__header {
    padding-top: 40px;
  }

  /* Card grid → single column */
  .blog-grid {
    grid-template-columns: 1fr !important;
    margin-top            : 32px !important;
    gap                   : 48px !important;
  }
  .blog-card__img {
    aspect-ratio: 16 / 9 !important;
  }
  .post-title { font-size: 22px !important; }
  .post-excerpt { font-size: 14px !important; }
}


/* ══════════════════════════════════════════════════════════
   ARTICLE PAGE
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .article-wrap {
    padding-top: 40px !important;
  }
  .article-meta {
    font-size: 13px;
  }
  .article-title {
    font-size  : 36px !important;
    margin-top : 12px !important;
    line-height: 1.1 !important;
  }
  .article-hero-img {
    height: 56vw !important;
    max-height: 280px;
  }
  .article-body {
    margin-top : 48px !important;
    max-width  : 100% !important;
  }
  .article-body p {
    font-size  : 16px !important;
    line-height: 1.65 !important;
  }
  .article-more {
    padding              : 60px var(--margin) 80px !important;
    grid-template-columns: 1fr !important;
  }
  .article-more__header {
    font-size: 30px !important;
  }
}


/* ══════════════════════════════════════════════════════════
   SHOP PAGE — Mobile
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .shop-header {
    padding: 40px var(--margin) 32px;
  }
  .shop-header__title { font-size: 42px !important; }
  .shop-header__top { gap: 16px; flex-wrap: wrap; }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 16px;
    padding: 40px var(--margin) 80px;
  }
  .shop-card__title  { font-size: 16px !important; }
  .shop-card__meta   { font-size: 11px; }
  .shop-card__price  { font-size: 13px; margin-bottom: 14px; }
  .shop-card__btn    { height: 42px; font-size: 13px; }

  /* Modal full-screen on mobile */
  .inquiry {
    align-items : flex-end;
    padding     : 0;
  }
  .inquiry__panel {
    max-width   : 100%;
    width       : 100%;
    padding     : 36px 24px 40px;
    max-height  : 92svh;
    border-radius: 0;
  }
  .inquiry__artwork-title { font-size: 26px !important; }
}

@media (max-width: 380px) {
  .shop-grid { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════════════════
   TABLET (769–1024px) — light fixes only
══════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --margin: 32px; }

  .hero__title      { font-size: 56px; }
  .about            { grid-template-columns: 1fr 320px; }
  .about__body p    { font-size: 20px; }
  .blog-post--a .blog-post__img { flex-basis: 480px; max-width: 480px; }
  .group-grid       { gap: 24px; }
}
