/* Atelier Gridling
   Black, like Julia's own logo and her old site, so the photos of her work
   carry all the colour. Her logo leads. Grenze Gotisch for headings (the kind
   of letter she paints on Schützenscheiben), Familjen Grotesk for reading.
   No ornaments, no accent colour. */

@font-face { font-family: "Grenze Gotisch"; src: url("/assets/fonts/grenze-gotisch.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("/assets/fonts/familjen-grotesk.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("/assets/fonts/familjen-grotesk-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #121310;          /* the black of her logo and her old site */
  --bg-2: #1a1b17;        /* the film band, image placeholders */
  --text: #eeece6;
  --text-2: #aaa79e;
  --text-3: #85827a;
  --line: rgb(238 236 230 / 0.14);

  --gothic: "Grenze Gotisch", "Old English Text MT", Georgia, serif;
  --sans: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1rem, 0.4rem + 2.8vw, 3.5rem);
  --max: 1440px;
  --space: clamp(5rem, 3rem + 7vw, 10rem);
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul[class], ol[class], nav ul { list-style: none; padding: 0; }
button { font: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
h1, h2, h3 { font-weight: 500; line-height: 1; text-wrap: balance; }
p { text-wrap: pretty; }

.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -5rem; z-index: 100;
  background: var(--text); color: var(--bg); padding: 0.75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.prose { color: var(--text-2); }
.prose > * + * { margin-top: 0.9em; }
.prose a { color: var(--text); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose h2 { font: 500 1.9rem/1.05 var(--gothic); color: var(--text); margin-top: 1.8em; }
.prose h2 + * { margin-top: 0.5em; }
.prose strong { font-weight: 700; color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose--big { font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem); line-height: 1.6; }

.section-title { font: 500 clamp(2.3rem, 1.6rem + 2.6vw, 4rem)/0.95 var(--gothic); }
.section-title a { text-decoration: none; }
.section-title a:hover { text-decoration: underline; text-decoration-thickness: 0.04em; text-underline-offset: 0.12em; }
/* Sections share the logo's centre line, as Julia wanted. Long reading text
   (work descriptions, news archive, legal pages) stays left-aligned. */
.section-head {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.section-more { margin-top: clamp(3rem, 5vw, 4.5rem); text-align: center; }
.section-link { color: var(--text-2); text-underline-offset: 0.3em; }
.section-link:hover { color: var(--text); }

/* ---------- Header ---------- */

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: 1.4rem var(--gutter);
}
.page-home .site-header { justify-content: flex-end; }
.brand { display: block; width: clamp(8.5rem, 7rem + 4vw, 11rem); color: var(--text); }
.brand:hover { opacity: 0.8; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.site-nav a { color: var(--text-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }
.site-nav a[aria-current] { text-decoration: underline; }
/* On phones the links get their own row, edge to edge, so they line up
   with the grid below instead of hanging off the logo. */
@media (max-width: 559px) {
  .site-header { gap: 0.9rem; padding-block: 1.1rem; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; gap: 0 0.75rem; }
  .site-nav a { display: block; padding-block: 0.45rem; }
}

/* ---------- Home: logo ---------- */

.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) clamp(4rem, 7vw, 6.5rem);
}
.hero__title { display: flex; flex-direction: column; align-items: center; }
.hero__logo { display: block; width: min(88vw, 62rem, 105svh); color: #f3f2ee; }
.hero__logo svg { width: 100%; height: auto; }
.hero__name {
  display: block;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  font: 500 clamp(1.1rem, 0.95rem + 0.5vw, 1.4rem)/1.35 var(--sans);
  letter-spacing: -0.005em;
}
.hero__intro {
  margin-top: 0.6rem;
  max-width: 38ch;
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.25rem); line-height: 1.5;
  color: var(--text-2);
}

/* ---------- Home: the four disciplines ---------- */

.areas { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.areas__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); }
@media (max-width: 999px) { .areas__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; } }
.area a { display: block; text-decoration: none; text-align: center; }
.area__img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.area__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity 0.4s; }
.area a:hover .area__img img { transform: scale(1.03); }
.area__title { margin-top: 1.1rem; font: 500 clamp(1.45rem, 1.1rem + 0.9vw, 2.1rem)/1 var(--gothic); }
.area a:hover .area__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.area__line { margin-top: 0.45rem; color: var(--text-2); font-size: 0.98rem; line-height: 1.4; }
@media (max-width: 559px) { .area__line { font-size: 0.9rem; } }

/* ---------- Home: selected works ---------- */

.selection, .news { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space) var(--gutter) 0; }

