:root {
  --bg: #0a0908;
  --raise: #131110;
  --ink: #f3eee3;
  --muted: #8f897e;
  --faint: rgba(243,238,227,.12);
  --gold: #c6a064;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --gutter: clamp(20px, 5vw, 64px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.label { font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.rock-img { object-fit: contain; }

.btn { background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: 14px 34px; font-weight: 500; letter-spacing: .02em; cursor: pointer; transition: background .3s, color .3s; }
.btn:hover { background: #fff; }
.btn:disabled { background: var(--faint); color: var(--muted); cursor: default; }
.link { background: none; border: 0; padding: 3px 0; color: var(--ink); border-bottom: 1px solid var(--faint); cursor: pointer; transition: border-color .3s; font-size: .92rem; white-space: nowrap; }
.link:hover { border-color: var(--ink); }

/* Technical details: serif with old-style figures */
.specs { margin: 0; }
.specs > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-top: 1px solid var(--faint); }
.specs > div:last-child { border-bottom: 1px solid var(--faint); }
.specs dt { font-size: .66rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 1.02rem; font-feature-settings: "onum", "pnum"; text-align: right; }

/* Header */
.site-header { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 32px var(--gutter); }
.wordmark { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.nav-link { font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .3s; }
.nav-link:hover { color: var(--ink); }

/* Stage */
.stage { --view-h: min(76svh, 720px); --stone: min(var(--view-h), 50vw); min-height: 100svh; max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding: 112px var(--gutter) 56px; }
.info { transition: opacity .35s ease; }
.info h1 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1.05; margin: 10px 0 26px; }
.price { display: flex; align-items: baseline; gap: 12px; font-family: var(--serif); font-size: 1.7rem; margin: 28px 0 0; font-feature-settings: "onum", "pnum"; transition: opacity .35s ease; }
.price.is-updating { opacity: 0; }
.price-label { font-family: var(--sans); font-size: .64rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.price.is-all-in .price-label { order: 2; }
.dd-muted { color: var(--muted); }
.deliver { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.zip-field { display: inline-grid; vertical-align: baseline; }
.zip-field > * { grid-area: 1 / 1; }
.zip, .zip-place { margin: 0; padding: 0 0 1px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--ink); font-family: var(--serif); font-weight: 300; font-size: 1rem; font-feature-settings: "onum", "pnum"; text-align: left; }
.zip { width: 7ch; min-width: 0; border-bottom-color: rgba(243,238,227,.3); letter-spacing: .04em; outline: none; transition: opacity .5s ease, border-color .3s; }
.zip::placeholder { color: var(--muted); font-family: var(--sans); font-size: .84rem; letter-spacing: 0; }
.zip:focus { border-bottom-color: var(--gold); }
.zip-place { white-space: nowrap; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s .7s, border-color .3s; }
.zip-place:hover, .zip-place:focus-visible { border-bottom-color: rgba(243,238,227,.3); outline: none; }
.zip-field.is-resolved .zip { opacity: 0; pointer-events: none; }
.zip-field.is-resolved .zip-place { opacity: 1; visibility: visible; transition: opacity .7s ease .15s, visibility 0s, border-color .3s; }
.zip-message { min-height: 1.3em; margin: 6px 0 0; color: var(--muted); font-size: .78rem; opacity: 0; transition: opacity .6s ease; }
.zip-message.show { opacity: 1; }
.dialog-zip { margin-top: 22px; }
.actions { margin-top: 30px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
#spaceToggle { transition: opacity .4s ease, border-color .3s; }
.stage:has(.viewer[data-mode="space"]) #spaceToggle { opacity: 0; pointer-events: none; }
.info .specs [data-spec="dims"] dd { transition: color .3s; }
.stage.show-dims .info .specs [data-spec="dims"] dd { color: var(--gold); }

.viewer { position: relative; height: var(--view-h); display: grid; place-items: center; perspective: 1600px; border-radius: 0; background-color: rgba(19,17,16,0); box-shadow: inset 0 0 0 1px transparent; transition: border-radius .9s var(--ease), background-color .9s ease, box-shadow .9s ease; }
.viewer[data-mode="space"] { border-radius: 18px; background-color: var(--raise); box-shadow: inset 0 0 0 1px var(--faint); }
.beam { position: absolute; left: 50%; top: -30%; width: 120%; height: 140%; transform: translateX(-50%); background: radial-gradient(ellipse 36% 55% at 50% 22%, rgba(255,244,222,.10), transparent 70%); pointer-events: none; transition: opacity .7s ease; }
.viewer[data-mode="space"] .beam { opacity: 0; }
.stone { position: relative; width: var(--stone); height: var(--stone); transition: opacity .6s ease, transform .9s var(--ease); }
.viewer[data-mode="space"] .stone { opacity: 0; transform: scale(.9) translateY(4%); transition-duration: .3s, .9s; }

.stone-poster, .stone-3d, .dims { position: absolute; inset: 0; width: 100%; height: 100%; }
.stone-poster { object-fit: contain; transition: opacity .8s ease; }
.stone-3d { opacity: 0; transition: opacity .8s ease; }
.stone-3d canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.stone-3d.is-dragging canvas { cursor: grabbing; }
.stone.is-live .stone-3d { opacity: 1; }
.stone.is-live .stone-poster { opacity: 0; }
.dims { pointer-events: none; overflow: visible; opacity: 0; transition: opacity 1.4s ease; }
.dims line { stroke: rgba(243,238,227,.28); stroke-width: 1; }
.dims text { fill: rgba(243,238,227,.62); font-family: var(--serif); font-weight: 300; font-size: 15px; font-feature-settings: "onum", "pnum"; text-anchor: middle; dominant-baseline: middle; }
.stage.show-dims .viewer[data-mode="stone"] .dims { opacity: 1; }
.stone-hint { position: absolute; left: 0; right: 0; bottom: 2%; margin: 0; text-align: center; font-size: .66rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.stone.is-live:hover .stone-hint { opacity: .7; }
.stone.is-live .stone-3d.is-dragging ~ .stone-hint { opacity: 0; }
@media (hover: none) { .stone.is-live .stone-hint { opacity: .6; } }

.space { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; opacity: 0; transition: opacity .6s .2s ease; }
.viewer[data-mode="space"] .space { opacity: 1; }
.drop { position: absolute; inset: 14px; display: flex; flex-direction: column; align-items: center; padding-top: 18%; gap: 4px; text-align: center; border: 1px dashed rgba(243,238,227,.18); border-radius: 12px; cursor: pointer; transition: border-color .3s, background .3s; }
.drop:hover, .space.is-over .drop, #photoInput:focus-visible ~ .drop { border-color: var(--gold); background: rgba(198,160,100,.04); }
.drop span { font-family: var(--serif); font-size: 1.3rem; }
.drop small { color: var(--muted); }
.space.has-photo .drop, .space.has-photo .sample { display: none; }
.sample { position: absolute; left: 50%; top: calc(18% + 96px); transform: translateX(-50%); color: var(--muted); }
.sample:hover { color: var(--ink); }
#photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .9s ease, transform 1.4s var(--ease); }
.space.has-photo #photo { opacity: 1; transform: none; }
.composite { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .9s ease; cursor: crosshair; touch-action: none; }
.composite.is-ready { opacity: 1; }
.composite.over-rock { cursor: grab; }
.composite.is-dragging { cursor: grabbing; }

.horizon { position: absolute; left: -2%; right: -2%; top: 45%; height: 0; transform-origin: center; border-top: 1px dashed rgba(243,238,227,.45); opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.space.is-placed .horizon { opacity: .35; pointer-events: auto; }
.space.is-placed:hover .horizon, .horizon.is-dragging, .horizon:focus-within { opacity: 1; }
.horizon::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 20px; cursor: ns-resize; }
.horizon-handle { position: absolute; right: calc(2% + 16px); top: 0; transform: translateY(-50%); padding: 5px 12px; border-radius: 999px; background: rgba(10,9,8,.6); backdrop-filter: blur(10px); font-size: .66rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); cursor: ns-resize; touch-action: none; user-select: none; }

.frame-btn { position: absolute; top: 16px; padding: 8px 16px; border: 0; border-radius: 999px; background: rgba(10,9,8,.6); backdrop-filter: blur(12px); color: var(--ink); font-size: .84rem; cursor: pointer; transition: background .3s, opacity .4s; }
.frame-btn:hover { background: rgba(10,9,8,.85); }
.frame-btn.back { left: 16px; }
.frame-actions { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.frame-actions .frame-btn { position: static; }
.space.has-photo .frame-actions { opacity: 1; pointer-events: auto; }
.hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(10,9,8,.6); backdrop-filter: blur(12px); font-size: .8rem; color: var(--ink); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.space.has-photo .hint { opacity: 1; }
.space.has-photo.interacted .hint:not(.is-status) { opacity: 0; }

.stage.is-changing .info, .stage.is-changing .stone { opacity: 0; }

/* In place */
.in-situ { position: relative; height: min(92svh, 900px); overflow: hidden; }
.in-situ img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.in-situ::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg), transparent 18%, transparent 50%, rgba(10,9,8,.8) 88%, var(--bg)); pointer-events: none; }
.in-situ-caption { position: absolute; z-index: 1; left: var(--gutter); bottom: clamp(32px, 6vw, 72px); max-width: 520px; }
.in-situ-caption h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.1; margin: 10px 0 18px; }

