/* joansalo.net */

/* EB Garamond (SIL Open Font License), served from this website */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}


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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: #FAFAFA;
  color: #000;
  font-family: "EB Garamond", "Times New Roman", Times, serif;
  font-size: 19px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}

a { color: #000; text-decoration: none; }
a:hover, a:focus-visible { font-style: italic; }
a:focus-visible, button:focus-visible { outline: 1px solid #000; outline-offset: 3px; }

img { display: block; max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
}
.skip:focus { left: 28px; top: 60px; z-index: 100; background: #FAFAFA; padding: 4px 8px; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100vh; height: 100dvh;
  margin: 0; padding: 0; border: 0;
  background: #000; color: #FFF;
  font: inherit; font-size: clamp(44px, 5.25vw, 76px); letter-spacing: -0.01em;
  cursor: pointer;
  transition: opacity .7s ease, visibility .7s;
}
.intro.is-hidden { opacity: 0; visibility: hidden; }
.no-js .intro { display: none; }

/* ---------- Name + menu ---------- */
.site-name {
  position: fixed; top: 28px; left: 28px; z-index: 40;
}

.menu-row {
  display: grid;
  grid-template-columns: 14% minmax(0, 1fr);
  padding: 28px 0;
  min-height: 150px;
}
.menu-row ul { list-style: none; margin: 0; padding: 0; }
.menu-row [aria-current="page"] { font-style: italic; }

.burger, .menu-close {
  position: fixed; z-index: 40;
  width: 48px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
.burger { top: 16px; right: 18px; visibility: hidden; opacity: 0; transition: opacity .2s; }
.is-scrolled .burger { visibility: visible; opacity: 1; }
.menu-open .burger { visibility: hidden; opacity: 0; }

.dropdown {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  background: #FAFAFA; border-bottom: 1px solid #000;
  display: none;
}
.menu-open .dropdown { display: block; }
.menu-close { position: absolute; top: 14px; right: 16px; }

/* ---------- Exhibitions ---------- */
.ex {
  display: grid;
  grid-template-columns: 14% minmax(0, 71%) minmax(0, 1fr);
  row-gap: 96px;
  padding-top: 120px;
}
.ex-title {
  grid-column: 2;
  margin: 0; padding: 0;
  text-align: left;
  font-weight: 400;
  font-size: clamp(34px, 3.9vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.ex-cap {
  position: sticky; top: calc(100vh - 104px);
  margin: 0; padding: 0 16px 0 28px;
  max-width: 150px;
  font-size: 14px; line-height: 1.3;
}
.ex-title { grid-row: 1; }
.ex-capcol { grid-column: 1; grid-row: 2; }
.ex-imgs { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 28px; }
/* All images take the same width: the full column, at most 1200 px (the size of the current images). */
.ex-imgs img { width: 100%; max-width: 1200px; margin: 0 auto; background: #EDEDED; }

/* ---------- Books ---------- */
.book {
  display: grid;
  grid-template-columns: 14% minmax(0, 24%) 4% minmax(0, 43%) minmax(0, 1fr);
  padding-top: 160px;
}
.book-text { grid-column: 2; }
.book-text-inner { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 18px; }
.book-text h2, .book-text p { margin: 0; font-size: inherit; font-weight: 400; line-height: inherit; }
.book-imgs { grid-column: 4; display: flex; flex-direction: column; gap: 28px; }
.book-imgs img { width: 100%; max-width: 1200px; background: #EDEDED; }

/* ---------- Text pages (Bio, Contact, Imprint, Privacy) ---------- */
.text-page {
  display: grid;
  grid-template-columns: 14% minmax(0, 71%) minmax(0, 1fr);
  padding: 120px 0 0;
}
.text-col { grid-column: 2; max-width: 640px; }
.text-block { margin: 0 0 42px; }
.text-col h1, .text-col h2 { margin: 0 0 1.25em; font-size: inherit; font-weight: 400; line-height: inherit; }
.text-col h2 { font-style: italic; }
.text-col p { margin: 0 0 1.25em; }
.text-list { list-style: none; margin: 0; padding: 0; }
.legal-links { display: flex; flex-direction: column; gap: 2px; margin-top: 120px; }

/* ---------- Footer ---------- */
main { padding-bottom: 160px; }
.site-footer {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 0 28px 28px;
}
.site-footer small { font-size: 14px; }
.site-footer a { padding: 12px 0; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .menu-row { grid-template-columns: minmax(0, 1fr); padding: 72px 20px 24px; min-height: 0; }
  .menu-row > .spacer { display: none; }
  .site-name { position: absolute; top: 20px; left: 20px; }

  .ex { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-top: 96px; }
  .ex-title { grid-column: 1; grid-row: 1; padding: 0 20px 40px; }
  .ex-imgs { grid-column: 1; grid-row: 2; }
  .ex-capcol { grid-column: 1; grid-row: 3; }
  .ex-cap { position: static; padding: 12px 20px 0; max-width: none; }
  .ex-imgs { padding: 0 20px; gap: 16px; }

  .book { grid-template-columns: minmax(0, 1fr); row-gap: 24px; padding: 96px 20px 0; }
  .book-text, .book-imgs { grid-column: 1; }
  .book-text-inner { position: static; }
  .book-imgs { gap: 16px; }

  .text-page { grid-template-columns: minmax(0, 1fr); padding: 48px 20px 0; }
  .text-col { grid-column: 1; }

  main { padding-bottom: 96px; }
  .site-footer { padding: 0 20px 20px; }
}
