/* Small-screen layout rules, loaded after the desktop design. */
@media (max-width: 1180px) {
  main, main > section, header > *, footer > *, .collection-grid > *,
  .about > *, .print-gallery > *, .card-caption > *, .gallery-header > *,
  .lightbox-top > *, .lightbox-content > *, .socials > * { min-width: 0; }
  img { max-width: 100%; }
  .close, .lightbox-bottom button { min-height: 44px; min-width: 44px; }
  .text-link, .light-button, .hero-link { min-height: 44px; align-items: center; }
  .gallery-photo-title, .gallery-photo-place, .photo-location,
  #photo-title, .card-caption h3 { overflow-wrap: break-word; }
}
@media (max-width: 1100px) {
  header { padding: 10px 4%; gap: 20px; }
  .brand-logo { width: 82px; height: 82px; }
  .brand .brand-words { font-size: 20px; letter-spacing: 1.5px; }
  .brand .brand-words > span { font-size: 7px; letter-spacing: 1.5px; }
  nav { gap: 20px; }
  nav a { font-size: 17px; min-height: 44px; display: inline-flex; align-items: center; }
  .nav-shop { padding: 10px 14px; }
  .nav-shop span { margin-left: 12px; }
  .section { padding: 64px 5%; }
  .section-top { gap: 30px; }
  .section-top h2, .connect h2 { font-size: clamp(38px, 4.8vw, 54px); }
  .section-top > p { max-width: 300px; font-size: 15px; line-height: 1.75; }
  /* Give the image its own row rather than squeezing text over it. */
  .hero { width: calc(100% - 32px); margin: 0 16px; height: auto; min-height: 0;
    max-height: none; color: var(--ink); background: rgba(242,248,244,.38); }
  .hero > img, #hero-img { position: relative; display: block; width: 100%; height: auto;
    max-height: none; aspect-ratio: auto; object-fit: contain; }
  .hero-shade { display: none; }
  .hero-top { top: 16px; left: 20px; right: 20px; color: white;
    text-shadow: 0 1px 5px #16231c; font-size: 8px; letter-spacing: 1px; }
  .hero-copy { position: relative; left: auto; bottom: auto; padding: 30px 5% 24px; }
  .hero-copy .eyebrow { color: #40594c; text-shadow: none; font-size: 10px;
    line-height: 1.6; letter-spacing: 1.2px; margin-bottom: 16px; }
  .hero h1 { font-size: clamp(42px, 6.2vw, 66px); line-height: 1.02; letter-spacing: -2px; }
  .hero-link { width: min(260px, 100%); background: rgba(246,251,248,.5);
    color: var(--ink); border-color: #718a7655; margin-top: 24px; padding: 13px 16px;
    font-size: 14px; backdrop-filter: none; }
  .hero-bottom { position: relative; inset: auto; padding: 0 5% 24px;
    font-size: 9px; line-height: 1.7; letter-spacing: .5px; flex-wrap: wrap; gap: 10px 20px; }
  .filter-row { gap: 20px; }
  .filter-row button { font-size: 12px; min-height: 44px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 30px 22px; }
  .card-caption { padding: 18px 15px; gap: 12px; align-items: flex-start; }
  .card-caption h3 { font-size: clamp(25px,3.2vw,34px); line-height: 1.15; }
  .card-caption p { font-size: 10px; line-height: 1.65; letter-spacing: .6px; }
  .card-arrow { flex: none; font-size: 22px; }
  .about { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 5%; }
  .about-photo { position: static; }
  .about-copy h2 { font-size: clamp(34px,4vw,44px); }
  .about-copy > p:not(.eyebrow) { font-size: 16px; line-height: 1.8; }
  .about-footnote { gap: 20px; padding: 20px 16px; flex-wrap: wrap; }
  .print-gallery { margin: 30px 3%; padding: 30px 4% 45px;
    grid-template-columns: repeat(2,minmax(0,1fr)); gap: 35px 6%; }
  .print-gallery .prints-copy { grid-row: auto; }
  .print-gallery .prints-copy h2 { font-size: clamp(35px,4.6vw,52px); line-height: 1.1; letter-spacing: -1px; }
  .print-gallery .prints-copy > p:not(.print-kicker) { font-size: 15px; line-height: 1.8; }
  .print-gallery-top { gap: 15px; flex-wrap: wrap; }
  .print-gallery-top > span { font-size: 8px; line-height: 1.6; }
  .print-artwork { max-width: 320px; }
  .gallery-frame { padding: 16px; }
  .print-gallery .light-button { max-width: 100%; gap: 16px; padding: 15px 16px;
    font-size: 13px; justify-content: space-between; }
  .frame-note, .shop-detail p { font-size: 12px; line-height: 1.7; }
  .shop-detail > span, .artwork-caption p { font-size: 10px; line-height: 1.6; }
  .socials { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .socials a { min-height: 64px; font-size: 16px; padding: 20px; }
  .contact-line { font-size: 14px; }
  footer { padding: 24px 5%; flex-wrap: wrap; gap: 16px 24px; }
  footer p, footer > a:last-child { font-size: 12px; line-height: 1.6; }
  dialog { max-width: calc(100vw - 24px); width: calc(100vw - 24px);
    max-height: calc(100svh - 24px); max-height: calc(100dvh - 24px); }
  #gallery { padding: 24px; overflow: auto; overscroll-behavior: contain; }
  #gallery-grid { columns: 2; column-gap: 20px; }
  #gallery-grid .gallery-photo-title { font-size: 25px; }
  .gallery-photo-place { font-size: 12px; }
  .gallery-photo-description { font-size: 14px; line-height: 1.7; }
  .gallery-header { align-items: flex-start; gap: 16px; }
  .gallery-header h2 { font-size: 38px; }
  .gallery-header .close { flex: none; }
  #lightbox { width: calc(100vw - 24px); max-width: calc(100vw - 24px);
    height: calc(100svh - 24px); height: calc(100dvh - 24px);
    max-height: calc(100svh - 24px); max-height: calc(100dvh - 24px); padding: 20px; }
  .lightbox-content { grid-template-columns: minmax(0,1fr) 250px; gap: 20px; }
  .lightbox-top { gap: 12px; }
  .lightbox-top .close { flex: none; }
  #lightbox-caption { line-height: 1.6; overflow-wrap: anywhere; }
  #lightbox-img { max-height: calc(100dvh - 170px); }
  .photo-details h2 { font-size: 28px; }
  .photo-details > p:not(.eyebrow):not(.photo-location) { font-size: 14px; }
  .lightbox-bottom button { font-size: 13px; padding: 10px 14px; }
}
@media (max-width: 900px) {
  header { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 8px 4% 14px; }
  header .brand { justify-self: center; }
  nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
    width: 100%; max-width: 620px; justify-self: center; gap: 8px; }
  nav a, nav a:not(.nav-shop), .nav-shop { display: flex; align-items: center;
    justify-content: center; padding: 10px 6px; min-height: 44px; font-size: 16px; }
  .nav-shop span { margin-left: 6px; }
  .section-top, .connect-heading { display: block; }
  .section-top > p { max-width: 600px; margin-top: 22px; }
  .connect-heading p { margin-top: 22px; font-size: 15px; }
  .about { grid-template-columns: minmax(0,1fr); gap: 34px; }
  .about-photo { width: min(100%,640px); margin: 0 auto; }
  .about-photo img { height: auto; aspect-ratio: auto; object-fit: contain; }
  .about-copy > p:not(.eyebrow) { max-width: none; }
  .about-copy h2 { font-size: clamp(34px,5vw,44px); }
  .text-link { font-size: 14px; line-height: 1.6; gap: 16px; }
  #lightbox .lightbox-content { display: flex; flex-direction: column;
    align-items: stretch; gap: 20px; overflow: auto; overscroll-behavior: contain; }
  #lightbox-img { height: auto; width: 100%; max-height: 58svh;
    max-height: 58dvh; min-height: 0; flex: none; object-fit: contain; }
  .photo-details { border-left: 0; border-top: 1px solid #ffffff26;
    padding: 20px 4px; max-height: none; overflow: visible; flex: none; }
  .photo-details dl { display: grid; grid-template-columns: 100px minmax(0,1fr);
    gap: 14px 12px; align-items: baseline; padding-top: 18px; margin-top: 22px; }
  .photo-details dt, .photo-details dd { margin: 0; }
}
@media (max-width: 700px) {
  .section { padding: 48px 5%; }
  .hero { width: calc(100% - 24px); margin: 0 12px; }
  .hero-top { left: 14px; top: 12px; font-size: 7px; }
  .hero-top > span:last-child { display: none; }
  .hero-copy { padding: 25px 6% 20px; }
  .hero-copy .eyebrow { font-size: 9px; letter-spacing: .9px; }
  .hero h1 { font-size: clamp(36px,7.7vw,50px); line-height: 1.06; letter-spacing: -1.4px; }
  .hero-bottom { padding: 0 6% 22px; font-size: 9px; letter-spacing: .25px; display: block; }
  .hero-bottom > a { display: block; padding-top: 10px; }
  .eyebrow { font-size: 10px; line-height: 1.6; letter-spacing: 1.4px; margin-bottom: 20px; }
  .section-top h2, .about-copy h2, .connect h2 { font-size: clamp(32px,6.4vw,42px);
    line-height: 1.13; letter-spacing: -.9px; }
  .filter-row { flex-wrap: wrap; white-space: normal; overflow: visible; gap: 8px;
    padding: 10px; margin-bottom: 28px; border: 1px solid #ffffff60; }
  .filter-row button { flex: 1 1 140px; padding: 11px 9px; font-size: 12px;
    line-height: 1.45; min-height: 44px; background: rgba(255,255,255,.22); }
  .filter-row button.active { background: rgba(250,254,251,.75); }
  .filter-row button.active:after { height: 2px; }
  .collection-grid { gap: 26px 16px; }
  .card-caption h3 { font-size: 26px; }
  .card-caption p { font-size: 10px; }
  .collection-card .photo-wrap { aspect-ratio: 1.48; }
  .about-copy .about-lead { font-size: 17px!important; line-height: 1.7!important; }
  .about-footnote { gap: 14px 22px; padding: 20px 16px; }
  .about-footnote > p { font-size: 18px; }
  .about-photo > span { font-size: 9px; line-height: 1.6; letter-spacing: .8px; }
  .print-gallery { grid-template-columns: minmax(0,1fr); margin: 24px 12px;
    padding: 25px 6% 35px; gap: 30px; }
  .print-gallery-top { grid-column: 1; padding-bottom: 18px; }
  .print-gallery-top > span { display: none; }
  .print-gallery-top .eyebrow { font-size: 10px; }
  .print-gallery .prints-copy { grid-row: 2; }
  .print-gallery .prints-copy h2 { font-size: clamp(34px,7.5vw,48px);
    line-height: 1.1; letter-spacing: -1px; }
  .print-gallery .prints-copy .print-kicker { font-size: 20px; line-height: 1.4; margin-bottom: 18px; }
  .print-gallery .prints-copy > p:not(.print-kicker), .shop-detail { max-width: none; }
  .print-gallery .light-button { width: 100%; font-size: 14px; padding: 16px; gap: 12px; }
  .print-artwork { max-width: 320px; width: 100%; }
  .gallery-frame { padding: 14px; }
  .artwork-view { font-size: 13px; min-height: 44px; align-items: center; }
  .artwork-caption h3 { font-size: 26px; }
  .artwork-caption p { font-size: 10px; letter-spacing: .9px; }
  .shop-detail { margin-top: 25px; padding-top: 20px; }
  .socials { margin-top: 28px; margin-bottom: 25px; }
  .socials a { padding: 16px 12px; gap: 8px; font-size: 15px; min-height: 56px; }
  .socials span { padding-right: 0; }
  .connect-heading p br { display: none; }
  footer { gap: 15px; padding: 22px 5%; }
  footer .brand .brand-words { font-size: 16px; letter-spacing: 1px; }
  footer .brand-logo { width: 66px; height: 66px; }
  footer p { order: 3; width: 100%; margin: 0; }
  #gallery { width: calc(100vw - 16px); max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px); padding: 18px; }
  .gallery-header h2 { font-size: 32px; line-height: 1.1; }
  .gallery-header .eyebrow { font-size: 9px; margin-bottom: 10px; }
  .gallery-header .close { padding: 10px 12px; }
  .gallery-intro { font-size: 14px; line-height: 1.65; margin: 20px 0 24px; }
  #gallery-grid { columns: 1; }
  #gallery-grid figcaption { padding: 16px; }
  #lightbox { width: 100%; max-width: 100%; height: 100svh; height: 100dvh;
    max-height: 100svh; max-height: 100dvh; margin: 0; inset: 0;
    padding: max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right))
      max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); }
  .lightbox-top { font-size: 10px; line-height: 1.5; gap: 10px; }
  #lightbox .lightbox-content { margin: 12px 0; gap: 15px; }
  .lightbox-bottom { gap: 8px; padding-top: 6px; }
  .lightbox-bottom button { font-size: 12px; padding: 10px 12px; }
  #image-count { white-space: nowrap; font-size: 12px; }
  .photo-details h2 { font-size: 28px; }
  .photo-details .photo-location { font-size: 14px; }
  .photo-details > p:not(.eyebrow):not(.photo-location) { font-size: 15px; }
}
@media (max-width: 560px) {
  header { padding: 4px 12px 12px; }
  .brand-logo { width: 68px; height: 68px; }
  .brand .brand-words { font-size: clamp(15px,4.2vw,19px); letter-spacing: 1px; }
  .brand .brand-words > span { font-size: 6px; letter-spacing: 1px; }
  nav { gap: 4px; }
  nav a, nav a:not(.nav-shop), .nav-shop { font-size: 14px; padding: 10px 3px; }
  .nav-shop span { display: none; }
  .collection-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .collection-card:first-child { grid-column: auto; }
  .collection-card .photo-wrap, .collection-card:first-child .photo-wrap { aspect-ratio: 1.5; }
  .card-caption { padding: 17px 16px; }
  .card-caption h3 { font-size: 29px; }
  .card-caption p { font-size: 10px; letter-spacing: .5px; }
  .hero-link { width: 100%; max-width: 270px; }
}
/* Short landscape screens need space for the picture alongside its details. */
@media (max-width: 1100px) and (min-width: 600px) and (max-height: 520px) {
  #lightbox { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh;
    margin: 0; inset: 0; padding: 10px 16px; }
  #lightbox .lightbox-content { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,.65fr);
    overflow: hidden; gap: 18px; align-items: stretch; margin: 8px 0; }
  #lightbox-img { width: 100%; height: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
  .photo-details { border-top: 0; border-left: 1px solid #ffffff26; padding: 6px 0 6px 16px;
    max-height: 100%; overflow: auto; }
  .photo-details h2 { font-size: 25px; }
  .lightbox-bottom { padding-top: 0; }
}
@media (hover: none), (pointer: coarse) {
  .collection-card:hover .photo-wrap, .collection-card:hover img,
  .collection-card:focus-visible .photo-wrap, .collection-card:focus-visible img,
  .artwork-button:hover .gallery-frame { transform: none; }
  #lightbox-img { touch-action: pan-y pinch-zoom; }
}
@media (max-width: 1100px) {
  /* A stable backdrop avoids rescaling as mobile browser controls retract. */
  .portfolio-backdrop { inset: 0 0 auto; height: 100vh; height: 100lvh; }
  header { -webkit-backdrop-filter: blur(10px); }
  .card-caption { -webkit-backdrop-filter: blur(7px); }
  .print-gallery { -webkit-backdrop-filter: blur(6px); }
  dialog { overscroll-behavior: contain; }
}
@media (max-width: 1100px) {
  #gallery .gallery-header { position: sticky; top: -1px; z-index: 2;
    background: rgba(237,245,240,.98); padding: 12px 0; margin-top: -12px; }
}
/* Photo captions are supporting text, not section headings. */
#gallery-grid .gallery-photo-title { display: block; font: 20px/1.35 Georgia,serif; }
#gallery-grid .gallery-photo-place { display: block; font: 12px/1.6 Arial,sans-serif; margin-top: 7px; }
#gallery-grid .gallery-photo-description { display: block; font: 13px/1.7 Arial,sans-serif; margin-top: 8px; }
#gallery-grid figure { margin: 0; }
#gallery-grid button { text-align: left; }
/* Keep controls in their own rows; only the photograph and details scroll. */
#lightbox[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
#lightbox .lightbox-top { grid-row: 1; }
#lightbox .lightbox-content { grid-row: 2; min-height: 0; max-height: 100%; }
#lightbox .lightbox-bottom { grid-row: 3; position: relative; z-index: 3;
  background: #172019; border-top: 1px solid #ffffff20; padding-top: 10px; }
