/* vilpponen.co — design system v2
   paper, one serif for reading, sans + mono for furniture, ratios never heights. */

:root {
  --paper: oklch(0.98 0.008 85);
  --tint: oklch(0.94 0.01 85);
  --rule: oklch(0.89 0.008 85);
  --rule-strong: oklch(0.86 0.01 85);
  --meta: oklch(0.6 0.015 60);
  --dek: oklch(0.48 0.012 60);
  --accent: oklch(0.5 0.1 40);
  --accent-soft: oklch(0.82 0.05 40);
  --ink: oklch(0.24 0.012 60);
  --ink-soft: oklch(0.36 0.012 60);

  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --shell: 1160px;
  --text: 680px;
  --wide: 920px;
  --hero: 1440px;
  --pad: 32px;
}

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

html { -webkit-text-size-adjust: 100%; }

html { overflow-x: clip; }

body {
  font-optical-sizing: auto;
  max-width: 100%;
  overflow-x: clip;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.02em; }

::selection { background: var(--accent-soft); }

/* ---------- widths ---------- */

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad); }
.text { max-width: var(--text); margin: 0 auto; padding: 0 var(--pad); }
.hero-width { max-width: var(--hero); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- furniture type ---------- */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--meta);
}
.meta .strong { color: var(--ink); }
.meta .accent, .accent { color: var(--accent); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.5 0.012 60);
}
.label--quiet { color: var(--meta); }
.label--rule { border-top: 1px solid var(--ink); padding-top: 16px; margin-top: 96px; display: block; }

.lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}

.dek { font-size: 15px; line-height: 1.6; color: var(--dek); margin: 0; max-width: 56ch; }
.dek--intro { max-width: 52ch; font-size: 16px; color: oklch(0.45 0.012 60); }

/* ---------- header ---------- */

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule);
}
.site-title { font-family: var(--serif); font-size: 23px; letter-spacing: -0.01em; color: var(--ink); }
.nav { list-style: none; margin: 0; padding: 0; }

.site-nav .nav { display: flex; gap: 30px; font-size: 14px; letter-spacing: 0.02em; }
.site-nav .nav-item a,
.site-nav__link {
  display: inline-block;
  color: oklch(0.45 0.012 60);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.site-nav .nav-item a:hover,
.site-nav__link:hover { color: var(--ink); border-color: var(--accent); }
.site-nav .nav-current a,
.site-nav__link.is-active { color: var(--ink); border-color: var(--accent); }

/* ---------- front-page hero ---------- */

.hero { max-width: var(--hero); margin: 0 auto; padding: 56px var(--pad) 0; }
.hero__frame { position: relative; }
.hero__frame > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 810px;
  object-fit: cover;
  background: var(--tint);
}
.hero__card {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 660px;
  background: var(--paper);
  padding: 36px 44px 32px;
  display: grid;
  gap: 14px;
  color: inherit;
  transition: background 200ms ease;
}
.hero__card:hover { background: oklch(0.965 0.009 85); color: inherit; }
.hero__title { font-size: clamp(38px, 3.6vw, 58px); line-height: 1.0; letter-spacing: -0.03em; max-width: 16ch; }
.hero__card .lede { font-size: clamp(16px, 1.4vw, 20px); max-width: 46ch; }
.hero__stats { border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 4px; }

/* Lead post with no feature image: the card sits in normal flow instead of being
   absolutely positioned inside a frame that has collapsed to zero height. */
.hero--text { max-width: var(--shell); padding-top: 88px; }
.hero--text .hero__frame { position: static; }
.hero--text .hero__card {
  position: static;
  max-width: 760px;
  padding: 0;
  background: none;
}
.hero--text .hero__card:hover { background: none; }
.hero--text .hero__title { font-size: clamp(38px, 4.4vw, 68px); max-width: 20ch; }

/* ---------- ledger rows ---------- */

.ledger { margin-top: 88px; }
.ledger__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--ink);
  padding: 20px 0 10px;
}
.ledger .row:first-child { border-top: 1px solid var(--ink); }

