/* House of Naqsha collection site.
   Direction: a workshop at night. The page is dark so the metal is the only thing that shines.
   Naqsh means an engraved pattern: the six-pointed star grid appears once, behind the reserving section.
   One bold thing: every piece turns live in front of you, in the metals you choose. Everything else stays quiet.
   Type: Bodoni Moda for names (knife-edge hairlines, like the facets), Barlow for text (kin to the logo's lettering). */

:root {
  --night: #0c0e12;
  --kohl: #13161c;
  --slate: #1d222b;
  --slate-hi: #2a303c;
  --sand: #eadfca;
  --sand-dim: #a8a394;
  --ink: #14161b;
  --gold: #d4af37;
  --line: rgba(234, 223, 202, 0.15);
  --font-display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --font-text: Barlow, "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 62ch;
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--sand);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, dl, dd, ol, ul, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sand); color: var(--ink); padding: 8px 14px; z-index: 10; }
.skip:focus { left: var(--gutter); top: 8px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 18px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
/* the name as the logo sets it: wide, light capitals */
.wordmark { font-weight: 300; font-size: 0.95rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px clamp(14px, 2.6vw, 34px); font-size: 0.98rem; }
.site-nav a { text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.count { display: inline-block; min-width: 1.5em; margin-left: 0.45em; padding: 0 0.4em; text-align: center; background: var(--gold); color: var(--ink); font-weight: 500; font-size: 0.85em; line-height: 1.5; }
@media (max-width: 560px) { .brand img { height: 36px; } .wordmark { font-size: 0.8rem; letter-spacing: 0.26em; } }
@media (max-width: 420px) { .site-nav { gap: 2px 14px; font-size: 0.92rem; } }

/* ---------- display type ---------- */
.name {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 0.92;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.lede { color: var(--sand-dim); max-width: 46ch; font-size: 1.15rem; line-height: 1.5; }
.price { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; }
.price small { font-family: var(--font-text); font-size: 0.88rem; color: var(--sand-dim); margin-left: 0.5em; }
.note { color: var(--sand-dim); font-size: 0.95rem; max-width: var(--measure); }
.note a { color: var(--sand); text-underline-offset: 3px; }

.button {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--sand); color: var(--ink);
  padding: 0.8em 1.5em; font: inherit; font-weight: 500; font-size: 1rem;
  border: 1px solid var(--sand);
  transition: background-color 0.15s, color 0.15s;
}
.button:hover { background: transparent; color: var(--sand); }
.button.quiet { background: transparent; color: var(--sand); border-color: var(--line); }
.button.quiet:hover { border-color: var(--sand); }
/* shown only when JavaScript is off (the noscript rule in the page turns it on); placed after .button so it wins */
.no-js { display: none !important; }
.link { font: inherit; font-size: 0.95rem; color: var(--sand); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the stage: a live piece ---------- */
.stage { position: relative; isolation: isolate; min-height: 320px; }
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 62% 30% at 50% 78%, rgba(234, 223, 202, 0.11), transparent 70%);
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.5s ease; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage.is-ready canvas { opacity: 1; }
.stage-wait {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 74px; margin: -37px 0 0 -32px;
  clip-path: var(--hex);
  background: var(--slate);
  animation: wait 1.6s ease-in-out infinite;
}
.stage.is-ready .stage-wait, .stage.is-fallback .stage-wait { display: none; }
@keyframes wait { 50% { background: var(--slate-hi); } }
@media (prefers-reduced-motion: reduce) { .stage-wait { animation: none; } .stage canvas { transition: none; } }
.stage-fallback { display: none; position: absolute; inset: 6% 8%; grid-template: minmax(0, 1fr) / minmax(0, 1fr); padding: 4%; background: radial-gradient(circle at 50% 45%, var(--slate-hi), transparent 68%); }
.stage-fallback img { width: 100%; height: 100%; object-fit: contain; }
.stage.is-fallback .stage-fallback { display: grid; }
.stage.is-fallback canvas { display: none; }
.stage-hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: var(--sand-dim); font-size: 0.9rem; pointer-events: none; opacity: 0; transition: opacity 0.6s 0.9s; }
.stage.is-ready .stage-hint { opacity: 1; }
.stage.is-touched .stage-hint { opacity: 0; transition-delay: 0s; }
.stage-holder { position: relative; }
.stage-pause { position: absolute; right: 0; bottom: 6px; z-index: 3; font: inherit; font-size: 0.9rem; color: var(--sand-dim); background: none; border: 1px solid var(--line); padding: 0.55em 1em; cursor: pointer; }
.stage-pause:hover { color: var(--sand); border-color: var(--sand); }

/* ---------- home: hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center;
  gap: 0; padding: 0 var(--gutter); min-height: min(86vh, 860px);
}
.hero-text { position: relative; z-index: 2; display: grid; gap: 22px; padding-block: 40px; pointer-events: none; }
.hero-text a { pointer-events: auto; }
.hero .name { font-size: clamp(4.2rem, 11.5vw, 11rem); margin-right: -18%; }
.hero .note { max-width: 40ch; }
.hero-visual { z-index: 1; }
.hero-stage { height: min(82vh, 820px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: 24px; }
  .hero-visual { order: -1; margin-inline: calc(var(--gutter) * -1); }
  .hero-stage { height: 62vh; min-height: 380px; }
  .stage-pause { right: var(--gutter); }
  .hero .name { margin-right: 0; }
  .hero-text { padding-block: 8px 24px; }
}

/* ---------- sections ---------- */
.band { padding: clamp(56px, 9vw, 120px) var(--gutter); }
.band-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 60px); }
.band-head h1, .band-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; text-wrap: balance; }
.band-head p { color: var(--sand-dim); max-width: var(--measure); }

