/* Self-hosted via @fontsource. The npm packages ship individual woff2 files
   which the Eleventy passthrough copies to /assets/fonts/. Loaded via @font-face. */

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda/bodoni-moda-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda/bodoni-moda-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda/bodoni-moda-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-latin-500-normal.woff2") format("woff2");
}

:root {
  --bg: #fafaf7;
  --ink: #1a1a1a;
  --ink-soft: #555;
  --rule: #e8e5dc;
  --accent: #8a6d3b;
  --serif: "Bodoni Moda", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; margin: 0 0 24px; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 16px; }
h3 { font-size: 24px; margin: 0 0 12px; }
.label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Layout */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* Nav */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-nav .brand {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.site-nav .brand:hover { text-decoration: none; }
/* The real wordmark (484×214 PNG, trimmed): size by height, keep aspect ratio */
.site-nav .brand img {
  height: 44px;
  width: auto;
  display: block;
}
.site-nav nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav nav a { color: var(--ink-soft); }
.site-nav nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav nav a.active {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* Footer */
.site-footer {
  margin-top: 96px;
  padding: 40px 32px;
  background: #1a1a1a;
  color: #aaa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}
.site-footer .brand-mark { display: block; line-height: 0; }
.site-footer .brand-mark img {
  height: 34px;
  width: auto;
  display: block;
  opacity: 0.92;
}
.site-footer .meta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Generic page */
.page { padding: 64px 32px; max-width: 900px; margin: 0 auto; }
.page p { font-size: 17px; line-height: 1.75; color: var(--ink); margin: 0 0 20px; }

@media (max-width: 640px) {
  .site-nav { flex-direction: column; gap: 12px; padding: 16px; position: static; }
  .site-nav .brand img { height: 38px; }
  .site-nav nav { gap: 18px; font-size: 12px; }
}

/* === Homepage === */
.hero {
  padding: 96px 32px 56px;
  max-width: 920px;
  margin: 0 auto;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero .lede {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 620px;
  margin-top: 24px;
}

.selected { border-top: 1px solid var(--rule); margin-top: 24px; }
.section-label { padding: 28px 32px 16px; }

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
}
.project-card {
  background: var(--bg);
  padding: 56px 48px;
  color: var(--ink);
  display: block;
}
.project-card:hover { background: #f4f1e8; text-decoration: none; }
.card-body h2 { font-size: 34px; line-height: 1.15; margin: 10px 0 4px; }
.card-flag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--accent);
  margin: 0 0 14px;
}
.card-body p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; margin: 0 0 16px; }
.card-link { color: var(--accent); font-size: 13px; letter-spacing: 0.05em; }
.project-card:hover .card-link { text-decoration: underline; }

.about-strip {
  padding: 96px 32px;
  border-top: 1px solid var(--rule);
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}
.about-strip-body .pullquote {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.4;
  font-style: italic;
  margin: 0 0 24px;
}
.more-link { font-size: 14px; }

@media (max-width: 800px) {
  .project-grid { grid-template-columns: 1fr; }
  .about-strip { grid-template-columns: 1fr; gap: 24px; padding: 56px 24px; }
  .hero { padding: 56px 24px 32px; }
  .project-card { padding: 32px 24px; }
  .br-desktop { display: none; }
}

/* === Hubs & Editions === */
.hub-header, .edition-header {
  padding: 64px 32px 32px;
  border-bottom: 1px solid var(--rule);
}
.hub-header h1, .edition-header h1 { margin-top: 12px; }
.hub-header .lede, .edition-header .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 720px;
  margin-top: 16px;
}
.edition-meta {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 8px;
}

.hub-editions { padding: 48px 32px; }
.edition-list { list-style: none; padding: 0; margin: 16px 0 0; }
.edition-list li { border-bottom: 1px solid var(--rule); }
.edition-list a, .edition-list .edition-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 24px;
  padding: 20px 8px;
  color: var(--ink);
  align-items: baseline;
}
.edition-list a:hover { background: #f4f1e8; text-decoration: none; }
.edition-year { font-family: var(--serif); font-size: 28px; color: var(--accent); }
.edition-title { font-family: var(--serif); font-size: 22px; }
.edition-dates { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); }

.edition-body { padding: 48px 32px; max-width: 800px; }
.edition-body p { font-size: 17px; line-height: 1.75; margin: 0 0 20px; }
.edition-body h2 { margin-top: 48px; }
.edition-footer { padding: 32px; border-top: 1px solid var(--rule); }
.download-link {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.05em;
}
.download-link:hover { background: var(--accent); color: var(--bg); text-decoration: none; }

@media (max-width: 640px) {
  .edition-list a, .edition-list .edition-row { grid-template-columns: 70px 1fr; }
  .edition-dates { grid-column: 1 / -1; padding-left: 94px; }
}

/* /work/ index rows — title-first layout */
.work-row { grid-template-columns: 110px 1fr auto !important; align-items: baseline; }
@media (max-width: 640px) {
  .work-row { grid-template-columns: 1fr !important; gap: 4px; }
  .work-row .edition-dates { grid-column: auto; padding-left: 0; }
}

/* Hub intro body */
.hub-body { max-width: 720px; padding: 0 32px 48px; }
.hub-body p { font-size: 17px; line-height: 1.75; margin: 0 0 20px; }

/* Edition hero */
.edition-hero {
  width: 100%;
  background: #000;
}
.edition-hero img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}
.edition-hero picture { display: block; }

/* === Gallery === */
.gallery { padding: 32px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.gallery-item {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}
.gallery-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.03); }

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.lightbox.open { display: flex; }
.lightbox-img { max-width: 92vw; max-height: 85vh; object-fit: contain; }
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ddd;
  font-family: var(--sans);
  font-size: 13px;
}
.lightbox button {
  position: absolute;
  background: none;
  color: #fff;
  border: 0;
  font-size: 40px;
  cursor: pointer;
  padding: 12px;
}
.lightbox-close { top: 16px; right: 24px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
  .gallery-item:hover img { transform: none; }
}

/* About portrait */
.about-portrait { margin: 0 0 28px; }
.about-portrait img { width: 100%; height: auto; }
.about-portrait figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
}
