/* Sinopia - painter portfolio theme. Colours, fonts and sizes live in :root. Radius is 0 everywhere, on purpose. */
:root {
  /* light theme */
  --l-bg: #f1ede6; --l-ink: #141210; --l-muted: #6e6861; --l-line: #d6d0c6; --l-card: #e7e2d9; --l-accent: #d9441c;
  /* dark theme */
  --d-bg: #100f0e; --d-ink: #f1ede7; --d-muted: #8c8780; --d-line: #2a2725; --d-card: #181614; --d-accent: #ff6a3d;
  --f-head: "Satoshi", system-ui, sans-serif;
  --w-head: 500;
  --ls-head: -.045em;
  --f-body: "Satoshi", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;
  --pad: clamp(16px, 3vw, 40px);
  --max: 1680px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --glow: 0 0 1px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 0, 0, .35);
}
[data-theme="light"] { --bg: var(--l-bg); --ink: var(--l-ink); --muted: var(--l-muted); --line: var(--l-line); --card: var(--l-card); --accent: var(--l-accent); color-scheme: light; }
[data-theme="dark"] { --bg: var(--d-bg); --ink: var(--d-ink); --muted: var(--d-muted); --line: var(--d-line); --card: var(--d-card); --accent: var(--d-accent); color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, blockquote, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.label { font: 500 11px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h1 { font: var(--w-head) clamp(48px, 8.4vw, 132px)/.94 var(--f-head); letter-spacing: var(--ls-head); color: var(--ink); }
.h1--long { font-size: clamp(34px, 5.2vw, 80px); line-height: 1.02; max-width: 18ch; }
.h2 { font: var(--w-head) clamp(30px, 4.2vw, 62px)/1 var(--f-head); letter-spacing: var(--ls-head); }
.quote { font: var(--w-head) clamp(24px, 2.8vw, 42px)/1.14 var(--f-head); letter-spacing: -.02em; }
.frame { position: relative; overflow: hidden; background: var(--card); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* buttons and links */
.btn { display: inline-flex; align-items: center; gap: 14px; height: 48px; padding: 0 6px 0 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-weight: 500; font-size: 15px; cursor: pointer; transition: background .3s, color .3s; }
.btn i { position: relative; width: 36px; height: 36px; background: var(--accent); flex: none; overflow: hidden; }
.btn i::before, .btn i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border: solid #fff; border-width: 1.5px 1.5px 0 0; transform: translate(-65%, -35%) rotate(45deg) scale(.9); transform-origin: 50% 50%; transition: transform .45s var(--ease); }
.btn i::after { transform: translate(-260%, -35%) rotate(45deg) scale(.9); }
.btn:hover { background: transparent; color: var(--ink); }
.btn:hover i::before { transform: translate(180%, -35%) rotate(45deg) scale(.9); }
.btn:hover i::after { transform: translate(-65%, -35%) rotate(45deg) scale(.9); }
.link { position: relative; color: var(--ink); padding-bottom: 3px; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: background-size .45s var(--ease); }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* header */
.head { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 28px; height: 68px; padding-inline: var(--pad); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.head.is-scrolled { border-bottom-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 600 16px/1 var(--f-head); letter-spacing: -.02em; white-space: nowrap; }
.logo-mark { width: 11px; height: 16px; background: var(--accent); flex: none; }
.nav { margin-left: auto; display: flex; gap: 26px; font-size: 14px; }
.nav a { position: relative; color: var(--muted); padding: 6px 0; transition: color .25s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); }
.theme-btn { position: relative; width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; cursor: pointer; flex: none; transition: border-color .25s; }
.theme-btn:hover { border-color: var(--ink); }
.theme-btn span { position: absolute; inset: 9px; background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border: 1px solid var(--ink); transition: transform .5s var(--ease); }
[data-theme="light"] .theme-btn span { transform: rotate(180deg); }
.menu-btn { display: none; margin-left: auto; height: 34px; padding: 0 14px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.menu { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: space-between; padding: 100px var(--pad) 32px; background: var(--bg); }
.menu[hidden] { display: none; }
.menu-nav a { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.menu-nav a:last-child { border-bottom: 1px solid var(--line); }
.menu-t { font: var(--w-head) clamp(40px, 11vw, 72px)/1 var(--f-head); letter-spacing: var(--ls-head); }
.menu-nav a[aria-current] .menu-t { color: var(--accent); }
.menu-foot { display: flex; flex-direction: column; gap: 6px; }

/* hero: a mosaic of 2:3 paintings, lines of the grid between them, some cells two by two */
.hero { padding-top: clamp(104px, 13vw, 150px); }
.hero-top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k k" "t s"; align-items: end; gap: 18px 40px; padding-bottom: clamp(28px, 4vw, 48px); }
.hero-top > .label { grid-area: k; }
.hero-title { grid-area: t; font: var(--w-head) clamp(52px, 9.6vw, 156px)/.9 var(--f-head); letter-spacing: var(--ls-head); }
.hero-side { grid-area: s; display: grid; gap: 18px; justify-items: start; max-width: 330px; padding-bottom: .6vw; }
.hero-line { color: var(--muted); font-size: 17px; line-height: 1.45; }
/* until every painting is on, the page shows only its own background: no grid lines, no dark cells */
.mosaic { --cols: 8; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-flow: dense; gap: 1px; padding: 1px; background: transparent; }
.mosaic.is-lit { background: var(--line); }
.cell { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--bg); }
.cell.is-big { --big: 1; grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* desktop hover: a small painting grows to the size of a big one (2 x 2) and a little more, the grid makes room
   for it (main.js 6b animates every cell from where it was), its name is cut in from the bottom edge */
@media (hover: hover) and (min-width: 768px) {
  /* clip only what is far below (cells pushed out of the grid wait one empty row lower), so a hovered painting can grow over every edge */
  .mosaic { position: relative; align-content: start; clip-path: inset(-120px -120px -60px -120px); }
  .mosaic.is-growing .cell { aspect-ratio: auto; }
  .cell.is-grow { z-index: 3; transform: scale(1.045); box-shadow: 0 0 0 1px var(--bg), 0 24px 60px rgba(0, 0, 0, .35); }
  .cell.is-big { transition: transform .6s var(--ease), z-index 0s .6s; }
  .cell.is-big:hover { z-index: 3; transform: scale(1.045); transition: transform .6s var(--ease), z-index 0s; }
  .cell.is-grow .cell-cap { clip-path: inset(0); transition-delay: .25s; }
  .cell.is-grow .cell-cap::before { transform: scaleX(1); }
}
.cell-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 40px 12px 11px; color: #fff; text-shadow: var(--glow); background: linear-gradient(transparent, rgba(0, 0, 0, .55)); clip-path: inset(100% 0 0 0); transition: clip-path .45s var(--ease); }
.cell-cap b { font: 500 15px/1.2 var(--f-body); letter-spacing: -.01em; text-transform: none; }
.cell-cap::before { content: ""; position: absolute; left: 12px; right: 12px; top: 26px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease) .15s; }
.cell:hover .cell-cap::before, .cell:focus-visible .cell-cap::before { transform: scaleX(1); }
.cell-cap span { color: rgba(255, 255, 255, .8); }
.cell:hover .cell-cap, .cell:focus-visible .cell-cap { clip-path: inset(0); transition-delay: .1s; }
/* the neon flicker: a painting goes out like a tube losing power, the next one stutters on */
.cell img.is-off { animation: tube-off .34s steps(1, end) forwards; }
.cell img.is-on { animation: tube-on .9s linear both; }
@keyframes tube-off { 0% { opacity: 1; } 18% { opacity: .25; } 30% { opacity: .9; } 46% { opacity: .08; } 60%, 100% { opacity: 0; } }
@keyframes tube-on {
  0% { opacity: 0; } 8% { opacity: .85; filter: brightness(1.7); } 14% { opacity: .05; } 26% { opacity: 1; filter: brightness(1.4); }
  32% { opacity: .2; } 40% { opacity: .95; filter: brightness(1.25); } 47% { opacity: .55; } 60%, 100% { opacity: 1; filter: none; }
}
.js .mosaic:not(.is-lit) .cell img:not(.is-on) { opacity: 0; }

/* sections */
section + section { margin-top: clamp(80px, 11vw, 168px); }
.sec-head { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l a" "t a"; align-items: end; gap: 10px 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-head > .label { grid-area: l; }
.sec-head .h2 { grid-area: t; }
.sec-head .link { grid-area: a; }
.sec-head:not(:has(.h2)) { grid-template-areas: "l a"; }

/* now showing */
.now-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border: 1px solid var(--line); background: var(--card); }
.now-photo { aspect-ratio: 4 / 3; background: var(--line); }
.now-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: clamp(24px, 3.4vw, 52px); }
.now-text .h2 { margin-top: 6px; }
.now-venue { font-size: 20px; }
.now-desc { color: var(--muted); max-width: 38ch; margin-top: auto; padding-top: 18px; }
.now-dot { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.now-dot::before { content: ""; width: 8px; height: 8px; background: var(--accent); animation: blink 2.4s steps(1) infinite; }
@keyframes blink { 0%, 70% { opacity: 1; } 72% { opacity: .2; } 75% { opacity: 1; } 78% { opacity: .3; } 81% { opacity: 1; } }
a.now-card { transition: border-color .3s; }
a.now-card:hover { border-color: var(--ink); }
a.now-card .now-photo img { transition: transform 1.2s var(--ease); }
a.now-card:hover .now-photo img { transform: scale(1.03); }

/* strips: narrow vertical slices of each painting; hover opens one to its full 2:3 width and its title falls flat */
.strips { --sh: clamp(420px, 70vh, 740px); --open: min(calc(var(--sh) * 2 / 3), 62%); display: flex; height: var(--sh); gap: 1px; padding: 1px; background: var(--line); }
.strip { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; background: var(--bg); transition: flex .75s var(--ease); }
.strip img { position: absolute; top: 0; left: 50%; height: 100%; width: calc(var(--sh) * 2 / 3); max-width: none; object-fit: cover; transform: translateX(-50%); transition: filter .6s; filter: saturate(.75) brightness(.82); }
.strip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .5)); pointer-events: none; }
.strip-cap { position: absolute; left: 0; bottom: 0; z-index: 2; display: flex; align-items: baseline; gap: 12px; padding: 0 16px; height: 46px; line-height: 46px; white-space: nowrap; color: #fff; text-shadow: var(--glow); transform-origin: 0 100%; transform: rotate(-90deg) translateY(100%); transition: transform .8s cubic-bezier(.5, 1.6, .55, 1) .08s; }
.strip-cap b { font: 500 15px/inherit var(--f-body); }
.strip-cap .label { color: rgba(255, 255, 255, .78); }
@media (hover: hover) and (min-width: 768px) {
  .strips:hover .strip { flex: 1 1 0; }
  .strips .strip:hover, .strips .strip:focus-visible { flex: 0 0 var(--open); }
  .strip:hover img, .strip:focus-visible img { filter: none; }
  .strip:hover .strip-cap, .strip:focus-visible .strip-cap { transform: rotate(0) translateY(0); }
}
@media (min-width: 768px) {
  .strips .strip.is-open { flex: 0 0 var(--open); }
  .strip.is-open img { filter: none; }
  .strip.is-open .strip-cap { transform: rotate(0) translateY(0); }
}
.works-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; }
.hint-m { display: none; }

/* works grid (the small switch at the top of Works) */
.switch { display: inline-flex; border: 1px solid var(--line); }
.switch button { height: 34px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; transition: background .25s, color .25s; }
.switch button + button { border-left: 1px solid var(--line); }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.grid-works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.grid-works[hidden] { display: none; }
.gw { display: block; background: var(--bg); padding: 10px 10px 14px; }
.gw .frame { display: block; aspect-ratio: 2 / 3; }
.gw .frame img { transition: transform 1.2s var(--ease); }
.gw:hover .frame img { transform: scale(1.035); }
.gw-cap { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding-top: 10px; }
.gw-cap b { font-weight: 500; font-size: 15px; }

/* page heads */
.page-head { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: end; padding-top: clamp(118px, 14vw, 176px); padding-bottom: clamp(30px, 4vw, 56px); }
.page-head > .label { grid-column: 1 / -1; }
.page-head sup { vertical-align: top; margin-left: .3em; font-size: 13px; letter-spacing: .05em; }
.page-side { display: grid; gap: 18px; justify-items: start; max-width: 360px; }
.page-side p { color: var(--muted); }
.page-head .h1--long { grid-column: 1 / -1; }
.page-meta { grid-column: 1 / -1; }
.page-head + section { margin-top: 0; }

/* exhibitions rows: hovering a row lights its photo in the frame beside the list */
.shows-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 30%); gap: clamp(24px, 4vw, 64px); align-items: start; }
.rows { border-bottom: 1px solid var(--line); }
.row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr) 118px; gap: 20px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); cursor: default; transition: padding .45s var(--ease); }
.row::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--accent); transition: width .6s var(--ease); }
.row:hover::before, .row.is-lit::before { width: 100%; }
.row-title { font: var(--w-head) clamp(19px, 1.7vw, 26px)/1.15 var(--f-head); letter-spacing: -.02em; }
.row small { display: block; margin-top: 8px; font: 400 14px/1.45 var(--f-body); color: var(--muted); letter-spacing: 0; }
.row-venue small.label { font: 500 11px/1.4 var(--f-mono); letter-spacing: .08em; }
.row-tag { justify-self: end; padding: 4px 8px; border: 1px solid var(--line); }
.tag-now-showing { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.tag-upcoming { color: var(--ink); border-color: var(--ink); }
.row-thumb { display: none; }
.row.is-hidden { display: none; }
.shows-view { position: sticky; top: 96px; aspect-ratio: 4 / 5; }
.shows-view img.is-off { animation: tube-off .3s steps(1, end) forwards; }
.shows-view img.is-on { animation: tube-on .8s linear both; }
.now--page .now-card { background: transparent; }

/* statement */
.statement { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.statement-photo { aspect-ratio: 16 / 11; }
.statement-text { display: grid; gap: 24px; justify-items: start; }

/* cta */
.cta { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px clamp(24px, 5vw, 80px); align-items: end; padding-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }
.cta > .label { grid-column: 1 / -1; }
.cta .h1 { font-size: clamp(38px, 5.6vw, 88px); line-height: .98; }
.cta-side { display: grid; gap: 22px; justify-items: start; }
.cta-side p { color: var(--muted); max-width: 40ch; }

/* work page */
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); padding-top: clamp(96px, 10vw, 120px); align-items: start; }
.work-photo { aspect-ratio: 2 / 3; }
.work-info { position: sticky; top: 100px; display: grid; gap: 26px; justify-items: start; padding-top: clamp(0px, 4vw, 60px); }
.crumb a { color: var(--ink); }
.work-info .h1 { font-size: clamp(42px, 5.6vw, 92px); }
.facts { width: 100%; border-bottom: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.facts dd { font-size: 15px; }
.st-available::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--accent); vertical-align: 1px; }
.st-sold { color: var(--muted); }
.work-text { display: grid; gap: 12px; max-width: 46ch; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 4px; padding: 14px 0; }
.pager a + a { text-align: right; border-left: 1px solid var(--line); }
.pager b { font-weight: 500; transition: color .25s; }
.pager a:hover b { color: var(--accent); }
.more .strips { --sh: clamp(380px, 56vh, 560px); }

