/* ============================================================
   Soho Printing Press — style sheet
   A letterpress-inspired sheet: paper, ink, and salvaged tile.
   ============================================================ */

@font-face {
  font-family: 'Michelle';
  src: url('../fonts/michelle_2/Michelle.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Michelle Outline';
  src: url('../fonts/michelle_2/Michelle%20Outline.otf') format('opentype');
  font-display: swap;
}

:root {
  --paper:      #f5f3ea;
  --paper-deep: #edeade;
  --ink:        #2b2921;
  --ink-soft:   #5c5847;
  --sage:       #6c8071;
  --teal:       #41625c;
  --blue:       #8ea0b4;
  --cream:      #e4d5b2;
  --rust:       #9c5b4f;
  --line:       rgba(43, 41, 33, .22);
  --line-soft:  rgba(43, 41, 33, .12);
  --ribbon-w:   92px;
  --font-display: 'Michelle', 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Songti SC', 'SimSun', 'Noto Serif CJK SC', serif;
  --font-outline: 'Michelle Outline', 'Michelle', Georgia, serif;
  --font-body:    'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, 'Songti SC', 'SimSun', 'Noto Serif CJK SC', serif;
  --font-label:   'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

/* Anchor jumps land clear of the fixed nav; the listings section pins to
   the very top of the viewport so no sliver of the section above shows. */
#about, #contact, #viewer { scroll-margin-top: 84px; }
#listings { scroll-margin-top: 0; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  padding-left: var(--ribbon-w);          /* make room for the printed selvedge */
  overflow-x: hidden;
}

main { position: relative; }

img { display: block; max-width: 100%; }
a { color: inherit; }

/* Let text and replaced elements shrink inside flex/grid tracks. */
.hero-text, .hero-art, .viewer, .viewer-prose, .viewer-head, .viewer-body,
.viewer-map, .gallery-item, .card, .media-item a > * { min-width: 0; }
h2, h3, p, .chips li, .card-body, .media-src, .media-title,
.footer-contact a { overflow-wrap: anywhere; }

::selection { background: var(--sage); color: var(--paper); }

/* ------------------------------------------------------------
   The selvedge: woven tiles repeating down the left margin,
   blended into the paper like a printer's registration edge.
   ------------------------------------------------------------ */
.ribbon {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(-1 * var(--ribbon-w));
  width: var(--ribbon-w);
  background: url('../assets/tile-woven.jpg') repeat;   /* js/main.js rotates the three tile prints each visit */
  /* tiles are scaled up so roughly three show across the ribbon (js sets a
     per-pattern width) instead of the whole compressed sheet */
  background-size: 233% auto;
  opacity: .34;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}
.ribbon::after {                            /* a hairline separating selvedge from sheet */
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 1px;
  background: var(--line);
}

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: var(--ribbon-w); right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.4rem, 4vw, 3.2rem);
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease, transform .4s cubic-bezier(.2, .7, .2, 1);
}
.nav.hidden {
  transform: translateY(-110%);
}
.nav.scrolled {
  background: rgba(245, 243, 234, .92);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--line-soft);
  padding-top: .7rem;
  padding-bottom: .7rem;
}
/* On the landing page the print runs to the top edge, so the transparent
   header sits on artwork. A paper scrim fades the ink out behind the links;
   it disappears once the solid header takes over on scroll. */
.nav::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 9rem;
  background: linear-gradient(to bottom,
    rgba(245, 243, 234, .97) 0%,
    rgba(245, 243, 234, .72) 42%,
    rgba(245, 243, 234, 0) 100%);
  pointer-events: none;
  z-index: -1;
  transition: opacity .35s ease;
}
.nav.scrolled::before { opacity: 0; }
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: .98;
  padding-block: .45rem;      /* keeps the header height as the line-height tightens */
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
  /* stays out of the header until the hero title has lifted up into it */
  opacity: 0;
  transition: opacity .4s ease;
}
.nav.brand-on .nav-brand { opacity: 1; }
/* The hero title itself becomes the brand, so the hand-off is instant. */
body.title-morph .nav-brand { transition: none; }
/* inline-block so each word's box matches the flying copy, making the
   hand-off at the end of the animation pixel-for-pixel */
