/* Museum of Dreams: the estate website. Photograph and render led, 5 to 10% text.
   MOD brand only: maroon #430F01, olive #736A50, paper #FDFBF7, Work Sans (Light display, Regular reading, Medium labels).
   Every picture carries a museum label (plate): what it is, and whether it is a site photograph or a design visualisation. */

@font-face { font-family: "Work Sans"; src: url(../assets/fonts/WorkSans-Light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url(../assets/fonts/WorkSans-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url(../assets/fonts/WorkSans-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --maroon: #430F01; --olive: #736A50; --paper: #FDFBF7;
  --ink: var(--maroon);
  --ink-soft: rgba(67, 15, 1, .74);
  --olive-wash: rgba(115, 106, 80, .14);
  --rule: rgba(67, 15, 1, .16);
  --paper-soft: rgba(253, 251, 247, .74);
  --paper-rule: rgba(253, 251, 247, .22);

  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(16px, 4vw, 64px);
  --gap: clamp(16px, 2.4vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --fs-xl: clamp(2.5rem, 1.1rem + 5.6vw, 7rem);
  --fs-l: clamp(1.9rem, 1rem + 2.9vw, 4rem);
  --fs-m: clamp(1.3rem, 1rem + .9vw, 1.75rem);
  --fs-label: .72rem;
  --hd-pad: 14px;
  --snd: 0px;
}
/* the HPA music switch (js/hpa-music.js on the HPAD site) sits in the header now (data-hpa-sound). Only if it ever
   floats bottom-left again do the cards anchored there move up for it */
html:has(body > .hpa-snd) { --snd: 62px; }
.sheet-open body > .hpa-snd, .menu-open body > .hpa-snd { opacity: 0; visibility: hidden; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); color: var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; font-family: var(--sans); font-weight: 400; font-size: 1rem; line-height: 1.55; background: var(--paper); overflow-x: clip; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, figure, h1, h2, h3, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 300; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
::selection { background: var(--maroon); color: var(--paper); }
.wrap { width: 100%; max-width: 1640px; margin-inline: auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--maroon); color: var(--paper); padding: 10px 14px; }
.skip:focus { left: 8px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ------------------------------------------------------------------ type */
.ch-label { display: flex; align-items: baseline; gap: 14px; font-size: var(--fs-label); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--olive); line-height: 1.4; }
.ch-label span { color: var(--maroon); letter-spacing: .08em; }
.line-xl { font-size: var(--fs-xl); font-weight: 300; line-height: 1.18; letter-spacing: -.028em; max-width: 13ch; margin-top: 22px; }
.line-l { font-size: var(--fs-l); font-weight: 300; line-height: 1.18; letter-spacing: -.02em; max-width: 19ch; }

/* text that rises in, word by word (js wraps the words) */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(108%); transition: transform 1.15s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
.js [data-split].is-in .w > span { transform: none; }
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ buttons */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1; white-space: nowrap; border: 1px solid transparent; transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease); }
.pill-fill { background: var(--maroon); color: var(--paper); border-color: var(--maroon); }
.pill-fill:hover { background: var(--olive); border-color: var(--olive); }
.pill-paper { background: var(--paper); color: var(--maroon); border-color: var(--paper); }
.pill-paper:hover { border-color: var(--maroon); }
.pill-line { border-color: currentColor; }
.pill-line:hover { background: var(--olive-wash); }

/* ------------------------------------------------------------------ plates (museum labels) */
.plate { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; line-height: 1.3; }
.plate b { font-weight: 400; font-size: .9rem; color: var(--maroon); }
.plate span { font-size: .72rem; letter-spacing: .04em; color: var(--olive); }
.plate-on { margin: 0; background: var(--paper); padding: 9px 13px 10px; max-width: calc(100vw - 2 * var(--gut)); }

/* ------------------------------------------------------------------ frames: a picture that fills its frame and drifts a little */
.frame { position: relative; overflow: hidden; aspect-ratio: var(--ar, 1.6); background: var(--olive-wash); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.fx { position: absolute; inset: calc(var(--px, 7%) * -1) 0; }
.fx img { width: 100%; height: 100%; object-fit: cover; }
.frame-art { background: none; }
.frame-art img { object-fit: contain; }

/* ------------------------------------------------------------------ header */
.hd { position: fixed; inset: 0 0 auto 0; z-index: 60; transition: background-color .45s var(--ease), box-shadow .45s var(--ease); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: var(--hd-pad) var(--gut); padding-top: max(var(--hd-pad), env(safe-area-inset-top)); pointer-events: none; }
.hd > * { pointer-events: auto; }
.hd-mark { display: flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--paper); color: var(--maroon); opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s .6s; }
.hd-mark svg { width: 118px; height: 31px; }
.hd.show-mark .hd-mark, .menu-open .hd-mark { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.hd-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hd-menu { gap: 12px; padding: 0 18px; }
.hd-menu-lines { position: relative; width: 20px; height: 8px; }
.hd-menu-lines::before, .hd-menu-lines::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.hd-menu-lines::before { top: 0; }
.hd-menu-lines::after { top: 6.5px; }
.menu-open .hd-menu-lines::before { top: 3.25px; transform: rotate(45deg); }
.menu-open .hd-menu-lines::after { top: 3.25px; transform: rotate(-45deg); }
.hd[data-on="paper"] { background: rgba(253, 251, 247, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--rule); }
.hd[data-on="dark"] .hd-book { background: var(--paper); color: var(--maroon); border-color: var(--paper); }
.hd[data-on="dark"] .hd-book:hover { background: var(--olive); color: var(--paper); border-color: var(--olive); }
.menu-open .hd-book { visibility: hidden; }

/* ------------------------------------------------------------------ menu */
.menu { position: fixed; inset: 0; z-index: 55; background: var(--paper); color: var(--maroon); overflow-y: auto; overscroll-behavior: contain; clip-path: circle(0 at calc(100% - 60px) 36px); transition: clip-path .9s var(--ease-io); }
.menu[hidden] { display: block; visibility: hidden; }
.menu-open .menu { clip-path: circle(150% at calc(100% - 60px) 36px); }
.menu-in { min-height: 100%; display: grid; grid-template-columns: 1.6fr 1fr; gap: 6vw; align-items: end; padding: 120px var(--gut) max(40px, env(safe-area-inset-bottom)); }
.menu-nav { display: flex; flex-direction: column; gap: .1em; }
.menu-nav a { display: flex; align-items: baseline; gap: 18px; font-size: clamp(1.9rem, 1rem + 3.2vw, 4.2rem); font-weight: 300; letter-spacing: -.02em; line-height: 1.12; transition: color .3s; }
.menu-nav a:hover { color: var(--olive); }
.menu-n { font-size: .74rem; font-weight: 500; letter-spacing: .12em; color: var(--olive); min-width: 2.4em; }
.menu-side { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 8px; }
.menu-back { font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.menu-back:hover { color: var(--olive); }
.menu-side .pill { margin-top: 12px; }
.menu-contact { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--olive); }
.hero-img { position: absolute; inset: 0; }
.hero-img picture, .hero-img img { width: 100%; height: 100%; }
.hero-img img { object-fit: cover; object-position: 38% 55%; }
.js .hero-img { clip-path: inset(100% 0 0 0); }
.js .hero-img img { transform: scale(1.12); }
.hero-in .hero-img { clip-path: inset(0 0 0 0); transition: clip-path 1.6s var(--ease-io); }
.hero-in .hero-img img { transform: none; transition: transform 2.6s var(--ease); }
.hero-card { position: absolute; left: var(--gut); bottom: max(clamp(24px, 6vh, 64px), var(--snd)); width: min(500px, calc(100% - 2 * var(--gut))); background: var(--paper); padding: clamp(22px, 2.6vw, 38px); }
.js .hero-card { opacity: 0; transform: translateY(24px); }
.hero-in .hero-card { opacity: 1; transform: none; transition: opacity 1s var(--ease) .9s, transform 1.2s var(--ease) .9s; }
.hero-title { margin: 0; }
.hero-lockup { width: 100%; max-width: 360px; height: auto; aspect-ratio: 1122.56 / 295.37; color: var(--maroon); }
.hero-line { margin-top: clamp(16px, 2vw, 24px); font-size: var(--fs-m); font-weight: 300; line-height: 1.2; letter-spacing: -.01em; }
.hero-plate { position: absolute; right: var(--gut); bottom: clamp(24px, 6vh, 64px); }
.js .hero-plate { opacity: 0; }
.hero-in .hero-plate { opacity: 1; transition: opacity 1s var(--ease) 1.4s; }
.hero-cue { position: absolute; left: 50%; bottom: 22px; width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; }
.hero-cue span { width: 1px; height: 30px; background: var(--paper); transform-origin: top; animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ------------------------------------------------------------------ chapters */
.ch { position: relative; padding: clamp(96px, 12vw, 190px) 0; }
.ch-idea .seq { margin-top: clamp(48px, 7vw, 110px); }
.seq-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: clamp(28px, 4vw, 64px); }
.stilts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(36px, 5vw, 80px); margin-top: clamp(110px, 13vw, 200px); }
.stilts-line { grid-column: 1 / span 9; max-width: 22ch; }
.stilts-main { grid-column: 1 / span 8; grid-row: 2; }
.stilts-art { grid-column: 9 / span 4; grid-row: 2; align-self: end; }
.stilts-real { grid-column: 5 / span 6; grid-row: 3; }

/* homes: an editorial spread, the picture to the edge */
.ch-homes { padding-top: 0; }
.spread { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: var(--gap); align-items: end; padding-right: var(--gut); }
.frame-tall { aspect-ratio: auto; height: min(88vh, 62vw); }
.spread-img .plate { padding-left: var(--gut); }
.spread-words { padding-bottom: clamp(48px, 6vw, 96px); }
.spread-words .line-l { margin-top: 22px; max-width: 12ch; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; margin-top: clamp(64px, 9vw, 150px); }
.pair > :nth-child(2) { margin-top: clamp(40px, 9vw, 170px); }

/* clusters: full bleed with a card */
.ch-clusters { padding-top: 0; }
.bleed { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--olive); }
.bleed-img { position: absolute; inset: 0; overflow: hidden; }
.bleed-img .fx { --px: 9%; }
.bleed-card { position: absolute; left: var(--gut); bottom: max(clamp(24px, 6vh, 64px), var(--snd)); width: min(620px, calc(100% - 2 * var(--gut))); background: var(--paper); padding: clamp(22px, 2.6vw, 38px); }
.bleed-card .line-l { margin-top: 18px; font-size: clamp(1.6rem, 1rem + 2vw, 3rem); }
.bleed-plate { position: absolute; right: var(--gut); bottom: clamp(24px, 6vh, 64px); }
.pair-step { padding-inline: var(--gut); }

