:root {
  --bg:#FBFAF7; --ink:#182429; --muted:#6B6F72; --line:#E4E1DA;
  --lavender:#CCBEDD; --aqua:#97D2DB;
  --edge:clamp(16px, 4vw, 48px);
}
* { box-sizing:border-box; margin:0; }
[hidden] { display:none !important; }
body { background:var(--bg); color:var(--ink); font:400 16px/1.5 "Montserrat", system-ui, sans-serif; }
a { color:inherit; }
button { font:inherit; color:inherit; cursor:pointer; }
img { display:block; max-width:100%; }

/* Menu bar */
.top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 24px; padding:14px var(--edge); background:#fff; border-bottom:1px solid var(--line); }
.brand { line-height:0; font-size:1rem; }
.brand img { height:46px; width:auto; }
.top nav { display:flex; gap:clamp(16px, 3vw, 32px); font-size:.8rem; font-weight:500; letter-spacing:.12em; text-transform:uppercase; }
.top nav a { text-decoration:none; padding:6px 0; border-bottom:2px solid transparent; }
.top nav a.on, .top nav a:hover { border-color:var(--ink); }
footer { padding:48px 16px; text-align:center; font-size:.75rem; color:var(--muted); }

/* Coming-soon state: no gallery yet, or it could not be loaded */
.soon-page { display:none; }
.soon { font-size:.8rem; letter-spacing:.3em; padding-left:.3em; text-transform:uppercase; color:var(--muted); margin-top:48px; }
body.empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100vh; padding:48px 16px; text-align:center; }
body.empty .soon-page { display:block; }
body.empty .logo { width:min(560px, 86vw); height:auto; margin:0 auto; }
body.empty .top, body.empty .count, body.empty #portfolio, body.empty .page { display:none; }
body.empty footer { position:fixed; bottom:20px; left:0; right:0; padding:0; }

/* Three chosen photos: words on the left, photos on the right */
.front { display:grid; grid-template-columns:1fr 1fr; gap:clamp(20px, 4vw, 56px); align-items:center; padding:clamp(24px, 4vw, 44px) var(--edge) clamp(28px, 4vw, 48px); }
.front h2 { font-weight:500; font-size:clamp(1.7rem, 3.6vw, 2.8rem); line-height:1.12; }
.front p { color:var(--muted); max-width:30em; margin-top:14px; }
.front .pics { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; padding-bottom:36px; }
.front .pics a { display:block; border-radius:6px; overflow:hidden; }
.front .pics a:nth-child(2) { transform:translateY(36px); }
.front .pics img { width:100%; aspect-ratio:3/4; object-fit:cover; }
.front.plain { grid-template-columns:minmax(0, 620px); justify-content:center; }
@media (max-width:760px) {
  .front { grid-template-columns:1fr; }
  .front .pics { gap:8px; padding-bottom:18px; }
  .front .pics a:nth-child(2) { transform:translateY(18px); }
}

