@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  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;
}

/* Gallery white, black velvet for the pieces, and the Spinnerei's orange only where you act. */
:root {
  --paper: #f6f6f3;
  --ink: #000;
  --quiet: #5c5c58;
  --glass: #0c0c0c; /* the placeholder frames are rendered on exactly this black (tools/bake) */
  --line: #d9d9d4;
  --signal: #f29100;
  --edge: clamp(16px, 2.2vw, 32px);
  --gap: clamp(8px, 1vw, 14px);
  --last-col: 0.5;
  --step: clamp(3rem, 8vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html.is-detail { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 'Bricolage Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, dl, dd, ul, address { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: var(--edge); top: -4rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 5; }
.skip:focus { top: var(--edge); }

/* Display voice: the same family, drawn thin and narrow. */
h1, h2, .numeral, .foot-mail {
  font-weight: 300;
  font-stretch: 75%;
  letter-spacing: -0.03em;
  line-height: 0.88;
}

/* ---------- Page ---------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem var(--edge);
  font-size: 0.875rem;
}
.mark { font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.top nav { display: flex; gap: clamp(1rem, 2.4vw, 2.2rem); }
.top a, .back, .foot-legal a { padding-block: 0.35rem; }
.top nav a:hover, .back:hover, .foot-legal a:hover { box-shadow: 0 1px 0 var(--signal); }

.intro {
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--edge) clamp(2rem, 4vw, 3.5rem);
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.intro h1 { font-size: clamp(4rem, 13.5vw, 13.5rem); margin-left: -0.04em; }
/* The paragraph stands on the grid of the panes below: above the last column. */
.intro p { max-width: 34ch; font-size: clamp(1rem, 1.25vw, 1.2rem); margin-left: calc((100% + var(--gap)) * var(--last-col)); }

.panes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) var(--gap);
  padding-inline: var(--edge);
}
.pane { display: block; }
.pane:focus-visible { outline: none; }
.pane:focus-visible .glass { outline: 2px solid var(--signal); outline-offset: 3px; }

/* Every other pane hangs lower, so the black fields do not close up into a wall. */
@media (min-width: 801px) and (max-width: 1099px) {
  .panes li:nth-child(even) { margin-top: var(--step); }
}
@media (min-width: 1100px) {
  :root { --last-col: 0.6667; }
  .panes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panes li:nth-child(3n + 2) { margin-top: var(--step); }
}
.glass { display: block; aspect-ratio: 4 / 5; background: var(--glass); }
.glass img { display: block; width: 100%; height: 100%; object-fit: cover; }
.caption {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  padding-top: 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.35;
}
.caption .material { color: var(--quiet); }
.pane:hover .name, .pane:focus-visible .name { box-shadow: 0 1px 0 var(--signal); }
.pane .name { justify-self: start; font-weight: 500; }
.caption .price { font-variant-numeric: tabular-nums; }

.atelier {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--edge);
  padding: clamp(5rem, 12vw, 11rem) var(--edge) clamp(3rem, 6vw, 5rem);
}
.numeral { font-size: clamp(11rem, 38vw, 36rem); line-height: 0.72; margin-left: -0.05em; }
.atelier-text { display: grid; gap: 1.2rem; max-width: 40ch; padding-bottom: 0.4rem; }
.atelier-text h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
.atelier-text h2 + p { font-size: 1.125rem; line-height: 1.55; }
.atelier-text address { border-top: 1px solid var(--line); padding-top: 1rem; font-weight: 500; }
.numeral { color: var(--signal); }

.foot {
  border-top: 1px solid var(--line);
  margin-inline: var(--edge);
  padding-block: clamp(2rem, 5vw, 4rem) 1.5rem;
  display: grid;
  gap: 0.6rem;
}

.foot-mail { font-size: clamp(1.8rem, 5.5vw, 5.5rem); justify-self: start; overflow-wrap: anywhere; padding-bottom: 0.08em; box-shadow: 0 2px 0 var(--signal); }
.foot-mail:hover { box-shadow: 0 5px 0 var(--signal); }
.foot-legal { display: flex; justify-content: space-between; gap: 1rem; margin-top: clamp(2rem, 5vw, 4rem); font-size: 0.875rem; color: var(--quiet); }

/* ---------- Detail view ---------- */

.detail {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr);
  gap: var(--edge);
}
.detail[hidden] { display: none; }
.veil { position: fixed; inset: 0; background: var(--paper); }

/* The stage normally fills its slot; while it travels to or from a pane, app.js moves it freely. */
.slot { position: relative; min-height: 0; }
.stage {
  position: absolute;
  inset: 0;
  background: var(--glass);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.stage.flying { position: fixed; inset: auto; z-index: 1; }
.stage:active { cursor: grabbing; }
.stage:focus-visible { outline: 2px solid var(--signal); outline-offset: -6px; }
.stage img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.stage.settling img { transition: transform 0.35s ease; }

.info {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.1rem var(--edge) 1.5rem 0;
  overflow-y: auto;
}
.back { font-size: 0.875rem; margin-bottom: clamp(2rem, 9vh, 6rem); }
.back::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; border-left: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); margin-right: 0.6em; vertical-align: 0.1em; }
.nr { font-size: 0.875rem; color: var(--quiet); margin-bottom: 0.8rem; }
.info h2 { font-size: clamp(2.8rem, 5.2vw, 5.5rem); margin-left: -0.03em; }
.info .material { margin-top: 1rem; color: var(--quiet); }
.info .text { margin-top: 1.6rem; max-width: 36ch; }
.info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.5rem;
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 24rem;
  font-size: 0.875rem;
}
.info dt { color: var(--quiet); }
.info .price { margin-top: auto; padding-top: 2rem; font-size: 1.5rem; font-weight: 300; }
.button {
  margin-top: 1.2rem;
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
}
.button:hover { background: var(--signal); color: var(--ink); }

/* The invitation to touch sits on the black of the stage and leaves at the first touch. */
.hint {
  position: absolute;
  left: var(--edge);
  right: var(--edge);
  bottom: 1.1rem;
  font-size: 0.8125rem;
  color: #a9a9a4;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.detail.invite .hint { opacity: 1; }
.by-touch { display: none; }
@media (hover: none) {
  .by-mouse { display: none; }
  .by-touch { display: inline; }
}

/* ---------- Small screens ---------- */

@media (max-width: 800px) {
  .panes { grid-template-columns: 1fr; }
  .atelier { grid-template-columns: 1fr; }
  .intro p { margin-left: 0; }
  .detail { display: block; overflow-y: auto; }
  .slot { height: max(62svh, 20rem); } /* never so flat that the way out covers the piece */
  .stage { touch-action: pan-y; } /* a thumb on the photo must still scroll the page */
  .info { padding: 1.4rem var(--edge) 2.5rem; overflow: visible; }
  /* The way out stays in reach above the photo; price and button come before the long text. */
  .back { position: fixed; top: 0.75rem; left: 0.75rem; z-index: 2; margin: 0; padding: 0.7rem 1rem; border-radius: 999px; background: var(--paper); }
  .info .price { order: 1; margin-top: 0; padding-top: 1.4rem; }
  .button { order: 1; }
  .info .text, .info dl { order: 2; }
  .info .text { margin-top: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage.settling img, .hint { transition: none; }
}