.row {
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 32px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  align-items: baseline;
  transition: opacity 180ms ease;
}
.row:hover { opacity: 0.7; color: inherit; }
.row--essay { align-items: start; }
.row--tight { grid-template-columns: 1fr auto; padding: 18px 0; }
.row__body { display: grid; gap: 8px; min-width: 0; }
.row__title { font-size: 28px; line-height: 1.18; letter-spacing: -0.015em; max-width: 32ch; }
.row__meta { justify-content: flex-end; white-space: nowrap; }
.row__count { color: var(--ink); }
.row__thumbs { display: grid; grid-template-columns: repeat(3, 168px); gap: 8px; margin-top: 8px; }
.row__thumbs img { aspect-ratio: 3 / 2; object-fit: cover; background: var(--tint); width: 100%; min-width: 0; }

/* ---------- index heads, cards ---------- */

.index-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
  padding-top: 88px;
  padding-bottom: 24px;
}
.index-head .post__title { font-size: 58px; line-height: 1.02; letter-spacing: -0.03em; }
.index-head .post__title::first-letter { text-transform: uppercase; }
.index-head__count { padding-bottom: 8px; }

.feature-card { display: grid; gap: 20px; color: inherit; margin-top: 32px; border-top: 1px solid var(--ink); padding-top: 32px; }
.feature-card:hover { opacity: 0.85; color: inherit; }
.feature-card img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; background: var(--tint); }
.feature-card__body { display: grid; gap: 12px; }
.feature-card h2 { font-size: 44px; line-height: 1.05; letter-spacing: -0.025em; max-width: 22ch; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 32px; margin-top: 96px; }
.card { display: grid; gap: 16px; color: inherit; align-content: start; }
.card:hover { opacity: 0.85; color: inherit; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }
.card__body { display: grid; gap: 8px; }
.card h2 { font-size: 30px; line-height: 1.12; letter-spacing: -0.02em; max-width: 24ch; }
.card .dek { max-width: 46ch; }

/* ---------- post ---------- */

/* The header runs wider than the reading measure so headlines are not forced into
   17-character lines, but keeps its left edge on the 616px text column. */
.post__header.text {
  width: auto;
  max-width: 920px;
  margin-left: max(32px, calc(50% - 308px));
  margin-right: 32px;
  padding: 0;
  padding-top: 96px;
  display: grid;
  gap: 24px;
}
.post__header .lede { max-width: 46ch; }
.post__header .meta { max-width: 616px; }
.post__title { font-size: 58px; line-height: 1.02; letter-spacing: -0.03em; text-wrap: pretty; overflow-wrap: break-word; max-width: 20ch; }
.row__title, .hero__title, .card h2, .feature-card h2 { overflow-wrap: break-word; }
.post__byline { border-top: 1px solid var(--rule); padding-top: 16px; gap: 16px; max-width: 616px; }

.post__feature { margin: 56px auto 0; }
.post__feature img { width: 100%; aspect-ratio: 16 / 9; max-height: 810px; object-fit: cover; background: var(--tint); }
.post__feature figcaption,
.gh-content figcaption {
  max-width: 616px;
  margin: 12px auto 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: oklch(0.5 0.012 60);
  text-align: left;
}

.post__rule { display: flex; gap: 10px; align-items: center; margin-top: 64px; }
.post__rule span { height: 1px; flex: 1; background: var(--rule-strong); }
.post__rule i { width: 3px; height: 3px; background: var(--meta); }

/* ---------- Ghost content ---------- */

.gh-content { padding-top: 88px; }
.gh-content > * {
  max-width: 616px;
  margin: 0 auto 24px;
  padding: 0;
}
.gh-content > p,
.gh-content > ul,
.gh-content > ol,
.gh-content > blockquote {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.62;
  text-wrap: pretty;
}
.gh-content > h2 { font-size: 32px; line-height: 1.18; margin-top: 48px; }
.gh-content > h3 { font-size: 24px; line-height: 1.25; font-weight: 500; margin-top: 40px; }
.gh-content a { border-bottom: 1px solid var(--accent-soft); }
.gh-content a:hover { border-color: var(--ink); }
.gh-content > blockquote {
  border-left: 1px solid var(--accent);
  padding-left: 24px;
  font-weight: 300;
  font-size: 22px;
  line-height: 1.5;
  color: oklch(0.3 0.012 60);
}
.gh-content > hr {
  border: 0;
  height: 1px;
  background: var(--rule-strong);
  margin: 56px auto;
}

