@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/figtree.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/figtree.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/figtree.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/jetbrains-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'Michroma'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/michroma-400.woff2) format('woff2'); }

/* Layout: gallery-wall white with a darkroom safelight red; the photos carry all the color.
   Frame numbers and capture dates (from the original files) act as contact-sheet edge marks. */
:root {
  --bg: #f3f3f0;
  --surface: #e8e8e4;
  --fg: #1a1b1d;
  --muted: #64676b;
  --line: #d2d3ce;
  --safelight: #b0281f;
  --on-photo: #ffffff;
  --display: "Michroma", "Eurostile Extended", "Eurostile", "Microgramma", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(1.5rem, 3.4vw, 2.4rem);
  --step-4: clamp(1.7rem, 3.2vw, 2.6rem);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121314; --surface: #1c1d1f; --fg: #e9e8e4; --muted: #9a9c9f;
    --line: #2e3033; --safelight: #e2594d; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121314; --surface: #1c1d1f; --fg: #e9e8e4; --muted: #9a9c9f;
  --line: #2e3033; --safelight: #e2594d; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--safelight); outline-offset: 3px; }

.wrap {
  max-width: 1280px; margin-inline: auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.label b { color: var(--safelight); font-weight: 500; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.2; text-wrap: balance; margin: 0; }
/* Logo style from the original Photonook wordmark: large initial capital, small capitals after it */
h1, h2, .wordmark, .cat-name, .lb-caption { font-variant-caps: small-caps; letter-spacing: 0.03em; }
h2 { font-size: var(--step-3); }
section { padding-block: clamp(56px, 9vw, 112px); }
section + section { border-top: 1px solid var(--line); }

/* Header */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px; flex-wrap: wrap;
}
.wordmark { font-family: var(--display); font-size: 1.25rem; text-decoration: none; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 32px); flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.site-nav a:hover { color: var(--fg); }

/* Hero */
.hero { padding-block: clamp(28px, 5vw, 56px) 0; border: 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px); align-items: end;
}
.hero h1 { font-size: var(--step-4); }
.hero h1 .role { display: block; font-size: 0.42em; color: var(--muted); margin-top: 0.35em; }
.hero-text { display: grid; gap: 24px; min-width: 0; padding-bottom: 8px; }
.hero-text p { margin: 0; max-width: 38ch; font-size: var(--step-1); line-height: 1.5; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 0.95rem var(--body); padding: 12px 20px; border-radius: 2px;
  text-decoration: none; cursor: pointer; border: 1px solid var(--fg);
  background: var(--fg); color: var(--bg);
}
.btn.ghost { background: transparent; color: var(--fg); }
.btn:hover { background: var(--safelight); border-color: var(--safelight); color: var(--on-photo); }
.hero-photo { position: relative; margin: 0; min-width: 0; }
.hero-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-photo figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; }

/* Category index */
.cats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px); margin-top: clamp(40px, 6vw, 72px);
}
.cat {
  all: unset; cursor: pointer; display: grid; gap: 10px; min-width: 0;
}
.cat img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: filter .3s, transform .3s; }
.cat:hover img { filter: brightness(1.06); transform: translateY(-3px); }
.cat:focus-visible { outline: 2px solid var(--safelight); outline-offset: 4px; }
.cat-name { font-family: var(--display); font-size: clamp(0.95rem, 1.7vw, 1.3rem); line-height: 1.2; }
.cat-meta { display: flex; justify-content: space-between; gap: 8px; }

/* Gallery */
.gallery-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 32px;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: 500 0.85rem var(--body); padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
}
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.grid { columns: 3 300px; column-gap: clamp(12px, 1.6vw, 20px); }
.frame {
  all: unset; display: block; width: 100%; cursor: zoom-in;
  break-inside: avoid; margin-bottom: clamp(12px, 1.6vw, 20px);
}
.frame img { width: 100%; background: var(--surface); transition: opacity .25s; }
.frame:hover img { opacity: .9; }
.frame:focus-visible { outline: 2px solid var(--safelight); outline-offset: 3px; }
.frame .label { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; }
.frame[hidden] { display: none !important; }

/* Lightbox */
dialog.lightbox {
  border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100%;
  background: rgb(10 10 11 / 0.96); color: #e9e8e4;
}
dialog.lightbox::backdrop { background: rgb(10 10 11 / 0.96); }
.lb-inner {
  height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px;
  padding: max(16px, env(safe-area-inset-top, 0px)) var(--gutter-r) max(16px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
}
.lb-top, .lb-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lb-stage { display: grid; place-items: center; min-height: 0; }
.lb-stage img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lb-btn {
  font: 500 0.85rem var(--mono); background: transparent; color: #e9e8e4; cursor: pointer;
  border: 1px solid #44464a; padding: 8px 14px; border-radius: 2px;
}
.lb-btn:hover { border-color: #e2594d; color: #fff; }
.lb-caption { font-family: var(--display); font-size: 0.95rem; text-align: center; }
.lb-count { font: 0.75rem var(--mono); letter-spacing: .08em; color: #9a9c9f; }

.two-col {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.prose { display: grid; gap: 20px; min-width: 0; }
.prose p { margin: 0; max-width: 60ch; color: var(--fg); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.facts div { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.facts dd { margin: 0; font-weight: 500; }

/* Contact */
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px; padding: 11px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--safelight); outline-offset: 0; border-color: transparent; }
textarea { min-height: 140px; resize: vertical; }
.form-note { grid-column: 1 / -1; margin: 0; font-size: 0.9rem; color: var(--muted); }
.form-note.ok { color: var(--fg); }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; }

@media (max-width: 860px) {
  .hero-grid, .two-col, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { order: -1; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  form { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .site-nav a { font-size: 0.85rem; }
}

/* Production additions */
body { margin: 0; -webkit-font-smoothing: antialiased; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note.err { color: var(--safelight); }
.empty-note { color: var(--muted); }
.optional { font-weight: 400; color: var(--muted); }
.about-side { display: grid; gap: 0; align-content: start; min-width: 0; }
.about-photo { margin: clamp(20px, 3vw, 32px) 0 0; }
.about-photo img { width: 100%; max-width: 360px; max-height: 520px; object-fit: cover; }