.nav-brand .nb { display: inline-block; }

/* ------------------------------------------------------------
   The flying hero title
   A fixed copy of the hero <h1>; scroll drives each word from its
   place on the sheet to its place in the header, the outlined
   "Printing Press" inking itself solid on the way.
   ------------------------------------------------------------ */
.title-fly {
  position: fixed;
  left: 0; top: 0;
  z-index: 60;
  display: none;
  pointer-events: none;
  visibility: hidden;        /* switched on by js once measured */
}
body.title-morph .title-fly { display: block; }
body.title-morph .hero-text h1 { opacity: 0; }   /* the fly renders the title */
/* The drop-down menu must sit above the flying title, so fold it away. */
.nav.menu-open ~ .title-fly { display: none; }

.tf {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  white-space: nowrap;
  display: block;
  line-height: .98;
  will-change: transform;
  backface-visibility: hidden;
}
.tf-soho {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7.2vw, 6.4rem);
  letter-spacing: .01em;
}
.tf-press-outline {
  font-family: var(--font-outline);
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
}
.tf-press-solid {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  letter-spacing: .01em;
  opacity: 0;
}
.nav-links { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); }
.nav-links a {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* The hamburger stays folded away on wide screens */
.hamburger { display: none; }

/* ------------------------------------------------------------
   Shared type
   ------------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.2rem;
}
.eyebrow-light { color: var(--cream); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; }

h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 1.6rem;
}
h2 em { font-style: italic; color: var(--teal); }

/* ------------------------------------------------------------
   Hero — name on the left, the living print on the right
   ------------------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  position: relative;
  z-index: 2;
  /* paper buffer below the print, so jumping to #about doesn't flash art */
  padding-bottom: 10vh;
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 10vh, 8rem) clamp(1.6rem, 4.5vw, 5rem) clamp(5rem, 12vh, 8rem);
  position: relative;
}
.hero-text h1 { line-height: .98; }
.h1-solid {
  display: block;
  font-size: clamp(3.4rem, 7.2vw, 6.4rem);
  letter-spacing: .01em;
}
.h1-outline {
  display: block;
  font-family: var(--font-outline);
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  margin-top: .35rem;
}
.tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-style: italic;
  color: var(--ink-soft);
  margin: 1.8rem 0 0;
}

