/* janwehrens.com
   White wall, black steel, one signal red taken from the painted works.
   One family (Archivo, variable width) – extended for display, normal for text. */

@font-face {
  font-family: "Archivo";
  src: url("archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --steel: #6b6b6b;      /* secondary text, 5.3:1 on white */
  --rule: #e3e3e1;
  --tint: #f2f2f0;       /* image placeholder */
  --signal: #c62a20;     /* the red of the painted steel works */

  --pad: clamp(20px, 4vw, 56px);
  --row: 230px;
  --rail-h: 48px;
  --gap: 10px;

  --t-meta: 0.875rem;
  --t-body: 1.0625rem;
  --t-lede: clamp(1.25rem, 1.6vw, 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--rail-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
h1, h2, h3, p, ul, dl, figure { margin: 0; }
ul { padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--pad); top: 8px; background: var(--paper); padding: 6px 10px; z-index: 50; }

/* ---------- header / footer ---------- */

header.site {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 22px var(--pad);
}
.brand { font-weight: 560; font-stretch: 112%; letter-spacing: -0.005em; }
header.site nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.9375rem; }
header.site nav a { color: var(--steel); }
header.site nav a:hover { color: var(--ink); }
header.site nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.home .brand { visibility: hidden; }

footer.site {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
  margin-top: clamp(80px, 12vw, 180px);
  padding: 28px var(--pad) 40px;
  border-top: 1px solid var(--rule);
  font-size: var(--t-meta); color: var(--steel);
}
footer.site p:nth-child(1) { grid-column: 1 / 5; color: var(--ink); }
footer.site p:nth-child(2) { grid-column: 5 / 9; }
footer.site p:nth-child(3) { grid-column: 9 / 13; }

/* ---------- type ---------- */

.display {
  font-weight: 280; font-stretch: 125%;
  font-size: clamp(3rem, 8.5vw, 8.75rem);
  line-height: 0.9; letter-spacing: -0.035em;
}
.section-title { font-size: var(--t-meta); font-weight: 500; color: var(--steel); }
.meta { color: var(--steel); font-size: var(--t-meta); }
.lede { font-size: var(--t-lede); line-height: 1.45; max-width: 34em; font-weight: 360; }

/* ---------- home ---------- */

.hero {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: clamp(8px, 2vw, 24px) var(--pad) 0;
  align-items: start;
}
.hero-name {
  grid-column: 1 / 8; grid-row: 1;
  font-weight: 240; font-stretch: 125%;
  font-size: clamp(3.75rem, 10.2vw, 12.5rem);
  line-height: 0.84; letter-spacing: -0.045em;
  margin-left: -0.05em;
}
.hero-img { grid-column: 7 / 13; grid-row: 1 / 3; }
.hero-img img { width: 100%; animation: settle 1.4s cubic-bezier(.2,.7,.1,1) both; }
.hero-img figcaption { margin-top: 10px; font-size: var(--t-meta); color: var(--steel); }
.hero-text { grid-column: 1 / 6; grid-row: 2; align-self: end; padding-bottom: 36px; }
.hero-text .role { color: var(--steel); margin-bottom: 1.4em; }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } }

.index { padding: clamp(80px, 11vw, 160px) var(--pad) 0; }
.index .section-title { margin-bottom: 18px; }
.index-wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.index-list { grid-column: 1 / 8; border-top: 1px solid var(--ink); }
.index-list a {
  display: grid; grid-template-columns: 1fr auto 4.5em; align-items: baseline; gap: 20px;
  padding: 0.18em 0 0.22em;
  border-bottom: 1px solid var(--rule);
}
.i-title {
  font-weight: 300; font-stretch: 125%; letter-spacing: -0.03em;
  font-size: clamp(2rem, 4.6vw, 4.5rem); line-height: 1.05;
}
.i-years, .i-n { font-size: var(--t-meta); color: var(--steel); white-space: nowrap; }
.i-n { text-align: right; }
.index-list a:hover .i-title, .index-list a:focus-visible .i-title,
.index-list a.is-active .i-title { color: var(--signal); }
.i-thumb { display: none; }
.index-preview { grid-column: 9 / 13; position: sticky; top: 24px; align-self: start; }
.index-preview img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--tint); }

.collections {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 18px;
  padding: clamp(80px, 11vw, 160px) var(--pad) 0;
}
.collections .section-title { grid-column: 1 / -1; }
.collections ul {
  grid-column: 1 / 11; columns: 2; column-gap: 24px;
  font-size: var(--t-lede); line-height: 1.4; font-weight: 360;
}
.collections p { grid-column: 1 / -1; font-size: var(--t-meta); }
.collections p a { box-shadow: inset 0 -1px 0 currentColor; }

/* ---------- work pages ---------- */

.work-head {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end;
  padding: clamp(24px, 5vw, 72px) var(--pad) clamp(28px, 4vw, 48px);
}
.work-head .display { grid-column: 1 / 9; }
.work-desc { grid-column: 9 / 13; max-width: 30em; padding-bottom: 0.4em; }
.work-desc.lede { grid-column: 1 / 11; padding-top: 1.2em; }
.work-head:has(.lede) .display { grid-column: 1 / -1; }

.rail {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 2px 18px; align-items: center;
  height: var(--rail-h); padding: 0 var(--pad);
  overflow-x: auto; scrollbar-width: none;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  font-size: var(--t-meta);
}
.rail::-webkit-scrollbar { display: none; }
.rail a { color: var(--steel); white-space: nowrap; padding: 4px 0; }
.rail a:hover { color: var(--ink); }
.rail a.is-current { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }

