/* =========================================================
   المزار الدمشقي — صفحة الترحيب واختيار المنيو
   ملف مستقل، بدون أي اعتماديات أو خطوات بناء.
   ========================================================= */

/* ---------------------------------------------------------
   نقطة الضبط الوحيدة: مسارات الصور من assets/products/
   استبدل أسماء الملفات بأسماء صور موجودة فعلاً في المستودع.
   لا يوجد أي مسار صور آخر في هذا الملف.
   --------------------------------------------------------- */
:root {
  --img-collage-main: url("/assets/products/184197.jpg");
  --img-collage-a:    url("/assets/products/184183.jpg");
  --img-collage-b:    url("/assets/products/184177.jpg");
  --img-card-full:    url("/assets/products/186116.jfif");
  --img-card-break:   url("/assets/products/184193.jpg");
}

/* ---------------------------------------------------------
   الهوية البصرية القائمة
   --------------------------------------------------------- */
:root {
  --bg:            #F6F0E8;
  --surface:       #FFFDF9;
  --surface-warm:  #F1E8E1;
  --burgundy:      #913F33;
  --burgundy-dark: #6F2F27;
  --text:          #2F2723;
  --muted:         #756A64;
  --border:        #DED4CC;

  --font-ar: "IBM Plex Sans Arabic", system-ui, "Segoe UI", sans-serif;
  --font-lat: "Inter", system-ui, sans-serif;

  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 14px;

  --shadow-soft: 0 2px 6px rgba(47, 39, 35, .05), 0 10px 26px rgba(47, 39, 35, .07);
  --shadow-card: 0 1px 3px rgba(47, 39, 35, .05), 0 8px 20px rgba(47, 39, 35, .06);
  --page-max: 920px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.welcome {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.welcome :lang(en),
body.welcome .lat { font-family: var(--font-lat); }

img { max-width: 100%; display: block; }

/* ---------------------------------------------------------
   الهيدر العائم
   --------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-top, 0px));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: 12px;
}

.topbar__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 253, 249, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.topbar__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--surface-warm);
  padding: 4px;
  flex: none;
}

.topbar__text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }

.topbar__name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

.topbar__tag {
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
}

/* ---------------------------------------------------------
   جسم الصفحة
   --------------------------------------------------------- */
.page {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 6px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------------------------------------------------------
   كولاج الصور — العنصر المميّز
   --------------------------------------------------------- */
.collage {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: clamp(212px, 57vw, 288px);
  margin: 4px 0 2px;
  isolation: isolate;
}

.collage__arc {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(228px, 64vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(145, 63, 51, .13), rgba(145, 63, 51, 0) 68%);
  z-index: 0;
}

.collage__frame {
  position: absolute;
  display: block;
  background-color: var(--surface-warm);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-soft);
}

.collage__frame--main {
  width: clamp(166px, 45vw, 226px);
  aspect-ratio: 1;
  border-radius: clamp(24px, 7vw, 34px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: var(--img-collage-main);
  z-index: 3;
}

.collage__frame--back-a {
  width: clamp(104px, 29vw, 146px);
  aspect-ratio: 1;
  border-radius: clamp(18px, 5vw, 26px);
  top: 8%;
  right: 2%;
  transform: rotate(-5deg);
  background-image: var(--img-collage-a);
  z-index: 2;
}

.collage__frame--back-b {
  width: clamp(96px, 27vw, 134px);
  aspect-ratio: 1;
  border-radius: clamp(18px, 5vw, 26px);
  bottom: 6%;
  left: 2%;
  transform: rotate(6deg);
  background-image: var(--img-collage-b);
  z-index: 2;
}

/* ---------------------------------------------------------
   العنوان الترحيبي
   --------------------------------------------------------- */
.intro {
  text-align: center;
  padding: 6px 4px 0;
  max-width: 34ch;
}

.intro__title {
  margin: 0;
  font-size: clamp(1.7rem, 7.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.015em;
  color: var(--text);
}

.intro__lead {
  margin: 10px 0 0;
  font-size: clamp(1rem, 4.1vw, 1.15rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
}

.intro__rule {
  display: block;
  width: 54px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(145, 63, 51, 0), var(--burgundy), rgba(145, 63, 51, 0));
  opacity: .55;
}

/* ---------------------------------------------------------
   بطاقتا الاختيار
   --------------------------------------------------------- */
.choices {
  width: 100%;
  max-width: 880px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px;
  min-height: 104px;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.choice__thumb {
  width: 78px;
  height: 78px;
  flex: none;
  border-radius: var(--r-sm);
  background-color: var(--surface-warm);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.choice__thumb--full { background-image: var(--img-card-full); }
.choice__thumb--breakfast { background-image: var(--img-card-break); }

.choice__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.choice__title {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.choice__sub {
  font-size: .89rem;
  font-weight: 400;
  line-height: 1.55;
}

.choice__go {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform .22s ease, background-color .22s ease;
}

.choice__go svg { width: 19px; height: 19px; }

/* البطاقة الأساسية */
.choice--primary {
  background: linear-gradient(165deg, var(--burgundy), var(--burgundy-dark));
  color: var(--surface);
  box-shadow: 0 2px 6px rgba(111, 47, 39, .16), 0 12px 26px rgba(111, 47, 39, .18);
}

.choice--primary .choice__thumb { box-shadow: inset 0 0 0 2px rgba(255, 253, 249, .32); }
.choice--primary .choice__sub { color: rgba(255, 253, 249, .82); }
.choice--primary .choice__go {
  background: rgba(255, 253, 249, .17);
  color: var(--surface);
}

/* البطاقة الثانوية */
.choice--secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.choice--secondary .choice__thumb { box-shadow: inset 0 0 0 2px var(--surface-warm); }
.choice--secondary .choice__title { color: var(--text); }
.choice--secondary .choice__sub { color: var(--muted); }
.choice--secondary .choice__go {
  background: var(--surface-warm);
  color: var(--burgundy);
}

/* تفاعل مقتصد */
@media (hover: hover) and (pointer: fine) {
  .choice:hover { transform: translateY(-2px); }
  .choice--primary:hover { box-shadow: 0 3px 8px rgba(111, 47, 39, .18), 0 16px 32px rgba(111, 47, 39, .22); }
  .choice--secondary:hover { background: #FFFEFC; box-shadow: var(--shadow-soft); }
  .choice:hover .choice__go { transform: translateX(-3px); }
  .choice--secondary:hover .choice__go { background: #E9DCD3; }
}

.choice:active { transform: translateY(0) scale(.99); }

.choice:focus-visible {
  outline: 3px solid var(--burgundy-dark);
  outline-offset: 3px;
}

/* ---------------------------------------------------------
   ظهور أوّلي منسّق
   --------------------------------------------------------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.collage { animation: riseIn .55s cubic-bezier(.2, .7, .2, 1) both; }
.intro   { animation: riseIn .55s cubic-bezier(.2, .7, .2, 1) .08s both; }
.choice--primary   { animation: riseIn .55s cubic-bezier(.2, .7, .2, 1) .16s both; }
.choice--secondary { animation: riseIn .55s cubic-bezier(.2, .7, .2, 1) .22s both; }

/* ---------------------------------------------------------
   الديسكتوب
   --------------------------------------------------------- */
@media (min-width: 768px) {
  .page { padding: 14px 24px 44px; }

  .collage { max-width: 560px; height: 300px; margin-bottom: 6px; }

  .intro { max-width: 40ch; padding-top: 10px; }

  .choices {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 30px;
  }

  .choice {
    padding: 16px;
    gap: 16px;
    min-height: 122px;
    border-radius: 26px;
  }

  .choice__thumb { width: 88px; height: 88px; border-radius: var(--r-md); }
  .choice__title { font-size: 1.3rem; }
  .choice__sub { font-size: .92rem; }
}

/* ---------------------------------------------------------
   احترام تقليل الحركة
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .collage,
  .intro,
  .choice--primary,
  .choice--secondary { animation: none; opacity: 1; transform: none; }

  .choice,
  .choice__go { transition: none; }

  .choice:hover,
  .choice:active { transform: none; }

  .choice:hover .choice__go { transform: none; }
}