/* A centered downward cue marks the transition to the next section. */
.scroll-cue {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(1.5rem + 10vh);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  text-decoration: none;
  font-family: var(--font-label);
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.scroll-cue:focus-visible { outline: 1px solid var(--teal); outline-offset: 4px; }
.cue-arrow {
  display: block;
  animation: cue 2.2s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  55% { transform: translateY(7px); }
}

/* The living print sits directly on the sheet, unframed,
   dissolving into the page along its left edge. */
.hero-art {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.print-frame {
  position: relative;
  height: 100vh;
  aspect-ratio: 983 / 1305;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 25%);
  mask-image: linear-gradient(to right, transparent 0%, #000 25%);
}
.print-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ------------------------------------------------------------
   About
   ------------------------------------------------------------ */
.about {
  display: grid;
  /* Image track sized to the image, copy track sized to its measure; the
     leftover space becomes the gap so neither column leaves a dead hole. */
  grid-template-columns: minmax(0, 27.5rem) minmax(0, 38.75rem);
  justify-content: space-between;
  column-gap: clamp(2rem, 4vw, 4.5rem);
  /* The photo is far taller than the copy: align to the top so the heading
     sits flush with the image rather than floating mid-column. */
  align-items: start;
  position: relative;
  overflow: hidden;
  padding: clamp(7.5rem, 17vh, 11.5rem) clamp(1.6rem, 6vw, 6rem);
  z-index: 2;
}
.about-photo {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.about-photo img { width: 100%; height: auto; }
.about-photo figcaption {
  margin-top: .8rem;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-label);
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.about-inner { grid-column: 2; min-width: 0; max-width: 620px; position: relative; }
.about-inner p { margin: 0 0 1.3rem; color: var(--ink-soft); }
.about-inner p strong { color: var(--ink); }

/* ------------------------------------------------------------
   Listings
   ------------------------------------------------------------ */
.listings {
  padding: clamp(7.5rem, 17vh, 11.5rem) clamp(1.6rem, 6vw, 6rem);
  position: relative;
  z-index: 2;
}
.section-head { margin-bottom: clamp(2.6rem, 6vh, 4rem); }
.section-head h2 { margin-bottom: 0; }
/* Listing viewer */
.viewer { transition: opacity .24s ease; }
.viewer.swap { opacity: 0; }

.viewer-prose { position: relative; }
.viewer.has-map .viewer-prose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: 'head map' 'body map';
  grid-template-rows: auto 1fr;
  column-gap: clamp(1.5rem, 3vw, 3rem);
}
.viewer-head { grid-area: head; }
.viewer-body { grid-area: body; }

/* Only the transparent edge extends into the text track; the detailed
   part of the map stays clear of the copy. The fade is kept short so the
   map meets the paper as a printed edge rather than a long wash. */
.viewer-map {
  --map-bleed: clamp(2.5rem, 5.5vw, 5rem);
  grid-area: map;
  align-self: center;
  width: calc(100% + var(--map-bleed));
  margin-left: calc(-1 * var(--map-bleed));
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .6) 9%, #000 18%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .6) 9%, #000 18%);
  opacity: 0;
  transition: opacity .5s cubic-bezier(.2, .7, .2, 1);
  pointer-events: none;
}
.viewer-map[hidden] { display: none; }
.viewer-map.on { opacity: .92; }
.viewer-map iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 1000;
  border: 0;
  mix-blend-mode: multiply;
}
.viewer-head, .viewer-body { position: relative; z-index: 1; }
.viewer-head { margin-bottom: 1.5rem; }
.viewer-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem 1.4rem;
}
.viewer-title-row h3 {
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.08;
}
.viewer-nav { display: flex; flex: 0 0 auto; align-items: center; gap: .7rem; }
.vnav-btn {
  width: 2.35rem; height: 2.35rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}
.vnav-btn:hover { color: var(--ink); border-color: var(--ink); transform: scale(1.08); }
.viewer-pos {
  font-family: var(--font-label);
  font-size: .68rem;
  letter-spacing: .22em;
  color: var(--ink-soft);
  min-width: 3.2em;
  text-align: center;
}
.viewer-body { max-width: 600px; }
.viewer-body p { color: var(--ink-soft); margin: 0; }

.viewer-gallery {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(2.2rem, 5vh, 3.4rem);
}

/* "See all listings" divider */
.see-all {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: clamp(4.5rem, 10vh, 6.5rem) 0 clamp(2rem, 4vh, 2.8rem);
}
.see-all::before, .see-all::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.see-all span {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.l-num {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 .7rem;
}
.featured h3, .modal-text h3 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.1;
  margin-bottom: 1.1rem;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  margin: 1.1rem 0 0;
}
.chips li {
  max-width: 100%;
  font-family: var(--font-label);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .34rem .85rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  cursor: zoom-in;
  padding: 0;
  background: var(--paper-deep);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}