/* Every photo gets the same frame and stands on its caption, so a tall
   figure and a wide bowl hang together like objects in a showcase. The black
   around them is the page itself. */
.plates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(3rem, 5vw, 4.5rem) clamp(1rem, 2vw, 2rem); }
@media (max-width: 759px) { .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; } }
.plate a { display: block; text-decoration: none; text-align: center; }
.plate__img { display: block; aspect-ratio: 1; }
.plate__img img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transition: opacity 0.3s; }
.plate a:hover .plate__img img { opacity: 0.85; }
.plate__title { display: block; margin-top: 1rem; font: 500 clamp(1.3rem, 1.05rem + 0.7vw, 1.75rem)/1.05 var(--gothic); }
.plate a:hover .plate__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.plate__meta { display: block; margin-top: 0.35rem; color: var(--text-2); font-size: 0.95rem; line-height: 1.4; }
.plate__meta::first-letter { text-transform: uppercase; }

/* ---------- Home: about ---------- */

.about {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: var(--space) var(--gutter) 0;
  text-align: center;
}
/* One photo between the title and the text, uncropped. */
.about__photo { max-width: 56rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.about__photo img { width: 100%; height: auto; }
.about__photo figcaption { margin-top: 0.7rem; color: var(--text-3); font-size: 0.92rem; }
.about__text { max-width: 38rem; margin: 0 auto; }

/* ---------- Home: film ---------- */

.film { margin-top: var(--space); background: var(--bg-2); padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter); text-align: center; }
.film__inner { max-width: 64rem; margin: 0 auto; }
.film__text { max-width: 40rem; margin: 0 auto clamp(2rem, 4vw, 3rem); color: var(--text-2); }
.film__text .section-title { margin: 0 0 1.4rem; color: var(--text); }
.film__note { max-width: 40rem; margin: 1.1rem auto 0; font-size: 0.88rem; color: var(--text-3); }

.video { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s; }
.video:hover img { opacity: 0.85; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(4rem, 7vw, 5.5rem); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / 0.9);
  background: rgb(0 0 0 / 0.35); color: #fff;
  transition: background-color 0.25s, color 0.25s;
}
.video__play svg { width: 36%; fill: currentColor; margin-left: 7%; }
.video:hover .video__play { background: #fff; color: #000; }

/* ---------- Home: news ---------- */

.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem var(--gutter); }
@media (max-width: 899px) { .notes { grid-template-columns: minmax(0, 1fr); max-width: 34rem; margin: 0 auto; gap: 2.75rem; } }
.note { text-align: center; }
.note__date { color: var(--text-3); font-size: 0.95rem; }
.note__title { margin-top: 0.5rem; font: 500 clamp(1.6rem, 1.3rem + 0.9vw, 2.2rem)/1.05 var(--gothic); }
.note__title a { text-decoration: none; }
.note__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.note__text { max-width: 30rem; margin: 0.6rem auto 0; color: var(--text-2); }

/* ---------- Page heads (subpages) ---------- */

.page-head { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 7vw, 6rem); text-align: center; }
.page-title { font: 500 clamp(3rem, 1.8rem + 4.6vw, 6.25rem)/0.92 var(--gothic); max-width: 16ch; }
.page-head .page-title { margin-inline: auto; }
.page-intro { margin: 1.5rem auto 0; max-width: 46ch; font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem); line-height: 1.55; color: var(--text-2); }
.page-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.4rem 0.75rem; margin-top: 2rem; color: var(--text-3); }
.page-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.75rem; }
.page-nav a { color: var(--text-2); text-decoration: none; }
.page-nav a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Discipline pages: the catalogue ---------- */

