/* ═══════════════════════════════════════════════════════════
   2M CAFE — المنيو الرقمي
   ألوان مأخوذة من اللوجو: بني إسبريسو غامق + ذهبي
   ═══════════════════════════════════════════════════════════ */

:root {
  --espresso: #16100c;
  --roast: #211813;
  --roast-2: #2c211a;
  --roast-3: #3a2c22;
  --cream: #f4ece0;
  --paper: #fbf7f1;
  --ink: #221812;
  --ink-soft: #6b5a4c;
  --on-dark: #f4ece0;
  --on-dark-soft: #b9a898;
  --gold: #c99a45;
  --gold-light: #e3bf78;
  --gold-deep: #a57a2c;
  --line-dark: rgba(244, 236, 224, 0.1);
  --line-light: rgba(34, 24, 18, 0.12);
  --sale: #d9653b;

  --font-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Alexandria", system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--espresso);
  color: var(--on-dark);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* ─── عناصر مشتركة ─── */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: currentColor; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.section-title em, .hero-title em { font-style: normal; color: var(--gold); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-note { color: var(--on-dark-soft); max-width: 380px; font-size: 0.95rem; }

.btn-gold, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-gold { background: var(--gold); color: var(--espresso); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid var(--line-dark); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

/* ─── شريط التنقل ─── */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-inline: var(--gutter);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(22, 16, 12, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-dark);
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper);
  padding: 2px;
}
.nav-brand-text { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; direction: ltr; }
.nav-brand-text b { color: var(--gold); font-weight: 800; }

.nav-links { display: flex; gap: 32px; font-family: var(--font-display); font-size: 0.95rem; font-weight: 500; }
.nav-links a { color: var(--on-dark-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--gold-light); }

.nav-end { display: flex; align-items: center; gap: 10px; }
.open-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(201, 154, 69, 0.12);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.open-pill i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6fcf86;
  box-shadow: 0 0 0 4px rgba(111, 207, 134, 0.18);
}
.lang-btn {
  min-width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}
.lang-btn:hover { border-color: var(--gold); color: var(--gold-light); }

/* ─── الواجهة ─── */
#hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 40px);
  background:
    radial-gradient(60rem 40rem at 85% 10%, rgba(201, 154, 69, 0.14), transparent 60%),
    var(--espresso);
  overflow: hidden;
}
.hero-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding-bottom: 64px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 7.5vw, 5.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.hero-lede { color: var(--on-dark-soft); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0;
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}
.hero-facts > div { padding-inline-end: clamp(18px, 3.5vw, 40px); margin-inline-end: clamp(18px, 3.5vw, 40px); border-inline-end: 1px solid var(--line-dark); }
.hero-facts > div:last-child { border: 0; margin: 0; padding: 0; }
.hero-facts dt { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--gold-light); direction: ltr; text-align: start; }
.hero-facts dd { font-size: 0.85rem; color: var(--on-dark-soft); }

.hero-visual { position: relative; justify-self: center; width: min(100%, 440px); }
.hero-arch {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 154, 69, 0.35);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}
.hero-arch img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; transform: scale(1.04); }
.hero-badge {
  position: absolute;
  inset-inline-start: -28px;
  bottom: 36px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
}
[dir="rtl"] .hero-badge { padding: 12px 12px 12px 18px; }
.hero-badge img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 0.9rem; line-height: 1.3; }
.hero-badge span { font-size: 0.78rem; color: var(--ink-soft); }

/* شريط الأصناف المتحرك */
.marquee-wrap { background: var(--gold); color: var(--espresso); overflow: hidden; padding: 14px 0; direction: ltr; }
.marquee-track {
  display: flex; align-items: center; gap: 28px;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
}
.marquee-track i { font-style: normal; font-size: 0.8rem; opacity: 0.6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─── العروض ─── */
#offersSection { padding: 88px 0 24px; }
.offers-arrows { display: flex; gap: 8px; }
.arrow-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--line-dark);
  display: grid; place-items: center;
  transition: border-color 0.2s, color 0.2s;
}
.arrow-btn:hover { border-color: var(--gold); color: var(--gold-light); }
[dir="ltr"] .arrow-btn svg { transform: scaleX(-1); }

