/* ==========================================================
   FAIM JEWELLERY ARABIA EXPERIENCE  |  Design tokens + shared base
   Concept: a jeweller's velvet tray. Warm black velvet, one
   lit white vitrine plate for the jewellery, champagne gold
   from the FAIM monogram used only as fine metalwork.
   ========================================================== */
@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-garamond-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-garamond-latin-300-italic.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../assets/fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../assets/fonts/jost-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../assets/fonts/jost-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../assets/fonts/jost-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Amiri'; src: url('../assets/fonts/amiri-arabic-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Amiri'; src: url('../assets/fonts/amiri-arabic-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url('../assets/fonts/ibm-plex-sans-arabic-arabic-300-normal.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url('../assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url('../assets/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* colour */
  --velvet: #0E0B09;        /* page */
  --tray: #17120F;          /* raised surfaces */
  --tray-2: #211A15;        /* hover / selected surfaces */
  --gold: #D2B271;          /* FAIM monogram gold: hairlines, marks, focus */
  --gold-dim: rgba(210, 178, 113, .28);
  --gold-faint: rgba(210, 178, 113, .12);
  --ivory: #EFE6D5;         /* primary text */
  --smoke: #A39888;         /* secondary text (AA on velvet) */
  --ash: #6E655B;           /* tertiary, disabled */
  --vitrine: #FFFFFF;       /* product plates: matches studio white of product photography */
  --vitrine-edge: #E9E4DB;
  --alert: #E2A15C;
  --ok: #9BC4A1;

  /* type */
  --display: 'Cormorant', 'Times New Roman', serif;
  --text: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  /* scale: whole interface is authored in rem against a 1920 x 1080 stage */
  --r-s: .25rem; --r-m: .5rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --t-fast: .25s; --t-med: .6s;
  --touch: 4.5rem;          /* minimum touch target on the 1080p stage (72px) */
}
html[lang="ar"] {
  --latin: 'Jost', sans-serif;
  --display: 'Amiri', 'Times New Roman', serif;
  --text: 'Plex Arabic', 'Geeza Pro', Tahoma, sans-serif;
}

/* 16px at 1920 x 1080, scales with the smaller axis, floors at 10px */
html { font-size: max(10px, min(calc(100vw / 120), calc(100vh / 67.5))); }
@media (max-width: 900px) { html { font-size: 11px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--velvet); color: var(--ivory); }
body {
  font-family: var(--text); font-weight: 300; font-size: 1.125rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--velvet); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 300; margin: 0; line-height: 1.05; letter-spacing: -.005em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-weight: 400; line-height: 1.35; }
p { margin: 0; }

/* ---------- shared components ---------- */
.btn {
  min-height: var(--touch); padding: 0 2.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  border: 1px solid var(--gold-dim); border-radius: 999px; font-size: 1.125rem; font-weight: 400; letter-spacing: .02em;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: scale(.98); }
.btn--solid { background: var(--ivory); color: var(--velvet); border-color: var(--ivory); font-weight: 500; }
.btn--solid:hover { background: #fff; border-color: #fff; }
.btn--quiet { border-color: transparent; color: var(--smoke); padding: 0 1.25rem; }
.btn--quiet:hover { color: var(--ivory); border-color: transparent; }
.btn--small { min-height: 3.25rem; padding: 0 1.5rem; font-size: 1rem; }
.btn[aria-pressed="true"] { background: var(--tray-2); color: var(--gold); border-color: var(--gold); }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.icon-btn {
  width: var(--touch); height: var(--touch); border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--gold-dim); transition: border-color var(--t-fast), background var(--t-fast); position: relative;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn svg { width: 1.6rem; height: 1.6rem; }
.icon-btn .count {
  position: absolute; top: .2rem; inset-inline-end: .1rem; min-width: 1.6rem; height: 1.6rem; border-radius: 1rem; padding: 0 .4rem;
  background: var(--gold); color: var(--velvet); font-size: .85rem; font-weight: 500; display: grid; place-items: center;
}

.chip {
  min-height: 3.25rem; padding: 0 1.4rem; border-radius: 999px; border: 1px solid var(--gold-faint); color: var(--smoke);
  display: inline-flex; align-items: center; gap: .6rem; font-size: 1rem; transition: all var(--t-fast);
}
.chip:hover { color: var(--ivory); border-color: var(--gold-dim); }
.chip[aria-pressed="true"] { color: var(--velvet); background: var(--ivory); border-color: var(--ivory); }
.swatch { width: 1.1rem; height: 1.1rem; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }

/* The vitrine: the lit white plate products sit on */
.vitrine {
  position: relative; background: var(--vitrine); border-radius: var(--r-s); overflow: hidden; isolation: isolate;
}
.vitrine img { width: 100%; height: 100%; object-fit: contain; }
.vitrine::after { /* soft falloff, like a lit display case */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(120% 95% at 50% 42%, rgba(60,45,30,0) 58%, rgba(60,45,30,.09) 100%);
}

.demo-flag {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; letter-spacing: .02em; color: var(--alert);
  border: 1px dashed rgba(226,161,92,.55); border-radius: 999px; padding: .3rem .9rem; font-weight: 400;
}
.req { color: var(--alert); font-style: normal; font-size: .95em; }
.note { font-size: .95rem; color: var(--smoke); }

.toast {
  position: fixed; left: 50%; bottom: 3rem; transform: translate(-50%, 2rem); opacity: 0; z-index: 900;
  background: var(--ivory); color: var(--velvet); padding: 1.1rem 2rem; border-radius: 999px; font-weight: 400; font-size: 1.15rem;
  transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none; max-width: 80vw; text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.modal-back {
  position: fixed; inset: 0; z-index: 800; background: rgba(8,6,5,.78); display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s var(--ease);
}
.modal { background: var(--tray); border: 1px solid var(--gold-faint); border-radius: var(--r-m); padding: 3rem; max-width: min(56rem, 92vw); max-height: 90vh; overflow: auto; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.monogram { width: 3rem; height: 3rem; }
.qr svg, .qr img { width: 100%; height: auto; display: block; }
.qr { background: #fff; padding: 1rem; border-radius: var(--r-s); }

/* scrollbars inside panels */
.scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent; }
.scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* boot loader */
#boot {
  position: fixed; inset: 0; z-index: 2000; background: var(--velvet); display: grid; place-items: center;
  transition: opacity .6s var(--ease);
}
#boot.is-done { opacity: 0; pointer-events: none; }
#boot .monogram { width: 5rem; height: 5rem; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35 } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
