:root {
  --bg: #F3F1EC; --card: #FFFFFF; --ink: #1E1C19; --ink2: #6A645B; --line: #E2DED5; --accent: #8C6A43; --accent2: #D9B98C;
  --shadow: 0 1px 2px rgb(30 28 25 / .06), 0 10px 28px rgb(30 28 25 / .08);
  --r: 12px; --f-disp: 'Fraunces', Georgia, 'Times New Roman', serif; --f-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #141311; --card: #1D1B18; --ink: #F1ECE4; --ink2: #ABA397; --line: #2F2C27; --accent: #D9B98C; --accent2: #E9CFA8; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #141311; --card: #1D1B18; --ink: #F1ECE4; --ink2: #ABA397; --line: #2F2C27; --accent: #D9B98C; --accent2: #E9CFA8; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.muted { color: var(--ink2); }
img { max-width: 100%; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; gap: clamp(12px, 3vw, 32px);
  padding: 12px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand b { display: block; font: 650 20px/1.05 var(--f-disp); letter-spacing: -.01em; }
.brand small { display: block; font: 600 10.5px/1.3 var(--f-body); color: var(--ink2); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.mark { flex: none; width: 30px; height: 30px; border-radius: 6px; background:
  linear-gradient(115deg, transparent 42%, rgb(255 255 255 / .55) 44%, transparent 47%, transparent 66%, rgb(255 255 255 / .35) 68%, transparent 70%),
  linear-gradient(160deg, #3a3631, #121110); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 600; color: var(--ink2); }
.nav a.on, .nav a:hover { color: var(--ink); background: var(--card); }
.cta { text-decoration: none; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; white-space: nowrap; }

main { padding: 0 clamp(16px, 4vw, 48px) 72px; max-width: 1600px; margin: 0 auto; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding: clamp(28px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); }
.hero h1 { margin: 0 0 14px; font: 650 clamp(34px, 5vw, 64px)/1.02 var(--f-disp); letter-spacing: -.025em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { margin: 0 0 20px; color: var(--ink2); font-size: 17px; max-width: 46ch; }
.hero .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 26px; color: var(--ink2); font-size: 13px; }
.stats b { display: block; color: var(--ink); font: 650 24px/1.1 var(--f-disp); }
.hero-view { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #1a1816; aspect-ratio: 7 / 4; }
.hero-view canvas { width: 100%; height: 100%; display: block; }
.hero-view .chip { position: absolute; left: 12px; bottom: 12px; }
.hero-swatches { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero-swatches button { width: 44px; height: 44px; border-radius: 8px; border: 2px solid transparent; padding: 0; overflow: hidden; background: var(--line); }
.hero-swatches button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-swatches button.on { border-color: var(--accent); }

/* sections */
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; padding: 36px 0 18px; border-top: 1px solid var(--line); }
.sec-head h2, .page-head h1 { margin: 0; font: 650 clamp(26px, 3.4vw, 40px)/1.05 var(--f-disp); letter-spacing: -.02em; }
.sec-head p, .page-head p { margin: 6px 0 0; color: var(--ink2); max-width: 62ch; }
.page-head { padding: 32px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button, .chips a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink2); text-decoration: none; }
.chips .on { border-color: var(--ink); color: var(--ink); }
.chips small { font-weight: 500; opacity: .7; margin-left: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 18px; }
.card { display: block; padding: 0; border: 0; text-align: left; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; text-decoration: none; color: inherit; width: 100%; }
.card:hover:not(:disabled) { transform: translateY(-3px); }
.card .im { position: relative; aspect-ratio: 7 / 4; background: var(--line); }
.card .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .im .badge { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px; background: rgb(0 0 0 / .6); color: #fff; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(4px); }
.card .meta { padding: 10px 13px 13px; }
.card .meta b { display: block; font: 600 15.5px/1.25 var(--f-body); }
.card .meta span { font-size: 12.5px; color: var(--ink2); }
.card:disabled { cursor: default; }
.card:disabled .im { display: grid; place-items: center; font-size: 12px; color: var(--ink2); text-align: center; padding: 12px; }
.ph { background: repeating-linear-gradient(135deg, var(--line) 0 10px, transparent 10px 20px), var(--card); }

.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 16px; }
.scard { display: block; text-decoration: none; color: inherit; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.scard:hover { transform: translateY(-3px); }
.scard .sw { aspect-ratio: 1; background: var(--line); }
.scard .sw img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard .meta { padding: 9px 11px 11px; }
.scard b { display: block; font-size: 14.5px; line-height: 1.25; }
.scard span { font-size: 12px; color: var(--ink2); }
.catrow { margin-bottom: 34px; }
.catrow h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 4px; font: 650 22px/1.2 var(--f-disp); }
.catrow h3 a { font: 600 13px var(--f-body); color: var(--accent); text-decoration: none; margin-left: auto; }
.catrow > p { margin: 0 0 12px; color: var(--ink2); font-size: 14px; }

/* stone page */
.stone-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding: 28px 0; align-items: start; }
.slab { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1; background: var(--line); }
.slab img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stone-page h1 { margin: 0 0 6px; font: 650 clamp(30px, 4vw, 48px)/1.05 var(--f-disp); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 18px 0; }
.facts dt { color: var(--ink2); } .facts dd { margin: 0; font-weight: 600; }
.note { font-size: 13px; color: var(--ink2); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

/* contact */
.contact { max-width: 560px; padding: 32px 0; }
.contact form, .enq { display: grid; gap: 8px; }
.contact input, .contact textarea, .enq input, .enq textarea, .search { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.contact button, .enq button { padding: 11px; border: 0; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 700; }

/* viewer pop-up */
.pop { width: min(1560px, 100vw - 24px); height: min(920px, 100dvh - 24px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .45); overflow: hidden; }
.pop::backdrop { background: rgb(10 9 8 / .72); backdrop-filter: blur(3px); }
.pop-grid { display: grid; grid-template-columns: 1fr 390px; height: 100%; }
.stage { position: relative; background: #161412; min-height: 0; }
#view { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: none; }
#view:active { cursor: grabbing; }
.hud { position: absolute; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.hud > * { pointer-events: auto; }
.top-l { left: 14px; top: 14px; flex-wrap: wrap; max-width: max(120px, min(55%, 100% - 420px)); } .top-r { right: 14px; top: 14px; }
.top-l .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom { left: 14px; right: 14px; bottom: 14px; justify-content: space-between; }
.chip, .tag, .hint, .ico { background: rgb(18 16 14 / .64); color: #fff; backdrop-filter: blur(6px); border-radius: 999px; padding: 6px 12px; font-size: 13px; border: 0; }
.chip { font-weight: 700; font-size: 14px; } .chip.ghost { font-weight: 500; font-size: 12.5px; opacity: .9; }
.hint { font-size: 12px; opacity: .85; margin-left: auto; }
.ico { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 10px; }
.ico:hover { background: rgb(18 16 14 / .86); }
.ico.close { background: #fff; color: #111; }
.ico.edit { font-weight: 700; padding: 0 14px; }
.pop.editing .ico.edit { background: var(--accent2); color: #1c150c; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgb(18 16 14 / .62); color: #fff; backdrop-filter: blur(6px); }
.nav-btn.prev { left: 14px; } .nav-btn.next { right: 14px; }
.nav-btn:hover:not(:disabled) { background: rgb(18 16 14 / .9); }
.nav-btn:disabled { opacity: .22; cursor: default; }
.legend { position: absolute; left: 14px; bottom: 56px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.legend span { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 4px 11px 4px 4px; border-radius: 999px; background: rgb(18 16 14 / .64); color: #fff; font-size: 12.5px; backdrop-filter: blur(6px); }
.legend img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.legend em { font-style: normal; opacity: .7; }
.pop:not(.editing) .pop-grid { grid-template-columns: 1fr; }
.pop:not(.editing) .side, .pop:not(.editing) .edit-only { display: none; }

.side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 14px 6px; border: 0; background: none; font-weight: 700; color: var(--ink2); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }
.panel { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.lbl { margin: 4px 0 0; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink2); }
.lbl .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.surfs { display: flex; flex-wrap: wrap; gap: 6px; }
.surfs button { display: flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; }
.surfs button i { width: 22px; height: 22px; border-radius: 50%; background: var(--line) center/cover; border: 1px solid rgb(0 0 0 / .12); }
.surfs button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.cats { display: flex; flex-wrap: wrap; gap: 5px; }
.cats button { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: none; font-size: 12px; font-weight: 600; color: var(--ink2); }
.cats button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.swatches button { padding: 0; border: 2px solid transparent; border-radius: 9px; background: none; text-align: left; font-size: 11px; line-height: 1.2; color: var(--ink2); }
.swatches button img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; background: var(--line); }
.swatches button span { display: block; padding: 4px 2px 2px; }
.swatches button.on { border-color: var(--accent); color: var(--ink); }
.swatches button.missing { cursor: default; opacity: .55; }
.swatches button.missing img { content: url('data:image/gif;base64,R0lGODlhAQABAAAAACw='); background: repeating-linear-gradient(135deg, var(--line) 0 8px, transparent 8px 16px); }
.opts { display: grid; gap: 8px; }
.opts .row { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; font-size: 13px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: none; font-size: 12.5px; }
.seg button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--card)); font-weight: 700; }
.areas { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.areas th, .areas td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.areas td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.areas tfoot td { font-weight: 700; border-bottom: 0; }

@media (max-width: 900px) {
  .hero, .stone-page { grid-template-columns: 1fr; }
  .pop { width: 100vw; height: 100dvh; border-radius: 0; }
  .pop.editing .pop-grid { grid-template-columns: 1fr; grid-template-rows: 46% 54%; }
  .pop.editing .side { border-left: 0; border-top: 1px solid var(--line); }
  .top-l { top: 60px; max-width: calc(100% - 28px); } .top-r { gap: 5px; right: 10px; }
  .pop.editing .top-l { display: none; } .ico { min-width: 34px; height: 34px; padding: 0 8px; font-size: 12px; }
  .hint { display: none; } .legend { display: none; }
  .brand small { display: none; }
}