.offers-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.offers-track::-webkit-scrollbar { display: none; }
.offer-card {
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--roast);
  border: 1px solid rgba(201, 154, 69, 0.3);
}
.offer-card .oc-img { aspect-ratio: 16 / 11; overflow: hidden; }
.offer-card .oc-img img { width: 100%; height: 100%; object-fit: cover; }
.offer-card .oc-tag {
  position: absolute; top: 14px; inset-inline-start: 14px;
  background: var(--sale); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  padding: 6px 14px; border-radius: 999px;
  direction: ltr;
}
.offer-card .oc-body { padding: 18px 20px 22px; }
.offer-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: 10px; }
.offer-card .oc-until { font-size: 0.82rem; color: var(--on-dark-soft); margin-top: 8px; }

.price { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); }
.price .now { font-weight: 700; font-size: 1.35rem; color: var(--gold-light); }
.price .cur { font-size: 0.8rem; color: var(--on-dark-soft); font-weight: 500; }
.price .was { font-size: 0.95rem; color: var(--on-dark-soft); text-decoration: line-through; }

/* ─── المنيو ─── */
#menu { padding: 88px 0 96px; }
.menu-toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 0;
  margin-bottom: 8px;
  background: var(--espresso);
}
.menu-search {
  display: flex; align-items: center; gap: 12px;
  max-width: 460px;
  height: 52px;
  padding-inline: 18px;
  border-radius: 999px;
  background: var(--roast);
  border: 1.5px solid var(--line-dark);
  color: var(--on-dark-soft);
  transition: border-color 0.2s;
}
.menu-search:focus-within { border-color: var(--gold); }
.menu-search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--on-dark);
  font: inherit; font-size: 1rem;
}
.menu-search input::placeholder { color: var(--on-dark-soft); opacity: 0.8; }
.menu-search input::-webkit-search-cancel-button { filter: invert(0.7); }

.cat-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  padding-inline: 4px;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-btn {
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line-dark);
  color: var(--on-dark-soft);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.cat-btn:hover { color: var(--on-dark); border-color: rgba(201, 154, 69, 0.5); }
.cat-btn[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--espresso); font-weight: 600; }
.cat-btn .n { opacity: 0.65; font-size: 0.78rem; margin-inline-start: 6px; }

.menu-count { color: var(--on-dark-soft); font-size: 0.88rem; margin: 10px 0 18px; min-height: 1.5em; }

.menu-grid { display: flex; flex-direction: column; gap: 40px; }

/* كل قسم: صورة القسم + قائمة الأسعار */
.menu-group {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) 1.25fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}
.group-banner {
  position: sticky;
  top: calc(var(--nav-h) + 150px);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--roast-2);
}
.group-banner img { width: 100%; height: 100%; object-fit: cover; }
.group-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(22, 16, 12, 0.92) 0%, rgba(22, 16, 12, 0.1) 55%);
}
.group-title { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 22px 24px; }
.group-title h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.3; }
.group-title span { color: var(--gold-light); font-size: 0.88rem; }