.groups { padding: 0 var(--pad); }
.group {
  display: grid; grid-template-columns: minmax(8rem, 2fr) 10fr; column-gap: 24px;
  padding: clamp(28px, 4vw, 52px) 0;
  border-bottom: 1px solid var(--rule);
}
.g-head {
  position: sticky; top: calc(var(--rail-h) + 20px); align-self: start;
  font-weight: 300; font-stretch: 125%; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 2.2vw, 2.25rem); line-height: 1.05;
}
.g-sub {
  display: block; margin-top: 10px;
  font-size: var(--t-meta); font-weight: 400; font-stretch: 100%; letter-spacing: 0;
  line-height: 1.45; color: var(--steel);
}

/* justified rows: every tile grows in proportion to its aspect ratio */
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.tile {
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * var(--row));
  max-width: calc(var(--r) * var(--row) * 1.9);
  background: var(--tint);
  cursor: zoom-in;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover img { opacity: .9; }
.fill { flex-grow: 1000000; flex-basis: 0; }

.next {
  display: block; margin: clamp(60px, 8vw, 120px) var(--pad) 0;
  font-weight: 280; font-stretch: 125%; letter-spacing: -0.035em;
  font-size: clamp(2.5rem, 6vw, 6rem); line-height: 1;
}
.next span {
  display: block; margin-bottom: 12px;
  font-size: var(--t-meta); font-weight: 400; font-stretch: 100%; letter-spacing: 0; color: var(--steel);
}

/* ---------- lists (biography, exhibitions, legal) ---------- */

.lists { padding: 0 var(--pad); }
.list {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: clamp(36px, 5vw, 64px) 0;
  border-top: 1px solid var(--ink);
}
.groups + .lists { margin-top: clamp(60px, 8vw, 120px); }
.list h2 {
  grid-column: 1 / 4; font-size: var(--t-body); font-weight: 520; line-height: 1.35;
  padding-right: 1em; margin-bottom: 1.2em;
}
.list dl, .list ul, .list > p { grid-column: 4 / 12; }
.list > p { max-width: 38em; margin-bottom: 1em; }
.list > h2 + p { grid-row: 1; }
.list .row { display: grid; grid-template-columns: 6.5em 1fr; gap: 16px; padding: 7px 0; }
.list .row + .row { border-top: 1px solid var(--rule); }
.list dt { color: var(--steel); }
.list dd { margin: 0; max-width: 40em; }
.list ul.cols { columns: 2; column-gap: 32px; }
.list ul.cols li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.legal a, .list a { box-shadow: inset 0 -1px 0 currentColor; }
.see { padding: 8px 0 0; }
.see a { box-shadow: inset 0 -1px 0 currentColor; }

.contact p + p { margin-top: 1.2em; }
.big-link { font-size: var(--t-lede); box-shadow: inset 0 -1px 0 currentColor; }

/* ---------- lightbox ---------- */

.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(255,255,255,.985); color: var(--ink);
}
.lb::backdrop { background: rgba(255,255,255,.9); }
.lb[open] { display: grid; place-items: center; }
.lb figure {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  max-width: calc(100vw - 2 * 76px);
}
.lb img {
  max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto;
  object-fit: contain; transition: opacity .25s ease;
}
.lb img.is-loading { opacity: 0; }
.lb figcaption {
  display: flex; justify-content: space-between; gap: 24px; width: 100%;
  font-size: var(--t-meta);
}
.lb-count { color: var(--steel); white-space: nowrap; }
.lb button {
  position: absolute; display: grid; place-items: center;
  width: 56px; height: 56px; padding: 0; border: 0; background: none; color: var(--ink);
  cursor: pointer;
}
.lb button:hover { color: var(--signal); }
.lb svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.25; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 10px; top: 10px; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  :root { --row: 180px; }
  .index-list { grid-column: 1 / -1; }
  .index-preview { display: none; }
  .index-list a { grid-template-columns: 1fr auto 64px; }
  .i-n { display: none; }
  .i-thumb { display: block; width: 64px; height: 64px; object-fit: cover; align-self: center; background: var(--tint); }
}

@media (max-width: 760px) {
  :root { --row: 128px; --gap: 6px; --rail-h: 44px; }
  header.site { flex-direction: column; gap: 10px; padding-top: 16px; }
  .home .brand { display: none; }
  header.site nav { gap: 4px 16px; }
  .hero-name, .hero-img, .hero-text { grid-column: 1 / -1; }
  .hero-name { grid-row: 1; margin-bottom: 24px; font-size: 19vw; }
  .i-title { font-size: 7.4vw; }
  .index-list a { gap: 12px; grid-template-columns: 1fr auto 52px; }
  .i-thumb { width: 52px; height: 52px; }
  .hero-img { grid-row: 2; }
  .hero-text { grid-row: 3; padding: 28px 0 0; }
  .work-head .display, .work-desc, .work-desc.lede { grid-column: 1 / -1; }
  .work-desc { padding-top: 18px; }
  .group { grid-template-columns: 1fr; row-gap: 16px; }
  .g-head { position: static; }
  .list h2, .list dl, .list ul, .list > p { grid-column: 1 / -1; }
  .list > h2 + p { grid-row: auto; }
  .list ul.cols, .collections ul { columns: 1; }
  .collections ul { grid-column: 1 / -1; }
  .list .row { grid-template-columns: 4.5em 1fr; }
  footer.site p { grid-column: 1 / -1 !important; }
  .lb figure { max-width: calc(100vw - 24px); }
  .lb img { max-height: calc(100dvh - 160px); }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  header.site nav, .rail, .lb, .next { display: none; }
  .g-head { position: static; }
}