.gh-content > figure { margin-bottom: 56px; margin-top: 56px; }
.gh-content img { width: 100%; object-fit: cover; background: var(--tint); }

.gh-content .kg-width-wide { max-width: var(--wide); }
.gh-content .kg-width-full { max-width: var(--hero); }
.gh-content .kg-width-full img { max-height: 810px; }

.kg-gallery-container { display: grid; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image { flex: 1 1 0; min-width: 0; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card {
  background: var(--tint);
  padding: 24px 28px;
  display: grid;
  gap: 8px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: oklch(0.3 0.012 60);
}
.kg-callout-card .kg-callout-emoji { display: none; }

.kg-bookmark-card { max-width: 616px; }
.kg-bookmark-container {
  display: grid;
  grid-template-columns: 1fr 132px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: inherit;
  transition: border-color 180ms ease, background 180ms ease;
}
.kg-bookmark-container:hover { border-color: var(--ink); background: oklch(0.965 0.009 85); }
.kg-bookmark-content { padding: 20px 22px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.kg-bookmark-title { font-family: var(--serif); font-size: 19px; line-height: 1.25; color: var(--ink); }
.kg-bookmark-description { font-size: 14px; line-height: 1.5; color: oklch(0.5 0.012 60); }
.kg-bookmark-metadata { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.58 0.015 60); }
.kg-bookmark-icon, .kg-bookmark-author, .kg-bookmark-publisher { display: none; }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; }

.kg-btn, .kg-card .kg-btn {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 24px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 0;
  transition: background 180ms ease;
}
.kg-btn:hover { background: var(--accent); color: var(--paper); }

/* ---------- tags, buttons ---------- */

.tag-list { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 40px; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.4 0.012 60);
  border: 1px solid var(--rule-strong);
  padding: 12px 14px;
  transition: border-color 160ms ease, color 160ms ease;
}
.tag:hover { border-color: var(--ink); color: var(--ink); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: background 180ms ease, color 180ms ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- pagination ---------- */

.pagination { display: flex; justify-content: center; gap: 12px; padding: 48px 0 0; }
.pagination a, .pagination .page-number {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pagination a:hover { background: var(--ink); color: var(--paper); }
.pagination .page-number { border-color: transparent; color: var(--meta); font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- read next ---------- */

.readnext { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 32px; }
.readnext__item { display: grid; gap: 14px; color: inherit; align-content: start; }
.readnext__item:hover { opacity: 0.75; color: inherit; }
.readnext__item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--tint); }
.readnext__item h3 { font-size: 26px; line-height: 1.18; letter-spacing: -0.015em; max-width: 24ch; }
.readnext__item--next .meta { justify-content: flex-end; }

/* ---------- subscribe ---------- */

.subscribe {
  margin: 88px 0 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--ink);
  display: grid;
  gap: 14px;
}
.subscribe p { margin: 0; max-width: 52ch; font-size: 15px; line-height: 1.6; color: var(--dek); }
.subscribe__form { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.subscribe__form input {
  flex: 1 1 260px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  border-radius: 0;
}
.subscribe__form input:focus { outline: none; border-color: var(--ink); }
.subscribe__form button {
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 180ms ease;
}
.subscribe__form button:hover { background: var(--accent); border-color: var(--accent); }
.subscribe__form button:disabled { opacity: 0.6; cursor: default; }
.subscribe__msg { display: none; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding-top: 4px; }
.success .subscribe__msg--success { display: block; color: var(--ink); }
.error .subscribe__msg--error { display: block; color: var(--accent); }

/* ---------- about ---------- */

.about__top {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 72px;
  align-items: start;
  padding-top: 88px;
}
.about__prose { max-width: 616px; display: grid; gap: 24px; }
.about__portrait { margin: 0; display: grid; gap: 12px; }
.about__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--tint); }
.about__portrait figcaption { font-size: 14px; line-height: 1.55; color: oklch(0.5 0.012 60); }
.gh-content--flat { padding-top: 0; }
.gh-content--flat > * { max-width: none; margin-left: 0; margin-right: 0; }

