:root {
  --bg: #fafaf7;
  --ink: #141414;
  --mute: #6b6b66;
  --line: #dcdcd5;
  --pad: clamp(16px, 3vw, 40px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121212; --ink: #f2f2ee; --mute: #9a9a94; --line: #2c2c2a; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }

#site-header {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding: var(--pad);
}
.brand { font-size: 1.25rem; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
#site-header nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
#site-header nav a { text-decoration: none; color: var(--mute); }
#site-header nav a:hover, #site-header nav a[aria-current] { color: var(--ink); }
#site-header nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }

main { padding: 0 var(--pad) var(--pad); }
#site-footer { padding: var(--pad); color: var(--mute); font-size: .875rem; border-top: 1px solid var(--line); margin-top: 4rem; }

/* Home page */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 6vw, 96px); align-items: center; padding: clamp(8px, 3vw, 40px) 0 clamp(40px, 8vw, 96px); }
.hero-photo img, .hero-photo .ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
.tagline { margin: .75rem 0 1.5rem; color: var(--mute); font-size: 1.125rem; }
#hero-intro { max-width: 52ch; font-size: 1.125rem; }
.ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn { display: inline-block; padding: .85rem 1.6rem; border: 1.5px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 600; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: transparent; color: var(--ink); }

.shop { padding-top: clamp(24px, 4vw, 48px); border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.shop-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.shop-head h2 { margin: 0; font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.03em; font-weight: 600; }
.shop-head a { color: var(--mute); }
.shop-head a:hover { color: var(--ink); }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--pad); }
.product { text-decoration: none; display: block; }
.product-img { aspect-ratio: 1; overflow: hidden; background: var(--line); }
.product-img img, .product-img .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product:hover .product-img img, .product:hover .product-img .ph { transform: scale(1.04); }
.product-info { display: flex; justify-content: space-between; gap: 1rem; padding-top: .6rem; }
.product-price { color: var(--mute); }

/* Works page: each category fills one screen. Text and cover alternate sides. */
[data-page="works"] main { padding: 0; }
#tiles { display: block; }
.row {
  display: grid; grid-template-columns: 1fr 1fr; text-decoration: none;
  height: calc(100vh - 4.5rem); height: calc(100svh - 4.5rem); min-height: 420px;
}
.row-text { display: flex; flex-direction: column; justify-content: center; padding: var(--pad) clamp(24px, 6vw, 96px); }
.row-text h2 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; font-size: clamp(2rem, 4.5vw, 3.75rem); }
.row-text p { margin: 1.25rem 0 0; font-size: clamp(1rem, 1.6vw, 1.375rem); color: var(--mute); max-width: 32ch; }
.row:hover .row-text h2 { text-decoration: underline; text-decoration-thickness: .05em; text-underline-offset: .15em; }
.row-img { overflow: hidden; background: var(--line); min-height: 0; }
.row-img img, .row-img .ph { width: 100%; height: 100%; object-fit: cover; }

.ph { display: grid; place-items: center; min-height: 240px; width: 100%; color: rgba(0,0,0,.55); font-weight: 600; text-align: center; padding: 1rem; }

.cat-head { padding: 0 var(--pad) 1.5rem; }
.cat-head h1 { margin: 0 0 .75rem; font-size: clamp(2.5rem, 8vw, 6rem); letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
#cat-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
#cat-nav a { color: var(--mute); text-decoration: none; }
#cat-nav a:hover, #cat-nav a[aria-current] { color: var(--ink); }
#cat-nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }

/* Category page: images pop in small, then grow */
#gallery { position: relative; width: 100%; }
.work {
  position: absolute; padding: 0; border: 0; background: none; cursor: zoom-in;
  opacity: 0; transform: rotate(var(--r, 0deg)) scale(0);
  transition: transform .9s cubic-bezier(.2, .9, .25, 1.15), opacity .35s ease;
}
.work.pop { opacity: 1; transform: rotate(var(--r, 0deg)) scale(.28); }
.work.grown { opacity: 1; transform: rotate(var(--r, 0deg)) scale(1); }
.work.grown:hover, .work.grown:focus-visible { transform: rotate(0deg) scale(1.05); z-index: 2; transition-duration: .3s; }
.work img, .work video, .work .ph { width: 100%; height: 100%; object-fit: contain; min-height: 0; }

/* Full-screen viewer with side arrows */
#box { position: fixed; inset: 0; z-index: 10; background: var(--bg); display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; align-items: center; padding: var(--pad); gap: 0 var(--pad); }
#box[hidden] { display: none; }
#box-img { grid-column: 2; grid-row: 1; display: grid; place-items: center; height: 100%; min-height: 0; min-width: 0; }
#box-img img, #box-img video { max-width: 100%; max-height: calc(100vh - 8rem); max-height: calc(100svh - 8rem); object-fit: contain; }
#box-img .ph { height: 60vh; max-width: 700px; }
#box-cap { grid-column: 2; grid-row: 2; text-align: center; color: var(--mute); padding-top: 1rem; }
#box .arrow { grid-row: 1; width: 3.25rem; height: 3.25rem; border-radius: 50%; border: 1px solid var(--line); }
#box-prev { grid-column: 1; }
#box-next { grid-column: 3; }
#box button { background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0; }
#box button:not(.arrow) { border: 0; }
#box .arrow:hover { background: var(--ink); color: var(--bg); }
#box-close { position: absolute; top: var(--pad); right: var(--pad); width: 2.5rem; height: 2.5rem; }
#box svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) {
  #box { grid-template-columns: 1fr; gap: 0; }
  #box-img, #box-cap { grid-column: 1; }
  #box .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; background: color-mix(in srgb, var(--bg) 80%, transparent); }
  #box-prev { left: .5rem; } #box-next { right: .5rem; }
}

