:root {
  --paper: #fbfbfb;
  --ink: #342e2e;
  --muted: #7d7474;
  --line: rgba(52, 46, 46, .18);
  --night: #2b2626;
  --night-fg: #f4f1ea;
  --serif-display: "Instrument Serif", Georgia, serif;
  --serif: Newsreader, Georgia, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --row: 260px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.5; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Buttons */
.btn { display: inline-block; white-space: nowrap; text-decoration: none; border: 1px solid currentColor; border-radius: 999px; padding: 11px 26px; font-size: 16px; line-height: 1.2; background: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--light { color: #fff; border-color: rgba(255, 255, 255, .85); background: rgba(20, 16, 16, .18); backdrop-filter: blur(4px); }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.arrow-link { text-decoration: none; white-space: nowrap; }
.arrow-link::after { content: " \2192"; }
.arrow-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.eyebrow { font-size: 12px !important; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px !important; }
.eyebrow a { text-decoration: none; }
.eyebrow a::before { content: "\2190  "; }

/* Home hero, with the header laid over it */
.home .site-header--overlay { position: absolute; inset: 0 0 auto 0; z-index: 3; color: #fff; background: linear-gradient(rgba(10, 8, 8, .35), transparent); }
.home .site-header--overlay .logo { color: #fff; }
.hero { position: relative; height: min(92vh, 900px); min-height: 520px; color: #fff; overflow: hidden; background: #3a2a20; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 8, 8, .45), rgba(10, 8, 8, 0) 60%), linear-gradient(transparent 55%, rgba(10, 8, 8, .45)); }
.hero__text { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(40px, 9vh, 96px); max-width: 720px; }
.hero h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(42px, 6.4vw, 84px); line-height: 1; margin: 0 0 18px; text-wrap: balance; }
.hero p { font-size: clamp(17px, 1.6vw, 21px); margin: 0 0 26px; max-width: 34ch; }

/* Sections and category cards */
.section { padding: clamp(48px, 8vw, 96px) var(--gutter); }
.section--flush { padding-top: 24px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section__head h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(34px, 4.4vw, 52px); line-height: 1; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.card { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; color: #fff; text-decoration: none; background: #e9e7e3; }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(10, 8, 8, .6)); }
.card:hover .card__img { transform: scale(1.04); }
.card__text { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card__name { font-family: var(--serif-display); font-weight: 400; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.05; margin: 0; }
.card__n { font-size: 14px; opacity: .85; white-space: nowrap; }

/* Text beside an image, used on the home page */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.split--dark { background: var(--night); color: var(--night-fg); }
.split--dark + .split--dark { padding-top: 0; }
.split--reverse .split__img { order: -1; }
.split--text { grid-template-columns: minmax(0, 720px); }
.split h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(36px, 4.4vw, 56px); line-height: 1; margin: 0 0 22px; }
.split p { margin: 0 0 16px; max-width: 58ch; }
.split .btn { margin-top: 12px; }
.split--dark .btn:hover { background: var(--night-fg); color: var(--night); border-color: var(--night-fg); }
.split__img img { width: 100%; height: auto; }

/* Text pages */
.prose-page { display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 420px); gap: clamp(32px, 6vw, 96px); padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 104px); align-items: start; }
.prose h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(42px, 6vw, 68px); line-height: 1.02; margin: 0 0 24px; }
.prose h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; margin: 48px 0 14px; }
.prose h3 { font-size: 19px; font-weight: 500; margin: 28px 0 6px; }
.prose p, .prose li { max-width: 62ch; }
.prose ul { padding-left: 1.2em; }
.prose a { text-underline-offset: 3px; }
.prose-page__img { margin: 8px 0 0; position: sticky; top: 24px; }
.prose-page__img img { width: 100%; height: auto; }
.prose-page__img figcaption { color: var(--muted); font-size: 15px; margin-top: 8px; }
.contact-links { font-size: 19px; line-height: 1.8; }

/* Contact form */
.contact-form { display: grid; gap: 16px; margin-top: 32px; max-width: 560px; }
.contact-form label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.contact-form input, .contact-form textarea { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 11px 14px; color: var(--ink); font-size: 17px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ink); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.contact-form__status { margin: 0; min-height: 1.5em; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px var(--gutter); }
.logo { display: grid; justify-items: center; text-decoration: none; color: var(--ink); }
.logo__mark { width: 64px; fill: currentColor; margin-bottom: 2px; }
.logo__name { font-family: var(--serif-display); font-size: 27px; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.logo__sub { font-size: 9px; letter-spacing: .42em; text-transform: uppercase; margin-top: 5px; display: flex; align-items: center; gap: 8px; }
.logo__sub::before, .logo__sub::after { content: ""; width: 22px; height: 1px; background: currentColor; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: currentColor; }

/* Intro */
.intro { padding: 40px var(--gutter) 8px; }
.intro h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; margin: 0 0 10px; }
.intro p { margin: 0; color: var(--muted); font-size: 19px; }

/* Filters */
.filters { padding: 20px var(--gutter) 14px; border-bottom: 1px solid var(--line); }
.filters__top { display: flex; gap: 12px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; background: #fff; max-width: 560px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: none; padding: 11px 0; min-width: 0; }
.search:focus-within { border-color: var(--ink); }
.filters__toggle { display: none; border: 1px solid var(--ink); background: none; border-radius: 999px; padding: 0 18px; cursor: pointer; }
.facets { display: grid; gap: 14px; margin-top: 20px; }
.facet { display: grid; grid-template-columns: 96px 1fr; align-items: start; }
.facet h2 { font-family: var(--serif); font-weight: 400; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.facet .chips--sub { grid-column: 2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--sub { margin-top: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: 15px; line-height: 1.4; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip:disabled { opacity: .38; cursor: default; border-color: var(--line); }
.chip__n { color: var(--muted); font-size: 13px; margin-left: 6px; }
.chip[aria-pressed="true"] .chip__n { color: rgba(251, 251, 251, .7); }
.chips--sub .chip { font-size: 14px; padding: 3px 12px; }
.status { display: flex; align-items: center; gap: 18px; margin-top: 16px; font-size: 15px; }
.status p { margin: 0; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sort { margin-left: auto; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: #fff; color: var(--ink); }

/* Justified grid: each tile grows in proportion to its aspect ratio */
.grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px var(--gutter) 64px; }
.grid::after { content: ""; flex-grow: 999; }
.tile { position: relative; margin: 0; height: var(--row); flex-grow: var(--r); flex-basis: calc(var(--r) * var(--row)); overflow: hidden; background: #e9e7e3; cursor: zoom-in; border: 0; padding: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .4s; opacity: 0; }
.tile img.is-loaded { opacity: 1; }
.tile:hover img { transform: scale(1.03); }
.tile__label { position: absolute; inset: auto 0 0 0; padding: 28px 14px 10px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(20, 16, 16, .72)); opacity: 0; transition: opacity .25s; font-size: 15px; line-height: 1.3; }
.tile__label small { display: block; opacity: .8; font-size: 13px; }
.tile:hover .tile__label, .tile:focus-visible .tile__label { opacity: 1; }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.empty { padding: 0 var(--gutter) 80px; color: var(--muted); }

/* Viewer */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(22, 18, 18, .97); color: var(--night-fg); }
.viewer::backdrop { background: rgba(22, 18, 18, .97); }
.viewer figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; padding: 56px 72px 24px; gap: 16px; }
.viewer img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.viewer figcaption { text-align: center; max-width: 720px; justify-self: center; }
.viewer h2 { font-family: var(--serif-display); font-weight: 400; font-size: 30px; margin: 0; line-height: 1.1; }
.viewer p { margin: 4px 0 0; color: rgba(244, 241, 234, .75); font-size: 15px; }
.viewer__meta { font-size: 13px !important; letter-spacing: .06em; }
.viewer__btn { position: absolute; z-index: 2; background: none; border: 0; color: var(--night-fg); cursor: pointer; font-size: 44px; line-height: 1; padding: 10px 16px; opacity: .7; }
.viewer__btn:hover { opacity: 1; }
.viewer__close { top: 8px; right: 12px; font-size: 40px; }
.viewer__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.viewer__next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Footer (matches the live site) */
.site-footer { background: var(--night); color: var(--night-fg); padding: 56px var(--gutter) 28px; border-top: 1px solid rgba(244, 241, 234, .12); }
.site-footer a { color: var(--night-fg); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.site-footer__name { font-family: var(--serif-display); font-size: 34px; line-height: 1.05; margin: 0 0 12px; }
.site-footer__tag { color: rgba(244, 241, 234, .6); margin: 0; max-width: 32ch; font-size: 16px; }
.site-footer__h { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(244, 241, 234, .6); margin: 6px 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 10px; }
.site-footer__base { margin-top: 56px; padding-top: 20px; border-top: 1px solid rgba(244, 241, 234, .16); display: flex; justify-content: space-between; gap: 16px; color: rgba(244, 241, 234, .6); font-size: 13px; }
.site-footer__base p { margin: 0; }
.site-footer__base a { color: rgba(244, 241, 234, .6); }

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .prose-page { grid-template-columns: minmax(0, 680px); }
  .prose-page__img { position: static; max-width: 480px; }
}

@media (max-width: 767px) {
  .hero { height: 88svh; min-height: 480px; }
  .hero::after { background: linear-gradient(transparent 35%, rgba(10, 8, 8, .6)); }
  .hero__text { text-align: left; }
  .home .site-header--overlay { background: linear-gradient(rgba(10, 8, 8, .45), transparent); }
  .section__head { flex-direction: column; gap: 6px; }
  .cards { gap: 8px; }
  .card { aspect-ratio: 1; }
  .card__text { left: 10px; right: 10px; bottom: 8px; flex-direction: column; gap: 0; }
  .card__name { font-size: 20px; }
  .card__n { font-size: 12px; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__img { order: 0; }
  :root { --row: 150px; }
  .site-header { flex-direction: column; gap: 14px; padding-top: 18px; }
  .site-nav { justify-content: center; gap: 16px; font-size: 16px; }
  .intro { text-align: center; padding-top: 24px; }
  .intro p { font-size: 17px; }
  .filters { padding-top: 12px; }
  .filters__toggle { display: block; }
  .facets { display: none; }
  .facets.is-open { display: grid; }
  .facet { grid-template-columns: 1fr; gap: 8px; }
  .facet h2 { margin: 0; }
  .facet .chips--sub { grid-column: 1; }
  .search input::placeholder { font-size: 15px; }
  .grid { gap: 4px; padding-top: 12px; }
  .tile__label { display: none; }
  .viewer figure { padding: 52px 12px 20px; }
  .viewer__prev, .viewer__next { display: none; }
  .viewer h2 { font-size: 24px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .site-footer__tag { margin: 0 auto; }
  .site-footer__base { flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-top: 40px; }
}