.catalogue {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3vw, 3rem);
}
@media (max-width: 1099px) { .catalogue { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .catalogue { grid-template-columns: 1fr; } }
/* Photo, extra thumbnails and caption share rows with the neighbouring
   pieces (subgrid), so the titles in a row line up even when only one piece
   has more photos. */
.piece {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0;
  align-content: start;
  min-width: 0;
  padding-bottom: clamp(4rem, 7vw, 6rem);
  scroll-margin-top: 1.5rem;
}
@media (max-width: 639px) { .piece { padding-bottom: 3.5rem; } }
.piece__img { display: block; aspect-ratio: 4 / 5; cursor: zoom-in; }
.piece__img img { width: 100%; height: 100%; object-fit: contain; object-position: left bottom; transition: opacity 0.3s; }
.piece__img:hover img { opacity: 0.88; }
@media (max-width: 639px) {
  .piece__img { aspect-ratio: auto; }
  .piece__img img { width: auto; height: auto; max-width: 100%; max-height: 80svh; }
}
.piece__more ul { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0.5rem 0 0; }
.piece__more a { display: block; width: 3.4rem; aspect-ratio: 1; overflow: hidden; cursor: zoom-in; background: var(--bg-2); }
.piece__more img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.piece__more a:hover img { opacity: 0.8; }
.piece__title { margin-top: 1.1rem; font: 500 clamp(1.6rem, 1.3rem + 0.8vw, 2.1rem)/1.02 var(--gothic); }
.piece__meta { margin-top: 0.4rem; color: var(--text-2); font-size: 0.95rem; line-height: 1.45; }
.piece__meta + .piece__meta { margin-top: 0.1rem; }
.piece__meta::first-letter { text-transform: uppercase; }
.piece__text { margin-top: 0.9rem; font-size: 0.98rem; line-height: 1.6; }
.piece:target .piece__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }

.next {
  display: block; max-width: calc(var(--max) + 2 * var(--gutter));
  margin: var(--space) auto 0; padding: 0 var(--gutter);
  text-decoration: none; text-align: center;
}
.next__label { display: block; color: var(--text-2); }
.next__title { display: block; margin-top: 0.4rem; font: 500 clamp(2.4rem, 1.4rem + 3.6vw, 4.75rem)/0.95 var(--gothic); }
.next:hover .next__title { text-decoration: underline; text-decoration-thickness: 0.035em; text-underline-offset: 0.12em; }

/* ---------- All works ---------- */

.group { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto clamp(4.5rem, 8vw, 7rem); padding: 0 var(--gutter); }
.group .section-head { margin-bottom: 1.75rem; }
.group__line { color: var(--text-2); }

/* Contact-sheet rows (justified): every photo keeps its proportions and each
   row fills the width. */
.sheet { display: flex; flex-wrap: wrap; gap: 1.75rem 1rem; }
.sheet::after { content: ""; flex: 999 1 0; } /* keeps the last row from stretching */
.sheet li { flex: var(--r) 1 calc(var(--r) * var(--row)); min-width: 0; }
.sheet a { display: block; text-decoration: none; }
.sheet img { width: 100%; aspect-ratio: var(--r); object-fit: cover; background: var(--bg-2); transition: opacity 0.3s; }
.sheet a:hover img { opacity: 0.85; }
.sheet span { display: block; margin-top: 0.5rem; color: var(--text-2); font-size: 0.95rem; line-height: 1.3; hyphens: auto; overflow-wrap: break-word; }
.sheet a:hover span { color: var(--text); }
@media (max-width: 759px) { .sheet { --row: 7.5rem !important; gap: 1.25rem 0.6rem; } .sheet span { font-size: 0.85rem; } }

/* ---------- News page ---------- */

