/* قلادة — storefront styles (mobile first, RTL) */
:root {
  --bg: #f6f1e8;
  --surface: #fffdf8;
  --ink: #1d1a14;
  --muted: #6b6356;
  --line: #e4d9c6;
  --gold: #b8862b;
  --gold-deep: #7d560f;
  --stage: #14110c;
  --stage-2: #231c12;
  --wa: #128c4b;
  --radius: 28px;
  --radius-sm: 16px;
  /* current metal (set from JS) */
  --m1: #8a5a12; --m2: #f3d57a; --m3: #fff3bf; --m4: #d4a03a; --m5: #9a6a1a;
  --font-ui: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-head: "Alexandria", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.7 var(--font-ui);
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.gold-text {
  background: linear-gradient(120deg, #a8771f, #f0cf72 35%, #fff0b8 50%, #d6a23c 70%, #a8771f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-gold { background: linear-gradient(120deg, #d9a93f, #f5d985 50%, #d9a93f); color: #2a1e05; box-shadow: 0 6px 18px rgba(184, 134, 43, .28); }
.btn-gold:hover { box-shadow: 0 10px 24px rgba(184, 134, 43, .4); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(18, 140, 75, .28); }
.btn-wa:hover { background: #0f7a41; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- nav ---------- */
.nav-wrap { padding: 12px 16px 0; }
.nav {
  max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: rgba(255, 253, 248, .86); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 8px 8px 18px; padding-inline: 18px 8px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 800 22px var(--font-head); }
.nav-links { display: none; gap: 4px; margin-inline: auto; }
.nav-links a { text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); background: rgba(29, 26, 20, .06); }
.nav .btn { margin-inline-start: auto; }

/* ---------- layout ---------- */
main { padding: 0 16px; }
.section { max-width: 1180px; margin: 0 auto; padding: 64px 0 0; }
.section.narrow { max-width: 780px; }
.section-head { margin-bottom: 28px; max-width: 640px; }
.section-head h2 { font-size: clamp(26px, 5.4vw, 40px); font-weight: 800; }
.sub { color: var(--muted); margin-top: 10px; }
.eyebrow { font: 600 13.5px var(--font-head); color: #e7c873; margin-bottom: 12px; }
.eyebrow.dark { color: var(--gold-deep); }

.stage {
  background:
    radial-gradient(120% 90% at 50% 0%, #3a2c16 0%, transparent 60%),
    linear-gradient(180deg, var(--stage-2), var(--stage));
  color: #f7efe0; border-radius: var(--radius);
}

/* ---------- hero ---------- */
.hero { max-width: 1180px; margin: 12px auto 0; padding: 36px 22px 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; overflow: hidden; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(44px, 12vw, 84px); font-weight: 800; line-height: 1.1; }
.lead { color: #d9cfbd; font-size: 17px; margin-top: 16px; max-width: 520px; }
.hero-input {
  display: flex; gap: 8px; margin-top: 24px; background: rgba(255, 255, 255, .08);
  border: 1.5px solid rgba(231, 200, 115, .45); border-radius: 999px; padding: 6px; max-width: 520px;
}
.hero-input:focus-within { border-color: #f0cf72; background: rgba(255, 255, 255, .12); }
.hero-input input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff;
  font-size: 17px; padding: 0 16px; height: 52px;
}
.hero-input input::placeholder { color: #b9ae9a; }
.hero-input .btn { padding: 0 14px; font-size: 15px; gap: 4px; }
.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: #cfc4b0; font-size: 14.5px; }
.hero-points li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e7c873; margin-inline-end: 8px; vertical-align: middle; }
.hero-visual { min-width: 0; margin-top: 4px; }

/* ---------- necklace svg ---------- */
.necklace { display: block; width: 100%; height: auto; overflow: visible; }
.necklace .chain { fill: none; stroke: var(--m2); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: .1 6.5; }
.necklace .ring { fill: none; stroke: var(--m2); stroke-width: 2.6; }
.necklace .name-text, .necklace .solid { fill: url(#metal); filter: url(#drop); }
.necklace .name-shadow { fill: var(--m1); }
.necklace .line-art { fill: none; stroke: url(#metal); stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; filter: url(#drop); }
.necklace .frame { fill: none; stroke: var(--m2); stroke-width: 2.5; stroke-dasharray: 8 8; }
.necklace .frame-label { fill: #d9cfbd; font: 500 20px var(--font-ui); }
.sway { transform-origin: 300px -40px; animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-1.1deg); } 50% { transform: rotate(1.1deg); } }
.name-swap { transition: opacity .35s ease; }
.name-swap.out { opacity: 0; }

/* ---------- services bento ---------- */
.bento { display: grid; gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; display: flex; flex-direction: column; gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(60, 40, 5, .1); border-color: #d6c39c; }
.card-art {
  height: 150px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 8px;
  background: radial-gradient(100% 100% at 50% 0%, #3a2c16, var(--stage));
}
.art-name { font: 700 64px "Aref Ruqaa", serif; line-height: 1.4; }
.card h3 { font-size: 21px; font-weight: 800; }
.card p { color: var(--muted); }
.card-link { margin-top: auto; padding-top: 8px; font: 600 15px var(--font-head); color: var(--gold-deep); }
.card-link::after { content: " ←"; }

/* ---------- studio ---------- */
.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 16px; max-width: 520px;
}
.tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 600 15.5px var(--font-head); color: var(--muted);
}
.tab svg { width: 20px; height: 20px; flex: none; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }

.studio { display: grid; gap: 16px; align-items: start; }
.studio > * { min-width: 0; }
.preview { position: sticky; top: 8px; z-index: 5; padding: 6px 14px 12px; box-shadow: 0 14px 34px rgba(20, 17, 12, .28); }
.pv { display: grid; place-items: center; position: relative; }
.pv .necklace { max-height: 34vh; }
#photoCanvas { width: auto; max-width: 100%; height: 34vh; max-height: 420px; aspect-ratio: 1; }
.pv-hint { position: absolute; inset-inline: 0; top: 58%; text-align: center; color: #3a2a08; font: 600 14px var(--font-head); padding: 0 28%; pointer-events: none; }
.pv-note { text-align: center; font-size: 12.5px; color: #b9ae9a; margin-top: 4px; }

.options { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 0; }
.panel { display: grid; gap: 24px; }
.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field.tight { margin-top: -12px; }
.step { display: flex; align-items: center; gap: 10px; font: 600 17px var(--font-head); margin-bottom: 12px; padding: 0; }
.step b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #f0cf72; font-size: 14px; flex: none; }
.step.plain { font-size: 15.5px; }
.step small { font: 400 13.5px var(--font-ui); color: var(--muted); }
.help { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

.text-input {
  width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px; font-size: 16px; outline: 0; transition: border-color .15s, box-shadow .15s; resize: vertical;
}
.text-input.big { font-size: 22px; font-weight: 600; padding: 14px 18px; }
.text-input.narrow { max-width: 120px; text-align: center; }
.text-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184, 134, 43, .16); }
.text-input.invalid { border-color: #c0392b; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(5px); } 75% { transform: translateX(-5px); } }

.chips, .swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .swatch, .font-opt { position: relative; cursor: pointer; }
.chip input, .swatch input, .font-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span, .swatch span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.chip input:checked + span, .swatch input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span, .swatch input:focus-visible + span, .font-opt input:focus-visible + span { outline: 2.5px solid var(--gold); outline-offset: 3px; }
.swatch span { padding-inline-start: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.sw-yellow { background: linear-gradient(135deg, #b9862a, #f6dc86 50%, #c9952f); }
.sw-rose { background: linear-gradient(135deg, #b46d5b, #f6cbb9 50%, #cf8a76); }
.sw-white { background: linear-gradient(135deg, #9a9da5, #f4f5f7 50%, #b4b7bf); }

.font-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.font-opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 92px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.font-opt em { font-style: normal; font-size: 28px; line-height: 1.5; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--gold-deep); }
.font-opt small { font-size: 12px; color: var(--muted); }
.font-opt input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); background: #fbf5e6; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; position: relative;
  border: 2px dashed #cdbb93; border-radius: 20px; padding: 22px 16px; background: #fbf5e6; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--gold); background: #f7edd2; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { color: var(--gold-deep); }
.drop strong { font-family: var(--font-head); font-weight: 600; }
.drop small { color: var(--muted); font-size: 13px; }

.order-bar {
  position: sticky; bottom: 0; z-index: 4; margin: 0 -18px; padding: 14px 18px 16px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0), var(--surface) 26%);
  border-radius: 0 0 var(--radius) var(--radius);
}
.order-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- how ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; }
.steps .num { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #f0cf72; font: 800 18px var(--font-head); }
.steps h3 { font-size: 18px; font-weight: 800; align-self: end; }
.steps p { color: var(--muted); font-size: 15px; }

/* ---------- trust ---------- */
.trust { margin-top: 64px; padding: 34px 22px; display: grid; gap: 24px; }
.trust h2 { font-size: clamp(26px, 5.4vw, 40px); font-weight: 800; }
.trust > div p { color: #d9cfbd; margin-top: 12px; max-width: 460px; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trust-list li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(231, 200, 115, .22); border-radius: 18px; padding: 16px 18px; display: grid; gap: 2px; }
.trust-list strong { font-family: var(--font-head); font-weight: 600; color: #f0cf72; }
.trust-list span { color: #d9cfbd; font-size: 15px; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font: 600 17px var(--font-head); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--font-ui); color: var(--gold-deep); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; }

/* ---------- footer ---------- */
.footer { margin-top: 72px; padding: 32px 16px 28px; border-top: 1px solid var(--line); }
.footer-in { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.footer-in p { color: var(--muted); margin-inline-end: auto; }
.copy { max-width: 1180px; margin: 20px auto 0; color: var(--muted); font-size: 13px; }

/* ---------- order sheet ---------- */
.sheet {
  border: 0; padding: 24px 20px 20px; width: 100%; max-width: 100%; margin: auto 0 0;
  border-radius: 26px 26px 0 0; background: var(--surface); color: var(--ink);
  max-height: 92dvh; overflow: auto;
}
.sheet::backdrop { background: rgba(20, 17, 12, .6); backdrop-filter: blur(3px); }
.sheet h3 { font-size: 22px; font-weight: 800; }
.sheet-sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.sheet dl { margin: 18px 0; display: grid; grid-template-columns: auto 1fr; gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sheet dt, .sheet dd { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.sheet dt { color: var(--muted); font-size: 14.5px; background: #fbf5e6; }
.sheet dd { font-weight: 600; overflow-wrap: anywhere; }
.sheet dt:last-of-type, .sheet dd:last-of-type { border-bottom: 0; }
.sheet-hint { background: #eef7f1; border: 1px solid #bfe0cc; color: #0c5a31; border-radius: 14px; padding: 10px 14px; font-size: 14.5px; margin-bottom: 14px; }
.sheet-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.sheet-row .btn { padding: 0 10px; font-size: 14.5px; }

.toast {
  position: fixed; bottom: 22px; inset-inline: 0; margin: 0 auto; width: max-content; max-width: 90vw; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 500;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- wider screens ---------- */
@media (min-width: 620px) {
  .font-grid { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .sheet { max-width: 480px; margin: auto; border-radius: 26px; }
  .options { padding: 28px 28px 0; }
  .order-bar { margin: 0 -28px; padding-inline: 28px; }
}
@media (min-width: 960px) {
  main { padding: 0 24px; }
  .nav-wrap { position: sticky; top: 0; z-index: 50; padding: 12px 24px 0; }
  .nav-links { display: flex; }
  .nav .btn { margin-inline-start: 0; }
  .section { padding-top: 104px; }
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; padding: 64px 56px; min-height: 600px; }
  .hero-visual { margin: 0; }
  .studio { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; }
  .preview { top: 92px; padding: 28px 28px 20px; min-height: 520px; display: grid; align-content: center; }
  .pv .necklace { max-height: none; }
  #photoCanvas { height: auto; width: 100%; max-width: 440px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { grid-template-columns: 1fr; gap: 10px; }
  .trust { grid-template-columns: 1fr 1fr; align-items: center; padding: 64px 56px; margin-top: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sway { animation: none; }
  * { transition-duration: .01ms !important; }
}