#lightbox .lightbox-bottom button { min-width: 100px; min-height: 44px; }
/* A dedicated stack keeps the background visible behind every translucent panel. */
body { position: relative; isolation: isolate; }
.portfolio-backdrop { position: fixed; z-index: -1; pointer-events: none; }
.gallery-frame { display: block; box-sizing: border-box; width: 100%; }
.gallery-frame #print-img { display: block; width: 100%; height: auto; }
@media (max-width: 1100px) {
  #lightbox { height: calc(var(--viewer-height,100dvh) - 24px);
    max-height: calc(var(--viewer-height,100dvh) - 24px); }
  #gallery { max-height: calc(var(--viewer-height,100dvh) - 24px); }
  #gallery-grid .gallery-photo-title { font-size: 19px; }
  .photo-details h2 { font-size: 24px; line-height: 1.25; }
  .gallery-frame { padding: 14px; border-width: 3px; }
  .artwork-caption { display: flex; justify-content: space-between; align-items: center; }
  .artwork-caption h3 { font-size: 23px; line-height: 1.3; }
  .artwork-number { font-size: 28px; }
}
@media (max-width: 700px) {
  #lightbox { height: var(--viewer-height,100dvh); max-height: var(--viewer-height,100dvh); }
  #gallery { max-height: calc(var(--viewer-height,100dvh) - 16px); }
  #gallery-grid .gallery-photo-title { font-size: 18px; }
  #gallery-grid figcaption { padding: 13px 14px 16px; }
  #gallery-grid .gallery-photo-place { font-size: 12px; }
  #gallery-grid .gallery-photo-description { font-size: 13px; }
  .photo-details h2 { font-size: 23px; }
  .photo-details .photo-location { font-size: 13px; }
  .photo-details > p:not(.eyebrow):not(.photo-location) { font-size: 14px; }
  #lightbox .lightbox-content { overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  #lightbox-img { max-height: calc(var(--viewer-height,100dvh) * .53); }
  .print-artwork { max-width: 285px; }
  .gallery-frame { padding: 12px; border-width: 2px; }
  .artwork-caption h3 { font-size: 22px; }
  .frame-note { font-size: 11px; }
}
@media (max-width: 1100px) and (min-width: 600px) and (max-height: 520px) {
  #lightbox { height: var(--viewer-height,100dvh); max-height: var(--viewer-height,100dvh); }
  #lightbox-img { max-height: 100%; }
}
.collection-card.tap-preview { position: relative; z-index: 2; }
.collection-card.tap-preview .photo-wrap { transform-origin: center; }
/* Empty drafts must not display photos removed from homepage selections. */
#hero-img[hidden],#about-img[hidden],#prints[hidden],.portfolio-backdrop[hidden]{display:none!important}