/* ------------------------------------------------------------------ places: an accordion of tall panels on a laptop, a swipe row on a phone */
.places { display: flex; gap: 8px; height: min(78vh, 780px); min-height: 520px; margin: clamp(48px, 6vw, 96px) var(--gut) 0; }
.place { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; background: var(--olive); transition: flex-grow 1s var(--ease); }
.place.is-open { flex-grow: 5.2; }
.place-body, .place-img { position: absolute; inset: 0; }
.place-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.4s var(--ease); }
.place.is-open .place-img img { transform: none; }
.place-tab { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 20px 18px; color: var(--paper); text-align: left; background: linear-gradient(180deg, rgba(67, 15, 1, .08), rgba(67, 15, 1, .62)); transition: opacity .6s var(--ease); }
.place.is-open .place-tab { opacity: 0; pointer-events: none; }
.place-n { font-size: .72rem; font-weight: 500; letter-spacing: .12em; }
.place-tab-name { writing-mode: vertical-rl; transform: rotate(180deg); font-size: clamp(1.1rem, .8rem + .7vw, 1.45rem); font-weight: 300; letter-spacing: .01em; line-height: 1.1; white-space: nowrap; }
.place-words { position: absolute; left: 0; bottom: 0; z-index: 1; width: min(440px, 100%); background: var(--paper); padding: 22px 26px 20px; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.place.is-open .place-words { opacity: 1; transform: none; transition-delay: .45s; }
.place-words h3 { font-size: clamp(1.4rem, 1rem + 1.2vw, 2.2rem); font-weight: 300; line-height: 1.18; letter-spacing: -.015em; }
.place-words p { margin-top: 8px; color: var(--ink-soft); }
.place-words .plate { margin-top: 12px; }
.note { margin-top: 22px; font-size: .74rem; color: var(--olive); }

/* ------------------------------------------------------------------ journal: photographs hung on a maroon wall */
.ch-journal { background: var(--maroon); color: var(--paper); padding: 0; }
.ch-journal .ch-label { color: var(--paper-soft); }
.ch-journal .ch-label span { color: var(--paper); }
.ch-journal .plate b { color: var(--paper); }
.ch-journal .plate span { color: var(--paper-soft); }
.journal { position: relative; overflow: hidden; }
.journal-track { padding: clamp(110px, 12vw, 180px) 0 clamp(64px, 8vw, 120px); }
.wall { display: flex; flex-direction: column; gap: 22px; margin-top: clamp(72px, 9vw, 130px); }
.wall-intro { margin-top: 0; padding-inline: var(--gut); }
.wall-intro .line-xl { font-size: clamp(2.5rem, 1rem + 4.6vw, 6.4rem); }
.wall-sub { margin-top: 22px; color: var(--paper-soft); max-width: 30ch; }
.wall-head { display: grid; grid-template-columns: 1fr; row-gap: 8px; max-width: 1100px; padding-inline: var(--gut); }
.wall-month { font-size: clamp(2rem, 1rem + 2.6vw, 3.6rem); font-weight: 300; letter-spacing: -.02em; line-height: 1.18; }
.wall-title { font-size: clamp(1.1rem, .9rem + .6vw, 1.5rem); font-weight: 400; line-height: 1.2; }
.wall-line { color: var(--paper-soft); font-size: .95rem; margin-top: 4px; }
.wall-pics { display: flex; align-items: flex-start; gap: clamp(14px, 1.8vw, 32px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); padding: 0 var(--gut) 6px; scrollbar-width: none; }
.wall-pics::-webkit-scrollbar { display: none; }
.pic { flex: 0 0 auto; margin: 0; scroll-snap-align: start; }
.pic img { height: var(--h); width: auto; max-width: none; object-fit: cover; }
.pic .plate { max-width: 70vw; }
.pic-l, .pic-m { --h: min(48vw, 420px); }
.pic-p { --h: min(72vw, 560px); }

/* on a laptop with motion: one long wall, walked sideways while the page is held */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .gsap .journal-track { display: flex; align-items: center; gap: clamp(64px, 6vw, 120px); height: 100vh; height: 100svh; min-height: 620px; padding: 80px var(--gut) 40px; width: max-content; will-change: transform; }
  .gsap .wall { flex: 0 0 auto; justify-content: center; gap: clamp(22px, 3.4vh, 40px); margin-top: 0; }
  .gsap .wall-intro { width: min(560px, 36vw); padding-inline: 0; }
  .gsap .wall-head { grid-template-columns: auto 1fr; column-gap: 28px; align-items: baseline; padding-inline: 0; }
  .gsap .wall-month { grid-row: span 2; line-height: 1; }
  .gsap .wall-pics { overflow: visible; padding: 0; align-items: flex-end; }
  .gsap .pic-l { --h: min(46vh, 30vw); }
  .gsap .pic-m { --h: min(32vh, 21vw); }
  .gsap .pic-p { --h: min(46vh, 30vw); }
}

