/* Facelift: موقع تعريفي. رمادي غامق كهوية الصالون، خط Alexandria، صور الصالون بألوانها. */

:root {
  --bg: #1e1e1e;
  --surface: #282828;
  --surface-2: #323232;
  --ink: #ece8e1;
  --muted: #a6a39c;
  --line: rgba(236, 232, 225, 0.14);
  --line-strong: rgba(236, 232, 225, 0.32);
  --accent: #ece8e1;
  --accent-ink: #181818;

  --font-display: "Alexandria", system-ui, sans-serif;
  --font-text: "Alexandria", system-ui, sans-serif;
  --display-weight: 200;
  --display-tracking: 0;

  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 48px);
  --nav-h: 76px;
  --bar: 0px;
  --padt: clamp(96px, 12vh, 136px);
  --padb: clamp(72px, 10vh, 112px);

  /* مقاييس تقرأها لحظات الحركة */
  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --r-md: 0; --r-lg: 0;
  --t-small: 14px; --t-lead: 19px; --t-h3: 26px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); scrollbar-color: #4a4a4a var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.85 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--ink);
}
::selection { background: var(--ink); color: var(--bg); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); text-wrap: balance; }
h1 { font-size: clamp(42px, 6.2vw, 88px); line-height: 1.14; }
h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.22; }
h3 { font-weight: 400; font-size: 20px; line-height: 1.5; }
bdi { unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }

/* ---------- الروابط والأزرار ---------- */