.gallery-item:hover img { transform: scale(1.045); }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
  gap: clamp(.9rem, 1.6vw, 1.4rem);
}
.card {
  text-align: left;
  border: 1px solid var(--line-soft);
  background: var(--paper);
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(43, 41, 33, .16);
  border-color: var(--line);
}
.card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-deep); }
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}
.card:hover .card-img img { transform: scale(1.05); }
.card-body { display: block; padding: .85rem .95rem 1.05rem; }
.card-num {
  display: block;
  font-family: var(--font-label);
  font-size: .64rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rust);
}
.card-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.15;
  margin: .3rem 0 .35rem;
}
.card-specs { display: block; font-size: .78rem; color: var(--ink-soft); font-style: italic; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer {
  position: relative;
  z-index: 2;
  margin-left: calc(-1 * var(--ribbon-w));   /* full-bleed past the selvedge */
}
.footer-inner {
  position: relative;
  overflow: hidden;
  background: #595d59 url('../assets/footer-green.jpg') center / cover;
  color: var(--paper);
  text-align: center;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.6rem, 6vw, 6rem) 2.4rem;
}

.footer-inner h2 { color: var(--paper); margin-bottom: .6rem; }
.footer-tag { color: rgba(245, 243, 234, .72); font-style: italic; margin: 0 0 2.2rem; }
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem clamp(2rem, 5vw, 4rem);
  margin-bottom: 2.6rem;
}
.footer-contact a {
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 243, 234, .35);
  padding-bottom: .2rem;
  transition: border-color .3s ease, color .3s ease;
}
.footer-contact a:hover { color: var(--cream); border-color: var(--cream); }
.footer-addr {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(245, 243, 234, .62);
  margin: 0 0 3rem;
}
.copyright {
  font-size: .8rem;
  color: rgba(245, 243, 234, .55);
  margin: 0;
}

/* ------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------ */
.lightbox {
  position: fixed; inset: 0;
  z-index: 120;
  background: rgba(22, 21, 16, .93);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  /* Fill the screen: the photos are 533:300, so 149.3vh wide == 84vh tall. */
  width: min(88vw, 149.3vh);
  max-height: 84vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(245, 243, 234, .75);
  cursor: pointer;
  transition: color .25s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: #fff; }
.lb-close { top: 1.2rem; right: 1.6rem; font-size: 2.4rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 1rem; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-count {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .3em;
  color: rgba(245, 243, 234, .65);
  margin: 0;
}

/* ------------------------------------------------------------
   Media page — press, interviews and films
   ------------------------------------------------------------ */
.media {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  padding: clamp(7rem, 13vh, 9.5rem) clamp(1.6rem, 6vw, 6rem) clamp(4.5rem, 9vh, 7rem);
}
.media-head { max-width: 62ch; margin-bottom: clamp(2.6rem, 6vh, 4rem); }
.media-head h2 { margin-bottom: .8rem; }
.media-intro { color: var(--ink-soft); margin: 0; }

.media-group { margin-bottom: clamp(2.6rem, 6vh, 4rem); }
.media-group h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  margin: 0 0 1.1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}

.media-list { list-style: none; margin: 0; padding: 0; }
.media-item { border-bottom: 1px solid var(--line-soft); }
.media-item a {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .25rem 1.5rem;
  padding: .95rem .3rem;
  text-decoration: none;
  color: inherit;
  transition: background .25s ease, padding-left .3s cubic-bezier(.2, .7, .2, 1);
}
.media-item a:hover { background: var(--paper-deep); padding-left: .8rem; }
.media-src {
  font-family: var(--font-label);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
}
.media-title { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.3; }
.media-play { color: var(--rust); font-size: .68em; margin-right: .55rem; vertical-align: .08em; }
.media-meta {
  font-family: var(--font-label);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  text-align: right;
}
.media-arrow { display: inline-block; margin-left: .5rem; transition: transform .25s ease, color .25s ease; }
.media-item a:hover .media-arrow { transform: translate(2px, -2px); color: var(--rust); }

@media (max-width: 680px) {
  .media-item a { grid-template-columns: minmax(0, 1fr) auto; }
  .media-src { grid-column: 1 / -1; }
  .media-title { font-size: 1rem; }
}

/* ------------------------------------------------------------
   Scroll reveals
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .65, .2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
  /* Portrait tablets need a full-width description and map. */
  .viewer.has-map .viewer-prose { display: block; }
  .viewer-map {
    --map-bleed: 0px;
    margin-top: 2rem;
    /* The map has its own row here — nothing to blend into, so no fade. */
    -webkit-mask-image: none;
    mask-image: none;
  }
  :root { --ribbon-w: 0px; }   /* selvedge folds away on small screens */
  .ribbon { display: none; }
  .nav { left: 0; }
}

