/* Instrument Sans and Instrument Serif (Google Fonts, Open Font License), hosted with the site */
@font-face { font-family: 'Instrument Sans'; src: url('../assets/fonts/instrument-sans.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; src: url('../assets/fonts/instrument-sans.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; src: url('../assets/fonts/instrument-sans.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; src: url('../assets/fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; src: url('../assets/fonts/instrument-serif.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* =====================================================================
   THE FOUNDRY · v3
   An endless wall of every piece (drag, scroll or use the keys), and a
   full-screen "premiere" for each one, lit in the colours of the work itself.
   Type: Instrument Serif (display) and Instrument Sans (interface).
   ===================================================================== */

:root {
  --bg: #0c0b0a;
  --ink: #f1ebe1;
  --mute: rgba(241, 235, 225, .58);
  --faint: rgba(241, 235, 225, .32);
  --line: rgba(241, 235, 225, .14);
  --glass: rgba(18, 16, 14, .62);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --out: cubic-bezier(.22, 1, .36, 1);          /* strong ease-out: things arriving */
  --io: cubic-bezier(.77, 0, .18, 1);           /* ease-in-out: things moving across the screen */
  --pad: clamp(16px, 2.2vw, 32px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
/* Film grain over everything: felt, not seen */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background: var(--grain); opacity: .07;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
.arr { display: inline-block; transition: transform .3s var(--out); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 18px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: 13px; letter-spacing: .02em;
  transition: background-color .25s, border-color .25s, transform .16s var(--out);
}
.pill:hover { border-color: var(--faint); }
.pill:hover .arr { transform: translateX(-3px); }
.pill:active { transform: scale(.97); }

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--pad); padding-top: max(var(--pad), env(safe-area-inset-top));
  pointer-events: none;
  transition: opacity .5s, transform .6s var(--out);
}
.top > * { pointer-events: auto; }
.top-exit {
  justify-self: start; display: inline-flex; gap: 10px; align-items: center;
  font-size: 13px; letter-spacing: .04em; text-decoration: none; color: var(--mute);
  transition: color .25s;
}
.top-exit:hover { color: var(--ink); }
.top-exit:hover .arr { transform: translateX(-3px); }
.top-mark {
  font: italic 400 clamp(24px, 2.3vw, 32px)/1 var(--serif); letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap;
}
.top-right { justify-self: end; display: flex; align-items: center; gap: 22px; }
/* Sound switch (assets/js/forge-sound.js), quiet like the Index link */
.snd {
  display: inline-flex; align-items: center; gap: 9px; position: relative;
  font-size: 13px; letter-spacing: .04em; color: var(--mute); padding: 8px 0;
  transition: color .25s;
}
.snd:hover, .snd[aria-pressed="true"] { color: var(--ink); }
/* thumb-sized hit areas for the small top-bar links, without moving them */
.snd { padding: 16px 15px; margin: -8px -15px; }
.top-exit, .top-mark { padding-block: 12px; margin-block: -12px; }
.snd-bars { display: inline-flex; align-items: center; gap: 2px; height: 12px; }
.snd-bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; }
.snd[aria-pressed="true"] .snd-bars i { animation: sndEq 1.3s ease-in-out infinite alternate; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(2) { animation-duration: .9s; animation-delay: -.3s; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(3) { animation-duration: 1.6s; animation-delay: -.7s; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(4) { animation-duration: 1.1s; animation-delay: -.5s; }
@keyframes sndEq { from { height: 3px; } to { height: 12px; } }
.snd.is-waiting .snd-bars { animation: sndWait 1.8s ease-in-out infinite; }
.snd.is-waiting .snd-bars i { animation-play-state: paused; }
@keyframes sndWait { 50% { opacity: .35; } }
.snd-hint {
  position: absolute; right: 0; top: calc(100% + 10px); padding: 9px 13px; border-radius: 10px; white-space: nowrap;
  background: var(--ink); color: var(--bg); font-size: 12px; letter-spacing: .02em;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .4s var(--out), transform .4s var(--out);
}
.snd.has-hint .snd-hint { opacity: 1; transform: none; }
@media (max-width: 760px) { .snd-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .top-right { gap: 16px; } }
@media (prefers-reduced-motion: reduce) { html:not(.motion-forced) .snd[aria-pressed="true"] .snd-bars i { animation: none; height: 8px; } }
.top-index {
  justify-self: end; display: inline-flex; align-items: flex-start; gap: 4px;
  font-size: 13px; letter-spacing: .04em; color: var(--mute); transition: color .25s;
  padding: 8px 0;
}
.top-index:hover, .top-index[aria-expanded="true"] { color: var(--ink); }
.top-index sup { font-size: 11px; color: var(--faint); }
.ti-close { display: none; }
.top-index[aria-expanded="true"] .ti-open { display: none; }
.top-index[aria-expanded="true"] .ti-close { display: inline; }
.top-index[aria-expanded="true"] sup { display: none; }
html.pm-open .top { opacity: 0; transform: translateY(-12px); pointer-events: none; }
html.pm-open .top > * { pointer-events: none; }

/* ---------------------------------------------------------------------
   The endless wall
   --------------------------------------------------------------------- */
.cv {
  position: fixed; inset: 0; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none;
  outline: none;
}
.cv::after {
  /* edges fall away into the dark, the centre stays lit */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 45%, rgba(12, 11, 10, .72) 100%),
    linear-gradient(var(--bg), transparent 16%, transparent 80%, var(--bg));
}
.cv-plane { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.fine .cv { cursor: none; }

.tile {
  position: absolute; left: 0; top: 0;
  display: block; text-decoration: none;
  will-change: transform;
  -webkit-user-drag: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tile-img {
  position: relative; display: block; width: 100%; height: 100%; overflow: hidden;
  border-radius: 2px; background: var(--tone, #1b1917);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .35), 0 18px 30px -18px rgba(0, 0, 0, .8);
  transition: filter .45s var(--out);
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s, transform .9s var(--out);
  -webkit-user-drag: none; pointer-events: none;
}
.tile img.is-loaded { opacity: 1; }

/* Poured in: while a picture travels, its frame is an empty mould. A line of molten metal rises inside it (a
   slow ease that never quite reaches the top, so a slow connection still looks alive), the metal running from
   white-hot at its surface down to the piece's own colour. When the picture lands, the mould fills, the piece
   shows glowing hot and cools to its true colours. Everything moves by transform and opacity only, on pseudo
   elements, so it costs the same on any computer. */
.tile-img::before, .tile-img::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.tile-img::before { z-index: 0; opacity: 0; transform: translateY(100%);
  background: linear-gradient(180deg, #fff3d6 0, #ffc65a 2px, #e8892a 6px, #9a3f14 22px, color-mix(in srgb, #5a2410 60%, var(--tone, #1b1917)) 60px, color-mix(in srgb, var(--tone, #1b1917) 45%, #0c0b0a) 55%); }
.tile-img::after { z-index: 2; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 232, 186, .9), rgba(255, 168, 70, .78) 45%, rgba(214, 92, 26, .7)); }
.tile img { position: relative; z-index: 1; }
.tile-img.is-pouring { background: #100f0d; box-shadow: inset 0 0 0 1px rgba(241, 235, 225, .08), 0 1px 1px rgba(0, 0, 0, .35), 0 18px 30px -18px rgba(0, 0, 0, .8); }
.tile-img.is-pouring::before { opacity: 1; transform: translateY(18%); }
.has-motion .tile-img.is-pouring::before { animation: tile-pour 6s cubic-bezier(.15, .7, .3, 1) both; }
@keyframes tile-pour { from { transform: translateY(100%); } to { transform: translateY(18%); } }
.tile-img.is-cast::before { opacity: 1; transform: translateY(0); transition: transform .35s var(--out); }
.tile-img.is-cast img.is-loaded { transition: opacity .25s .2s, transform .9s var(--out); }
.has-motion .tile-img.is-cast::after { animation: tile-cool 1.6s ease-out .3s both; }
@keyframes tile-cool { 0% { opacity: .85; } 100% { opacity: 0; } }
/* without motion: the mould shows half full and still, and the piece simply appears */
html:not(.has-motion) .tile-img.is-pouring::before { transform: translateY(45%); }
.tile-cap {
  position: absolute; left: 0; right: -40px; top: calc(100% + 12px);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .25s, transform .3s var(--out);
  pointer-events: none;
}
.tile-cap b { font: italic 400 17px/1.1 var(--serif); }
.tile-cap span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }

/* Arriving and leaving (filters, first load) */
.has-motion .tile { opacity: 0; scale: .86; transition: opacity .7s var(--out), scale 1s var(--out); }
.has-motion .tile.is-in { opacity: 1; scale: 1; }
.has-motion .tile.is-out { opacity: 0; scale: .92; transition-duration: .3s, .35s; transition-delay: 0s !important; }
html:not(.has-motion) .tile.is-out { opacity: 0; }

/* Hover: the piece warms up, the rest of the wall steps back */
@media (hover: hover) {
  .cv-plane.has-hover .tile:not(.is-hover) .tile-img { filter: brightness(.42) saturate(.6); }
  .tile.is-hover img { transform: scale(1.035); }
  .tile.is-hover .tile-cap { opacity: 1; transform: none; }
}
.cv.is-dragging .tile-cap { opacity: 0 !important; }
.cv.is-dragging .tile-img { filter: none !important; }
.tile.is-source { visibility: hidden; }

/* ---------------------------------------------------------------------
   Filter dock and hint
   --------------------------------------------------------------------- */
.dock {
  position: fixed; left: 50%; bottom: max(var(--pad), env(safe-area-inset-bottom)); z-index: 30;
  transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  max-width: calc(100vw - 2 * var(--pad)); overflow-x: auto; scrollbar-width: none;
  transition: opacity .5s, transform .6s var(--out);
}
.dock::-webkit-scrollbar { display: none; }
.dock a {
  position: relative; flex: none;
  display: inline-flex; align-items: flex-start; gap: 4px;
  padding: 10px 18px; border-radius: 99px;
  font-size: 13px; text-decoration: none; color: var(--mute); white-space: nowrap;
  transition: color .25s, background-color .3s, transform .16s var(--out);
}
.dock a:hover { color: var(--ink); }
.dock a:active { transform: scale(.97); }
.dock a sup { font-size: 11px; letter-spacing: .04em; opacity: .7; margin-top: -1px; }
.dock a[aria-current="true"] { background: var(--ink); color: var(--bg); }
html.pm-open .dock, html.ix-open .dock { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }

.hint {
  position: fixed; left: var(--pad); bottom: calc(max(var(--pad), env(safe-area-inset-bottom)) + 12px); z-index: 30;
  margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
  transition: opacity .8s;
}
.hint-ico {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--faint); position: relative;
}
.hint-ico::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px;
  border-radius: 50%; background: var(--ink);
}
.has-motion .hint-ico::after { animation: nudge 2.4s var(--io) infinite; }
@keyframes nudge {
  0%, 100% { transform: translate(-5px, 0); }
  50% { transform: translate(5px, 0); }
}
.hint.is-gone, html.pm-open .hint, html.ix-open .hint { opacity: 0; }
@media (max-width: 760px) { .hint { display: none; } }

/* ---------------------------------------------------------------------
   Opening title
   --------------------------------------------------------------------- */
.intro {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: none; place-content: center; text-align: center; gap: 18px;
}
html.is-intro .intro { display: grid; }
.intro-word {
  margin: 0; font: italic 400 clamp(64px, 11vw, 168px)/.9 var(--serif); letter-spacing: -.02em;
  overflow: hidden; padding: .06em .1em .12em;
}
.intro-word span { display: inline-block; transform: translateY(105%); }
.intro-sub {
  margin: 0; display: flex; justify-content: center; gap: 28px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--mute);
  opacity: 0;
}
html.is-intro.intro-go .intro-word span { transform: none; transition: transform 1.1s var(--out); transition-delay: calc(var(--i) * 45ms); }
html.is-intro.intro-go .intro-sub { opacity: 1; transition: opacity .8s .5s; }
html.is-intro.intro-lift .intro { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--io); }
html.is-intro.intro-lift .intro-word { transform: translateY(-30px); transition: transform 1s var(--io); }

/* ---------------------------------------------------------------------
   Premiere
   --------------------------------------------------------------------- */
.pm { position: fixed; inset: 0; z-index: 40; overflow: hidden; }
.pm[hidden] { display: none; }
.pm-bg { position: absolute; inset: 0; background: #050404; transition: opacity .7s var(--out); }
.pm-amb {
  position: absolute; inset: -14%;
  background: center / cover no-repeat;
  filter: blur(60px) saturate(1.7) brightness(.55);
  transform: scale(1.12);
  opacity: 0; transition: opacity 1.3s var(--out);
}
.pm-amb.is-on { opacity: 1; }
.pm-vig {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 62% 58% at 50% 46%, transparent 25%, rgba(5, 4, 4, .74) 100%),
    linear-gradient(rgba(5, 4, 4, .5), transparent 22%, transparent 64%, rgba(5, 4, 4, .82));
}

/* The giant outlined title behind the work */
.pm-titles { position: absolute; inset: 0; pointer-events: none; transition: opacity .45s; }
.pm-title {
  position: absolute; left: 0; right: 0; top: 46%;
  transform: translateY(-50%);
  margin: 0; text-align: center; white-space: nowrap;
  font: italic 400 200px/.9 var(--serif); letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .26);
  transition: opacity .6s;
}
.pm-title span { display: inline-block; }
.has-motion .pm-title span { transform: translateY(.35em); opacity: 0; transition: transform 1.2s var(--out), opacity .9s; transition-delay: calc(var(--i) * 32ms + 120ms); }
.has-motion .pm-title.is-on span { transform: none; opacity: 1; }
.pm-title.is-off { opacity: 0; }

/* The work */
.pm-stage { position: absolute; inset: 0; perspective: 1600px; touch-action: none; }
.pm-piece {
  position: absolute; transform-origin: 0 0;
  transition: transform .7s var(--out);
}
.pm-tilt {
  position: absolute; inset: 0; border-radius: 3px; overflow: hidden;
  background: var(--tone, #1b1917) center / cover no-repeat;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .45),
    0 12px 24px -8px rgba(0, 0, 0, .55),
    0 40px 70px -20px rgba(0, 0, 0, .7),
    0 90px 120px -40px rgba(0, 0, 0, .75);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  will-change: transform;
}
.pm-tilt img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.pm-tilt img.is-loaded { opacity: 1; }
.pm-gloss {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .16), transparent 46%);
  mix-blend-mode: soft-light;
}
/* Motion poster: a canvas over the still image, faded in once its first frame (identical to the still) is drawn */
.pm-motion { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s var(--out); pointer-events: none; }
.pm-motion.is-on { opacity: 1; }
button.pm-tag { font: inherit; font-size: 11.5px; color: var(--ink); background: rgba(255, 255, 255, .06); cursor: pointer; transition: background-color .25s; }
button.pm-tag:hover { background: rgba(255, 255, 255, .14); }
.pm-motion-btn::before { width: 7px; height: 8px; border-radius: 0; background: none; border-left: 2px solid currentColor; border-right: 2px solid currentColor; opacity: 1; }
.pm-motion-btn[aria-pressed="false"]::before { border: 0; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.pm-piece.is-entering .pm-tilt { clip-path: inset(0 0 0 100%); }
.pm-piece.is-entering.from-left .pm-tilt { clip-path: inset(0 100% 0 0); }
.pm-piece.is-entering.is-go .pm-tilt { clip-path: inset(0 0 0 0); transition: clip-path 1s var(--io); }
.pm-piece.is-leaving { transition: transform 1s var(--io), opacity 1s var(--io); opacity: 0; }
.fine .pm-stage { cursor: none; }

/* Interface */
.pm-top, .pm-info, .pm-nav, .pm-strip { position: absolute; z-index: 2; transition: opacity .45s, transform .6s var(--out); }
.pm-top {
  inset: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--pad); padding-top: max(var(--pad), env(safe-area-inset-top));
}
.pm-close { justify-self: start; }
.pm-room { margin: 0; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); text-align: center; }
.pm-count { justify-self: end; margin: 0; display: flex; align-items: baseline; gap: 6px; font-family: var(--serif); }
.pm-count b { font-weight: 400; font-size: clamp(34px, 3.4vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; }
.pm-count span { font-size: 16px; color: var(--mute); }

.pm-info {
  left: var(--pad); bottom: calc(max(var(--pad), env(safe-area-inset-bottom)) + 4px);
  width: min(30vw, 420px);
}
.pm-kicker { margin: 0 0 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.pm-name { margin: 0; font: italic 400 clamp(30px, 3vw, 46px)/1.02 var(--serif); letter-spacing: -.01em; }
.pm-note {
  margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--mute);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pm-note:empty { display: none; }
.pm-extra { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pm-extra:empty { display: none; }
.pm-tag {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 99px;
  font-size: 11.5px; letter-spacing: .04em; border: 1px solid var(--line); color: var(--mute);
}
.pm-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
a.pm-tag { color: var(--ink); text-decoration: none; background: rgba(255, 255, 255, .06); transition: background-color .25s; }
a.pm-tag::before { display: none; }
a.pm-tag:hover { background: rgba(255, 255, 255, .14); }
.has-motion .pm-swap { animation: swapIn .7s var(--out) both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } }

.pm-nav {
  right: var(--pad); bottom: calc(max(var(--pad), env(safe-area-inset-bottom)) + 4px);
  display: flex; gap: 8px;
}
.pm-nav button {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-size: 18px;
  transition: background-color .25s, color .25s, border-color .25s, transform .16s var(--out);
}
.pm-nav button:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pm-nav button:active { transform: scale(.95); }

.pm-strip {
  left: 50%; transform: translateX(-50%);
  bottom: calc(max(var(--pad), env(safe-area-inset-bottom)) + 8px);
  max-width: max(200px, calc(100vw - 2 * (min(30vw, 420px) + 2 * var(--pad)) - 40px));
  display: flex; gap: 6px; padding: 6px 4px 4px; overflow-x: auto; scrollbar-width: none;
  touch-action: pan-x;
}
.pm-strip::-webkit-scrollbar { display: none; }
.pm-strip:empty { display: none; }
.pm-strip button {
  flex: none; height: 46px; border-radius: 2px; overflow: hidden; position: relative;
  background: var(--tone, #222);
  opacity: .38; transition: opacity .3s, transform .3s var(--out);
}
.pm-strip button img { height: 100%; width: auto; }
.pm-strip button:hover { opacity: .75; }
.pm-strip button[aria-current="true"] { opacity: 1; transform: translateY(-4px); }
.pm-strip button[aria-current="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink);
}

.pm.is-zoom .pm-top, .pm.is-zoom .pm-info, .pm.is-zoom .pm-nav, .pm.is-zoom .pm-strip { opacity: 0; pointer-events: none; }
.pm.is-zoom .pm-titles { opacity: .3; }

/* Opening and closing */
.pm.is-arriving .pm-bg { opacity: 0; }
.pm.is-arriving .pm-top { opacity: 0; transform: translateY(-10px); }
.pm.is-arriving .pm-info, .pm.is-arriving .pm-nav, .pm.is-arriving .pm-strip { opacity: 0; }
.pm.is-arriving .pm-info { transform: translateY(14px); }
.pm.is-arriving .pm-strip { transform: translate(-50%, 14px); }
.pm.is-leaving .pm-bg { opacity: 0; transition-duration: .6s; }
.pm.is-leaving .pm-top, .pm.is-leaving .pm-info, .pm.is-leaving .pm-nav, .pm.is-leaving .pm-strip, .pm.is-leaving .pm-titles { opacity: 0; transition-duration: .25s; }
.pm.is-fading { opacity: 0; transition: opacity .45s; }

/* ---------------------------------------------------------------------
   Index
   --------------------------------------------------------------------- */
.ix { position: fixed; inset: 0; z-index: 25; background: var(--bg); }
.ix[hidden] { display: none; }
.has-motion .ix { clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--io); }
.has-motion .ix.is-open { clip-path: inset(0 0 0 0); }
.ix-scroll {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--pad) * 2 + 60px) var(--pad) var(--pad);
}
.ix-head {
  display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 24px; align-items: end;
  padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 36px;
}
.ix-eyebrow { margin: 0; font: italic 400 clamp(56px, 8vw, 120px)/.85 var(--serif); letter-spacing: -.02em; }
.ix-lede { margin: 0; color: var(--mute); font-size: 15px; }
.ix-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.ix-room h3 {
  margin: 0 0 18px; display: flex; align-items: baseline; gap: 10px;
  font: 500 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--mute);
}
.ix-room h3 a { text-decoration: none; }
.ix-room h3 a:hover { color: var(--ink); }
.ix-room h3 sup { font-size: 11px; color: var(--faint); }
.ix-room ul { list-style: none; margin: 0; padding: 0; }
.ix-room li { border-top: 1px solid var(--line); }
.ix-room li a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 0 13px; text-decoration: none;
}
.ix-name { font: italic 400 clamp(24px, 2.2vw, 34px)/1.05 var(--serif); transition: transform .4s var(--out), color .3s; }
.ix-meta { font-size: 11px; letter-spacing: .1em; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .ix-cols:hover .ix-name { color: var(--faint); }
  .ix-cols .ix-room li a:hover .ix-name { color: var(--ink); transform: translateX(8px); }
}
.has-motion .ix-room li { opacity: 0; transform: translateY(18px); }
.has-motion .ix.is-open .ix-room li { opacity: 1; transform: none; transition: opacity .6s var(--out), transform .8s var(--out); transition-delay: calc(var(--i) * 28ms + 260ms); }
.ix-foot {
  margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line);
  display: grid; gap: 14px; font-size: 12px; color: var(--faint); max-width: 860px;
}
.ix-foot p { margin: 0; }
.ix-foot p:last-child { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.ix-foot a { color: var(--mute); }
.ix-foot a:hover { color: var(--ink); }
.ix-peek {
  position: fixed; left: 0; top: 0; z-index: 3; pointer-events: none;
  width: 220px; opacity: 0; transition: opacity .3s;
}
.ix-peek img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.ix-peek.is-on { opacity: 1; }
@media (hover: none) { .ix-peek { display: none; } }

/* ---------------------------------------------------------------------
   Cursor (fine pointers only)
   --------------------------------------------------------------------- */
.cur { position: fixed; left: 0; top: 0; z-index: 65; pointer-events: none; display: none; }
.fine .cur { display: block; }
.cur-ring {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; border: 1px solid rgba(241, 235, 225, .5);
  transform: scale(.14); background: var(--ink);
  transition: transform .45s var(--out), background-color .3s, border-color .3s, opacity .3s;
}
.cur-label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transition: opacity .25s;
}
.cur.is-drag .cur-ring { transform: scale(1); background: transparent; }
.cur.is-drag .cur-label { opacity: 1; color: var(--ink); }
.cur.is-grab .cur-ring { transform: scale(.7); background: transparent; }
.cur.is-grab .cur-label { opacity: 0; }
.cur.is-view .cur-ring, .cur.is-zoom .cur-ring { transform: scale(1.3); background: var(--ink); border-color: var(--ink); }
.cur.is-view .cur-label, .cur.is-zoom .cur-label { opacity: 1; color: var(--bg); }
.cur.is-off { opacity: 0; }

