/* Architecture Makes — SABE 60th anniversary */

:root {
  --ink: #0b0b0b;
  --paper: #ffffff;
  --mute: #6b6b6b;
  --rule: #0b0b0b;
  --soft: #f1f1ef;
  --gutter: 20px;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --small: 13px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 var(--small)/1.35 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.label { font-size: var(--small); font-weight: 600; color: var(--mute); }
.display {
  font-weight: 800;
  font-size: clamp(52px, 10vw, 176px);
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.arrow { font-weight: 600; border-bottom: 1px solid; }
.arrow::after { content: " →"; }

/* ---------- masthead + menu ---------- */
.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--gutter);
  color: #fff; mix-blend-mode: difference; pointer-events: none;
}
.masthead > * { pointer-events: auto; }
.logo { display: flex; align-items: flex-start; gap: 3px; line-height: 0.92; }
.logo b { font-size: 19px; font-weight: 900; letter-spacing: -0.03em; text-transform: uppercase; }
.logo sup { font-size: 11px; font-weight: 800; top: 0; }
.menu-btn { font-weight: 600; font-size: 14px; }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--ink); color: #fff;
  padding: 96px var(--gutter) var(--gutter);
  display: grid; grid-template-columns: 1fr; gap: 48px; align-content: start;
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu-main a {
  display: inline-block;
  font-weight: 800; font-size: clamp(44px, 9vw, 128px);
  line-height: 0.95; letter-spacing: -0.045em;
}
.menu-main a:hover { color: #9a9a9a; }
.menu-side .label { color: #8a8a8a; margin-bottom: 12px; }
.menu-themes a { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; padding: 4px 0; }
.menu-themes i, .tag i, .dots i, .chip i, .about-themes i {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none;
}
@media (min-width: 900px) {
  .menu { grid-template-columns: 2fr 1fr; align-content: end; padding-bottom: 48px; }
}
body.menu-open { overflow: hidden; }

/* ---------- loader (home) ---------- */
.loader {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  transition: opacity .5s ease, visibility .5s;
}
.loader span { font-weight: 900; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; transition: font-size .6s cubic-bezier(.2,.7,.2,1), color .6s; }
.loader.big span { font-size: 27vw; color: #1e1e1e; }
.loader.done { opacity: 0; visibility: hidden; }
.no-loader .loader { display: none; }

/* ---------- home hero ---------- */
.hero { position: relative; height: 72svh; min-height: 420px; background: var(--ink); overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide.contain img { object-fit: contain; padding: 64px 0 40px; }
.slide-cap, .hero-count {
  position: absolute; bottom: var(--gutter); z-index: 2;
  color: #fff; font-weight: 600; text-shadow: 0 0 12px rgba(0,0,0,.35);
}
.slide-cap { left: var(--gutter); }
.hero-count { right: var(--gutter); font-variant-numeric: tabular-nums; }

.wordmark-strip { background: var(--ink); padding: 14px var(--gutter) 0; overflow: hidden; }
.wordmark {
  display: inline-block;
  font-weight: 900; text-transform: uppercase; white-space: nowrap;
  font-size: 11.6vw; line-height: 0.86; letter-spacing: -0.05em;
  margin-left: -0.04em;
}
/* exhibition artwork (assets/wordmark-art.*, rendered from the hero SVG) shows through the letters */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  /* each word gets its own crop of the drawing, so both land on dense linework */
  .wordmark span {
    display: inline-block;
    padding-bottom: 0.04em;
    color: transparent;
    background-image: url("wordmark-art.jpg");
    background-image: image-set(url("wordmark-art.webp") type("image/webp"), url("wordmark-art.jpg") type("image/jpeg"));
    background-size: cover;
    /* --py is driven by scroll in site.js (parallax); 30% is the resting crop */
    background-position: var(--px, 50%) var(--py, 30%);
    -webkit-background-clip: text;
    background-clip: text;
  }
  /* oversize the second word's crop so it also has room to move */
  .wordmark span + span { --px: 30%; background-size: 150% auto; }
}
/* phones: stack the two words so the letters are big enough to show the drawing */
@media (max-width: 599px) {
  .wordmark span { display: block; }
}
.band { background: var(--ink); color: #fff; padding: 48px var(--gutter) 56px; }
.band-grid { display: grid; gap: 32px; }
.statement { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.18; letter-spacing: -0.015em; max-width: 30ch; }
.statement p + p { margin-top: 0.8em; }
.statement .arrow { font-size: var(--small); letter-spacing: 0; }
.band .label { color: #8a8a8a; }
@media (min-width: 900px) {
  .band-grid { grid-template-columns: 2fr 1fr; align-items: end; }
  .statement { max-width: 34ch; }
}

/* ---------- sections ---------- */
.section { padding: 64px var(--gutter) 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--rule); padding-top: 10px; margin-bottom: 20px;
}
.section-head h2 { font-size: var(--small); font-weight: 700; }
.section-head p { color: var(--mute); text-align: right; }

.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.theme-cell {
  position: relative; display: flex; flex-direction: column; gap: 32px;
  padding: 14px 14px 16px 0; min-height: 150px;
  border-top: 4px solid var(--c);
}
.theme-cell b { font-size: clamp(18px, 1.7vw, 24px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.theme-cell:hover b { color: var(--c); }
.theme-num { font-weight: 600; color: var(--mute); }
.theme-count { margin-top: auto; color: var(--mute); }
@media (min-width: 900px) { .theme-grid { grid-template-columns: repeat(6, 1fr); gap: 0 12px; } }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 40px 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card-img { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.card-img.contain { background: #1a1a1a; }
.card-img.contain img { object-fit: contain; padding: 14px; }
.card:hover .card-img img, .interview:hover .card-img img { transform: scale(1.03); }
.card-meta { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding-top: 8px; }
.card-meta b { font-weight: 700; }
.card-meta > span:not(.dots) { color: var(--mute); grid-column: 1; }
.dots { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 4px; padding-top: 3px; }

/* ---------- page heads ---------- */
.page-head { padding: 120px var(--gutter) 32px; }
.lede { max-width: 38ch; margin-top: 24px; font-size: clamp(19px, 1.8vw, 26px); line-height: 1.2; letter-spacing: -0.012em; }
.lede p + p { margin-top: .6em; }
.theme-head .display { max-width: 12ch; }
.theme-head .label { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.swatch { width: 12px; height: 12px; background: var(--c); border-radius: 50%; }

/* ---------- toolbar / filters ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding: 64px var(--gutter) 12px; margin-top: -64px;
  background: linear-gradient(var(--paper) 85%, rgba(255,255,255,0));
}
.chips, .views, .toolbar-right { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--ink); padding: 5px 11px; font-weight: 600; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.search {
  font: inherit; font-weight: 500; border: 1px solid var(--ink); border-radius: 0;
  padding: 5px 10px; width: 220px; max-width: 100%; background: var(--paper);
}
.filterable { padding: 12px var(--gutter) 0; }
.filterable[data-view="grid"] .list, .filterable[data-view="list"] .grid { display: none; }
.list { border-bottom: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px;
  padding: 10px 0; border-top: 1px solid var(--rule);
}
.row b { font-weight: 700; }
.row > span { color: var(--mute); }
.row .tags { grid-column: 1 / -1; }
.row:hover:not(.row-head) { background: var(--soft); }
.row-head { display: none; color: var(--mute); }
@media (min-width: 900px) {
  .row { grid-template-columns: 1.1fr 1fr 1.6fr .5fr 1.4fr; align-items: baseline; padding: 8px 0; }
  .row .tags { grid-column: auto; }
  .row-head { display: grid; }
  .row > span { color: var(--ink); }
}
.empty { color: var(--mute); padding: 24px 0; }
.empty.big { font-size: 22px; max-width: 30ch; }
[hidden] { display: none !important; }

.tags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
a.tag:hover { text-decoration: underline; }

/* ---------- project page ---------- */
/* full-bleed under the logo and menu, but shortened so the name shows below it on first view, inviting a scroll */
.p-hero {
  --title-space: calc(clamp(52px, 10vw, 176px) * 0.9 + 110px);
  position: relative; background: var(--ink);
  height: max(320px, calc(100svh - var(--title-space)));
}
.p-hero img { width: 100%; height: 100%; object-fit: cover; }
.p-hero.contain { background: #1a1a1a; }
.p-hero.contain img { object-fit: contain; padding: 72px var(--gutter) 44px; }
.p-hero figcaption { position: absolute; left: var(--gutter); bottom: var(--gutter); color: #fff; font-weight: 600; text-shadow: 0 0 12px rgba(0,0,0,.4); }

.project { padding: 0 var(--gutter); }
.p-head { padding: 24px 0 72px; }
.p-sub { font-size: clamp(22px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.02em; margin-top: 14px; }

.p-grid { display: grid; gap: 40px; }
.spec { width: 100%; border-collapse: collapse; align-self: start; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 6px 0 7px; border-top: 1px solid var(--rule); font-weight: 600; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--rule); }
.spec th { width: 34%; padding-right: 12px; }
.spec td a:not(.tag) { border-bottom: 1px solid; }
.share { font-weight: 600; border-bottom: 1px solid; }

.p-text { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.3; letter-spacing: -0.01em; max-width: 40ch; }
.p-text p + p, .p-text p + h2, .p-text ul + h2 { margin-top: 0.9em; }
.p-text h2 { font-size: var(--small); font-weight: 700; letter-spacing: 0; padding-top: 28px; margin-bottom: 8px; }
.p-text a { border-bottom: 1px solid; }
.p-lede { font-size: 1.2em; line-height: 1.18; margin-bottom: 1.2em; font-weight: 600; letter-spacing: -0.02em; }
@media (min-width: 900px) {
  .p-grid { grid-template-columns: 1fr 1fr; gap: var(--gutter); }
  .p-text { justify-self: end; width: 100%; max-width: 42ch; }
  .about .p-text { justify-self: start; }
}

.project figure { margin-top: 96px; }
.project figcaption { color: var(--mute); padding-top: 8px; font-weight: 600; }
.p-portrait img { width: 100%; }
.p-figure.narrow { max-width: 760px; margin-left: auto; }
@media (min-width: 900px) {
  .p-figure:not(.narrow) { width: 66%; }
  .p-figure:nth-of-type(even):not(.narrow) { margin-left: auto; }
}

.p-interview { margin-top: 96px; }
.p-interview .label { margin-bottom: 10px; color: var(--ink); }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.p-credits { margin-top: 64px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--mute); }
.p-credits .label { color: var(--ink); margin-bottom: 4px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; margin: 96px var(--gutter) 0; border-top: 1px solid var(--rule); }
.pager a { padding: 10px 0 0; display: grid; gap: 4px; }
.pager a:last-child { text-align: right; }
.pager b { font-size: clamp(22px, 3vw, 44px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.pager a:hover b { color: var(--mute); }

/* ---------- themes index ---------- */
.theme-list { padding: 0 var(--gutter); }
.theme-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 6px 16px; align-items: baseline;
  padding: 14px 0 18px; border-top: 1px solid var(--rule); position: relative;
}
.theme-row::before { content: ""; position: absolute; left: 0; top: -1px; height: 4px; width: 0; background: var(--c); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.theme-row:hover::before { width: 100%; }
.theme-row b { font-size: clamp(26px, 4.4vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.theme-row > span:nth-child(3) { grid-column: 2; color: var(--mute); max-width: 60ch; font-size: 15px; }
.theme-row .theme-count { grid-column: 3; grid-row: 1; font-weight: 700; color: var(--ink); }

/* ---------- interviews ---------- */
.interview .card-img { aspect-ratio: 16 / 9; }
.play {
  position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--ink); font-size: 14px;
}

/* ---------- about ---------- */
.about { padding: 0 var(--gutter); }
.about-themes { align-self: start; }
.about-themes a { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule); font-weight: 600; }
.about-themes li:last-child a { border-bottom: 1px solid var(--rule); }

/* ---------- footer ---------- */
.footer { margin-top: 120px; background: var(--ink); color: #fff; padding: 56px var(--gutter) 28px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px var(--gutter); font-weight: 600; }
.footer-grid p:not(:first-child) { color: #9a9a9a; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }

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

.p-figure:nth-of-type(even) img { margin-left: auto; }
@media (min-width: 900px) { .spec { position: sticky; top: 72px; } }