/* ---------- the comb: the collection as a honeycomb of frames ---------- */
.comb { --w: clamp(190px, 23vw, 300px); --g: calc(var(--w) * 0.045); display: flex; flex-direction: column; align-items: center; }
.comb-row { display: flex; gap: var(--g); }
.comb-row + .comb-row { margin-top: calc(var(--w) * -0.2887 + var(--g) * 0.866); }
.cell { position: relative; display: block; width: var(--w); aspect-ratio: 1 / 1.1547; text-decoration: none; color: var(--sand); pointer-events: none; }
.cell::before { content: ""; position: absolute; inset: 0; clip-path: var(--hex); background: var(--gold); opacity: 0.32; transition: opacity 0.2s; }
.cell:hover::before, .cell:focus-visible::before { opacity: 0.95; }
.cell:focus-visible { outline: none; }
.cell:focus-visible .hex-name { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.hex {
  position: absolute; inset: 1.5px; display: block;
  clip-path: var(--hex);
  background: radial-gradient(circle at 50% 36%, #39404f 0%, #20252f 46%, #15181f 100%);
  pointer-events: auto;
}
.hex img { position: absolute; left: 9%; top: 9%; width: 82%; height: 50%; object-fit: contain; transition: transform 0.35s ease; }
.cell:hover .hex img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .hex img { transition: none; } .cell:hover .hex img { transform: none; } }
.hex-label { position: absolute; left: 8%; right: 8%; top: 61%; text-align: center; display: grid; gap: 0; }
.hex-name { font-family: var(--font-display); font-size: calc(var(--w) * 0.1); line-height: 1.05; }
.hex-meta { font-size: max(12px, calc(var(--w) * 0.055)); line-height: 1.25; color: var(--sand-dim); }
.comb.narrow { display: none; --w: min(43vw, 230px); }
.comb.narrow .hex img { top: 9%; height: 44%; }
.comb.narrow .hex-label { top: 55%; }
@media (max-width: 880px) { .comb.wide { display: none; } .comb.narrow { display: flex; } }

/* ---------- reserving ---------- */
.reserve { position: relative; isolation: isolate; background: var(--kohl); display: grid; gap: clamp(28px, 4vw, 48px); }
.reserve::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(naqsha.svg) 0 0 / 96px auto; opacity: 0.07; -webkit-mask-image: linear-gradient(105deg, transparent 30%, #000 100%); mask-image: linear-gradient(105deg, transparent 30%, #000 100%); }
.reserve .band-head { margin-bottom: 0; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--gold); margin-bottom: 12px; }
.steps h3, .facts h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; line-height: 1.15; margin-bottom: 10px; }
.steps p, .facts p { color: var(--sand-dim); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- making ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 1100px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* ---------- object page ---------- */
.object { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); padding: 8px var(--gutter) clamp(56px, 8vw, 100px); align-items: start; }
.object-text { display: grid; gap: 26px; padding-top: clamp(16px, 4vw, 56px); }
.object .name { font-size: clamp(3.4rem, 8vw, 7.4rem); }
.kicker { color: var(--sand-dim); font-size: 1rem; }
.story { font-size: 1.25rem; line-height: 1.45; max-width: 34ch; }
.buy { display: grid; gap: 14px; justify-items: start; border-top: 1px solid var(--line); padding-top: 24px; }
.object-stage { position: sticky; top: 16px; height: min(84vh, 860px); }
.spec { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; }
.spec dt { color: var(--sand-dim); }