/* خط تحت الرابط يُرسم عند المرور */
.line {
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px;
  padding-block-end: 2px;
  transition: background-size 320ms var(--ease-out), color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .line:hover { background-size: 100% 1px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  font: 400 16px/1 var(--font-text);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--lg { min-height: 58px; padding: 0 32px; font-size: 17px; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--secondary { border-color: var(--line-strong); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #ffffff; }
  .btn--secondary:hover { border-color: var(--ink); background: rgba(236, 232, 225, 0.06); }
  .btn:hover .arrow { transform: translateX(-3px); }
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 220ms var(--ease-out); }

/* عنوان للقارئ الآلي ومحركات البحث، لا يظهر على الشاشة */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.head--row:has(> .sr-only:only-child) { margin-block-end: 0; }

.skip { position: absolute; inset-block-start: -100px; inset-inline-start: var(--gut); z-index: 60; padding: 10px 16px; background: var(--ink); color: var(--bg); }
.skip:focus { inset-block-start: 12px; }

/* ---------- الشريط العلوي ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--nav-h);
  background: var(--bg);
  border-block-end: 1px solid transparent;
  transition: border-color 240ms ease;
}
.nav.is-scrolled { border-block-end-color: var(--line); }
.nav__bar { height: 100%; display: flex; align-items: center; gap: 40px; }
.nav__logo { flex: none; }
.nav__logo img { height: 40px; width: auto; }
.nav__links { display: flex; gap: 32px; margin-inline-start: auto; font-size: 15px; font-weight: 400; }
.nav__links a { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--ink); } }
.nav__cta { min-height: 44px; padding: 0 22px; font-size: 15px; }
.nav__toggle { display: none; }

/* ---------- الواجهة ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-block: calc(var(--nav-h) + 48px) clamp(48px, 8vh, 88px);
  overflow: hidden;
  isolation: isolate;
  background: #131313;
}
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; z-index: -2; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(19, 19, 19, 0.92) 0%, rgba(19, 19, 19, 0.55) 38%, rgba(19, 19, 19, 0.1) 70%),
    linear-gradient(to right, rgba(19, 19, 19, 0.7), rgba(19, 19, 19, 0) 60%);
}
/* النص على الجانب الأيسر حتى لا يغطي وجه أبو طارق في الصورة */
.hero__body { display: grid; gap: 28px; justify-items: end; }
.hero__body > * { width: min(100%, 46vw); }
.hero__body > h1 { max-width: none; }
.hero h1 { max-width: 12ch; }
.hero__lead { max-width: 46ch; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.85; color: #ddd9d2; }
.hero .btn-row { margin-block-start: 8px; }
/* الصفحة الإنجليزية من اليسار لليمين: النص يبقى على الجهة اليسرى بعيداً عن الوجه، والسهم يتجه لليمين */
[dir="ltr"] .hero__body { justify-items: start; }
[dir="ltr"] .arrow { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) { [dir="ltr"] .btn:hover .arrow { transform: scaleX(-1) translateX(-3px); } }
[lang="en"] .hours .is-today dt::after { content: "\00a0·\00a0today"; }
[lang="en"] body { font-weight: 300; letter-spacing: 0.005em; }
.nav__lang { font-family: var(--font-text); }
@media (max-width: 900px) {
  .hero__body { justify-items: stretch; }
  .hero__body > * { width: auto; }
}

/* تدخل الواجهة مرة واحدة عند فتح الصفحة */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__body > * { animation: rise 900ms var(--ease-out) both; }
  .js .hero__body > :nth-child(2) { animation-delay: 90ms; }
  .js .hero__body > :nth-child(3) { animation-delay: 180ms; }
  .js .hero__photo { animation: settle 1600ms var(--ease-out) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle { from { opacity: 0.4; transform: scale(1.05); } }

/* ---------- الأقسام ---------- */

.section { padding-block: var(--padt) var(--padb); }
.head { display: grid; gap: 14px; max-width: 34ch; }
.head p { color: var(--muted); font-size: 17px; max-width: 46ch; }
.head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 48px; margin-block-end: 56px; }
.head--row p { max-width: 44ch; }

.photo { position: relative; margin: 0; overflow: hidden; background: var(--surface); }
.photo > img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .photo:hover > img { transform: scale(1.03); } }

/* الموقع والأوقات */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.visit { background: var(--surface); padding: clamp(32px, 4vw, 56px); display: grid; gap: 36px; align-content: space-between; }
.visit h2 { font-size: clamp(30px, 3vw, 44px); }
.visit__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.visit__address { font-size: 20px; line-height: 1.7; font-weight: 300; }
.contacts { margin-block-start: 20px; display: grid; gap: 6px; color: var(--muted); }
.contacts span { color: var(--muted); }
.contacts a { color: var(--ink); }
.hours { display: grid; gap: 0; align-content: start; }
.hours > div { display: grid; gap: 2px; padding-block: 12px; border-block-end: 1px solid var(--line); }
.hours > div:first-child { padding-block-start: 0; }
.hours dt { color: var(--muted); font-size: 15px; }
.hours dd { font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours .is-today dt { color: var(--ink); }
.hours .is-today dt::after { content: "\00a0·\00a0اليوم"; color: var(--muted); white-space: nowrap; }
/* ارتفاع الصورة من ارتفاع اللوحة بجانبها، فلا يتسع عرضها خارج عمودها */
.photo--visit { min-height: 480px; }
.photo--visit > img { position: absolute; inset: 0; }
.photo--visit > img { object-position: 50% 58%; }

/* الخدمات */
.offer { display: grid; grid-template-columns: 1fr 1fr; gap: 24px clamp(40px, 6vw, 96px); align-items: start; }
.photo--tall { aspect-ratio: 4 / 5; position: sticky; inset-block-start: calc(var(--nav-h) + 32px); }
.photo--tall > img { object-position: 50% 55%; }
.offer__side { display: grid; gap: 40px; }
.rows { border-block-start: 1px solid var(--line); }
.rows li { display: grid; gap: 4px; padding-block: 18px; border-block-end: 1px solid var(--line); }
.rows__name { font-size: 20px; font-weight: 400; line-height: 1.5; }
.rows__desc { color: var(--muted); font-size: 16px; line-height: 1.75; }

/* الغرف: الشكل قبل تشغيل الحركة، وبعده يتولاه photo-chapters */
#rooms { background: var(--bg); }
#rooms .mo-ph__head h2 { font-size: clamp(32px, 3.6vw, 52px); }
#rooms .mo-ph__head p { color: var(--muted); }
#rooms .mo-ph__ch p { color: var(--muted); }
#rooms.is-live .mo-ph__panel { inset-inline-start: var(--s-5); left: auto; background: var(--bg); }
#rooms.is-live .mo-ph__ch h3 { font-weight: 300; }
#rooms .mo-ph__count { display: none; }

/* قبل وبعد */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.photo--pair { aspect-ratio: 4 / 5; }
/* الصورتان مقصوصتان مسبقاً 4:5 ورأس العميل في المنتصف بنفس الحجم */
.photo--pair > img { object-position: 50% 50%; }
.tag {
  position: absolute;
  inset-block-end: 20px;
  inset-inline-start: 20px;
  z-index: 2;
  padding: 6px 14px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-block-start: 24px; }
.strip .photo { aspect-ratio: 1; }
.strip .photo > img { object-position: 50% 30%; }

/* الفريق */
.people { display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px 24px; }
.person__photo { aspect-ratio: 4 / 5; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .person:hover .person__photo img { transform: scale(1.03); } }
/* من ليس له صورة بعد: الحرف الأول من اسمه على أرضية تشبه خلفية صور الفريق */
.person__photo--mono { background: radial-gradient(circle at 60% 38%, #3c3c3c, #202020 70%); }
.person__mono { font-family: var(--font-display); font-weight: 200; font-size: clamp(56px, 6vw, 88px); line-height: 1; color: var(--muted); }
.person__name { margin-block-start: 14px; font-size: 18px; font-weight: 400; line-height: 1.4; }
.person__job { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* الأسئلة */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px clamp(40px, 6vw, 96px); align-items: start; }
.qa { border-block-start: 1px solid var(--line); }
.qa > div { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px 40px; padding-block: 24px; border-block-end: 1px solid var(--line); }
.qa dt { font-size: 18px; font-weight: 400; line-height: 1.6; }
.qa dd { color: var(--muted); font-size: 16px; line-height: 1.8; }

/* ---------- الختام والتذييل ---------- */

.closing { background: var(--surface); padding-block: var(--padt) 40px; overflow: hidden; }
.close { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px 64px; }
.close__text { display: grid; gap: 14px; max-width: 30ch; }
.close__text p { color: var(--muted); }
/* اسم الصالون بحروف الشعار، مرسوم كخطوط فيبقى حاداً بأي حجم */
.close__name {
  display: block;
  width: min(100%, 760px);
  height: auto;
  margin-block: clamp(56px, 9vh, 104px) clamp(40px, 6vh, 72px);
  color: var(--ink);
}
.foot { display: grid; grid-template-columns: 1.4fr 1.6fr auto; gap: 16px 40px; align-items: baseline; font-size: 15px; color: var(--muted); }
.foot a { color: var(--ink); }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot__legal { justify-self: end; }

/* شريط التواصل على الجوال: يظهر بعد أن يختفي زر الواجهة */
.actionbar { display: none; }

/* ---------- الشاشات الأصغر ---------- */

@media (max-width: 1100px) {
  .people { grid-template-columns: repeat(4, 1fr); }
  .visit__cols { grid-template-columns: 1fr; gap: 24px; }
  .nav__links { gap: 24px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav__bar { gap: 16px; }
  .nav__logo img { height: 34px; }
  .nav__cta { margin-inline-start: auto; }
  .nav__toggle {
    display: grid; place-content: center; gap: 7px;
    width: 44px; height: 44px; padding: 0;
    background: none; border: 1px solid var(--line-strong); cursor: pointer;
  }
  .nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 220ms var(--ease-out); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 0; z-index: 39;
    flex-direction: column; gap: 0; margin: 0;
    padding: 24px var(--gut);
    background: var(--bg);
    font-size: 24px; font-weight: 300;
    visibility: hidden; opacity: 0;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
  }
  .nav__links.is-open { visibility: visible; opacity: 1; transition: opacity 200ms ease; }
  .nav__links a { color: var(--ink); padding-block: 16px; border-block-end: 1px solid var(--line); background: none; }

  .split, .offer, .faq { grid-template-columns: 1fr; }
  .photo--visit { aspect-ratio: 4 / 3; min-height: 0; }
  .photo--tall { position: static; aspect-ratio: 4 / 3; order: 2; }
  .people { grid-template-columns: repeat(3, 1fr); }
  .foot { grid-template-columns: 1fr; }
  .foot__legal { justify-self: start; }
}

@media (max-width: 640px) {
  :root { --bar: 76px; --padt: 88px; --padb: 64px; }
  body { font-size: 16px; }
  .nav__cta { display: none; }
  .nav__toggle { margin-inline-start: auto; }
  .hero { padding-block-end: 40px; }
  .hero__body { gap: 22px; }
  .hero .btn-row, .hero .btn { width: 100%; }
  .visit { padding: 24px; gap: 28px; }
  .visit__cols { grid-template-columns: 1fr; gap: 24px; }
  .visit .btn-row .btn { flex: 1 1 0; }
  .head--row { margin-block-end: 36px; }
  .pair, .strip { gap: 8px; }
  .strip { grid-template-columns: 1fr 1fr; margin-block-start: 8px; }
  .tag { inset-block-end: 10px; inset-inline-start: 10px; }
  .people { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .qa > div { grid-template-columns: 1fr; }
  .close .btn { width: 100%; }
  .closing { padding-block-end: calc(32px + var(--bar)); }

  .actionbar {
    display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px;
    position: fixed; inset: auto 0 0; z-index: 30;
    padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom));
    background: var(--bg); border-block-start: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform 320ms var(--ease-out);
  }
  .actionbar.is-on { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
