/* ────────────────────────────────────────────────────────────────
   Studio Tessellate — Field Studies
   White cube: the artworks are the only colour on the page.
   ──────────────────────────────────────────────────────────────── */

:root {
  --wall: #FAFAF8;
  --ink: #101014;
  --ink-soft: #4A4A52;
  --plinth: #C8C8C4;
  --plinth-deep: #B4B4B0;
  --hairline: rgba(16, 16, 20, 0.14);
  --hairline-soft: rgba(16, 16, 20, 0.08);
  --paper: #FFFFFF;
  --frame-wood: #17171B;
  --serif: "Libre Caslon Text", "Georgia", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --ease-settle: cubic-bezier(0.22, 0.61, 0.2, 1);
  --measure: 58ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--wall); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.01em; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ─── Top bar ──────────────────────────────────────────────────── */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(250, 250, 248, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-soft);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.topbar nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }

.topbar nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease-settle);
}
.topbar nav a:hover { color: var(--ink); }

/* ─── Hero: the entrance wall ──────────────────────────────────── */

.hero {
  min-height: 96vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(7rem, 14vh, 10rem) clamp(1.25rem, 6vw, 6rem) clamp(4rem, 8vh, 6rem);
  max-width: 74rem;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 10.5vw, 8.25rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 1.1rem 0 1.4rem;
}
.hero h1 em { font-style: italic; }

.dates { color: var(--ink-soft); margin-bottom: 2.6rem; }

.wall-text {
  max-width: var(--measure);
  display: grid;
  gap: 1rem;
  font-size: 1.125rem;
  line-height: 1.7;
}
.wall-text em { font-style: italic; font-family: var(--serif); font-size: 0.98em; }

.enter {
  margin-top: 3rem;
  align-self: flex-start;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.35rem;
  transition: opacity 0.25s var(--ease-settle);
}
.enter:hover { opacity: 0.6; }

/* load choreography */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.9s var(--ease-settle) forwards;
  }
  .r1 { animation-delay: 0.05s; }
  .r2 { animation-delay: 0.16s; }
  .r3 { animation-delay: 0.30s; }
  .r4 { animation-delay: 0.44s; }
  .r5 { animation-delay: 0.60s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ─── Rooms ────────────────────────────────────────────────────── */

.room {
  border-top: 1px solid var(--hairline-soft);
  padding: clamp(4rem, 9vh, 7rem) clamp(1.25rem, 4vw, 3rem) clamp(5rem, 11vh, 8.5rem);
  position: relative;
}

.room-head {
  max-width: 74rem;
  margin: 0 auto clamp(2.5rem, 6vh, 4rem);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.room-count { color: var(--plinth-deep); }

.room-inner {
  max-width: 74rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.room-alt .room-inner .artwork { order: 2; }
.room-alt .room-inner .label-col { order: 1; }

/* ─── The frame: gallery shadow craft ──────────────────────────── */

.artwork {
  position: relative;
  justify-self: center;
  width: min(100%, 560px);
}

/* soft light from the ceiling track */
.artwork::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12%;
  width: 130%;
  height: 130%;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse 55% 42% at 50% 12%,
      rgba(255, 253, 246, 0.9),
      rgba(255, 253, 246, 0.32) 45%,
      rgba(255, 253, 246, 0) 72%);
}

.frame {
  position: relative;
  background: var(--paper);                    /* the mat */
  border: 11px solid var(--frame-wood);
  padding: clamp(16px, 3.2vw, 34px);
  box-shadow:
    0 1px 2px rgba(16, 16, 20, 0.12),
    0 10px 22px -8px rgba(16, 16, 20, 0.20),
    0 34px 58px -26px rgba(16, 16, 20, 0.28);
}

.print {
  position: relative;
  aspect-ratio: var(--ar, 4 / 5);
  background: #FCFBF7;                          /* the sheet before ink */
}

/* mat bevel casts onto the sheet */
.print::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 1px 3px rgba(16, 16, 20, 0.14),
    inset 0 0 1px rgba(16, 16, 20, 0.22);
}

.print canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* the hang: the frame settles onto the wall when its room is first seen */
@media (prefers-reduced-motion: no-preference) {
  .artwork .frame {
    transform: translateY(-9px);
    transition: transform 1.5s cubic-bezier(0.18, 0.72, 0.12, 1);
  }
  .room.seen .artwork .frame { transform: none; }
}

