:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --ink: #1d1b19;
  --muted: #6f6a63;
  --line: #e7e2d9;
  --accent: #c2410c;
  --accent-soft: #fde7d6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gap: 28px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(251, 249, 245, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font: 600 1.15rem var(--serif); text-decoration: none; letter-spacing: .01em; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.site-header nav a:hover { color: var(--accent); }

/* hero */
.hero {
  padding: clamp(56px, 10vw, 120px) clamp(16px, 4vw, 48px) clamp(40px, 6vw, 72px);
  max-width: 1100px; margin: 0 auto; text-align: center;
}
.eyebrow { margin: 0 0 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 600; }
.hero h1 { margin: 0; font: 400 clamp(2.6rem, 7vw, 5.2rem)/1.05 var(--serif); letter-spacing: -.01em; }
.lead { margin: 20px auto 0; max-width: 34em; color: var(--muted); font-size: 1.1rem; }

/* gallery (JS masonry: items go into the shortest column) */
main { padding: 0 clamp(16px, 4vw, 48px) 40px; max-width: 1500px; margin: 0 auto; }
.gallery { display: flex; gap: var(--gap); align-items: flex-start; }
.col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }

.work { margin: 0; cursor: zoom-in; opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.work.in { opacity: 1; transform: none; }
.work .frame {
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(60,40,20,.07);
  transition: box-shadow .25s ease, transform .25s ease;
}
.work:hover .frame { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 16px 36px rgba(60,40,20,.12); }
.work img { width: 100%; height: auto; background: #efebe4; }
.work figcaption { padding: 12px 2px 0; }
.work .t { font: 500 1.05rem/1.3 var(--serif); }
.work .m { color: var(--muted); font-size: .85rem; }

.sentinel { display: flex; justify-content: center; padding: 40px 0; }
.sentinel.done { display: none; }
.loader { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); }

/* contact */
.contact { background: var(--surface); border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 96px) 16px; }
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact h2, .page h1 { font: 400 2.2rem/1.2 var(--serif); margin: 0 0 8px; }
.contact > div > p { color: var(--muted); margin-top: 0; }
form { display: grid; gap: 16px; margin-top: 28px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
input, textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.consent { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 400; color: var(--muted); }
.consent input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
button[type=submit] {
  justify-self: start; font: 600 1rem var(--sans); color: #fff; background: var(--accent);
  border: 0; border-radius: 999px; padding: 13px 28px; cursor: pointer; transition: filter .2s;
}
button[type=submit]:hover { filter: brightness(1.08); }
button[type=submit]:disabled { opacity: .6; cursor: wait; }
.form-status { margin: 0; min-height: 1.4em; font-size: .95rem; }
.form-status.ok { color: #15803d; }
.form-status.err { color: #b91c1c; }

/* footer */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding: 24px clamp(16px, 4vw, 48px); color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* lightbox */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--bg); color: var(--ink);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: calc(100vw - 140px); }
.lb-stage {
  --r: 1; --maxw: calc(100vw - 140px); --maxh: calc(100dvh - 190px);
  position: relative; width: min(var(--maxw), calc(var(--maxh) * var(--r))); aspect-ratio: var(--r);
  background: var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.15); overflow: hidden;
}
.lb-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lb-thumb { filter: blur(12px); transform: scale(1.04); }
.lb-full { opacity: 0; transition: opacity .4s ease; }
.lb-stage.ready .lb-full { opacity: 1; }
.lb-stage .loader { border-color: rgba(255,255,255,.55); border-top-color: var(--accent); background: rgba(0,0,0,.18); position: absolute; top: 50%; left: 50%; margin: -13px 0 0 -13px; transition: opacity .2s; }
.lb-stage.ready .loader { opacity: 0; }
.lightbox figcaption { text-align: center; }
.lb-title { margin: 0; font: 500 1.4rem var(--serif); }
.lb-meta { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.lb-desc { margin: 8px auto 0; max-width: 40em; font-size: .95rem; }
.lb-desc:empty { display: none; }
.lb-close, .lb-nav {
  position: absolute; background: none; border: 0; cursor: pointer; color: var(--ink);
  font: 300 2.6rem/1 var(--sans); padding: 12px; opacity: .6; transition: opacity .2s, color .2s;
}
.lb-close:hover, .lb-nav:hover { opacity: 1; color: var(--accent); }
.lb-close { top: 8px; right: 16px; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

@media (max-width: 640px) {
  :root { --gap: 18px; }
  .lightbox figure { max-width: calc(100vw - 32px); }
  .lb-stage { --maxw: calc(100vw - 32px); }
  .lb-nav { top: auto; bottom: 8px; }
  .lightbox img { max-height: calc(100dvh - 230px); }
}

/* legal pages */
.page { max-width: 760px; margin: 0 auto; padding: clamp(40px, 8vw, 80px) 16px; }
.page h2 { font: 500 1.3rem var(--serif); margin-top: 2em; }
.page p, .page li { color: #3b3733; }
.placeholder { background: var(--accent-soft); padding: 0 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work { opacity: 1; transform: none; transition: none; }
}
