/* Fonts are served from this site (SIL Open Font License, see /fonts/). */
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("/fonts/newsreader-300.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/newsreader-italic-400.woff2") format("woff2");
}
@font-face {
  font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/familjen-grotesk.woff2") format("woff2");
}

:root {
  --primer: #F2A679;   /* the apricot ground of a primed canvas */
  --wall: #ECEEEA;     /* gallery wall */
  --paper: #FBFBF8;
  --ink: #12312B;      /* foliage shadow */
  --rain: #25364A;     /* the avenue at dusk */

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

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

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

.text-button {
  font: inherit; color: inherit; background: none; border: 0;
  padding: 0.6rem 0; min-height: 2.75rem;
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px;
  cursor: pointer;
}

.pill {
  font: inherit; font-size: 0.9375rem; color: var(--ink);
  background: transparent; border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: 999px; padding: 0.4rem 1rem; min-height: 2.75rem; cursor: pointer;
}
.pill:hover { border-color: var(--ink); }
.pill:disabled { opacity: 0.4; cursor: default; }

/* ---------- Hero: the primed canvas ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 var(--gutter);
  background: var(--primer);
  overflow: hidden;
  isolation: isolate;
}

.hero-canvas {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

.masthead {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0 1.5rem; flex-wrap: wrap;
  padding: 0.75rem 0;
}
.masthead-name { font-weight: 600; text-decoration: none; }
.masthead a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.masthead nav { display: flex; gap: clamp(0.9rem, 3vw, 2.25rem); }
.masthead nav a { text-decoration: none; }
.masthead nav a:hover { text-decoration: underline; }

/* Dragging here paints, so it should not select the headline. */
.hero-body { align-self: center; padding: 2rem 0; -webkit-user-select: none; user-select: none; }

.hero h1 {
  max-width: 13em;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.75rem, 1.4rem + 6.6vw, 8rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-sub { margin-top: clamp(1.25rem, 3vw, 2.25rem); font-size: 1.1875rem; }

.hero-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.75rem 0; min-height: 4.5rem;
  font-size: 0.9375rem;
}

/* ---------- Works: the gallery wall ---------- */

.works { padding: clamp(4rem, 10vw, 9rem) var(--gutter) clamp(3rem, 8vw, 7rem); }

.works-head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters button:focus-visible { outline-color: var(--ink); }
.filters .count { opacity: 0.75; font-variant-numeric: tabular-nums; }

.wall { columns: 3; column-gap: clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 62rem) { .wall { columns: 2; } }
@media (max-width: 36rem) { .wall { columns: 1; } }

.piece { break-inside: avoid; margin-bottom: clamp(2rem, 5vw, 4.5rem); }
.piece[hidden] { display: none; }

.piece-open { display: block; text-decoration: none; cursor: zoom-in; }
.piece-open img {
  width: 100%; height: auto;
  box-shadow: 0 1px 0 rgba(18, 49, 43, 0.1), 0 22px 34px -24px rgba(18, 49, 43, 0.6);
}

.label { display: block; margin-top: 1rem; }
.label-title { display: block; font-family: var(--serif); font-style: italic; font-size: 1.3125rem; line-height: 1.25; }
.label-medium { display: block; font-size: 0.9375rem; opacity: 0.75; }

.works-note { max-width: 34em; margin-top: clamp(2.5rem, 5vw, 4.5rem); }

/* ---------- Studio films ---------- */

.studio {
  background: var(--ink); color: var(--paper);
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
}
.studio-head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 0.75rem 2rem;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.studio-head p { max-width: 24em; opacity: 0.8; text-wrap: balance; }

.clips {
  display: grid; grid-template-columns: repeat(3, minmax(0, 21rem));
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
}
.clip-frame { position: relative; background: #000; }
.clip video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.clip-controls { position: absolute; left: 0.75rem; bottom: 0.75rem; display: flex; gap: 0.5rem; }
.clip-controls[hidden] { display: none; }
.clip-controls button {
  font: inherit; font-size: 0.875rem; color: var(--ink);
  background: var(--paper); border: 0; border-radius: 999px;
  padding: 0.4rem 0.9rem; min-height: 2.75rem; cursor: pointer;
}
.clip-controls button:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
.clip .label-title { margin-top: 1rem; }

@media (max-width: 44rem) {
  .clips {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 1rem;
  }
  .clip { flex: 0 0 78%; scroll-snap-align: center; }
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
  background: var(--paper);
}
.about-text > * + * { margin-top: 1.25rem; }
.about-text p { max-width: 36em; }
.about-text .lead {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.3; max-width: 22em;
}

@media (max-width: 52rem) { .about { grid-template-columns: 1fr; } }

/* ---------- Contact: the avenue at dusk ---------- */

.contact {
  background: var(--rain); color: var(--paper);
  padding: clamp(4rem, 10vw, 9rem) var(--gutter) 1.5rem;
}
.contact h2 { max-width: 16em; text-wrap: balance; }
.contact-link {
  display: inline-block; margin-top: 2rem; padding: 0.4rem 0;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.5rem);
  color: var(--primer);
}
.colophon {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.25rem 2rem;
  margin-top: clamp(4rem, 9vw, 8rem); font-size: 0.875rem;
}
.colophon p { opacity: 0.75; }
.colophon nav { display: flex; gap: 1.5rem; }
.colophon nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---------- Viewer ---------- */

.viewer {
  width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh;
  margin: 0; border: 0; padding: clamp(0.75rem, 2.5vw, 2rem);
  background: var(--wall); color: var(--ink);
  overflow: hidden;
}
.viewer[open] {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 1rem;
  animation: viewer-in 0.2s ease-out;
}
.viewer::backdrop { background: var(--wall); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; font-size: 0.9375rem; }
.viewer-art {
  display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center; min-height: 0;
}
.viewer-art img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  box-shadow: 0 30px 50px -30px rgba(18, 49, 43, 0.6);
}
.viewer-label { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.viewer-label h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.viewer-label p { font-size: 0.9375rem; opacity: 0.75; }
.viewer-nav { display: flex; gap: 0.5rem; margin-left: auto; }

@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 36rem) {
  .viewer-label > a { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .viewer[open] { animation: none; }
}
