:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #1d1b19;
  --muted: #6b665f;
  --line: #e4dfd7;
  --accent: #8a4b2a;
  --accent-ink: #ffffff;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514; --surface: #1f1d1b; --ink: #f1ede6; --muted: #a59f96;
    --line: #34312d; --accent: #d39a74; --accent-ink: #161514;
  }
  .logo img { filter: invert(1) hue-rotate(180deg); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 5; }
.site-header .wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 22px; padding-bottom: 10px; position: relative; }
.logo { display: block; flex: none; }
.logo img { height: 140px; width: auto; }
.nav { display: flex; gap: clamp(18px, 3vw, 40px); align-items: center; justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav a { text-decoration: none; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; padding: 8px 12px; font: inherit; font-size: 14px; }
@media (max-width: 860px) {
  .menu-btn { display: block; position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); }
  .site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line);
         flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .logo img { height: 92px; }
}

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(38px, 6vw, 64px); }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 60ch; }
.page-head { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); }
.page-head .lede { margin: 16px 0 0; }
section { padding: clamp(32px, 5vw, 64px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.link-arrow { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.link-arrow:hover { color: var(--ink); }

/* Slideshow */
.slideshow { position: relative; margin-top: clamp(20px, 3vw, 32px); }
.slides { position: relative; aspect-ratio: 1141 / 400; min-height: 220px; overflow: hidden; background: var(--line); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
.slide > a { display: block; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.ss-btn { position: absolute; top: calc(50% - 20px); transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
          border: 0; background: rgba(255,255,255,.8); color: #1d1b19; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 0 4px; opacity: .8; }
.ss-btn:hover { opacity: 1; }
.ss-btn.prev { left: 14px; } .ss-btn.next { right: 14px; }
.ss-dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.ss-dots button { width: 26px; height: 26px; border: 0; background: none; cursor: pointer; padding: 0; position: relative; }
.ss-dots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.ss-dots button[aria-current]::after { background: var(--ink); transform: scale(1.25); }
.home-intro { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: clamp(18px, 3vw, 28px); }
.home-intro .btn.ghost { margin-left: 0; }
@media (max-width: 860px) { .ss-btn { display: none; } }
@media (max-width: 420px) { .home-intro { flex-direction: column; text-align: center; } }

/* Full-screen viewer */
.no-scroll { overflow: hidden; }
.zoom { display: block; cursor: zoom-in; }
.gallery a[data-view] { cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(14, 13, 12, .96); color: #f1ede6;
          display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; animation: vfade .2s ease; }
.viewer[hidden] { display: none; }
@keyframes vfade { from { opacity: 0; } }
.viewer figure { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 0 16px; min-width: 0; }
.viewer img { max-width: 100%; max-height: calc(100dvh - 120px); max-height: calc(100vh - 120px); width: auto; object-fit: contain; transition: opacity .2s; }
.viewer.loading img { opacity: .35; }
.viewer figcaption { text-align: center; padding-top: 14px; font-size: 14px; color: #b9b2a8; max-width: 70ch; }
.viewer figcaption b { display: block; font-family: var(--serif); font-weight: 500; font-size: 22px; color: #f1ede6; }
.viewer .v-more { color: #f1ede6; margin-left: 10px; white-space: nowrap; }
.viewer button { background: none; border: 0; color: #f1ede6; cursor: pointer; opacity: .75; }
.viewer button:hover, .viewer button:focus-visible { opacity: 1; }
.v-nav { font-size: 48px; height: 100%; width: 64px; }
.v-close { position: absolute; top: 8px; right: 12px; font-size: 40px; width: 52px; height: 52px; z-index: 1; }
.viewer.single .v-nav { visibility: hidden; }
@media (max-width: 700px) {
  .viewer { grid-template-columns: 0 1fr 0; }
  .v-nav { display: none; }
  .viewer figure { padding: 56px 12px 16px; }
}

.btn { display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none; padding: 13px 22px; border-radius: 4px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); margin-left: 8px; }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }

/* Category tiles */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat { text-decoration: none; display: block; }
.cat .thumb { aspect-ratio: 4/5; overflow: hidden; background: var(--line); }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat:hover img { transform: scale(1.04); }
.cat span { display: block; font-family: var(--serif); font-size: 22px; margin-top: 10px; }
.cat small { color: var(--muted); font-size: 13px; }
@media (max-width: 960px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cats { grid-template-columns: repeat(2, 1fr); } }

/* Masonry gallery */
.gallery { columns: 3 300px; column-gap: 20px; }
.gallery a { break-inside: avoid; display: block; margin: 0 0 20px; text-decoration: none; }
.gallery img { width: 100%; background: var(--line); transition: opacity .2s; }
.gallery a:hover img { opacity: .88; }
.gallery .cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.gallery .cap b { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.2; }
.gallery .cap i { font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; padding-top: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.filters a { text-decoration: none; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--muted); }
.filters a:hover, .filters a[aria-current="page"] { border-color: var(--ink); color: var(--ink); }

/* Single work */
.work { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(24px, 5vw, 64px); padding: clamp(28px, 5vw, 56px) 0; align-items: start; }
.work figure { margin: 0; }
.work figure img { margin: 0 auto; max-height: 82vh; width: auto; box-shadow: 0 20px 50px -24px rgba(0,0,0,.35); }
.work aside { position: sticky; top: 110px; }
.work h1 { font-size: clamp(34px, 4.4vw, 52px); margin-bottom: 20px; }
.specs { border-top: 1px solid var(--line); margin: 0 0 28px; }
.specs div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; border-bottom: 1px solid var(--line); padding: 11px 0; font-size: 15px; }
.specs dt { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding-top: 3px; }
.specs dd { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 24px 0 8px; font-size: 14px; }
.pager a { text-decoration: none; color: var(--muted); max-width: 45%; }
.pager a:hover { color: var(--ink); }
@media (max-width: 860px) { .work { grid-template-columns: 1fr; } .work aside { position: static; } .work figure img { max-height: none; width: 100%; } }

/* Commissions */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.price img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.price .body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.price h3 { font-size: 28px; margin-bottom: 8px; }
.price p { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.price table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: auto; }
.price td { padding: 9px 0; border-top: 1px solid var(--line); }
.price td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.price .note { font-size: 13px; margin: 14px 0 0; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; max-width: 560px; } }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: s; border-top: 1px solid var(--ink); padding-top: 14px; }
.steps li::before { content: "0" counter(s); font-family: var(--serif); font-size: 28px; display: block; margin-bottom: 6px; }
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.contact .mail { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 36px); text-decoration: none; border-bottom: 1px solid var(--line); word-break: break-all; }
.contact .mail:hover { border-color: var(--ink); }
form label { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
form input, form textarea, form select { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 4px; margin-bottom: 18px; }
form textarea { min-height: 150px; resize: vertical; }
form button { border: 0; cursor: pointer; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.cta { background: var(--surface); border: 1px solid var(--line); padding: clamp(28px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta p { margin: 8px 0 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(32px, 6vw, 72px); padding: 32px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; margin-left: 18px; }
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: var(--ink); }