/* ---------- 404 ---------- */

.error { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; padding-top: 112px; }
.error__copy { display: grid; gap: 24px; max-width: 46ch; align-content: start; }
.error__recent .label--rule { margin-top: 0; }

/* ---------- footer ---------- */

.site-footer { margin-top: 112px; padding-bottom: 40px; }
.site-footer__cols {
  border-top: 1px solid var(--ink);
  padding-top: 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.site-footer__name { font-family: var(--serif); font-size: 21px; letter-spacing: -0.01em; }
.site-footer__bio p { margin: 12px 0 0; max-width: 40ch; font-size: 15px; line-height: 1.6; color: var(--dek); }
.site-footer__nav { display: grid; gap: 10px; font-size: 14px; }
.site-footer__nav .nav { display: grid; gap: 10px; }
.site-footer__nav a { color: oklch(0.4 0.012 60); }
.site-footer__nav a:hover { color: var(--ink); }
.site-footer__nav .label { margin-bottom: 4px; }
.site-footer__base {
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.62 0.015 60);
}

/* ---------- tablet ---------- */

@media (min-width: 601px) {
  .row__thumbs:has(> :nth-child(2)) { grid-template-columns: repeat(3, 168px); }
}

@media (max-width: 900px) {
  .index-head, .about__top, .error, .readnext, .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .index-head { align-items: start; }
  .index-head .post__title, .post__title { font-size: 46px; }
  .hero__card { max-width: 78%; padding: 28px 32px 26px; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .readnext__item--next .meta { justify-content: flex-start; }
  .row { grid-template-columns: 1fr auto; }
  .row__date { grid-column: 1 / -1; }
  .row__thumbs { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- mobile ---------- */

@media (max-width: 600px) {
  :root { --pad: 20px; }

  .site-header__inner {
    display: block;
    padding-top: 20px;
    padding-bottom: 0;
    border-bottom: 0;
  }
  .site-nav .nav {
    gap: 0;
    margin: 16px calc(var(--pad) * -1) 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }
  .site-nav .nav-item {
    flex: 1 1 0;
    display: flex;
    align-items: stretch;
    min-width: 0;
    border-right: 1px solid var(--rule);
  }
  .site-nav .nav-item:last-child { border-right: 0; }
  .site-nav .nav-item a,
  .site-nav__link {
    flex: 1 1 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 4px;
    border-bottom: 2px solid transparent;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .site-nav .nav-current a { border-bottom-color: var(--accent); }

  /* hero: photo full-bleed, card below it */
  .hero { padding: 0; }
  .hero__frame > img { aspect-ratio: 4 / 5; max-height: none; }
  .hero__card { position: static; max-width: none; padding: 24px var(--pad) 28px; gap: 12px; }
  .hero--text { padding-top: 32px; }
  .hero--text .hero__card { padding: 0 var(--pad); }
  .hero__title { font-size: 36px; }
  .hero__card .lede { font-size: 17px; }

  .ledger { margin-top: 8px; }
  .row, .row--essay { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; align-items: start; }
  .row__date { order: -1; }
  .row__meta { justify-content: flex-start; }
  .row__title { font-size: 23px; }
  .row__thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .row__thumbs img { aspect-ratio: 1; }

  .index-head { padding-top: 40px; }
  .index-head .post__title, .post__title { font-size: 40px; }
  .post__header.text {
    width: auto;
    max-width: none;
    margin-left: 0;
    padding: 0 var(--pad);
    padding-top: 40px;
    gap: 16px;
  }
  .post__title { max-width: none; }
  .post__header .lede, .post__header .meta, .post__byline { max-width: none; }
  .lede { font-size: 19px; }

  /* images ignore the gutter, captions keep it */
  .post__feature, .hero-width { padding: 0; }
  .post__feature { margin-top: 32px; }
  .post__feature img { aspect-ratio: 4 / 5; max-height: none; }
  .post__feature figcaption, .gh-content figcaption { padding: 0 var(--pad); max-width: none; }

  .gh-content { padding-top: 40px; }
  .gh-content > * { max-width: none; margin-left: var(--pad); margin-right: var(--pad); margin-bottom: 20px; }
  .gh-content > p, .gh-content > ul, .gh-content > ol { font-size: 18px; line-height: 1.6; }
  .gh-content > h2 { font-size: 26px; margin-top: 32px; }
  .gh-content > h3 { font-size: 21px; }
  .gh-content > blockquote { font-size: 20px; padding-left: 18px; }
  .gh-content > figure, .gh-content .kg-width-wide, .gh-content .kg-width-full {
    margin-left: 0; margin-right: 0; max-width: none;
  }
  .gh-content > figure { margin-top: 32px; margin-bottom: 32px; }
  .gh-content .kg-width-full img { max-height: none; }
  .kg-gallery-row { flex-wrap: wrap; gap: 6px; }
  .kg-gallery-row .kg-gallery-image { flex: 1 1 100%; }
  .kg-gallery-row:has(> :nth-child(2):last-child) .kg-gallery-image { flex: 1 1 calc(50% - 3px); }
  .kg-bookmark-container { grid-template-columns: 1fr; }
  .kg-bookmark-thumbnail { order: -1; }
  .kg-bookmark-thumbnail img { aspect-ratio: 16 / 9; }

  .card img { aspect-ratio: 4 / 3; }
  .card h2, .feature-card h2 { font-size: 25px; }
  .feature-card img { aspect-ratio: 4 / 5; }

  .tag { padding: 15px 14px; }
  .btn, .pagination a, .subscribe__form button, .subscribe__form input { width: 100%; justify-content: center; height: 48px; }
  .btn-row, .subscribe__form { display: grid; gap: 10px; }

  .site-footer { margin-top: 64px; }
  .site-footer__cols { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .readnext { gap: 24px; }
}


/* ---------- lightbox ---------- */

.is-zoomable { cursor: zoom-in; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  grid-template-columns: 88px 1fr 88px;
  align-items: center;
  background: oklch(0.16 0.008 60 / 0.97);
}
.lb.is-open { display: grid; }

.lb__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.75 0.008 60);
}
.lb__close {
  background: none;
  border: 0;
  border-bottom: 1px solid oklch(0.5 0.008 60);
  padding: 2px 0;
  font: inherit;
  color: oklch(0.92 0.006 60);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease;
}
.lb__close:hover { border-color: oklch(0.92 0.006 60); }

.lb__stage {
  grid-column: 2;
  margin: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: center;
  max-height: 100vh;
  padding: 64px 0;
}
.lb__stage img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 220ms ease;
}
.lb__stage img.is-in { opacity: 1; }
.lb__stage figcaption {
  max-width: 56ch;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: oklch(0.7 0.008 60);
  text-align: center;
}

.lb__nav {
  height: 100%;
  background: none;
  border: 0;
  color: oklch(0.7 0.008 60);
  font-size: 22px;
  cursor: pointer;
  transition: color 160ms ease;
}
.lb__nav:hover { color: oklch(0.95 0.006 60); }
.lb__nav--prev { grid-column: 1; }
.lb__nav--next { grid-column: 3; }

@media (max-width: 600px) {
  .lb { grid-template-columns: 1fr; }
  .lb__stage { grid-column: 1; padding: 56px 12px 88px; }
  .lb__stage img { max-height: 70vh; }
  .lb__nav {
    position: absolute;
    bottom: 0;
    height: 64px;
    width: 50%;
    font-size: 20px;
  }
  .lb__nav--prev { left: 0; }
  .lb__nav--next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
