/* Sana Gold House: bottle-green night, gold hairlines, slow luxurious motion. */
:root {
  --bg: #0B1411; --bg2: #101D18; --surf: #13221C; --line: rgba(216, 176, 106, .22); --line2: rgba(216, 176, 106, .45);
  --gold: #D8B06A; --gold-hi: #F1D59A; --gold-lo: #9C7631; --ivory: #EDE6D6; --muted: #A6B0A8; --mal: #2F6B57;
  --focus: #F1D59A;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-lux: cubic-bezier(.16, 1, .3, 1); --ease-snap: cubic-bezier(.34, 1.56, .64, 1);
  --disp: "Noto Kufi Arabic", "Tajawal", serif; --text: "Tajawal", system-ui, sans-serif;
  --gut: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}
html { background: var(--bg); }
body { background: var(--bg); color: var(--ivory); font-family: var(--text); font-size: 17px; line-height: 1.75; overflow-x: hidden; }
html[lang="en"] body { line-height: 1.6; }
::selection { background: var(--gold); color: var(--bg); }

.skip { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 60; background: var(--gold); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---------- bar ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 14px var(--gut); background: linear-gradient(var(--bg) 20%, rgba(11, 20, 17, 0)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-hi); margin-inline-end: auto; }
.mark { width: 28px; height: 28px; color: var(--gold); }
.brand-name { font-family: var(--disp); font-size: 19px; font-weight: 500; }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--gold-hi); }
.lang { background: none; border: 1px solid var(--line2); color: var(--gold-hi); border-radius: 99px; padding: 6px 14px; font-size: 14px; }
.back-chip { position: fixed; z-index: 20; bottom: 14px; inset-inline-start: 14px; font-size: 13px; color: var(--muted); text-decoration: none; background: rgba(11, 20, 17, .82); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; backdrop-filter: blur(6px); }
.back-chip:hover { color: var(--gold-hi); }
@media (max-width: 760px) { .nav { display: none; } .brand-name { font-size: 17px; } }

/* ---------- canvas ---------- */
#gl { position: fixed; inset: 0 0 auto 0; width: 100%; height: 100vh; z-index: 5; pointer-events: none; }
.rm #gl, .low #gl { display: none; }
.gl-on .fallback { opacity: 0; }

/* ---------- type ---------- */
.kicker { color: var(--gold); font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.title { font-family: var(--disp); font-weight: 300; font-size: clamp(2.1rem, 5.2vw, 4.4rem); line-height: 1.22; margin: 0 0 18px; color: var(--ivory); letter-spacing: 0; }
html[lang="en"] .title { line-height: 1.08; }
.title.sm { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.title [data-shop] { color: var(--gold-hi); }
.lede { color: var(--muted); max-width: 34em; margin: 0 0 22px; }

/* word reveal */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em 0 .16em; margin: -.08em 0 -.16em; }
.split .wi { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-lux); transition-delay: calc(var(--i, 0) * 75ms); }
.on .split .wi, .split.on .wi, .rm .split .wi { transform: none; }