/* Collection */
.collection { padding: 110px var(--gutter); border-top: 1px solid var(--faint); }
.section-title { text-align: center; margin-bottom: 56px; }
.grid { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; display: grid; grid-template-columns: repeat(2, 1fr); row-gap: clamp(56px, 7vw, 96px); gap: clamp(28px, 4vw, 64px); }
.card { display: block; color: inherit; text-decoration: none; border-radius: 8px; }
.card:focus-visible { outline-offset: 12px; }
.card-image { position: relative; display: block; aspect-ratio: 3/2; overflow: hidden; background: radial-gradient(ellipse 50% 60% at 50% 48%, rgba(255,244,222,.07), transparent 72%); }
.card-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; scale: 1.32; transition: opacity .5s ease, transform 1.2s var(--ease); }
.card:hover .card-image > img { transform: scale(1.02); }
.card-live { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.card-live canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.card-live.is-dragging canvas { cursor: grabbing; }
.card-image.is-live .card-live { opacity: 1; }
.card-image.is-live > img { opacity: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 6px 0 4px; }
.card-title { font-size: 1.5rem; margin: 4px 0 0; }
.card-price { font-family: var(--serif); font-size: 1.2rem; font-feature-settings: "onum", "pnum"; white-space: nowrap; }
.card-specs { margin: 0; color: var(--muted); font-family: var(--serif); font-weight: 300; font-size: .98rem; font-feature-settings: "onum", "pnum"; }
.card[aria-current="true"] .label { color: var(--gold); }
.card.is-reserved .card-price { color: var(--gold); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 130px; }
.principles > div { border-top: 1px solid var(--faint); padding-top: 26px; }
.principles h3 { font-size: 1.2rem; margin: 0 0 8px; }
.principles p { color: var(--muted); margin: 0; font-size: .94rem; }

footer a { color: inherit; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 30px var(--gutter); border-top: 1px solid var(--faint); color: var(--muted); font-size: .8rem; }

/* Acquire dialog */
.sheet { border: 0; background: var(--raise); color: var(--ink); border-radius: 16px; width: min(420px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 40px 34px 30px; text-align: center; box-shadow: 0 40px 120px rgba(0,0,0,.6); }
.sheet::backdrop { background: rgba(5,4,3,.84); backdrop-filter: blur(10px); }
.sheet[open] { animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.sheet h2 { font-size: 1.7rem; margin: 6px 0 0; }
.close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 6px; transition: color .3s; }
.close:hover { color: var(--ink); }
.acq-image { width: 170px; height: 150px; margin: 18px auto 22px; filter: drop-shadow(0 12px 14px rgba(0,0,0,.8)); }
.sheet .specs { text-align: left; }
.sheet .specs .total dd { font-size: 1.3rem; }
.btn.wide { width: 100%; margin-top: 24px; }
.fine { color: var(--muted); font-size: .8rem; margin: 14px 0 0; }
#acqDone h2 { font-size: 2.2rem; margin-top: 16px; }

@media (max-width: 560px) {
  .frame-btn .long { display: none; }
  .frame-btn { padding: 8px 14px; }
}
@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; gap: 28px; padding-top: 92px; }
  .stage { --view-h: 54svh; --stone: min(54svh, 92vw); }
  .viewer { order: -1; }
  .hint { white-space: normal; width: max-content; max-width: calc(100% - 32px); text-align: center; }
  .grid, .principles { grid-template-columns: 1fr; }
  .grid { gap: 56px; }
  .principles { gap: 32px; }
  footer { flex-direction: column; gap: 4px; }
}

/* Fixes for collection interactions */
.card-live canvas {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.card-image.is-live {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent white flash when tapping on canvas */
canvas {
  -webkit-touch-callout: none;
}

/* Contact affordance for out-of-area customers */
.contact-cta {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--gold);
}

.contact-cta a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.contact-cta a:hover {
  opacity: 0.85;
}