/* the metal chooser */
.chooser { display: grid; gap: 18px; border-top: 1px solid var(--line); padding-top: 24px; }
.chooser h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.pick { border: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.pick legend { padding: 0; margin-bottom: 8px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; font-size: 0.95rem; line-height: 1.25; cursor: pointer; }
.chip-face { display: inline-flex; align-items: center; gap: 0.55em; padding: 0.55em 0.85em 0.55em 0.65em; border: 1px solid rgba(234, 223, 202, 0.3); background: var(--kohl); transition: border-color 0.15s, background-color 0.15s; }
.chip:hover .chip-face { border-color: var(--sand-dim); }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip input:checked + .chip-face { border-color: var(--gold); background: var(--slate); box-shadow: inset 0 0 0 1px var(--gold); }
.chip input:focus-visible + .chip-face { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (forced-colors: active) { .chip input:checked + .chip-face { border-color: Highlight; background: Highlight; color: HighlightText; } }
@media (pointer: coarse) { .chip-face { padding-block: 0.75em; } .link { padding-block: 0.6em; } }
.swatch { flex: none; display: inline-block; width: 1.05em; height: 1.2em; clip-path: var(--hex); background: var(--sw, #888); }
.chooser-foot { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; }
@media (max-width: 900px) {
  .object { grid-template-columns: 1fr; }
  /* the model stays in view while the metals are chosen, but never takes more than part of the screen */
  .object-stage { position: sticky; top: 0; z-index: 2; order: -1; height: clamp(240px, 42vh, 420px); min-height: 0; margin-inline: calc(var(--gutter) * -1); background: linear-gradient(var(--night) 86%, transparent); }
  .object-text { padding-top: 0; }
  html:has(.object-stage) { scroll-padding-top: calc(clamp(240px, 42vh, 420px) + 20px); }   /* a focused chip is never under the model */
}
/* a short screen (a phone held sideways): the model scrolls away with the page instead of covering it */
@media (max-width: 900px) and (max-height: 620px) {
  .object-stage { position: relative; height: 72vh; min-height: 220px; }
  html:has(.object-stage) { scroll-padding-top: 0; }
}
.neighbours { display: flex; justify-content: space-between; gap: 24px; padding: 28px var(--gutter); border-top: 1px solid var(--line); }
.neighbours a { text-decoration: none; display: grid; gap: 2px; }
.neighbours a:last-child { text-align: right; }
.neighbours .n { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.neighbours a:hover .n { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* ---------- my selection ---------- */
.selection { max-width: 1100px; }
.empty { font-size: 1.15rem; }
.empty a { text-underline-offset: 3px; }
.chosen { display: grid; gap: 0; border-top: 1px solid var(--line); }
.chosen li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.chosen img { width: 112px; height: 112px; object-fit: contain; background: radial-gradient(circle at 50% 42%, var(--slate-hi), transparent 70%); }
.chosen h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; line-height: 1.05; }
.chosen h2 a { text-decoration: none; }
.chosen h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.chosen .metals { color: var(--sand-dim); font-size: 0.98rem; margin-top: 8px; }
.chosen .side { display: grid; gap: 8px; justify-items: end; text-align: right; max-width: 30ch; }
.total { font-size: 1.15rem; padding-top: 22px; }
.request { display: grid; gap: 18px; margin-top: clamp(32px, 5vw, 56px); padding: clamp(20px, 3vw, 36px); background: var(--kohl); border: 1px solid var(--line); }
.request h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; line-height: 1.1; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fields label { display: grid; gap: 6px; font-size: 0.95rem; color: var(--sand-dim); }
.fields input, .request textarea { font: inherit; color: var(--sand); background: var(--night); border: 1px solid var(--sand-dim); padding: 0.7em 0.8em; min-width: 0; }
.request textarea { width: 100%; font-size: 0.95rem; line-height: 1.45; resize: vertical; }
.fields input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.request-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 720px) {
  .fields { grid-template-columns: 1fr; }
  .chosen li { grid-template-columns: 76px minmax(0, 1fr); }
  .chosen img { width: 76px; height: 76px; }
  .chosen .side { grid-column: 2; justify-items: start; text-align: left; max-width: none; }
}

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 36px var(--gutter) 48px; display: flex; flex-wrap: wrap; gap: 18px 48px; align-items: center; justify-content: space-between; color: var(--sand-dim); font-size: 0.95rem; }
.site-foot img { height: 30px; width: auto; opacity: 0.9; }