/* ---------- buttons ---------- */
.btn { --b: var(--gold); display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 99px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid var(--b); transition: background .22s, color .22s, transform .22s var(--ease-snap); }
.btn.gold { background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: #1a1407; border-color: transparent; }
.btn.gold:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--gold-hi); border-color: var(--line2); }
.btn.ghost:hover { background: rgba(216, 176, 106, .08); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 15px; background: transparent; color: var(--gold-hi); border-color: var(--line2); }
.btn.small:hover { background: var(--gold); color: var(--bg); }
.btn.wide { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- story ---------- */
.story { position: relative; height: 620vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.halo { position: absolute; inset: 0; background:
  radial-gradient(42vmax 34vmax at var(--hx, 30%) 50%, rgba(216, 176, 106, .16), transparent 70%),
  radial-gradient(60vmax 40vmax at 50% 120%, rgba(47, 107, 87, .35), transparent 70%); }
html[dir="ltr"] .halo { --hx: 70%; }
.fallback { position: absolute; top: 50%; inset-inline-end: 8vw; width: min(42vw, 560px); aspect-ratio: 1; translate: 0 -50%; transition: opacity .6s; will-change: transform; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.css-ring { position: absolute; inset: 22% 22% 14%; border-radius: 50%;
  background: conic-gradient(from 200deg, #fbe3a4, #b9822c, #f6d48b, #8f6420, #fbe3a4, #c99a4b, #fbe3a4);
  -webkit-mask: radial-gradient(closest-side, transparent 82%, #000 84%); mask: radial-gradient(closest-side, transparent 82%, #000 84%); }
.css-ring i { position: absolute; left: 50%; top: -15%; width: 18%; aspect-ratio: 1; translate: -50% 0; rotate: 45deg; background: linear-gradient(135deg, #fff, #b8cbe0); }
.fallback:has(.poster) .css-ring { display: none; }

.panel { position: absolute; z-index: 6; top: 50%; inset-inline-start: var(--gut); width: min(36rem, 42vw); translate: 0 -50%; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease-out), visibility 0s .7s; }
.panel.on { opacity: 1; visibility: visible; transition: opacity .7s var(--ease-out); }
.panel > :not(.title) { transform: translateY(16px); transition: transform .9s var(--ease-lux) .15s; }
.panel.on > :not(.title) { transform: none; }
.panel-center { inset-inline-start: 50%; translate: 50% 0; top: auto; bottom: 7vh; text-align: center; width: min(40rem, 86vw); }
html[dir="ltr"] .panel-center { translate: -50% 0; }
.panel-center .kicker { justify-content: center; }
.panel-center .lede { margin-inline: auto; }
.hero-panel .title { font-size: clamp(2.5rem, 6.4vw, 5.6rem); }
.scroll-hint { margin-top: 34px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--gold), transparent); animation: drip 2.4s var(--ease-out) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.karats { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.karats li { padding: 14px 18px; border-inline-start: 2px solid var(--line); color: var(--muted); transition: border-color .5s, color .5s, background .5s; }
.karats li b { display: block; font-family: var(--disp); font-weight: 500; font-size: 22px; color: var(--ivory); }
.karats li.hot { border-color: var(--gold); color: var(--ivory); background: linear-gradient(90deg, rgba(216, 176, 106, .08), transparent); }
html[dir="rtl"] .karats li.hot { background: linear-gradient(-90deg, rgba(216, 176, 106, .08), transparent); }

.labels { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.lbl { position: absolute; left: 0; top: 0; opacity: 0; font-size: 14px; color: var(--gold-hi); white-space: nowrap; padding-inline-start: 70px; margin-top: -11px; }
.lbl::before { content: ""; position: absolute; inset-inline-start: 6px; top: 50%; width: 56px; height: 1px; background: var(--gold); }
.lbl::after { content: ""; position: absolute; inset-inline-start: 0; top: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--gold-hi); }
html[dir="rtl"] .lbl { translate: -100% 0; }
html[dir="rtl"] .lbl { padding-inline-start: 70px; }

.rail { position: absolute; z-index: 6; inset-inline-end: var(--gut); top: 50%; translate: 0 -50%; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; font-size: 13px; color: var(--muted); }
.rail li { display: flex; align-items: center; gap: 10px; opacity: .45; transition: opacity .4s, color .4s; }
.rail li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; transition: background .4s; }
.rail li.on { opacity: 1; color: var(--gold-hi); }
.rail li.on::before, .rail li.past::before { background: currentColor; }
.rail li.past { opacity: .7; }

/* ---------- configurator ---------- */
.cfg { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); padding: 120px var(--gut) 100px; align-items: start; }
.cfg-view { position: sticky; top: 90px; height: min(76vh, 720px); border-radius: 28px; border: 1px solid var(--line); background:
  radial-gradient(60% 55% at 50% 45%, rgba(216, 176, 106, .18), transparent 70%), linear-gradient(160deg, var(--surf), var(--bg2)); overflow: hidden; touch-action: pan-y; cursor: grab; }
.cfg-view:active { cursor: grabbing; }
.cfg-view .fallback { inset: 0; top: 50%; left: 50%; inset-inline-end: auto; width: 74%; translate: -50% -50%; }
.engr-cap { position: absolute; inset-inline-start: 22px; bottom: 16px; margin: 0; font-size: 14px; color: var(--muted); z-index: 6; }
.engr-cap b { color: var(--gold-hi); font-family: var(--disp); font-weight: 500; font-size: 18px; }
.drag-hint { position: absolute; top: 16px; inset-inline-start: 22px; margin: 0; font-size: 13px; color: var(--muted); }
.rm .drag-hint, .low .drag-hint { display: none; }
.inside-btn { position: absolute; z-index: 6; bottom: 12px; inset-inline-end: 14px; background: rgba(11, 20, 17, .7); color: var(--gold-hi); border: 1px solid var(--line2); border-radius: 99px; padding: 8px 14px; font-size: 13px; }
.inside-btn[aria-pressed="true"] { background: var(--gold); color: var(--bg); }
.rm .inside-btn, .low .inside-btn { display: none; }

.cfg-panel { padding-top: 10px; }
.opt { border: 0; padding: 0; margin: 0 0 22px; }
.opt legend { font-size: 14px; color: var(--muted); margin-bottom: 10px; padding: 0; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sw { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .22s, background .22s; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw i { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.sw span { display: grid; font-size: 15px; line-height: 1.35; }
.sw small { color: var(--muted); font-size: 12.5px; }
.sw:has(input:checked) { border-color: var(--gold); background: rgba(216, 176, 106, .08); }
.sw:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin-bottom: 22px; }
.field { display: grid; gap: 8px; }
.lab { font-size: 14px; color: var(--muted); }
.field input, .field select { min-height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); padding: 0 14px; color: var(--ivory); }
.field input::placeholder { color: #6f7a73; }
.quote { margin: 0 0 10px; border-top: 1px solid var(--line); }
.quote div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.quote dt { color: var(--muted); }
.quote dd { margin: 0; font-variant-numeric: tabular-nums; }
.quote .tot dd { color: var(--gold-hi); font-family: var(--disp); font-size: 22px; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 20px; }

/* ---------- collection ---------- */
.coll { position: relative; z-index: 6; background: var(--bg); padding: 110px var(--gut); }
.sec-head { max-width: 760px; margin-bottom: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--ivory); font-size: 14.5px; transition: background .22s, color .22s; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.item { background: var(--bg); padding: 22px 22px 20px; display: flex; flex-direction: column; }
.item-art { aspect-ratio: 10 / 9; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(60% 60% at 50% 50%, rgba(216, 176, 106, .14), transparent 75%), var(--bg2); margin-bottom: 16px; overflow: hidden; }
.item-art svg { width: 78%; height: auto; transition: transform 1.1s var(--ease-lux); }
.item:hover .item-art svg { transform: scale(1.06) rotate(-3deg); }
.item h3 { font-family: var(--disp); font-weight: 500; font-size: 21px; margin: 0; }
.desc { color: var(--muted); font-size: 14.5px; margin: 2px 0 8px; }
.meta { display: flex; gap: 14px; font-size: 13px; color: var(--gold); margin: 0 0 14px; }
.item-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.item-foot b { font-variant-numeric: tabular-nums; font-size: 16px; }
.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-lux); transition-delay: calc(var(--d, 0) * 80ms); }
.rv.on, .rm .rv { opacity: 1; transform: none; }
.item.rv { opacity: 1; transform: none; }
.item.rv > * { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-lux); transition-delay: calc(var(--d, 0) * 80ms); }
.item.rv.on > *, .rm .item.rv > * { opacity: 1; transform: none; }

/* ---------- visit ---------- */
.visit { position: relative; z-index: 6; background: var(--bg2); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); padding: 110px var(--gut); }
.facts { margin: 0 0 22px; display: grid; gap: 14px; }
.facts div { border-inline-start: 1px solid var(--line2); padding-inline-start: 14px; }
.facts dt { font-size: 13px; color: var(--gold); }
.facts dd { margin: 0; }
.social { display: flex; gap: 18px; }
.social a { color: var(--gold-hi); }
.visit-form { background: var(--surf); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 34px); align-self: start; }
.err { color: #ffb39a; font-size: 14px; margin: -8px 0 14px; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 6; background: var(--bg); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 34px var(--gut) 70px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-name { font-family: var(--disp); color: var(--gold-hi); font-size: 18px; margin: 0 0 0 auto; }
html[dir="ltr"] .foot-name { margin: 0 auto 0 0; }
.motion-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 99px; padding: 6px 14px; font-size: 13px; }
.credit { color: var(--muted); }

/* ---------- sheet ---------- */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(4, 8, 6, .7); opacity: 0; transition: opacity .3s; }
.sheet-card { position: relative; width: min(560px, 100%); background: var(--surf); border: 1px solid var(--line2); border-radius: 24px 24px 0 0; padding: 26px 22px 30px; transform: translateY(100%); transition: transform .42s var(--ease-out); }
.sheet.open .sheet-bg { opacity: 1; }
.sheet.open .sheet-card { transform: none; }
.sheet h3 { font-family: var(--disp); font-weight: 500; font-size: 22px; margin: 0 0 14px; color: var(--gold-hi); }
.msg { white-space: pre-wrap; font-family: var(--text); font-size: 15px; line-height: 1.7; background: #0d3b2e; color: #e7f3ec; border-radius: 4px 16px 16px 16px; padding: 14px 16px; margin: 0 0 18px; max-height: 46vh; overflow: auto; }
@media (min-width: 761px) { .sheet { align-items: center; } .sheet-card { border-radius: 24px; } }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .story { height: 430vh; }
  .halo { --hx: 50% !important; background: radial-gradient(70vmax 40vmax at 50% 28%, rgba(216, 176, 106, .16), transparent 70%), radial-gradient(60vmax 40vmax at 50% 120%, rgba(47, 107, 87, .35), transparent 70%); }
  .fallback { inset-inline-end: auto; left: 50%; top: 30%; width: 78vw; translate: -50% -50%; }
  .panel, .panel-center { top: auto; bottom: calc(22px + env(safe-area-inset-bottom)); inset-inline-start: 20px; width: calc(100% - 40px); translate: none; text-align: start; }
  html[dir="ltr"] .panel-center { translate: none; }
  .panel-center .kicker { justify-content: flex-start; }
  .title { font-size: clamp(1.9rem, 8.4vw, 2.6rem); margin-bottom: 10px; }
  .hero-panel .title { font-size: clamp(2.3rem, 10.5vw, 3.2rem); }
  .lede { font-size: 15px; margin-bottom: 16px; }
  .karats li { padding: 8px 12px; font-size: 14px; line-height: 1.55; }
  .karats li b { font-size: 18px; }
  .scroll-hint { display: none; }
  .back-chip { top: 64px; bottom: auto; inset-inline-start: auto; inset-inline-end: 20px; }
  .bc-long { display: none; }
  .rail { top: 112px; translate: none; inset-inline-end: 20px; gap: 10px; }
  .rail li span { display: none; }
  .lbl { font-size: 12.5px; padding-inline-start: 44px; }
  .lbl::before { width: 32px; }
  .cfg { grid-template-columns: 1fr; padding: 80px 20px 70px; gap: 22px; }
  .cfg-view { top: 64px; height: 44svh; z-index: 4; border-radius: 22px; }
  .row2 { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr 1fr; border-radius: 18px; }
  .item { padding: 14px; }
  .item h3 { font-size: 17px; }
  .desc { display: none; }
  .item-foot { flex-direction: column; align-items: stretch; }
  .item-foot .btn { width: 100%; }
  .coll, .visit { padding: 80px 20px; }
  .visit { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- reduced motion: no pin, stacked chapters, poster only ---------- */
.rm .story { height: auto; }
.rm .stage { position: relative; height: auto; display: grid; gap: 48px; padding: 110px var(--gut) 60px; }
.rm .stage .fallback { position: relative; inset: auto; top: auto; left: auto; translate: none; width: min(80vw, 460px); margin: 0 auto; order: -1; }
.rm .panel, .rm .panel-center { position: relative; inset: auto; translate: none; width: auto; max-width: 40rem; opacity: 1; visibility: visible; text-align: start; }
.rm .panel > * { transform: none !important; }
.rm .panel-center .kicker { justify-content: flex-start; }
.rm .rail, .rm .labels, .rm .scroll-hint { display: none; }

.poster-mode body > :not(#gl) { display: none !important; }
.poster-mode #gl { position: static; display: block; }
