/* joansalo.net */

/* Body: Times New Roman (system font), fallback Tinos (Apache License 2.0) for devices without it, served from this website */
@font-face { font-family: 'Tinos'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/tinos-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: 'Tinos'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/tinos-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: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/hanken-grotesk-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: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/hanken-grotesk-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: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/hanken-grotesk-latin-ext-500-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: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/hanken-grotesk-latin-500-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; }

*, *::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;
  overflow-x: hidden;
  background: #FAFAFA;
  color: #000;
  font-family: "Times New Roman", Times, Tinos, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

/* Links: underline only on hover */
a { color: #000; text-decoration: none; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 1px solid #000; outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

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

/* ---------- Top bar: name + menu in one line ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: #FAFAFA;
}
.menu-row {
  display: grid;
  grid-template-columns: 14% minmax(0, 1fr);
  align-items: baseline;
  padding: 14px 28px 12px 0;
}
.site-name { padding-left: 28px; white-space: nowrap; }
.menu-row ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.menu-row [aria-current="page"] { text-decoration: underline; }

/* Home: the bar slides in once the installation view has been scrolled past */
.has-hero .topbar { position: fixed; left: 0; right: 0; transform: translateY(-100%); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.has-hero.past-hero .topbar { transform: none; opacity: 1; }
.no-js .has-hero .topbar, .has-hero .topbar:focus-within { transform: none; opacity: 1; }

/* ---------- Hero (installation views) ---------- */
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #D9D9D6; }
.hero-set { position: absolute; inset: 0; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-img.is-on, .no-js .hero-img:first-child { opacity: 1; }
.hero-m { display: none; }
.hero-name { position: absolute; left: 28px; top: 24px; z-index: 2; margin: 0; color: #000; font-size: 28px; font-weight: 400; line-height: 1.2; }
.hero-down { display: none; position: absolute; right: 20px; bottom: 20px; z-index: 2; color: #000; font-size: 26px; line-height: 1; padding: 8px; }
.hero-down:hover { text-decoration: none; }
/* Hero text adapts to the image: white on dark backgrounds, black on light */
.hero-name, .hero-cap, .hero-down { transition: color .8s ease; }
.hero.tone-dark .hero-name, .hero.tone-dark .hero-cap, .hero.tone-dark .hero-down { color: #fff; }
.hero-cap-m { display: none; }
.hero-cap { position: absolute; left: 28px; bottom: 24px; z-index: 2; margin: 0; color: #000; font-size: 19px; line-height: 1.25; max-width: 320px; }

/* ---------- Works index ---------- */
.works { display: grid; grid-template-columns: 14% minmax(0, 71%) minmax(0, 1fr); }
.yr { grid-column: 2; padding-top: 96px; }
.has-hero .works .yr:first-child { padding-top: 120px; }
.yr-title { margin: 0 0 20px; font-size: inherit; font-weight: 400; }
.yr-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; }
.yr-grid li { max-width: 100%; }
.wk { display: block; cursor: zoom-in; max-width: 100%; }
.wk img { width: auto; height: auto; max-height: 170px; max-width: 100%; background: #EDEDED; }
.wk:hover img { opacity: .85; }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 70; background: #FAFAFA;
  display: grid; grid-template-columns: 14% minmax(0, 1fr) 14%; grid-template-rows: 96px minmax(0, 1fr) 96px;
}
.lb { height: 100vh; height: 100dvh; }
.lb[hidden] { display: none; }
.lb-img { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-content: center; min-height: 0; cursor: zoom-in; }
.lb-img img { display: block; max-width: 100%; max-height: 100%; max-height: calc(100dvh - 192px); width: auto; height: auto; object-fit: contain; }
.lb.is-zoom .lb-img { display: block; overflow: auto; scrollbar-width: none; cursor: zoom-out; grid-column: 1 / -1; grid-row: 1 / -1; z-index: 2; background: #FAFAFA; }
.lb.is-zoom .lb-img::-webkit-scrollbar { display: none; }
.lb.is-zoom .lb-img img { max-width: none; max-height: none; width: 250%; height: auto; }
.lb.is-zoom.is-wide .lb-img img { width: auto; height: 200vh; }
.lb-cap { grid-column: 1; grid-row: 2; align-self: end; margin: 0; padding: 0 16px 0 28px; font-size: 19px; line-height: 1.25; }
.lb-prev, .lb-next { grid-row: 2; align-self: center; background: transparent; border: 0; padding: 0; cursor: pointer; min-width: 44px; min-height: 44px; }
.lb-prev:hover, .lb-next:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lb-prev { grid-column: 1; justify-self: start; padding-left: 28px; text-align: left; }
.lb-next { grid-column: 3; justify-self: end; padding-right: 28px; text-align: right; }
.lb-count { grid-column: 3; grid-row: 3; align-self: center; justify-self: end; margin: 0; padding-right: 28px; font-size: 19px; }
.lb-close { position: absolute; top: 14px; right: 16px; z-index: 3; width: 48px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; padding: 0; cursor: pointer; }
.lb-open { overflow: hidden; }

/* ---------- 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; font-size: 19px; line-height: 1.3; }
.book-text h2 { margin: 0; font-size: 28px; font-weight: 400; line-height: 1.2; }
.book-text p { margin: 0; }
.book-imgs { grid-column: 4; display: flex; flex-direction: column; gap: 28px; }
.book-imgs img { width: 100%; max-width: 1200px; background: #EDEDED; }

/* ---------- Text pages (Texts, 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: 760px; }
.text-block { margin: 0 0 42px; }
.text-col h1, .text-col h2 { margin: 0 0 1em; font-size: inherit; font-weight: 400; line-height: inherit; }
.text-col p { margin: 0 0 1em; }
.text-body { font-size: 19px; line-height: 1.4; }
.text-small .text-col { font-size: 19px; line-height: 1.4; }
.text-list { list-style: none; margin: 0; padding: 0; }
.text-list li { margin-bottom: .35em; }
.legal-links { display: flex; flex-direction: column; gap: 2px; margin-top: 120px; font-size: 19px; }
/* links inside running text: same colour, underline on hover */
.text-col p a { text-decoration: none; }
.text-col p a:hover { text-decoration: underline; }

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

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  body { font-size: 19px; }
  .menu-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px 16px 10px 0; font-size: 19px; }
  .site-name { padding-left: 16px; }
  .menu-row ul { justify-content: flex-end; gap: 4px 10px; }

  .hero-d { display: none; }
  .hero-m { display: block; }
  .hero-name { left: 16px; top: 12px; font-size: 19px; }
  .hero-down { display: block; }
  .hero-cap-d { display: none; }
  .hero-cap-m { display: block; }
  .hero-cap { left: 20px; bottom: 20px; font-size: 16px; max-width: 240px; }

  .works { grid-template-columns: minmax(0, 1fr); padding: 0 20px; }
  .yr { grid-column: 1; padding-top: 56px; }
  .has-hero .works .yr:first-child { padding-top: 72px; }
  .yr-grid { gap: 14px; }
  .wk img { max-height: 110px; }

  .lb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 72px minmax(0, 1fr) auto 64px; }
  .lb-img { grid-column: 1 / -1; padding: 0 20px; overflow: hidden; }
  .lb-img img { max-height: calc(100vh - 240px); max-height: calc(100dvh - 240px); }
  .lb.is-zoom .lb-img { padding: 0; overflow: auto; }
  .lb-cap { grid-column: 1 / -1; grid-row: 3; padding: 16px 20px 0; }
  .lb-prev { grid-column: 1; grid-row: 4; padding-left: 20px; }
  .lb-next { grid-column: 2; grid-row: 4; padding-right: 20px; }
  .lb-count { display: none; }

  .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: 56px 20px 0; }
  .text-col { grid-column: 1; }
  .text-body { font-size: 16px; }
  .lb-cap, .lb-count, .book-text-inner, .legal-links, .site-footer { font-size: 16px; }
  .book-text h2 { font-size: 19px; }
  .text-small .text-col { font-size: 16px; }

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

@media (max-width: 374px) {
  .menu-row, .hero-name { font-size: 17px; }
}