/* ------------------------------------------------------------------ footprints of dreams */
.ch-plan { padding: 0; }
.plan { position: relative; height: 100vh; height: 100svh; min-height: 600px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 92px var(--gut) 28px; overflow: hidden; }
.plan-words { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 28px; row-gap: 8px; }
.plan-words .line-l { margin: 0; max-width: none; font-size: clamp(1.6rem, 1rem + 1.4vw, 2.6rem); }
.plan-key { position: absolute; right: var(--gut); bottom: 28px; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.plan-legend { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.plan-legend li { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.pt-k { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--maroon); color: var(--paper); font-size: .68rem; font-weight: 500; }
.plan-art { position: relative; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.plan-svg { width: 100%; height: 100%; overflow: visible; }
.plan-ink path { fill: none; stroke: var(--maroon); stroke-width: .55; stroke-linecap: round; stroke-linejoin: round; }
.plan-amen path { fill: none; stroke: var(--olive); stroke-width: .3; }
.plan-bound path { fill: none; stroke: var(--maroon); stroke-width: 1.3; stroke-linejoin: round; }
.pt circle { fill: var(--maroon); stroke: var(--paper); stroke-width: 1.5; }
.pt text { fill: var(--paper); font-family: var(--sans); font-size: 10px; font-weight: 500; }
.plan-north circle { fill: none; stroke: var(--maroon); stroke-width: .8; }
.plan-north path { fill: var(--maroon); }
.plan-north text { fill: var(--maroon); font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.plan-plate { margin: 0; text-align: right; }

/* ------------------------------------------------------------------ visit */
.ch-visit { padding: 0; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: var(--olive); }
.visit-img { position: absolute; inset: 0; overflow: hidden; }
.visit-img .fx { --px: 8%; }
.visit-card { position: absolute; right: var(--gut); bottom: max(clamp(24px, 6vh, 64px), var(--snd)); width: min(500px, calc(100% - 2 * var(--gut))); background: var(--paper); padding: clamp(24px, 3vw, 44px); }
.visit-card .line-l { margin-top: 18px; }
.visit-line { margin-top: 10px; color: var(--ink-soft); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.visit-contact { display: grid; gap: 5px; margin-top: 20px; font-size: .92rem; }
.visit-contact li { display: flex; gap: 10px; align-items: baseline; }
.who { display: inline-block; min-width: 3.4em; color: var(--ink-soft); }
.visit-contact a { border-bottom: 1px solid var(--rule); }
.visit-contact a:hover { border-color: currentColor; }
.visit-where { margin-top: 6px; font-size: .78rem; letter-spacing: .04em; color: var(--olive); }
.visit-plate { position: absolute; left: var(--gut); bottom: max(clamp(24px, 6vh, 64px), var(--snd)); }

/* ------------------------------------------------------------------ footer */
.ft { background: var(--paper); color: var(--maroon); }
.ft-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding-top: clamp(80px, 9vw, 140px); }
.ft-lockup { width: clamp(220px, 24vw, 340px); height: auto; aspect-ratio: 1122.56 / 295.37; color: var(--maroon); }
.ft-line { margin-top: 18px; font-size: var(--fs-m); font-weight: 300; }
.ft-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ft-nav a, .ft-nav button { font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.ft-nav a:hover, .ft-nav button:hover { color: var(--olive); }
.ft-family { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px 40px; margin-top: clamp(56px, 7vw, 100px); padding-top: 28px; border-top: 1px solid var(--rule); }
.ft-family-label { font-size: var(--fs-label); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--olive); }
.ft-marks { display: flex; align-items: center; flex-wrap: wrap; gap: 18px clamp(22px, 3vw, 44px); color: var(--olive); }
.ft-marks a, .mk-wrap { display: grid; place-items: center; min-height: 44px; transition: color .3s; }
.ft-marks a:hover { color: var(--maroon); }
.mk { height: 24px; }
.mk-hpad, .mk-hpar, .mk-hpac { width: 52px; height: 24px; }
.mk-mf { width: 46px; height: 28px; }
.mk-zen { width: 300px; height: 18px; }
.ft-small { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 22px; font-size: .74rem; color: var(--olive); }
/* Karan, 23 Oct 2026: the very last line of every page, in the footer's label type, quieter than the small print */
.ft-credit { padding-top: 16px; padding-bottom: calc(max(28px, env(safe-area-inset-bottom)) + var(--snd)); font-size: var(--fs-label); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5; color: var(--olive); opacity: .7; }

/* ------------------------------------------------------------------ book a viewing */
.sheet { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(67, 15, 1, .38); opacity: 0; transition: opacity .5s var(--ease); }
.sheet-panel { position: relative; width: min(480px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); color: var(--maroon); padding: 22px clamp(22px, 3vw, 40px) max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 20px; transform: translateX(100%); transition: transform .7s var(--ease); }
.sheet.is-open .sheet-scrim { opacity: 1; }
.sheet.is-open .sheet-panel { transform: none; }
.sheet-top { display: flex; justify-content: space-between; align-items: center; }
.sheet-device { width: 24px; height: 28px; color: var(--maroon); }
.sheet-close { min-height: 44px; padding: 0 4px; font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.sheet-close:hover { color: var(--olive); }
.sheet-panel .line-l { margin-top: 18px; font-size: clamp(2rem, 1.4rem + 1.6vw, 3rem); }
.sheet-line { color: var(--ink-soft); }
.form { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: var(--fs-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--olive); }
.field i { font-style: normal; text-transform: none; letter-spacing: 0; }
.field input { font: inherit; font-size: 1.05rem; color: var(--maroon); background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 10px 0; min-height: 44px; width: 100%; }
.field input:focus { outline: none; border-bottom-color: var(--maroon); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.form-note { font-size: .78rem; color: var(--olive); }
.sheet-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule); font-size: .92rem; color: var(--ink-soft); }
.sheet-foot a { border-bottom: 1px solid var(--rule); }

/* ------------------------------------------------------------------ tablet and phone */
@media (max-width: 1023px) {
  .places { display: flex; height: auto; min-height: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); gap: 12px; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0 var(--gut) 8px; scrollbar-width: none; }
  .places::-webkit-scrollbar { display: none; }
  .place { flex: 0 0 min(82vw, 560px); background: none; scroll-snap-align: start; overflow: visible; }
  .place-tab { display: none; }
  .place-body { position: static; }
  .place-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--olive); }
  .place-img img { transform: none; }
  .place-words { position: static; width: auto; opacity: 1; transform: none; padding: 16px 0 0; background: none; }
  .note { margin-top: 18px; }

}

@media (max-width: 899px) {
  .hero-plate, .bleed-plate { bottom: auto; top: 76px; right: var(--gut); }
  .visit-plate { bottom: auto; top: 76px; left: var(--gut); }
  .seq-two, .pair { grid-template-columns: 1fr; }
  .pair > :nth-child(2) { margin-top: 0; }
  .pair { row-gap: 44px; }
  .stilts { grid-template-columns: 1fr; }
  .stilts-line, .stilts-main, .stilts-art, .stilts-real { grid-column: auto; grid-row: auto; }
  .stilts-art { width: 72%; justify-self: center; }
  .spread { grid-template-columns: 1fr; padding-right: 0; }
  .frame-tall { height: auto; aspect-ratio: 4 / 5; }
  .spread-words { padding: 36px var(--gut) 0; }
  .ft-in { flex-direction: column; align-items: flex-start; }
  .ft-nav { align-items: flex-start; }
}

@media (max-width: 699px) {
  :root { --hd-pad: 10px; --fs-label: .6875rem; }
  .pill { min-height: 42px; padding: 0 14px; font-size: .6875rem; letter-spacing: .12em; }
  .hd-book { font-size: .66rem; }   /* the one label that must stay narrow: four pills share a phone's header */
  .hd-mark { height: 42px; padding: 0 14px; }
  .hd-mark svg { width: 92px; height: 24px; }
  .hd-menu { width: 42px; padding: 0; }
  .hd-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu { clip-path: circle(0 at calc(100% - 37px) 31px); }
  .menu-open .menu { clip-path: circle(150% at calc(100% - 37px) 31px); }
  .menu-in { grid-template-columns: 1fr; gap: 40px; padding-top: 96px; align-items: start; }
  .menu-nav a { font-size: 1.85rem; gap: 14px; }

  .hero-img img { object-position: 50% 50%; }
  .hero-card { bottom: max(18px, var(--snd)); padding: 20px 20px 22px; }
  .hero-lockup { max-width: 250px; }
  .hero-cue { display: none; }

  .bleed-card { bottom: max(18px, var(--snd)); padding: 20px; }
  .visit-card { bottom: max(18px, var(--snd)); right: var(--gut); padding: 22px 20px; }
  .visit-actions .pill { flex: 1 1 auto; }


  .sheet { align-items: flex-end; }
  .sheet-panel { height: auto; max-height: 92svh; transform: translateY(100%); padding-top: 14px; }
  .sheet.is-open .sheet-panel { transform: none; }
  .form-actions .pill { flex: 1 1 auto; }

  .ft-small { flex-direction: column; }
  .mk-zen { width: 220px; height: 13px; }
}

/* the plan turned upright for any portrait screen narrower than a laptop (the script rotates the drawing to match) */
@media (max-width: 1023px) and (orientation: portrait) {
  .plan { grid-template-rows: auto minmax(0, 1fr) auto; padding: 76px var(--gut) calc(16px + var(--snd)); gap: 10px; }
  .plan-words { display: block; }
  .plan-words .line-l { font-size: clamp(1.7rem, 1rem + 2.4vw, 2.6rem); margin-top: 10px; max-width: 16ch; }
  .plan-key { position: static; align-items: stretch; gap: 10px; }
  .plan-legend { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 6px 12px; }
  .plan-legend li { font-size: clamp(.76rem, .6rem + .5vw, .95rem); gap: 7px; line-height: 1.25; }
  .pt-k { width: 18px; height: 18px; font-size: .6rem; }
  .plan-art { height: 100%; }
  .plan-ink path { stroke-width: .8; }
  .plan-bound path { stroke-width: 1.8; }
  .plan-plate { text-align: left; }
}

@media (max-width: 380px) {
  .hd-book { padding: 0 11px; letter-spacing: .08em; }
}

/* ------------------------------------------------------------------ less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .js .hero-img, .js .hero-card, .js .hero-plate { clip-path: none; opacity: 1; transform: none; }
  .js .hero-img img { transform: none; }
  .js [data-reveal], .js [data-split] .w > span { opacity: 1; transform: none; }
}

/* ================================================================== the Fable 5.2 pass (15 Nov 2026) */
/* pages hand over to each other where the browser can */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* the music switch: a round paper pill in the header, beside Book a viewing */
.hd-sound { width: 44px; min-width: 44px; padding: 0; overflow: hidden; }
.hd-sound .hpa-snd { width: 44px; min-width: 44px; height: 44px; padding: 0 0 15px; }
.menu-open .hd-sound { visibility: hidden; }
@media (max-width: 699px) {
  .hd-sound, .hd-sound .hpa-snd { width: 42px; min-width: 42px; }
  .hd-sound .hpa-snd { height: 42px; padding-bottom: 14px; }
}
/* small phones: the four header pills still fit side by side */
@media (max-width: 400px) {
  .hd { gap: 6px; }
  .hd-right { gap: 6px; }
  .hd-mark { padding: 0 10px; }
  .hd-book { padding: 0 10px; letter-spacing: .08em; }
}
@media (max-width: 349px) { .hd-mark { display: none; } }

/* the numbers and the email on the visit card are full-size links */
.visit-contact { gap: 0; }
.visit-contact li { align-items: center; }
.visit-contact a { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--rule); }
.visit-contact a:hover { text-decoration-color: currentColor; }

/* the A Note of Zen mark is drawn in hairlines: in the footer row they keep a readable weight at any size */
#m-zen path, #m-zen polygon, #m-zen rect { stroke: currentColor; stroke-width: .8px; vector-effect: non-scaling-stroke; }