/* pencil inscription on the mat — graphite under the image */
.pencil {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(9px, 1.6vw, 14px);
  color: #85857F;
  user-select: none;
}
.pencil-ed {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pencil-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nojs {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 2rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* raking light: sweeps the glass once per approach */
.glass {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.glass::before {
  content: "";
  position: absolute;
  top: -25%;
  bottom: -25%;
  left: 0;
  width: 42%;
  transform: skewX(-16deg) translateX(-160%);
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.32) 45%,
      rgba(255, 255, 255, 0.06) 75%,
      rgba(255, 255, 255, 0) 100%);
}
.artwork.sweep .glass::before {
  animation: rake 1.15s var(--ease-settle);
}
@keyframes rake {
  from { transform: skewX(-16deg) translateX(-160%); }
  to   { transform: skewX(-16deg) translateX(420%); }
}

/* ─── Label column ─────────────────────────────────────────────── */

.label-col {
  display: grid;
  gap: 1.6rem;
  max-width: 26.5rem;
}

.statement {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
}

.placard {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow:
    0 1px 0 rgba(16, 16, 20, 0.04),
    0 10px 24px -18px rgba(16, 16, 20, 0.35);
}

.p-artist {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.p-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0.3rem 0 0.8rem;
}
.p-title cite { font-style: italic; }

.p-media {
  font-size: 0.84375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.p-edition {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--hairline-soft);
  color: var(--ink);
}
/* the edition number is a button: click copies "Title #seed" */
.seed {
  font: inherit;
  font-weight: 500;
  color: inherit;
  background: none;
  border: none;
  padding: 0 0 1px;
  cursor: copy;
  border-bottom: 1px dashed rgba(16, 16, 20, 0.38);
  transition: border-color 0.25s var(--ease-settle);
}
.seed:hover { border-bottom-color: var(--ink); }

.copy-note {
  margin-left: 0.6rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.regen {
  margin-top: 1rem;
  width: 100%;
  font: 600 0.8125rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: background 0.25s var(--ease-settle), color 0.25s var(--ease-settle);
}
.regen:hover { background: var(--ink); color: var(--wall); }
.regen-glyph { display: inline-block; margin-right: 0.4rem; }

.algo summary {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  cursor: pointer;
  width: fit-content;
  list-style: none;
}
.algo summary::-webkit-details-marker { display: none; }
.algo summary::before { content: "+ "; }
.algo[open] summary::before { content: "\2212 "; }
.algo summary:hover { color: var(--ink); }
.algo[open] summary { margin-bottom: 0.7rem; }

.algo pre {
  background: #F3F3F0;
  border: 1px solid var(--hairline-soft);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
.algo code {
  font-family: var(--mono);
  font-size: 0.71875rem;
  line-height: 1.65;
  color: var(--ink);
}

/* placard reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .label-col > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease-settle), transform 0.7s var(--ease-settle);
  }
  .room.seen .label-col > * { opacity: 1; transform: none; }
  .room.seen .label-col > :nth-child(2) { transition-delay: 0.12s; }
  .room.seen .label-col > :nth-child(3) { transition-delay: 0.24s; }
}

/* ─── Artists ──────────────────────────────────────────────────── */

.artists {
  border-top: 1px solid var(--hairline-soft);
  padding: clamp(4.5rem, 10vh, 7.5rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 78rem;
  margin: 0 auto;
}

.artists h2,
.acquire h2,
.visit h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0.9rem 0 0;
  max-width: 24ch;
}
.artists h2 em, .acquire h2 em { font-style: italic; }

.bios {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
}

.bio h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.375rem;
}
.bio-meta { color: var(--ink-soft); margin: 0.35rem 0 0.9rem; }
.bio p { font-size: 0.9689rem; }
.bio cite { font-style: italic; }
.bio-works {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--hairline-soft);
  font-size: 0.84375rem !important;
  color: var(--ink-soft);
}

/* ─── Acquire ──────────────────────────────────────────────────── */

.acquire {
  border-top: 1px solid var(--hairline-soft);
  padding: clamp(4.5rem, 10vh, 7.5rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 78rem;
  margin: 0 auto;
}

.acquire-lede {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-top: 1.4rem;
}

.steps {
  margin: clamp(2.5rem, 6vh, 4rem) 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  list-style: none;
  counter-reset: step;
}

.steps li { counter-increment: step; }

.steps h3 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.steps h3::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-weight: 400;
  color: var(--plinth-deep);
  margin-right: 0.7rem;
}
.steps p { font-size: 0.9689rem; color: var(--ink-soft); }
.steps em { font-style: italic; }

/* pricing on a plinth */
.plinth {
  max-width: 46rem;
  filter: drop-shadow(0 22px 26px rgba(16, 16, 20, 0.10));
}

.plinth table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-bottom: none;
}