/* about */
.about-portrait { aspect-ratio: 21 / 9; }
.cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.page-head + .wrap + .cells, .cells { margin-top: clamp(48px, 6vw, 96px); }
.cell-block { display: grid; align-content: start; gap: 16px; padding: clamp(24px, 3vw, 44px); background: var(--bg); }
.cell-block--wide { grid-column: 1 / -1; }
.cell-block--wide .quote { max-width: 30ch; }
.cell-block > p:not(.label) { color: var(--muted); max-width: 52ch; }
.list li { display: grid; grid-template-columns: 56px 1fr; gap: 2px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.list li span:last-child { grid-column: 2; color: var(--muted); font-size: 14px; }
.list b { font-weight: 500; }
.list-head { margin-top: 18px; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); align-items: end; }
.studio-text { display: grid; gap: 20px; justify-items: start; align-self: start; }
.studio-line { font: var(--w-head) clamp(20px, 1.9vw, 28px)/1.25 var(--f-head); letter-spacing: -.015em; }
.studio-photo { aspect-ratio: 2 / 3; }

/* contact */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); }
.card { display: flex; flex-direction: column; gap: 10px; min-height: 190px; padding: clamp(20px, 2.4vw, 32px); background: var(--bg); transition: background .3s; }
.card b { margin-top: auto; font: var(--w-head) clamp(19px, 1.7vw, 26px)/1.2 var(--f-head); letter-spacing: -.02em; overflow-wrap: anywhere; }
.card > span:not(.label) { color: var(--muted); font-size: 14px; }
.card--big { grid-column: span 2; }
.card--big b { font-size: clamp(24px, 3.4vw, 50px); }
a.card:hover { background: var(--card); }
.card--accent { background: var(--accent); color: #fff; }
.card--accent .label { color: rgba(255, 255, 255, .8); }
.form-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 80px); }
.form-side { display: grid; gap: 14px; align-content: start; }
.form { display: grid; gap: 26px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field[hidden] { display: none; }
.field input, .field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 0; font-size: 18px; resize: vertical; outline: 0; transition: border-color .25s; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field.is-bad input, .field.is-bad textarea { border-color: var(--accent); }
.field legend { padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); font-size: 14px; transition: background .25s, color .25s, border-color .25s; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 1px solid var(--accent); outline-offset: 2px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.form-msg { color: var(--muted); max-width: 40ch; font-size: 14px; }

/* 404 */
.nf { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; min-height: 100svh; padding-top: 110px; padding-bottom: 60px; }
.nf-frame { aspect-ratio: 2 / 3; max-height: 70vh; border: 1px solid var(--line); background: var(--card); position: relative; }
.nf-frame span { position: absolute; left: 50%; top: 14%; width: 22%; aspect-ratio: 1; border: 1px solid var(--muted); transform: translateX(-50%) rotate(45deg); border-width: 1px 0 0 1px; }
.nf-text { display: grid; gap: 22px; justify-items: start; }
.nf-text p:not(.label) { color: var(--muted); max-width: 36ch; }
.nf-page .foot { margin-top: 0; }

/* footer: plain logo, links and a button, never a giant name */
.foot { margin-top: clamp(96px, 12vw, 180px); border-top: 1px solid var(--line); padding-top: clamp(40px, 5vw, 64px); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
.foot-lead { display: grid; gap: 18px; justify-items: start; align-content: start; }
.foot-line { color: var(--muted); max-width: 30ch; }
.foot-col { display: grid; gap: 8px; align-content: start; font-size: 14px; }
.foot-col .label { margin-bottom: 6px; }
.foot-col a { justify-self: start; transition: color .25s; }
.foot-col a:hover { color: var(--accent); }
.foot-col span { color: var(--muted); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(40px, 5vw, 72px); padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--line); }
.foot-social { display: flex; gap: 18px; }
.foot-social a:hover { color: var(--ink); }

/* back to top */
.to-top { position: fixed; right: var(--pad); bottom: 20px; z-index: 40; display: grid; place-items: center; width: 44px; height: 44px; background: var(--ink); color: var(--bg); visibility: hidden; clip-path: inset(100% 0 0 0); transition: clip-path .45s var(--ease), visibility 0s .45s, background .25s; }
.to-top.is-on { visibility: visible; clip-path: inset(0); transition: clip-path .45s var(--ease), background .25s; }
.to-top:hover { background: var(--accent); }
.copied-tip { position: absolute; z-index: 60; padding: 4px 8px; background: var(--ink); color: var(--bg); font: 500 11px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }

/* theme switch: the room lights stutter while the walls change colour */
.lights { position: fixed; inset: 0; z-index: 80; background: var(--ink); pointer-events: none; animation: lights .5s linear forwards; }
@keyframes lights { 0% { opacity: 0; } 10% { opacity: .5; } 18% { opacity: 0; } 30% { opacity: .85; } 46% { opacity: .9; } 56% { opacity: .1; } 66% { opacity: .4; } 100% { opacity: 0; } }

/* the one entrance of the theme: every block is uncovered from its top edge down, like a canvas unrolled on the wall */
.js [data-in] { visibility: hidden; }
.js [data-in].in { visibility: visible; animation: uncover 1s var(--ease) var(--d, 0s) both; }
@keyframes uncover { from { clip-path: inset(-40px -40px 100% -40px); } to { clip-path: inset(-40px -40px -40px -40px); } }
.js [data-in].in-done { animation: none; clip-path: none; }

@media (max-width: 1099px) {
  .mosaic { --cols: 6; }
  .mosaic .cell:nth-child(n+16) { display: none; }
  .mosaic .cell.is-big:nth-child(11) { --big: 0; grid-column: auto; grid-row: auto; aspect-ratio: 2 / 3; }   /* 6 columns: one big cell, 14 small = three full rows */
  .grid-works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-lead { grid-column: 1 / -1; }
  .row { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); }
  .row-tag { grid-column: 2; justify-self: start; }
  .studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .studio-text { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .theme-btn { order: 3; }
  .hero-top { grid-template-columns: 1fr; grid-template-areas: "k" "t" "s"; }
  .hero-side { max-width: 460px; }
  .now-card, .statement, .work, .form-wrap, .cta { grid-template-columns: 1fr; }
  .work-info { position: static; padding-top: 0; }
  .shows-body { grid-template-columns: 1fr; }
  .shows-view { display: none; }
  .row-thumb { display: block; position: absolute; right: 0; top: 18px; width: 52px; aspect-ratio: 2 / 3; height: auto; object-fit: cover; }
  .row { grid-template-columns: 48px minmax(0, 1fr); padding-right: 68px; }
  .row-venue, .row-tag { grid-column: 2; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { grid-template-columns: 1fr; }
  .nf { grid-template-columns: 1fr; }
  .nf-frame { width: 46%; max-width: 220px; }
}
@media (max-width: 767px) {
  .mosaic { --cols: 4; }
  .mosaic .cell:nth-child(n+10) { display: none; }
  .cell-cap { display: none; }
  /* strips stack; the one in the middle of the screen opens to the full painting */
  .strips { display: block; height: auto; }
  .strip { display: block; height: 76px; transition: height .6s var(--ease); }
  .strip + .strip { margin-top: 1px; }
  .strip.is-open { height: calc((100vw - 2 * var(--pad) - 2px) * 1.5); }
  .strip img { top: 50%; left: 0; width: 100%; height: auto; aspect-ratio: 2 / 3; transform: translateY(-50%); }
  .strip.is-open img { filter: none; }
  .strip-cap { top: 50%; bottom: auto; transform: translateY(-50%); transition: top .7s cubic-bezier(.5, 1.4, .55, 1), transform .7s cubic-bezier(.5, 1.4, .55, 1); }
  .strip.is-open .strip-cap { top: 100%; transform: translateY(-100%); }
  .hint-d { display: none; }
  .hint-m { display: inline; }
  .grid-works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gw { padding: 6px 6px 10px; }
  .gw-cap { grid-template-columns: 1fr; gap: 2px; }
  .gw-cap .label:first-child { display: none; }
  .cards { grid-template-columns: 1fr; }
  .card--big { grid-column: auto; }
  .card { min-height: 150px; }
  .cells { grid-template-columns: 1fr; }
  .studio { grid-template-columns: 1fr 1fr; }
  .about-portrait { aspect-ratio: 4 / 3; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .works-foot { flex-direction: column; gap: 4px; }
  .facts div { grid-template-columns: 90px 1fr; }
  .foot-bottom { padding-right: 60px; }
}
@media (max-width: 400px) {
  .head { gap: 14px; }
  .logo { font-size: 15px; }
  .foot-grid { grid-template-columns: 1fr; }
  .btn { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