@media (max-width: 860px) {
  /* hamburger replaces the section links; the menu drops open under it */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: .4rem 0;
    cursor: pointer;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    transition: transform .35s ease, opacity .25s ease;
  }
  #nav.menu-open .hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  #nav.menu-open .hamburger span:nth-child(2) { opacity: 0; }
  #nav.menu-open .hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    top: 100%;
    right: clamp(1.4rem, 4vw, 3.2rem);
    flex-direction: column;
    gap: 1.15rem;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    box-shadow: 0 14px 34px rgba(43, 41, 33, .16);
    padding: 1rem 1.4rem;
    opacity: 0;
    transform: translateY(-.45rem);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
  }
  .nav.menu-open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

@media (max-width: 1100px) {
  /* Hero: tighter to the header, and the print is pulled up behind the
     tagline, dissolving in from its top edge instead of its left. */
  .hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: 5vh; }
  .hero-text { padding-top: 5rem; padding-bottom: 0; z-index: 2; }
  /* Keep the cue centered directly after the artwork on touch screens. */
  .scroll-cue {
    position: relative;
    left: auto; bottom: auto;
    transform: none;
    margin-top: 1rem;
    justify-self: center;
  }
  .hero-art {
    justify-content: center;
    padding: 0 1.2rem;
    margin-top: -2.6rem;              /* the art rises behind the tagline */
    position: relative;
    z-index: 1;
  }
  .print-frame {
    height: auto;
    width: min(100%, 46vh);
    width: min(100%, 46svh);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
  }
}

@media (max-width: 680px) {
  .about { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .about-inner { grid-column: 1; }
  .about-photo { grid-row: auto; max-width: 420px; }
  .about { row-gap: 2.2rem; }
}

@media (max-width: 860px) {
  /* Listing viewer: arrows above the name, a swipeable photo strip above
     the description, then the complete map in its own row. */
  .viewer { display: flex; flex-direction: column; position: relative; }
  .viewer-prose, .viewer.has-map .viewer-prose { display: contents; }
  .viewer-head { order: 1; display: flex; flex-direction: column; }
  .viewer-title-row { display: contents; }
  .viewer-nav { order: -1; margin: 0 0 1.2rem; }
  .vnav-btn { width: 2.6rem; height: 2.6rem; }
  .viewer-body { order: 3; }
  .viewer-gallery {
    order: 2;
    display: flex;
    gap: 10px;
    margin: 0 calc(-1 * clamp(1.6rem, 6vw, 6rem)) 1.8rem;
    padding: 0 clamp(1.6rem, 6vw, 6rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .viewer-gallery::-webkit-scrollbar { display: none; }
  .gallery-item { flex: 0 0 86%; scroll-snap-align: center; }
  .viewer-map {
    order: 4;
    width: 100%;
  }
}

@media (max-width: 520px) {
  /* the brand and the links wrap onto two lines instead of colliding */
  .nav { flex-wrap: wrap; row-gap: .1rem; padding: .75rem 1.1rem; }
  .nav-brand { font-size: 1.05rem; }
  .nav-links { gap: 1.1rem; margin-left: auto; }
  .nav-links a { font-size: .62rem; letter-spacing: .16em; }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cue-arrow { animation: none; }
  .gallery-item img, .card-img img { transition: none; }
}