.group-items { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line-dark);
}
.row:first-child { padding-top: 4px; }
.row-main { min-width: 0; flex: 0 1 auto; }
.row-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.5; }
.row-desc { font-size: 0.86rem; color: var(--on-dark-soft); line-height: 1.6; margin-top: 2px; }
.row-temp {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem; font-weight: 600;
  padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: var(--on-dark-soft);
}
.row-temp-hot { color: #e9a27c; border-color: rgba(233, 162, 124, 0.3); }
.row-temp-cold { color: #8fc3d9; border-color: rgba(143, 195, 217, 0.3); }
.row-sale {
  display: inline-block;
  background: var(--sale); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 1px 8px; border-radius: 999px;
  vertical-align: middle; direction: ltr;
}
.row-dots { flex: 1 1 24px; min-width: 24px; border-bottom: 1.5px dotted rgba(244, 236, 224, 0.22); transform: translateY(-5px); }
.row .price { flex: none; }
.row .price .now { font-size: 1.15rem; }

.menu-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 72px 16px;
  color: var(--on-dark-soft);
  text-align: center;
}
.menu-state .btn-ghost { min-height: 44px; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line-dark);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── حكايتنا ─── */
#about { background: var(--cream); color: var(--ink); padding: 104px 0; }
#about .eyebrow { color: var(--gold-deep); }
#about .section-title em { color: var(--gold-deep); }
.about-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -30px rgba(34, 24, 18, 0.55); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-para { color: var(--ink-soft); font-size: 1.05rem; margin: 20px 0 32px; max-width: 560px; }
.about-features { list-style: none; display: grid; gap: 0; }
.about-features li { display: flex; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line-light); }
.af-num { font-family: var(--font-display); font-weight: 700; color: var(--gold-deep); font-size: 0.95rem; min-width: 28px; padding-top: 2px; }
.about-features strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; display: block; margin-bottom: 2px; }
.about-features p { color: var(--ink-soft); font-size: 0.95rem; }

/* ─── مكاننا ─── */
#visit { padding: 104px 0; background: var(--roast); }
.visit-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.visit-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.visit-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--espresso);
  border: 1px solid var(--line-dark);
}
.visit-card svg { color: var(--gold); margin-bottom: 8px; }
.visit-card strong { font-family: var(--font-display); font-weight: 600; }
.visit-card p { color: var(--on-dark-soft); font-size: 0.92rem; }

/* ─── التذييل ─── */
#footer { padding: 56px 0 40px; border-top: 1px solid var(--line-dark); }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.footer-logo-img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--paper); }
.footer-tag { color: var(--on-dark-soft); max-width: 460px; }
.footer-copy { color: var(--on-dark-soft); font-size: 0.82rem; opacity: 0.7; direction: ltr; }

/* ─── ظهور العناصر عند التمرير ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ─── الشاشات المتوسطة ─── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
  .hero-badge { inset-inline-start: -10px; bottom: 24px; }
  .about-inner, .visit-inner { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 16 / 11; }
}

@media (max-width: 760px) {
  .menu-group { grid-template-columns: 1fr; gap: 12px; }
  .group-banner { position: relative; top: auto; aspect-ratio: 16 / 7; }
  .group-title { padding: 16px 18px; }
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 48px; gap: 40px; }
  .hero-visual { width: 100%; max-width: 460px; }
  .hero-arch { aspect-ratio: 5 / 4; border-radius: 220px 220px var(--radius) var(--radius); }
  .hero-badge { inset-inline-start: 12px; bottom: 16px; }
}

/* ─── الموبايل ─── */
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .nav-brand-mark { width: 36px; height: 36px; }
  .open-pill { padding: 6px 10px; font-size: 0.75rem; }
  #hero { padding-top: calc(var(--nav-h) + 20px); }
  .hero-badge { padding: 8px 10px; }
  [dir="rtl"] .hero-badge { padding: 8px 10px; }
  .hero-badge img { width: 36px; height: 36px; }
  .hero-actions .btn-gold, .hero-actions .btn-ghost { flex: 1 1 100%; }
  .hero-facts { grid-template-columns: repeat(3, 1fr); }
  .hero-facts > div { padding-inline-end: 10px; margin-inline-end: 10px; }
  #offersSection, #menu { padding-top: 64px; }
  .row { padding: 14px 2px; gap: 10px; }
  .row-name { font-size: 0.98rem; }
  .visit-cards { grid-template-columns: 1fr; }
  #about, #visit { padding: 72px 0; }
}

@media (max-width: 360px) {
  .open-pill span { display: none; }
  .row-dots { display: none; }
  .row { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