.plinth th, .plinth td {
  text-align: left;
  padding: 0.95rem 1.25rem;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--hairline-soft);
}
.plinth thead th {
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.plinth tbody th { font-family: var(--serif); font-weight: 400; font-size: 1.0625rem; }
.plinth td.mono { color: var(--ink); }
.plinth td:last-child, .plinth thead th:last-child { text-align: right; }

.plinth-base {
  height: 16px;
  background: linear-gradient(to bottom, #D6D6D2, var(--plinth));
  border: 1px solid var(--plinth-deep);
  margin: 0 -10px;
}

.acquire-notes {
  margin: 2.2rem 0 0;
  list-style: none;
  max-width: var(--measure);
  display: grid;
  gap: 0.45rem;
}
.acquire-notes li {
  font-size: 0.9063rem;
  color: var(--ink-soft);
  padding-left: 1.1rem;
  position: relative;
}
.acquire-notes li::before {
  content: "·";
  position: absolute;
  left: 0.15rem;
  color: var(--plinth-deep);
  font-weight: 700;
}

.acquire-cta {
  display: inline-block;
  margin-top: 2.4rem;
  font-family: var(--mono);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.3rem;
  transition: opacity 0.25s var(--ease-settle);
}
.acquire-cta:hover { opacity: 0.6; }

/* ─── Visit ────────────────────────────────────────────────────── */

.visit {
  border-top: 1px solid var(--hairline-soft);
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 3rem) clamp(5rem, 10vh, 7rem);
  max-width: 78rem;
  margin: 0 auto;
}

.visit-grid {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  max-width: 56rem;
}
.visit-grid p { font-size: 0.9689rem; }
.visit-hours { margin-bottom: 0.8rem; color: var(--ink); }
.visit-grid div:last-child p:last-child { color: var(--ink-soft); }

/* ─── Colophon ─────────────────────────────────────────────────── */

.colophon {
  border-top: 1px solid var(--hairline);
  padding: 2.4rem clamp(1.25rem, 4vw, 3rem) 2.8rem;
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
.colophon p {
  font-size: 0.84375rem;
  color: var(--ink-soft);
  max-width: 72ch;
  line-height: 1.7;
}
.colophon a { color: var(--ink-soft); }
.colophon a:hover { color: var(--ink); }
.credit { font-size: 0.78125rem; }

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .room-inner { gap: clamp(2rem, 5vw, 3.5rem); }
  .bios, .steps { gap: 1.75rem; }
}

@media (max-width: 800px) {
  .topbar nav a:first-child { display: none; }

  .room-inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .room-alt .room-inner .artwork { order: 1; }
  .room-alt .room-inner .label-col { order: 2; }

  .artwork { width: min(100%, 480px); }
  .label-col { max-width: 30rem; }

  .bios, .steps { grid-template-columns: minmax(0, 1fr); }
  .visit-grid { grid-template-columns: minmax(0, 1fr); }

  .hero { min-height: 88vh; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .topbar { padding: 0.8rem 1.25rem; }
  .topbar nav { gap: 0.9rem; }
  .topbar nav a { font-size: 0.75rem; letter-spacing: 0.05em; }
  .wordmark { letter-spacing: 0.14em; }
  .frame { border-width: 8px; }
  .plinth th, .plinth td { padding: 0.75rem 0.8rem; font-size: 0.84375rem; }
  .plinth tbody th { font-size: 0.9375rem; }
  .plinth-base { margin: 0 -6px; }
}

/* ─── Reduced motion ───────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .artwork.sweep .glass::before { animation: none; }
  .regen, .enter, .acquire-cta, .topbar nav a { transition: none; }
}