/* ---------------------------------------------------------------------
   No JavaScript
   --------------------------------------------------------------------- */
.nojs { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; color: var(--mute); }
.nojs-word { margin: 0 0 12px; font: italic 400 clamp(56px, 10vw, 120px)/.9 var(--serif); color: var(--ink); }
html:not(.js) .dock, html:not(.js) .hint, html:not(.js) .top-index { display: none; }

/* ---------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ix-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .top { grid-template-columns: auto 1fr auto; gap: 12px; }
  /* the words stay for screen readers; only the arrow shows. 44px is the smallest comfortable tap area. */
  .top-exit span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top-exit { min-width: 44px; min-height: 44px; margin: -8px 0; } /* the margin keeps the header the height it was */
  .top-exit .arr { font-size: 18px; }
  .top-mark { justify-self: center; }
  .dock a { padding: 9px 14px; font-size: 12.5px; }

  .pm-top { grid-template-columns: auto 1fr auto; gap: 12px; }
  .pm-close span:last-child { display: none; }
  .pm-close { width: 40px; padding: 0; justify-content: center; }
  .pm-room { font-size: 11px; letter-spacing: .18em; }
  .pm-count b { font-size: 30px; }
  .pm-count span { font-size: 13px; }
  .pm-info { left: 16px; right: 16px; width: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 76px); }
  .pm-name { font-size: 28px; }
  .pm-note { display: none; }
  .pm-extra { margin-top: 10px; }
  .pm-strip { left: 16px; right: 128px; transform: none; max-width: none; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 2px); }
  .pm.is-arriving .pm-strip { transform: translateY(14px); }
  .pm-strip button { height: 40px; }
  .pm-nav { right: 16px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 2px); }
  .pm-nav button { width: 48px; height: 48px; }

  .ix-head { grid-template-columns: 1fr; }
  .ix-cols { grid-template-columns: 1fr; }
}

/* Reduced motion: everything still works, nothing travels */
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-forced) .pm-piece, html:not(.motion-forced) .pm-tilt, html:not(.motion-forced) .pm-amb, html:not(.motion-forced) .tile img { transition-duration: .01ms !important; }
  html:not(.motion-forced) .pm-piece.is-entering .pm-tilt { clip-path: none !important; }
}

/* "Skip to the posters": the first stop for keyboard users, out of sight until it has focus */
.skip { position: fixed; top: 10px; left: 10px; z-index: 300; padding: 12px 18px; border-radius: 999px; background: #FFC247; color: #0A0908;
  font: 600 15px/1 var(--sans); text-decoration: none; transform: translateY(-160%); transition: transform .3s ease; }
.skip:focus, .skip:focus-visible { transform: none; }