/* Filters */
.filters { position:sticky; top:0; z-index:5; background:var(--bg); padding:12px var(--edge); display:grid; gap:8px; border-bottom:1px solid var(--line); }
.chips { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.chips::-webkit-scrollbar { display:none; }
.chip { flex:none; min-height:40px; padding:0 16px; border:1px solid var(--line); border-radius:999px; background:#fff; font-size:.85rem; }
.chip.on { background:var(--ink); border-color:var(--ink); color:#fff; }
.count { padding:0 var(--edge); margin-top:16px; color:var(--muted); font-size:.85rem; }

/* The wall */
.wall { columns:4 260px; column-gap:18px; padding:24px var(--edge); }
.tile { display:block; break-inside:avoid; margin:0 0 22px; text-decoration:none; }
.tile .frame { position:relative; border-radius:6px; overflow:hidden; }
.tile img { width:100%; height:auto; transition:opacity .35s; }
.tile img.alt { position:absolute; inset:0; height:100%; object-fit:cover; opacity:0; }
@media (hover:hover) { .tile:hover img.alt { opacity:1; } }
.tile .flag { position:absolute; top:10px; left:10px; padding:3px 10px; border-radius:999px; background:rgba(24, 36, 41, .82); color:#fff; font-size:.68rem; font-weight:500; letter-spacing:.14em; text-transform:uppercase; }
.tile .cap { display:flex; justify-content:space-between; align-items:baseline; gap:8px; padding:8px 2px 0; font-size:.9rem; }
.tile .cap small { color:var(--muted); font-size:.75rem; white-space:nowrap; }

/* One piece, with its other photos */
.detail { position:fixed; inset:0; z-index:50; background:var(--bg); display:grid; grid-template-columns:1fr minmax(280px, 380px); }
.detail .stage { position:relative; min-height:0; min-width:0; display:flex; align-items:center; justify-content:center; padding:20px; }
.detail .stage img { max-width:100%; max-height:100%; object-fit:contain; border-radius:4px; }
.detail aside { padding:28px 24px; border-left:1px solid var(--line); overflow:auto; display:flex; flex-direction:column; gap:16px; }
.detail .kind { font-size:.75rem; letter-spacing:.28em; text-transform:uppercase; color:var(--muted); }
.detail h2 { font-weight:500; font-size:1.5rem; line-height:1.2; }
.detail dl { display:grid; grid-template-columns:auto 1fr; gap:6px 16px; font-size:.9rem; }
.detail dt { color:var(--muted); }
.detail .angles { display:flex; gap:8px; flex-wrap:wrap; }
.detail .angles button { padding:0; border:2px solid transparent; border-radius:6px; background:none; overflow:hidden; }
.detail .angles button.on { border-color:var(--ink); }
.detail .angles img { width:72px; height:90px; object-fit:cover; }
.detail .pager { display:flex; gap:8px; margin-top:auto; }
.detail .pager button, .detail .close { min-height:44px; padding:0 16px; border:1px solid var(--line); border-radius:999px; background:#fff; font-size:.85rem; }
.detail .pager button { flex:1; }
.detail .close { position:absolute; top:16px; left:16px; z-index:2; }
.status { display:inline-block; padding:2px 10px; border-radius:999px; font-size:.72rem; letter-spacing:.06em; background:var(--line); }
.status.available { background:var(--aqua); }
.status.made-to-order { background:var(--lavender); }
.status.sold { background:transparent; border:1px solid var(--line); color:var(--muted); }

@media (max-width:760px) {
  .top { justify-content:center; }
  .detail { grid-template-columns:1fr; grid-template-rows:58vh 1fr; overflow:auto; }
  .detail aside { border-left:0; border-top:1px solid var(--line); overflow:visible; }
}
@media (max-width:600px) {
  .wall { columns:2; column-gap:10px; padding:16px 10px; }
  .tile { margin-bottom:14px; }
  .tile .cap { display:block; font-size:.8rem; }
  .tile .cap small { display:block; }
}

/* Commissions page */
.page { max-width:1040px; margin:0 auto; padding:0 var(--edge); }
.page h1 { font-weight:500; font-size:clamp(1.8rem, 4vw, 2.4rem); line-height:1.15; }
.page h2 { font-weight:500; font-size:1.4rem; line-height:1.2; }
.page section { padding:clamp(32px, 6vw, 64px) 0; }
.page section + section { border-top:1px solid var(--line); }
.page p { color:var(--muted); margin-top:12px; max-width:36em; }
/* Wide screens: photo on the left, heading and steps stacked on the right. */
.lead { display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 3fr); grid-template-areas:"photo head" "photo steps"; column-gap:clamp(24px, 5vw, 64px); row-gap:24px; }
.lead-head { grid-area:head; align-self:end; }
.lead img { grid-area:photo; align-self:center; width:100%; height:auto; border-radius:6px; }
.steps { grid-area:steps; align-self:start; counter-reset:s; list-style:none; padding:0; margin:0; display:grid; gap:16px; }
.steps li { counter-increment:s; display:grid; grid-template-columns:40px 1fr; gap:14px; align-items:center; }
.steps li::before { content:counter(s); display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--lavender); font-weight:500; }
.talk { text-align:center; }
.talk p { margin-left:auto; margin-right:auto; }
.ask { max-width:520px; margin:28px auto 0; display:grid; gap:14px; text-align:left; }
.ask label { display:grid; gap:6px; font-size:.85rem; }
.ask label b { font-weight:500; }
.ask label span { font-weight:400; color:var(--muted); margin-left:6px; }
.ask input, .ask textarea { font:inherit; color:inherit; width:100%; padding:12px 14px; border:1px solid #b9b5ac; border-radius:10px; background:#fff; }
.ask .go { min-height:48px; padding:0 24px; border:0; border-radius:999px; background:var(--ink); color:#fff; font-size:.85rem; letter-spacing:.08em; justify-self:start; }
.later { font-size:.85rem; }
.ask .bad { border-color:#C85146; outline:2px solid #C8514633; }
.ask .trap { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.ask .problem { margin:0; padding:10px 14px; border-radius:10px; background:#C8514614; color:#8d2f26; font-size:.9rem; max-width:none; }
.ask .go:disabled { opacity:.6; cursor:default; }
#captcha { min-height:65px; }
.thanks { max-width:520px; margin:28px auto 0; padding:28px 24px; border-radius:12px; background:#fff; border:1px solid var(--line); }
.thanks h3 { font-weight:500; font-size:1.3rem; }
.again .wall { padding:24px 0 0; columns:3 240px; }

/* Phones. These must stay below the rules they adjust, or they are overridden. */
@media (max-width:760px) {
  .lead { grid-template-columns:1fr; grid-template-areas:"head" "photo" "steps"; row-gap:22px; }
  .again .wall { columns:2; column-gap:10px; }
}
