:root {
  color-scheme: light;
  --paper: #fafaf8;
  --ink: #252522;
  --muted: #64645d;
  --card-paper: #eeeee9;
  --gutter: 24px;
  --gap: 20px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding: var(--gutter); }
a { color: inherit; text-underline-offset: 0.2em; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
figure, p, h1, h2, h3 { margin: 0; }
picture, img { display: block; width: 100%; }
img { height: auto; }
figcaption { padding-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.site-header {
  flex-shrink: 0;
  position: relative;
  min-height: calc(44px + 2 * var(--gutter));
  padding-right: calc(44px + var(--gutter));
}

.manifesto-link {
  position: absolute;
  top: var(--gutter);
  right: var(--gutter);
  width: 44px;
  height: 44px;
  background: url("/assets/icon-trash.svg") center / 24px auto no-repeat;
}

.manifesto-link:hover { opacity: 0.65; }
.site-home-link { text-decoration: none; }

.random-font-heading {
  padding: var(--gutter);
  letter-spacing: .33rem;
  text-align: center;
}

.gallery {
  --columns: 1;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  align-items: start;
  gap: var(--gap);
  list-style: none;
  padding: 0;
  margin: 0;
}
.gallery.is-masonry { grid-auto-rows: 1px; grid-auto-flow: dense; row-gap: 0; }
.gallery-item { min-width: 0; }
.home .gallery figcaption { font-size: 9px; letter-spacing: 0.05em; }
.card { display: block; text-decoration: none; overflow-wrap: anywhere; }
a.card:hover { opacity: 0.86; }
html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(0 0 0 / 94%);
  color: white;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: black; }
.lightbox img { height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: 50%;
  background: rgb(0 0 0 / 70%);
  color: white;
  font: 28px/1 sans-serif;
  cursor: pointer;
}
.lightbox-close:focus-visible { outline: 2px solid white; outline-offset: 4px; }
.card--text { padding: clamp(24px, 3vw, 40px); background: var(--card-paper); }
.card--text h2 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 400; line-height: 1.16; letter-spacing: -0.035em; margin-bottom: 24px; }
.eyebrow { color: var(--muted); font-size: 11px; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 30px; }
.prose { font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 24px; line-height: 1.3; font-weight: 400; letter-spacing: -0.025em; }
.prose h3 { font-size: 19px; line-height: 1.4; font-weight: 400; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose blockquote { margin-inline: 0; padding-left: 1em; border-left: 2px solid #babbb2; }
.prose pre { white-space: pre-wrap; }
.card--text .prose { font-size: 15px; }

.page-title { max-width: 640px; margin: 0 auto 32px; }
.page-title, .page-blocks--heading-text .text-block { font-size: clamp(30px, 4vw, 48px); font-weight: 400; line-height: 1.15; letter-spacing: -0.04em; }
.page-blocks { display: flex; flex-direction: column; gap: clamp(32px, 5vw, 72px); padding-bottom: 48px; }
.detail:has(> .page-blocks--heading-text) { display: flex; flex-direction: column; justify-content: center; }
.page-blocks--heading-text { padding-bottom: 0; text-align: left; }
.text-block { width: 100%; max-width: 640px; margin-inline: auto; }
.image-block { width: 100%; max-width: 1200px; margin-inline: auto; }
.gallery-block { min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 12px 16px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

footer { 
  flex-shrink: 0;
  padding: var(--gutter); 
}

footer img {
  max-width: 90%;
  margin: 0 auto;
  padding: var(--gutter);
}

.site-copyright {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 599px) {
  :root { --gutter: 12px; }
  .random-font-heading {
    font-size: var(--mobile-heading-size, clamp(1rem, 6vw, 1.5rem));
    letter-spacing: 0.08em;
    line-height: 44px;
    text-align: left;
  }
  .site-home-link { display: inline-block; white-space: nowrap; }
}
@media (hover: hover) and (pointer: fine) { [data-lightbox] { cursor: zoom-in; } }
@media (min-width: 600px) { 
  .gallery { --columns: 2; } 
  footer img { max-width: 33%; } 
  .random-font-heading { 
    text-align: left; 
    letter-spacing: .5rem;
  }
}
@media (min-width: 900px) { .gallery { --columns: 3; } }
@media (min-width: 1200px) { .gallery { --columns: 4; } }
@media (prefers-reduced-motion: no-preference) { a.card { transition: opacity 140ms ease; } }
