:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --tile: #ecebe6;
  --text: #1a1a1a;
  --muted: #6e6c67;
  --line: #e2e0da;
  --ink: #1a1a1a;
  --accent: #2f4b3a; /* deep green, used sparingly */
  --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.notice { background: var(--ink); color: #f2f1ed; font-size: 13px; text-align: center; padding: 8px 16px; }

header.top { position: sticky; top: 0; z-index: 40; background: rgba(247,246,243,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; height: 64px; gap: 32px; }
.logo { font-weight: 600; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.links { display: flex; gap: 26px; font-size: 15px; }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover { color: var(--text); }
.basket { margin-left: auto; background: none; border: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.basket span.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
body.scrolled header.top { box-shadow: 0 1px 12px rgba(0,0,0,.05); }
.basket span { min-width: 22px; height: 22px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 6px; }

.intro { padding: 56px 24px 64px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.intro-ctas { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero-tile { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: relative; }
.hero-stage { aspect-ratio: 1; background: var(--tile); display: grid; place-items: center; cursor: pointer; padding: 18%; overflow: hidden; }
.hero-stage .psvg { transition: transform .4s ease; }
.hero-stage:hover .psvg { transform: scale(1.03); }
.hero-tile figcaption { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding: 14px 16px 16px; font-size: 14px; }
.hero-name { font-weight: 500; font-size: 15px; }
.hero-pick { display: grid; gap: 6px; justify-items: end; font-size: 12px; }
.hero-nav { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.hero-nav button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 14px; transition: border-color .15s; }
.hero-nav button:hover { border-color: var(--text); }
.swatches.small { gap: 6px; }
.swatches.small button { width: 20px; height: 20px; }
.swatches.small button.on::after { inset: -3px; }
.intro h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 500; letter-spacing: -.025em; line-height: 1.05; margin: 0 0 16px; max-width: 760px; }
.intro p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0; }

/* shop */
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0 20px; border-top: 1px solid var(--line); }
.cats { display: flex; gap: 4px; flex-wrap: wrap; position: relative; padding-bottom: 6px; }
.cat-ink { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--text); border-radius: 1px; transition: transform .3s ease, width .3s ease; }
.cats button { background: none; border: 0; padding: 6px 12px; border-radius: 6px; color: var(--muted); font-size: 15px; }
.cats button:hover { color: var(--text); }
.cats button.on { color: var(--text); }
.shop-tools { display: flex; gap: 8px; }
.shop-tools select, .shop-tools input { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-size: 14px; outline: none; }
.shop-tools input:focus, .shop-tools select:focus { border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 20px; padding-bottom: 80px; }
.card { cursor: pointer; }
.card .img { aspect-ratio: 4/5; background: var(--tile); border-radius: 4px; display: grid; place-items: center; overflow: hidden; position: relative; }
.card .img .obj { width: 58%; height: 62%; transition: transform .4s ease; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .img .obj, .card:hover .img img { transform: scale(1.04); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease var(--d, 0ms), transform .5s ease var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.quick { position: absolute; left: 10px; right: 10px; bottom: 10px; background: var(--surface); border: 0; border-radius: 5px; padding: 10px; font-size: 14px; font-weight: 500; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s, background .15s; }
.quick:hover { background: var(--ink); color: #fff; }
.card:hover .quick, .quick:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .quick { display: none; } }
.card .sw .dot { width: 14px; height: 14px; cursor: pointer; transition: transform .15s; }
.card .sw .dot:hover, .card .sw .dot.on { transform: scale(1.25); }
.card .tag { position: absolute; top: 10px; left: 10px; font-size: 12px; background: var(--surface); padding: 2px 8px; border-radius: 3px; }
.card .name { margin: 12px 0 2px; font-size: 15px; font-weight: 500; }
.card .sub { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.card .sw { display: flex; gap: 4px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.empty { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--muted); }
.psvg { width: 100%; height: 100%; display: block; color: #9a978f; overflow: visible; }

/* custom DXF */
.custom { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 80px 0; }
.custom-inner { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.custom h2 { font-size: 34px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 14px; line-height: 1.1; }
.custom p { color: var(--muted); margin: 0 0 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; font-size: 15px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 10px; height: 5px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }
.small { font-size: 14px; }
.drop { display: grid; place-items: center; align-content: center; gap: 4px; min-height: 300px; border: 1.5px dashed #c9c6be; border-radius: 6px; background: var(--bg); cursor: pointer; text-align: center; padding: 24px; transition: border-color .2s, background .2s; }
.drop strong { font-weight: 500; font-size: 17px; }
.drop span { color: var(--muted); font-size: 14px; }
.drop:hover, .drop.over { border-color: var(--text); background: #f1f0ec; }
.dxf-result { display: grid; gap: 18px; }
.dxf-preview { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; aspect-ratio: 16/10; position: relative; overflow: hidden; }
.dxf-preview svg { width: 100%; height: 100%; display: block; }
.dxf-preview .dims { position: absolute; left: 12px; bottom: 10px; font-size: 13px; color: var(--muted); background: rgba(247,246,243,.9); padding: 2px 8px; border-radius: 3px; }
.dxf-preview .fname { position: absolute; left: 12px; top: 10px; font-size: 13px; }
.dxf-preview .change { position: absolute; right: 10px; top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: 13px; padding: 3px 10px; }
.warn { font-size: 13px; color: #8a5a12; background: #fbf3e4; border-radius: 4px; padding: 8px 12px; }
.err { font-size: 14px; color: #9b2c1f; background: #fbeceb; border-radius: 4px; padding: 10px 12px; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.view-toggle { position: absolute; right: 10px; bottom: 8px; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.view-toggle button { border: 0; background: none; padding: 3px 10px; font-size: 13px; color: var(--muted); }
.view-toggle button.on { background: var(--ink); color: #fff; }
.thk { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.thk .top { display: flex; justify-content: space-between; }
.thk .top b { color: var(--text); font-weight: 500; }
.thk input[type=range] { width: 100%; accent-color: var(--ink); }
.dxf-preview svg { transition: opacity .2s; }
.drop { position: relative; }
.drop .icon { width: 44px; height: 44px; margin-bottom: 8px; color: var(--muted); transition: transform .25s; }
.drop:hover .icon, .drop.over .icon { transform: translateY(-4px); }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; font-size: 15px; color: var(--text); outline: none; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--text); }
.quote { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; flex-wrap: wrap; }
.quote .price { font-size: 24px; font-weight: 500; }
.quote .price small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }

/* about */
.about { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 80px 24px; }
.about h3 { font-size: 17px; font-weight: 500; margin: 0 0 6px; }
.about p { margin: 0; color: var(--muted); font-size: 15px; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 14px; color: var(--muted); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: #fff; border: 1px solid var(--ink); padding: 12px 22px; border-radius: 6px; font-size: 15px; font-weight: 500; text-decoration: none; transition: background .15s; }
.btn:hover { background: #333; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--text); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: 13px; }

/* modal */
.scrim { position: fixed; inset: 0; background: rgba(20,20,18,.35); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -48%); width: min(940px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 8px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; display: grid; grid-template-columns: 1fr 1fr; }
.modal.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal .gallery { background: var(--tile); position: relative; min-height: 460px; display: grid; place-items: center; }
.modal .gallery .obj { width: 60%; height: 66%; }
.modal .gallery { overflow: hidden; }
.modal .gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; cursor: zoom-in; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.more { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.more summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.more summary::after { content: '+'; color: var(--muted); }
.more[open] summary::after { content: '−'; }
.more div { color: var(--muted); padding-top: 8px; line-height: 1.6; }
.low { font-size: 13px; color: #9b2c1f; }
.label-preview { display: inline-block; margin-top: 8px; justify-self: start; font-weight: 600; letter-spacing: .08em; font-size: 18px; padding: 8px 14px; border-radius: 6px; background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.btn.done { background: var(--accent); border-color: var(--accent); }
.modal .thumbs { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; z-index: 2; }
.modal .thumbs button { width: 46px; height: 46px; border-radius: 4px; border: 1px solid var(--line); background: var(--tile) center/cover; padding: 3px; }
.modal .thumbs button.on { border-color: var(--text); }
.modal .info { padding: 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.modal h2 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
.modal .price { font-size: 19px; }
.modal .desc { color: var(--muted); margin: 0; font-size: 15px; }
.modal .close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface); font-size: 18px; line-height: 1; z-index: 3; }
.label { font-size: 14px; margin-bottom: 8px; }
.label span { color: var(--muted); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); position: relative; transition: transform .15s; }
.swatches button:hover { transform: scale(1.1); }
.swatches button.on::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--text); }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; }
.qty button { width: 40px; height: 44px; background: none; border: 0; font-size: 18px; }
.qty span { width: 32px; display: grid; place-items: center; }
.buy { display: flex; gap: 10px; }
.buy .btn { flex: 1; }
.specs { border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; color: var(--muted); display: grid; gap: 4px; }

/* basket drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--surface); z-index: 100; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.drawer.on { transform: none; }
.drawer .dh { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer .dh h2 { margin: 0; font-size: 18px; font-weight: 500; }
.drawer .dh button { background: none; border: 0; font-size: 22px; line-height: 1; }
.drawer .items { flex: 1; overflow: auto; padding: 8px 24px; }
.citem { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.citem .t { width: 64px; height: 76px; background: var(--tile); border-radius: 3px; padding: 8px; display: grid; place-items: center; overflow: hidden; }
.citem .t img { width: 100%; height: 100%; object-fit: cover; }
.citem .n { font-size: 15px; font-weight: 500; }
.citem .s { font-size: 13px; color: var(--muted); }
.citem .p { font-size: 15px; text-align: right; }
.citem { transition: opacity .2s, transform .2s; }
.citem.out { opacity: 0; transform: translateX(30px); }
.cq { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.qty.sm button { width: 30px; height: 30px; font-size: 15px; }
.qty.sm span { width: 24px; font-size: 14px; }
.freebar { padding: 14px 24px; border-bottom: 1px solid var(--line); font-size: 14px; display: grid; gap: 8px; }
.freebar .track { height: 4px; background: var(--tile); border-radius: 2px; overflow: hidden; }
.freebar .track i { display: block; height: 100%; background: var(--accent); transition: width .5s ease; }
.empty-basket { padding: 40px 0; display: grid; gap: 14px; justify-items: start; color: var(--muted); }
.field input.bad { border-color: #c0392b; }
.spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.check { width: 56px; height: 56px; margin-bottom: 16px; }
.check circle { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s ease forwards; }
.check path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s ease .5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.drawer .df { padding: 20px 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.rowt { display: flex; justify-content: space-between; font-size: 15px; }
.rowt.total { font-weight: 500; font-size: 17px; }
.muted { color: var(--muted); }
.checkout-form { display: grid; gap: 12px; padding: 16px 0; }
.stripe-note { font-size: 12px; color: var(--muted); }
.thanks { padding: 48px 8px; }
.thanks h3 { font-size: 22px; font-weight: 500; margin: 0 0 8px; }
.thanks p { color: var(--muted); margin: 0 0 20px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 150%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 6px; font-size: 14px; z-index: 200; transition: transform .3s ease; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .custom-inner { grid-template-columns: 1fr; gap: 32px; }
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .hero-tile { max-width: 440px; }
  .opts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .intro { padding: 44px 16px 32px; }
  .links { display: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .modal { grid-template-columns: 1fr; }
  .modal .gallery { min-height: 320px; }
  .about { grid-template-columns: 1fr; gap: 24px; padding: 56px 16px; }
  .shop-tools { width: 100%; }
  .shop-tools input { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* 3D renders */
img.snap { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease, transform .4s ease; }
img.snap.in { opacity: 1; }
.citem .t img.snap { object-fit: cover; }
.citem .t:has(img.snap) { padding: 0; }
.hero-stage.live { padding: 0; cursor: grab; }
.hero-stage.live:active { cursor: grabbing; }
.modal .gallery .live { position: absolute; inset: 0; }
.drag-hint { position: absolute; right: 14px; bottom: 12px; font-size: 12px; color: var(--muted); pointer-events: none; z-index: 1; }