.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
#about-photo img, #about-photo .ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about h1 { margin: 0 0 1rem; font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
#about-text { max-width: 60ch; font-size: 1.125rem; }
#clients { list-style: none; padding: 0; margin: 2rem 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; color: var(--mute); }

@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: auto; min-height: calc(100svh - 4.5rem); }
  .row-img { order: -1; min-height: 60svh; }
  .row-text { padding: 1.25rem var(--pad) 2.5rem; }
  .about { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.gone { display: none; }
.thanks { max-width: 56ch; padding: clamp(24px, 8vw, 96px) 0; }
.thanks h1 { margin: 0 0 1rem; font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
.thanks p { font-size: 1.125rem; }
.product-buy { margin-top: .75rem; min-height: 3rem; }
.soon .soon-label { margin: .25rem 0 0; color: var(--mute); font-size: .875rem; }
div.product:hover .product-img img, div.product:hover .product-img .ph { transform: none; }

/* Product page */
.back { display: inline-block; margin: 0 0 1.25rem; color: var(--mute); text-decoration: none; }
.back:hover { color: var(--ink); }
.pdp { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
.p-main img, .p-main .ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line); }
.p-thumbs { display: flex; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; background: var(--line); cursor: pointer; opacity: .65; }
.thumb[aria-current] { border-color: var(--ink); opacity: 1; }
.thumb img, .thumb .ph { width: 100%; height: 100%; object-fit: cover; min-height: 0; padding: 0; font-size: 0; }
.pinfo h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.5rem); letter-spacing: -0.03em; line-height: 1.05; font-weight: 600; }
.p-price { margin: .5rem 0 1.25rem; font-size: 1.375rem; }
.p-desc { max-width: 52ch; font-size: 1.0625rem; }
.p-options { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 1rem; }
.opt { padding: .6rem 1.1rem; border: 1.5px solid var(--line); border-radius: 999px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.opt:hover { border-color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.p-buy { margin: 1rem 0; min-height: 3.5rem; }
.p-note { color: var(--mute); font-size: .9375rem; max-width: 52ch; }
@media (max-width: 700px) { .pdp { grid-template-columns: 1fr; } }
#about-photo video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-photo video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.p-main { position: relative; }
.parrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink); background: color-mix(in srgb, var(--bg) 80%, transparent); }
.parrow.prev { left: .75rem; }
.parrow.next { right: .75rem; }
.parrow:hover { background: var(--ink); color: var(--bg); }
.parrow svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
dialog.contact { width: min(92vw, 30rem); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); }
dialog.contact::backdrop { background: rgba(0, 0, 0, .6); }
.contact-inner { padding: clamp(20px, 5vw, 36px); position: relative; }
.contact-inner h2 { margin: 0 2rem .5rem 0; font-size: 1.75rem; letter-spacing: -0.03em; font-weight: 600; }
.c-intro { margin: 0 0 1.25rem; color: var(--mute); }
.contact-close { position: absolute; top: .75rem; right: .75rem; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; }
.contact-close svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#c-form { display: grid; gap: 1rem; }
#c-form label { display: grid; gap: .35rem; font-size: .9375rem; color: var(--mute); }
#c-form input, #c-form textarea { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; }
#c-form input:focus, #c-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
#c-form textarea { resize: vertical; }
#c-form .btn { cursor: pointer; font: inherit; font-weight: 600; justify-self: start; }
#c-form .btn:disabled { opacity: .6; cursor: default; }
.c-status { margin: 0; min-height: 1.5rem; }
.hp { position: absolute; left: -9999px; opacity: 0; }
