@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-arabic-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-arabic-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --wine: #1c1613; --wine-deep: #0f0b09; --rose: #8a6a2c; --rose-mid: #c9a24a; --blush: #e2cc97; --blush-soft: #f6eedc;
  --ivory: #fbf8f2; --ink: #221c19; --muted: #6e645c; --line: #e9dfcc; --danger: #a8323f; --danger-soft: #fbe6e8;
  --gold: #c9a24a; --gold-light: #e8cf8e; --burgundy: #6b1631; --navy: #1f3557; --night: #120e0c;
  --ok: #2f745d; --ok-soft: #e1f1ea; --warn: #8f5a12; --warn-soft: #fbefdc; --focus: #7059a5;
  --shadow: 0 8px 30px rgba(35, 24, 30, .06);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: "Plex Arabic", "Segoe UI", Tahoma, system-ui, sans-serif; line-height: 1.7; }
a { color: var(--wine); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, p { margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* رأس وأسفل الصفحة */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 249, 247, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--wine); text-decoration: none; font-size: .95rem; }
.brand-icon { width: 28px; height: 28px; flex-shrink: 0; }
.site-header nav a { text-decoration: none; color: var(--ink); font-size: .9rem; padding: 10px 6px; }
.site-footer { margin-top: 64px; background: #fff; border-top: 1px solid var(--line); font-size: .9rem; }
.footer-grid { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.footer-grid p { margin-bottom: 4px; }
.footer-title { font-weight: 700; color: var(--wine); }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a { text-decoration: none; color: var(--ink); padding: 6px 0; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* الواجهة */
.hero { position: relative; overflow: hidden; background: radial-gradient(70% 80% at 85% 10%, rgba(201,162,74,.28) 0%, transparent 60%), radial-gradient(60% 70% at 5% 90%, rgba(107,22,49,.55) 0%, transparent 65%), linear-gradient(160deg, #1d1613 0%, var(--night) 100%); }
.hero-blossom { position: absolute; pointer-events: none; }
.hero-blossom.a { width: 190px; height: 190px; top: -60px; right: -70px; opacity: .45; }
.hero-blossom.b { width: 260px; height: 260px; bottom: -110px; left: -90px; opacity: .25; }
.hero-inner { position: relative; text-align: center; padding-top: 40px; padding-bottom: 32px; }
.badge { display: inline-block; background: var(--blush-soft); color: var(--wine); font-weight: 700; font-size: .9rem; padding: 6px 16px; border-radius: 999px; }
.hero h1 { margin-top: 16px; font-size: 1.9rem; line-height: 1.35; color: var(--wine); }
.lead { margin: 16px auto 0; max-width: 560px; font-size: 1.1rem; line-height: 2; }
.steps { list-style: none; padding: 0; margin: 24px auto 0; display: grid; gap: 8px; max-width: 560px; text-align: start; font-size: .92rem; }
.steps li { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .85); border-radius: 16px; padding: 10px 12px; }
.steps span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--wine); color: #fff; font-weight: 700; font-size: .85rem; }
.hero-cta { margin-top: 22px; }
.hero .small { margin-top: 14px; line-height: 1.8; }
@media (min-width: 640px) {
  .hero h1 { font-size: 2.4rem; }
  .hero-inner { padding-top: 56px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero-blossom.a { width: 320px; height: 320px; opacity: .6; }
}

/* الأزرار والحقول */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 28px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: background-color .15s, opacity .15s; }
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-deep); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn-block { width: 100%; font-size: 1.1rem; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; background: #fff; border: 1px solid #cdb9c2; border-radius: 12px; color: var(--ink); font: inherit; }
.input:focus { border-color: var(--wine); outline: none; box-shadow: 0 0 0 3px rgba(106, 31, 62, .12); }
textarea.input { resize: vertical; min-height: 96px; }
.field-label { display: block; font-weight: 700; color: var(--wine-deep); margin-bottom: 6px; }
/* مخفي بالقص، ماشي بـ left سالب: في RTL الإزاحة السالبة تولّد تمرير أفقي في الهاتف */
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; opacity: 0; }
body { overflow-x: clip; }

/* الاستبيان */
.form-wrap { max-width: 720px; padding-top: 24px; scroll-margin-top: 70px; }
.survey { display: flex; flex-direction: column; gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 640px) { .card { padding: 28px; } }
.card-title { font-size: 1.15rem; color: var(--wine); }
.q { border: 0; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); min-width: 0; scroll-margin-top: 90px; }
.card-title + .q, .card > .q:first-of-type { border-top: 0; padding-top: 0; }
.q-num { font-size: .75rem; font-weight: 700; color: var(--rose); margin-bottom: 2px; }
.q-text { font-size: 1.12rem; font-weight: 700; line-height: 1.8; color: var(--wine-deep); padding: 0; }
.q-hint { font-size: .87rem; color: var(--muted); margin-top: 2px; }
.q-body { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 52px; width: 100%; padding: 10px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; text-align: start; font: inherit; color: inherit; transition: border-color .15s, background-color .15s; }
.option:hover { border-color: var(--blush); }
.option input { width: 20px; height: 20px; accent-color: var(--wine); flex-shrink: 0; margin: 0; }
.option:has(input:checked), .option[aria-pressed="true"] { border-color: var(--wine); background: var(--blush-soft); font-weight: 500; }
.option.top { align-items: flex-start; font-size: .92rem; line-height: 1.8; }
.option.top input { margin-top: 4px; }
.option.off, .option:disabled { opacity: .5; cursor: not-allowed; }
.rank-n { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border: 1.5px solid var(--rose-mid); border-radius: 50%; font-weight: 700; color: var(--wine); font-size: .9rem; }
.option[aria-pressed="true"] .rank-n { background: var(--wine); border-color: var(--wine); color: #fff; }
.price-row { display: flex; align-items: center; gap: 8px; }
.price-row .input { max-width: 220px; }
.counter { font-size: .75rem; color: var(--muted); text-align: end; }
.scale { display: flex; flex-wrap: wrap; gap: 6px; }
.scale-btn { flex: 1; min-width: 44px; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.scale-btn[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
.scale-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.err { color: var(--danger); font-size: .88rem; font-weight: 500; margin-top: 8px; }
.q.has-err .q-text, .q.has-err .field-label { color: var(--danger); }
.q.has-err .input { border-color: var(--danger); }
.warn { margin-top: 8px; background: var(--warn-soft); color: var(--warn); padding: 10px 14px; border-radius: 12px; font-size: .88rem; }
.terms-link { font-size: .9rem; margin-top: -6px; padding: 0 4px; }
.notice { background: var(--blush-soft); color: var(--wine-deep); padding: 16px 18px; border-radius: 16px; line-height: 1.9; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.done-title { font-size: 1.5rem; color: var(--wine); }
.ref { font-size: 1.2rem; color: var(--wine); letter-spacing: .04em; }
.page-title { color: var(--wine); font-size: 1.6rem; margin: 8px 0 12px; }

/* الصفحات النصية */
.page { padding-top: 32px; }
.page h1 { color: var(--wine); font-size: 1.6rem; }
.prose h2 { font-size: 1.12rem; color: var(--wine); margin: 26px 0 8px; }
.prose p, .prose li { line-height: 1.95; }
.prose ul { padding-inline-start: 20px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* الأرقام مثل «18–24» تبقى بترتيبها الصحيح داخل نص عربي */
.option > span:last-child, .tbl td, .bar-l, .kv dd { unicode-bidi: plaintext; }

/* صفحة الشكر والمشاركة */
.done-card { gap: 20px; }
.done-head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.done-check { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; }
.share-box { background: linear-gradient(160deg, #fffaf0 0%, #f6eedc 60%, #fbf8f2 100%); border: 1px solid var(--blush); border-radius: 18px; padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.share-kicker { display: inline-block; align-self: center; background: var(--wine); color: #fff; font-weight: 700; font-size: .85rem; padding: 4px 14px; border-radius: 999px; }
.share-title { margin: 0; font-size: 1.3rem; color: var(--wine); }
.share-sub { line-height: 1.9; }
.share-friends { background: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 500; }
.share-friends b { color: var(--wine); font-size: 1.15rem; }
.share-link { display: flex; gap: 8px; }
.share-link .input { min-height: 46px; font-size: .85rem; background: #fff; text-align: left; }
.share-link .btn { min-height: 46px; flex-shrink: 0; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-btn { --c: #6a1f3e; --c2: #6a1f3e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 6px; border: 0; border-radius: 14px; background: var(--c); color: #fff; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; transition: transform .12s, filter .12s; }
.share-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.share-btn:active { transform: scale(.97); }
.share-btn svg { width: 26px; height: 26px; }
.share-btn.n-wa { --c: #1fa855; }
.share-btn.n-fb { --c: #1877f2; }
.share-btn.n-ms { background: linear-gradient(135deg, #0a7cff, #a033ff 60%, #ff5c87); --c2: #6b47ff; }
.share-btn.n-ig { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); }
.share-btn.n-tt { --c: #111; }
.share-btn.n-sh { --c: var(--rose); }
.share-toast { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 8px 12px; font-weight: 500; font-size: .9rem; }
@media (min-width: 560px) { .share-grid { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); } .share-box { padding: 24px; } }
.done-card { scroll-margin-top: 76px; }


/* ===== هوية معطرات الجو: أسود، ذهبي، عنابي ===== */
.site-header { background: rgba(18,14,12,.94); border-bottom: 1px solid rgba(201,162,74,.25); }
.site-header .brand { color: var(--gold-light); }
.site-header nav a { color: #e9dfcc; }
.brand-icon { color: var(--gold); }
.hero { color: #f3ead8; }
.hero h1 { color: #fbf3e2; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #f3d98f, #c9a24a 60%, #e8cf8e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #e2d6bf; }
.hero .small.muted { color: #b5a891; }
.badge { background: rgba(201,162,74,.14); color: var(--gold-light); border: 1px solid rgba(201,162,74,.45); }
.steps li { background: rgba(255,255,255,.06); border: 1px solid rgba(201,162,74,.22); color: #efe4cf; }
.steps span { background: linear-gradient(135deg, #e8cf8e, #b38a36); color: #1c1613; }
.btn-primary { background: linear-gradient(180deg, #2a211c, #15100d); color: var(--gold-light); border: 1px solid rgba(201,162,74,.6); box-shadow: 0 6px 20px rgba(18,14,12,.25); }
.btn-primary:hover { background: #0f0b09; color: #f3d98f; }
.hero .btn-primary { background: linear-gradient(135deg, #f0d791, #c9a24a 55%, #a7802f); color: #1c1613; border: 0; }
.hero-art { position: absolute; pointer-events: none; opacity: .9; }
.hero-art { color: var(--gold); }
.hero-art.a { width: 110px; top: 12px; left: -34px; transform: rotate(-12deg); opacity: .14; }
.hero-art.b { display: none; }
@media (min-width: 640px) { .hero-art.a { width: 220px; left: 6%; top: 50px; opacity: .3; } .hero-art.b { display: block; width: 170px; right: 6%; bottom: 20px; opacity: .22; } }
.card { border-color: var(--line); }
.card-title { color: var(--wine); display: flex; align-items: center; gap: 10px; }
.card-title::before { content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; flex-shrink: 0; }
.q-num { color: var(--rose); }
.option:has(input:checked), .option[aria-pressed="true"] { border-color: var(--gold); background: #fbf4e3; }
.option input { accent-color: var(--burgundy); }
.scale-btn[aria-pressed="true"], .option[aria-pressed="true"] .rank-n { background: var(--wine); border-color: var(--wine); color: var(--gold-light); }
.rank-n { border-color: var(--gold); }
.site-footer { background: var(--night); color: #cfc3ad; border-top: 1px solid rgba(201,162,74,.25); }
.site-footer .muted { color: #9b8f7c; }
.footer-title { color: var(--gold-light); }
.footer-links a { color: #e9dfcc; }
/* سؤال الصور */
.img-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.option.img-opt { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; min-height: 0; position: relative; }
.option.img-opt img { width: 100%; height: auto; aspect-ratio: 493 / 540; object-fit: cover; border-radius: 10px; display: block; }
.option.img-opt input { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; background: #fff; }
.option.img-opt span { font-size: .85rem; line-height: 1.6; text-align: center; }
.option.img-opt:has(input:checked) { box-shadow: 0 0 0 2px var(--gold); }
@media (min-width: 640px) { .img-grid { gap: 14px; } .option.img-opt span { font-size: .92rem; } }
/* صفحة الشكر */
.share-box { border-color: var(--blush); }
.share-kicker { background: var(--wine); color: var(--gold-light); }
.share-title { color: var(--wine); }
.share-friends b { color: var(--burgundy); }
.done-check { background: #f6eedc; color: #8a6a2c; }
.ref { color: var(--burgundy); }

/* صورة التصميم المختار فوق سؤال السعر */
.chosen-design { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 6px; }
.chosen-design img { width: 100%; max-width: 340px; aspect-ratio: 493 / 540; object-fit: cover; border-radius: 16px; box-shadow: 0 0 0 2px var(--gold), 0 14px 40px rgba(18,14,12,.18); }
.chosen-empty { font-size: .88rem; color: var(--muted); background: #fbf4e3; border: 1px dashed var(--gold); border-radius: 12px; padding: 12px 16px; text-align: center; width: 100%; }
.price-row .input.price { font-size: 1.3rem; font-weight: 700; text-align: center; }