.year {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto clamp(4rem, 8vw, 7rem); padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem var(--gutter);
}
.year__num { grid-column: 1 / span 3; align-self: start; font: 500 clamp(2.8rem, 1.6rem + 4vw, 5.5rem)/0.9 var(--gothic); color: var(--text-2); }
@media (min-width: 900px) { .year__num { position: sticky; top: 1.5rem; } }
.year__list { grid-column: 4 / -1; }
@media (max-width: 899px) { .year__num, .year__list { grid-column: 1 / -1; } }
.entry { padding: 0 0 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.entry__date { color: var(--text-3); font-size: 0.95rem; }
.entry__title { margin: 0.35rem 0 1rem; font: 500 clamp(1.9rem, 1.5rem + 1.2vw, 2.7rem)/1 var(--gothic); }
.entry .prose { max-width: 40rem; }
.entry .sheet { margin-top: 1.75rem; }

/* ---------- Text pages, 404 ---------- */

.text-page { max-width: calc(46rem + 2 * var(--gutter)); margin: 0 auto; padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) 0; }
.text-page .page-title { margin-bottom: 2.5rem; }
.text-page .prose { font-size: 1.02rem; }

.lost {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem var(--gutter);
  align-items: center;
  min-height: 70vh;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter);
}
.lost__text { grid-column: 1 / span 6; font-size: 1.15rem; color: var(--text-2); }
.lost__text p { margin-top: 1rem; }
.lost__text .page-title { color: var(--text); margin-bottom: 1.5rem; }
.lost__img { grid-column: 8 / span 4; width: 100%; }
@media (max-width: 759px) { .lost__text, .lost__img { grid-column: 1 / -1; } .lost__img { width: 70%; } }

/* ---------- Footer ---------- */

.site-footer { margin-top: var(--space); border-top: 1px solid var(--line); }
.site-footer__inner { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) var(--gutter) 2rem; text-align: center; }
.footer-title { font: 500 clamp(3rem, 1.6rem + 5.5vw, 7rem)/0.9 var(--gothic); }
.footer-intro { margin: 1.4rem auto 0; max-width: 36ch; font-size: 1.1rem; color: var(--text-2); }
.footer-mail { margin-top: clamp(2rem, 4vw, 3rem); font: 500 clamp(1.4rem, 0.8rem + 2.6vw, 3.25rem)/1.1 var(--sans); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.footer-mail a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.footer-mail a:hover { text-decoration-thickness: 2px; }
.footer-lines { margin-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2.5rem; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.3rem); color: var(--text-2); }
.footer-lines a { text-decoration: none; }
.footer-lines a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  margin-top: clamp(4rem, 9vw, 7rem); padding-top: 2.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem; color: var(--text-2);
}
.footer-logo { display: block; width: 9.5rem; color: var(--text); }
.footer-logo:hover { opacity: 0.8; }
.footer-bottom ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.5rem; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.5rem; color: var(--text-3); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgb(10 10 9 / 0.97); color: var(--text);
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: transparent; }
.lightbox__figure { position: absolute; inset: 4rem 5rem 4.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox__img { max-width: 100%; max-height: calc(100% - 3rem); width: auto; height: auto; object-fit: contain; }
.lightbox__caption { margin-top: 1rem; font: 500 1.6rem/1 var(--gothic); text-align: center; }
.lightbox__btn {
  position: absolute; width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border: 1px solid rgb(238 236 230 / 0.35); border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.lightbox__btn:hover { border-color: var(--text); background: rgb(238 236 230 / 0.08); }
.lightbox__btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: calc(50% - 1.5rem); }
.lightbox__next { right: 1rem; top: calc(50% - 1.5rem); }
.lightbox__count { position: absolute; top: 1.85rem; left: 1.5rem; font-size: 0.95rem; color: var(--text-3); }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next, .lightbox.is-single .lightbox__count { display: none; }
@media (max-width: 759px) {
  .lightbox__figure { inset: 4rem 0.5rem 5.5rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 1.25rem; }
  .lightbox__prev { left: calc(50% - 4rem); }
  .lightbox__next { right: calc(50% - 4rem); }
}
