/* ==========================================================
   Eden – Alaa Merhie | Interior & Exterior Design
   ألوان 2027: PANTONE 14-4812 Aqua Splash (#85CED1 كما تعرضه Pantone)
   مع درجاته العميقة، والذهبي #b8924a من الشعار.
   الخطوط: Amiri للعربي · Playfair Display للإنكليزي
   وضعان بتصميمين مختلفين: data-theme="light" (أبيض) و "dark" (أسود)
   ========================================================== */

/* ---------- الوضع الأبيض ---------- */
:root, [data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #eef7f7;
  --surface: #ffffff;
  --text: #12302f;
  --text-soft: #4f6869;
  --line: rgba(18, 48, 47, .13);
  --accent: #0f4c50;          /* اللون البارز للعناوين */
  --accent-deep: #0a3538;
  --gold: #b8924a;
  --gold-soft: #d9bd86;
  --olive: #2f8c88;
  --cream: #f3e9df;
  --ink: #12302f;
  --header-bg: rgba(255, 255, 255, .9);
  --btn-bg: #0f4c50;
  --btn-text: #fff;
  --btn-shadow: 0 14px 30px -14px rgba(15, 76, 80, .7);
  --shadow: 0 30px 60px -35px rgba(18, 48, 47, .45);
  --card-border: rgba(18, 48, 47, .1);
  --field-bg: #fff;
  color-scheme: light;
}

/* ---------- الوضع الأسود ---------- */
[data-theme="dark"] {
  --bg: #071112;
  --bg-alt: #0c1a1b;
  --surface: #102223;
  --text: #f3e9df;
  --text-soft: rgba(243, 233, 223, .68);
  --line: rgba(217, 189, 134, .2);
  --accent: #85CED1;
  --accent-deep: #5fb5b9;
  --gold: #c9a35b;
  --gold-soft: #e3c992;
  --olive: #5fb5b9;
  --header-bg: rgba(7, 17, 18, .86);
  --btn-bg: #85CED1;
  --btn-text: #062628;
  --btn-shadow: 0 14px 34px -14px rgba(133, 206, 209, .55);
  --shadow: 0 34px 70px -30px rgba(0, 0, 0, .9);
  --card-border: rgba(217, 189, 134, .18);
  --field-bg: #081415;
  color-scheme: dark;
}

:root {
  --aqua: #85CED1;            /* PANTONE 14-4812 Aqua Splash — لون 2027 */
  --aqua-soft: #c9ebec;
  --burgundy: #0f4c50;
  --burgundy-deep: #0a3538;
  --font-ar: "Amiri", "Times New Roman", serif;
  --font-en: "Playfair Display", Georgia, serif;
  --font: var(--font-ar);
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(84px, 11vw, 148px);
  --radius: 6px;
  --arch: 999px 999px 6px 6px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 88px;
  --dir: 1;
}
[dir="ltr"] { --font: var(--font-en); --dir: -1; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 19px; line-height: 1.9;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
[dir="ltr"] body { font-size: 17px; line-height: 1.75; }
body.no-scroll { overflow: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.3; margin: 0; }
[dir="ltr"] h1, [dir="ltr"] h2 { font-weight: 500; letter-spacing: -.01em; }
p { margin: 0; }
em { font-style: normal; color: var(--accent); }
[dir="ltr"] em { font-style: italic; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: -60px; inset-inline-start: 16px; z-index: 400; background: var(--btn-bg); color: var(--btn-text); padding: 10px 18px; border-radius: var(--radius); transition: top .2s; }
.skip-link:focus { top: 16px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

/* شعار حسب الوضع */
.logo-on-dark { display: none !important; }
[data-theme="dark"] .logo-on-light { display: none !important; }
[data-theme="dark"] .logo-on-dark { display: block !important; }

/* ---------- عناوين ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-en); font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
[dir="rtl"] .eyebrow:lang(ar) { letter-spacing: .04em; }
.eyebrow::before { content: ""; width: 42px; height: 1px; background: var(--gold); }
.eyebrow-light { color: var(--gold-soft); }
h2 { font-size: clamp(32px, 4.2vw, 54px); max-width: 22ch; }
.section-head { margin-bottom: clamp(44px, 6vw, 72px); }
.section-head.center { text-align: center; }
.section-head.center h2 { margin-inline: auto; }
.section-head.center .eyebrow::after { content: ""; width: 42px; height: 1px; background: var(--gold); }
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.section-intro { max-width: 46ch; color: var(--text-soft); }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 34px; border-radius: 999px;
  font-family: var(--font); font-size: 18px; font-weight: 700; line-height: 1.1; text-align: center;
  border: 1px solid transparent;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
[dir="ltr"] .btn { font-size: 15px; font-weight: 600; letter-spacing: .03em; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: var(--btn-shadow); }
.btn-primary:hover { filter: brightness(.9); }
.btn-outline { border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--bg); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-soft); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 8px 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- الترويسة ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), height .4s var(--ease);
}
.site-header.is-scrolled { --header-h: 72px; box-shadow: 0 1px 0 var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: block; height: calc(var(--header-h) - 24px); flex: none; transition: height .4s var(--ease); }
.brand img { height: 100%; width: auto; }
.main-nav ul { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.main-nav a:not(.btn) { position: relative; font-size: 18px; padding-block: 6px; white-space: nowrap; }
[dir="ltr"] .main-nav a:not(.btn) { font-size: 15px; }
.main-nav a:not(.btn)::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 2px; width: 0; height: 1px; background: var(--accent); transition: width .35s var(--ease); }
.main-nav a:not(.btn):hover::after, .main-nav a.is-current::after { width: 100%; }
.main-nav a.is-current { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.tool {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 12px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 15px; transition: all .3s var(--ease);
}
.tool:hover { border-color: var(--gold); color: var(--accent); }
.lang-toggle { font-family: var(--font-en); font-weight: 500; }
.lang-toggle:lang(ar) { font-family: var(--font-ar); font-size: 17px; }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.menu-toggle { display: none; width: 44px; height: 44px; position: relative; z-index: 120; }
.menu-toggle span { position: absolute; inset-inline-end: 9px; width: 26px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease), opacity .2s, background .3s; }
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; width: 18px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-toggle[aria-expanded="true"] span { background: #f3e9df; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- القوس (الرمز البصري) ---------- */
.arch { position: relative; overflow: hidden; border-radius: var(--arch); background: var(--bg-alt); }
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- البطل ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 36px) 0 56px; background: var(--bg-alt);
}
.hero-curve {
  position: absolute; z-index: -1; top: -18%; inset-inline-end: -22%;
  width: 62vw; height: 136%;
  border-start-start-radius: 50% 50%; border-end-start-radius: 50% 50%;
  background: radial-gradient(120% 90% at 50% 50%, var(--aqua) 0%, var(--aqua) 50%, #5fb5b9 100%);
  box-shadow: calc(var(--dir) * 22px) 0 0 -20px var(--gold);
}
.hero-grid-lines { display: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.hero h1 { font-size: clamp(42px, min(6vw, 9.5vh), 82px); line-height: 1.22; margin-bottom: 22px; }
[dir="ltr"] .hero h1 { font-size: clamp(36px, min(4.3vw, 7vh), 62px); line-height: 1.12; }
.hero-lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-soft); max-width: 50ch; margin-bottom: 36px; }
[dir="ltr"] .hero-lead { font-size: clamp(16px, 1.3vw, 18px); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-trust { display: flex; gap: clamp(20px, 3vw, 44px); flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-trust li { display: grid; gap: 2px; }
.hero-trust strong { font-family: var(--font-en); font-size: 24px; font-weight: 500; color: var(--accent); line-height: 1.2; }
.hero-trust span { font-size: 15.5px; color: var(--text-soft); }
[dir="ltr"] .hero-trust span { font-size: 14px; }

.hero-visual { position: relative; justify-self: center; height: min(calc(100svh - var(--header-h) - 120px), 640px); min-height: 440px; max-width: 100%; aspect-ratio: 4 / 5.6; }
.arch-main { position: absolute; inset: 0; box-shadow: var(--shadow); }
.arch-main img { position: absolute; inset: 0; opacity: 0; transform: scale(1.06); transition: opacity 1.4s var(--ease), transform 6s linear; }
.arch-main img.is-active { opacity: 1; transform: scale(1); }
.arch-outline { position: absolute; inset: -18px; inset-inline-end: 18px; inset-block-end: 18px; border: 1px solid var(--gold); border-radius: var(--arch); z-index: -1; }
.hero-round { position: absolute; margin: 0; inset-inline-end: -14%; bottom: 8%; width: 40%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 6px solid var(--bg-alt); box-shadow: var(--shadow); }
.hero-round img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; top: 12%; inset-inline-start: -9%;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); padding: 12px 20px 12px 14px; border-radius: 999px; box-shadow: var(--shadow);
  font-size: 15.5px; line-height: 1.35; font-weight: 700; white-space: pre-line;
}
[dir="ltr"] .hero-badge { font-size: 13.5px; }
.hero-badge-num { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--olive); color: #f3e9df; font-family: var(--font-en); font-size: 15px; font-weight: 500; }

/* البطل في الوضع الأسود: خطوط ذهبية بدل الكتلة العنّابية + شبكة مخطط */
[data-theme="dark"] .hero { background: radial-gradient(70% 80% at calc(50% - 30% * var(--dir)) 50%, rgba(133, 206, 209, .16), transparent 70%), var(--bg); }
[data-theme="dark"] .hero-curve { background: transparent; border: 1px solid rgba(133, 206, 209, .6); border-inline-end: 0; box-shadow: none; }
[data-theme="dark"] .hero-curve::before { content: ""; position: absolute; inset: 7% 0 7% 9%; border: 1px solid rgba(201, 163, 91, .25); border-inline-end: 0; border-radius: inherit; border-start-start-radius: 50% 50%; border-end-start-radius: 50% 50%; }
[data-theme="dark"] .hero-grid-lines {
  display: block; position: absolute; inset: 0; z-index: -2; opacity: .5;
  background-image: linear-gradient(rgba(201, 163, 91, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(201, 163, 91, .07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
[data-theme="dark"] .arch-main { box-shadow: 0 0 0 1px rgba(201, 163, 91, .4), 0 40px 90px -30px rgba(133, 206, 209, .35); }
[data-theme="dark"] .hero-round { border-color: var(--bg); }
[data-theme="dark"] .hero-badge { border: 1px solid var(--line); }

/* ---------- الشريط المتحرك ---------- */
.ticker { background: var(--burgundy); color: #f3e9df; overflow: hidden; padding-block: 18px; border-block: 1px solid var(--gold); }
[data-theme="dark"] .ticker { background: var(--bg); color: var(--gold-soft); }
.ticker-track { display: flex; width: max-content; gap: 34px; align-items: center; animation: ticker 40s linear infinite; }
.ticker span { font-family: var(--font-ar); font-size: 22px; white-space: nowrap; }
.ticker span.en { font-family: var(--font-en); font-style: italic; font-size: 20px; }
.ticker i { font-style: normal; color: var(--gold-soft); font-size: 14px; }
@keyframes ticker { to { transform: translateX(calc(50% * var(--dir))); } }

/* ---------- من نحن ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(48px, 7vw, 110px); align-items: center; }
.about-media { position: relative; padding-bottom: 60px; padding-inline-end: 60px; }
.arch-portrait { aspect-ratio: 3 / 4.2; box-shadow: var(--shadow); }
.arch-portrait img { object-position: center 20%; }
.about-onsite { position: absolute; inset-inline-end: 0; bottom: 0; width: 44%; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; border: 6px solid var(--bg); box-shadow: var(--shadow); }
.about-onsite img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.about-onsite span { position: absolute; bottom: 10px; inset-inline-start: 10px; background: var(--olive); color: #f3e9df; font-family: var(--font-en); font-style: italic; font-size: 14px; padding: 2px 12px; border-radius: 999px; }
.about-text h2 { margin-bottom: 26px; }
.about-text > p { color: var(--text-soft); margin-bottom: 18px; }
.signature { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.signature img { width: min(260px, 70%); }
[data-theme="dark"] .arch-portrait { box-shadow: 0 0 0 1px rgba(201, 163, 91, .35), var(--shadow); }

/* ---------- الرؤية والرسالة ---------- */
.vm { background: var(--bg-alt); }
.vm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.vm-card {
  position: relative; background: var(--surface); text-align: center;
  padding: clamp(70px, 8vw, 96px) clamp(28px, 3.5vw, 44px) clamp(32px, 4vw, 48px);
  border-radius: 180px 180px var(--radius) var(--radius); border: 1px solid var(--card-border);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.vm-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.vm-en { display: block; font-family: var(--font-en); font-style: italic; font-size: 17px; color: var(--gold); margin-bottom: 6px; }
.vm-card h3 { font-size: 32px; margin-bottom: 16px; }
[dir="ltr"] .vm-card h3 { font-size: 28px; font-weight: 500; }
.vm-card p { color: var(--text-soft); font-size: 18px; }
[dir="ltr"] .vm-card p { font-size: 16px; }
.vm-card-featured { background: var(--burgundy); color: #f3e9df; border-color: var(--burgundy); }
.vm-card-featured p { color: rgba(243, 233, 223, .86); }
.vm-card-featured .vm-en { color: var(--gold-soft); }
.vm-card-featured em, .vm-card-featured h3 { color: #fff; }
[data-theme="dark"] .vm-card { background: transparent; border-color: rgba(201, 163, 91, .4); }
[data-theme="dark"] .vm-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(201, 163, 91, .14); border-radius: 170px 170px 3px 3px; pointer-events: none; }
[data-theme="dark"] .vm-card-featured { background: linear-gradient(180deg, var(--burgundy), #062628); border-color: var(--gold); }
.values { display: grid; gap: 10px; text-align: start; max-width: 270px; margin-inline: auto; }
.values li { display: flex; gap: 12px; align-items: baseline; font-size: 18px; color: var(--text-soft); }
[dir="ltr"] .values li { font-size: 15.5px; }
.values li::before { content: "✦"; color: var(--gold); font-size: 12px; }

/* ---------- الخدمات ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--card-border); transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s; }
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-img { aspect-ratio: 16 / 11; overflow: hidden; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter 1s var(--ease); }
.service:hover .service-img img { transform: scale(1.06); }
.service-body { position: relative; padding: 32px 28px 32px; }
.service-num { position: absolute; top: -26px; inset-inline-end: 24px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--burgundy); color: #f3e9df; font-family: var(--font-en); font-size: 16px; border: 3px solid var(--surface); }
.service h3 { font-size: 25px; margin-bottom: 8px; }
[dir="ltr"] .service h3 { font-size: 21px; font-weight: 600; }
.service p { color: var(--text-soft); font-size: 17.5px; line-height: 1.8; }
[dir="ltr"] .service p { font-size: 15.5px; line-height: 1.7; }
[data-theme="dark"] .service { border-radius: 140px 140px var(--radius) var(--radius); }
[data-theme="dark"] .service-img { border-radius: 140px 140px 0 0; }
[data-theme="dark"] .service-img img { filter: saturate(.85) brightness(.9); }
[data-theme="dark"] .service:hover { border-color: var(--gold); }
[data-theme="dark"] .service:hover .service-img img { filter: none; }
[data-theme="dark"] .service-num { background: var(--bg); color: var(--gold-soft); border-color: var(--gold); border-width: 1px; }

/* ---------- قبل / بعد ---------- */
.ba { background: #12302f; color: #f3e9df; position: relative; overflow: hidden; }
[data-theme="dark"] .ba { background: linear-gradient(135deg, #062628, var(--burgundy)); }
.ba::before { content: ""; position: absolute; inset-inline-start: -15%; top: -30%; width: 55%; height: 160%; border-radius: 50%; background: var(--burgundy); opacity: .55; }
[data-theme="dark"] .ba::before { background: transparent; border: 1px solid rgba(217, 189, 134, .3); opacity: 1; }
.ba-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.ba-text h2 { margin-bottom: 22px; }
.ba-text h2 em { color: var(--gold-soft); }
.ba-text p { color: rgba(243, 233, 223, .8); margin-bottom: 34px; max-width: 44ch; }
.ba-compare { position: relative; justify-self: center; width: min(100%, 440px); aspect-ratio: 9 / 14; border-radius: var(--arch); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); user-select: none; }
.ba-compare > img, .ba-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba-label { position: absolute; top: 46%; padding: 4px 16px; border-radius: 999px; background: rgba(18, 48, 47, .75); color: #f3e9df; font-size: 15px; pointer-events: none; }
.ba-label-before { right: 14px; }
.ba-label-after { left: 14px; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--gold-soft); pointer-events: none; }
.ba-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 20px; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; direction: ltr; }
.ba-compare:focus-within { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- الأعمال ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { min-height: 44px; padding: 6px 22px; border-radius: 999px; border: 1px solid var(--line); font-size: 17px; color: var(--text-soft); transition: all .3s var(--ease); }
[dir="ltr"] .filter { font-size: 14.5px; }
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.is-active { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 290px; gap: 20px; grid-auto-flow: dense; }
.project { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--bg-alt); }
.project.tall { grid-row: span 2; }
.project.wide { grid-column: span 2; }
.project.is-hidden { display: none; }
.project-open { display: block; width: 100%; height: 100%; }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.project figcaption { position: absolute; inset: auto 0 0 0; padding: 70px 24px 22px; pointer-events: none; background: linear-gradient(to top, rgba(6, 20, 21, .9), transparent); color: #f3e9df; display: flex; flex-direction: column; opacity: 0; transform: translateY(14px); transition: all .5s var(--ease); }
.project figcaption span { font-size: 23px; font-weight: 700; line-height: 1.4; }
[dir="ltr"] .project figcaption span { font-size: 20px; font-weight: 500; }
.project figcaption small { font-size: 15px; color: var(--gold-soft); }
.project:hover img, .project:focus-within img { transform: scale(1.06); }
.project:hover figcaption, .project:focus-within figcaption { opacity: 1; transform: none; }
[data-theme="dark"] .project { outline: 1px solid rgba(201, 163, 91, .18); outline-offset: -1px; }
[data-theme="dark"] .project:hover { outline-color: var(--gold); }

/* ---------- كيف نعمل ---------- */
.process { background: var(--bg-alt); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.step { padding: clamp(28px, 3.5vw, 44px); border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .4s var(--ease); }
.step:hover { background: var(--surface); }
.step-num { display: block; font-family: var(--font-en); font-style: italic; font-size: 54px; line-height: 1; color: var(--gold); margin-bottom: 18px; }
.step h3 { font-size: 25px; margin-bottom: 8px; }
[dir="ltr"] .step h3 { font-size: 21px; font-weight: 600; }
.step p { color: var(--text-soft); font-size: 17.5px; }
[dir="ltr"] .step p { font-size: 15.5px; }
[data-theme="dark"] .step-num { -webkit-text-stroke: 1px var(--gold); color: transparent; font-size: 64px; }

/* ---------- الأرقام ---------- */
.stats { background: var(--aqua); color: var(--ink); padding-block: clamp(52px, 6vw, 76px); }
[data-theme="light"] .stats .stat + .stat { border-color: rgba(15, 76, 80, .25); }
[data-theme="light"] .stats .stat strong { color: #0f4c50; }
[data-theme="light"] .stats .stat span { color: #12302f; }
[data-theme="dark"] .stats { background: var(--bg); border-block: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat + .stat { border-inline-start: 1px solid rgba(243, 233, 223, .2); }
[data-theme="dark"] .stat + .stat { border-color: var(--line); }
.stat strong { display: block; font-family: var(--font-en); font-weight: 500; font-size: clamp(38px, 4.6vw, 58px); line-height: 1.2; color: #fff; }
[data-theme="dark"] .stat strong { color: var(--gold-soft); }
.stat span { font-size: 17px; color: rgba(243, 233, 223, .85); }
[dir="ltr"] .stat span { font-size: 14.5px; }

/* ---------- الفيديو والإنستغرام ---------- */
.social-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.reel { position: relative; justify-self: center; width: min(100%, 340px); aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; border: 8px solid #12302f; box-shadow: var(--shadow); background: #12302f; }
[data-theme="dark"] .reel { border-color: #0c1a1b; box-shadow: 0 0 0 1px rgba(201, 163, 91, .4), var(--shadow); }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel-sound { position: absolute; bottom: 14px; inset-inline-start: 14px; width: 42px; height: 42px; border-radius: 50%; background: rgba(18, 48, 47, .7); font-size: 18px; }
.social-text h2 { margin-bottom: 20px; }
.social-text > p { color: var(--text-soft); margin-bottom: 30px; max-width: 48ch; }
.insta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; }
.insta-grid a { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; }
.insta-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.insta-grid a:hover img { transform: scale(1.06); }

/* ---------- أسئلة شائعة ---------- */
.faq { background: var(--bg-alt); }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; font-size: 22px; font-weight: 700; }
[dir="ltr"] .faq-list summary { font-size: 18px; font-weight: 600; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--gold); color: var(--accent); font-family: var(--font-en); font-size: 22px; transition: transform .35s var(--ease), background .35s; }
.faq-list details[open] summary::after { transform: rotate(45deg); background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.faq-list details p { padding: 0 0 26px; color: var(--text-soft); max-width: 60ch; }

/* ---------- التواصل ---------- */
.contact { background: var(--burgundy); color: #f3e9df; position: relative; overflow: hidden; }
[data-theme="dark"] .contact { background: radial-gradient(80% 90% at 20% 30%, rgba(15, 76, 80, .7), transparent 70%), var(--bg); }
.contact::before { content: ""; position: absolute; inset-inline-end: -10%; bottom: -40%; width: 50%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(217, 189, 134, .35); }
.contact-grid { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.contact-info h2 { margin-bottom: 20px; }
.contact-info h2 em { color: var(--gold-soft); }
.contact-info > p { color: rgba(243, 233, 223, .82); margin-bottom: 36px; }
.contact-list li { display: grid; padding: 16px 0; border-bottom: 1px solid rgba(243, 233, 223, .18); }
.contact-list span { font-size: 15px; color: var(--gold-soft); }
.contact-list a { font-family: var(--font-en); font-size: 20px; text-align: start; }
[dir="rtl"] .contact-list a { text-align: right; }
.contact-list a:hover { color: var(--gold-soft); }
.contact-list a.addr { font-family: var(--font); font-size: 21px; }
.contact-list a.addr::after { content: " ↗"; font-size: 15px; color: var(--gold-soft); }

.contact-form { background: var(--bg); color: var(--text); padding: clamp(28px, 4vw, 48px); border-radius: 20px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.55); }
[data-theme="dark"] .contact-form { background: var(--surface); border: 1px solid var(--line); }
.contact-form h3 { font-size: 28px; margin-bottom: 22px; }
.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label, .field .label { font-size: 16px; font-weight: 700; }
[dir="ltr"] .field label, [dir="ltr"] .field .label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--text); background: var(--field-bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-height: 50px;
  transition: border-color .3s, box-shadow .3s; -webkit-appearance: none; appearance: none;
}
[dir="ltr"] .field input, [dir="ltr"] .field select, [dir="ltr"] .field textarea { font-size: 16px; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b8924a' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-inline-end: 36px; }
[dir="ltr"] .field select { background-position: right 14px center; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 146, 74, .18); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.field.has-error input { border-color: #c0392b; }
.error { font-size: 14px; color: #d0453a; min-height: 1em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-flex; align-items: center; min-height: 42px; padding: 4px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--field-bg); font-size: 16px; cursor: pointer; transition: all .25s; }
[dir="ltr"] .chips span { font-size: 14px; }
.chips input:checked + span { background: var(--olive); border-color: var(--olive); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.form-status { margin-top: 14px; text-align: center; font-size: 16px; min-height: 1.5em; }
.form-status.ok { color: var(--olive); }
[data-theme="dark"] .form-status.ok { color: var(--gold-soft); }

/* ---------- التذييل ---------- */
.site-footer { background: #0b1d1e; color: rgba(243, 233, 223, .75); font-size: 17px; }
[data-theme="dark"] .site-footer { background: #040b0b; border-top: 1px solid var(--line); }
.footer-top { text-align: center; padding-block: clamp(56px, 7vw, 84px) 40px; border-bottom: 1px solid rgba(243, 233, 223, .12); }
.footer-logo { width: min(320px, 80%); margin-inline: auto; }
.footer-tag { margin-top: 16px; color: var(--gold-soft); font-size: 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-block: 48px; }
.site-footer h3 { font-size: 19px; color: #f3e9df; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 6px; }
.site-footer a:hover { color: var(--gold-soft); }
.social-links { display: flex !important; gap: 10px; }
.social-links a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(243, 233, 223, .25); transition: all .3s; }
.social-links a:hover { border-color: var(--gold); background: var(--gold); color: #fff; }
.social-links svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.social-links .fill { fill: currentColor; stroke: none; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 22px; border-top: 1px solid rgba(243, 233, 223, .12); font-size: 15px; }
.footer-bottom p[dir="ltr"] { font-family: var(--font-en); font-size: 13px; letter-spacing: .08em; }

/* ---------- عارض الصور ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(4, 14, 15, .95); display: flex; align-items: center; justify-content: center; gap: 16px; padding: 60px 16px; animation: fade .35s var(--ease); }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); text-align: center; color: #f3e9df; }
.lightbox img { max-height: 80vh; width: auto; margin-inline: auto; border-radius: var(--radius); }
.lightbox figcaption { margin-top: 14px; font-size: 20px; }
.lightbox-close { position: absolute; top: 14px; inset-inline-end: 18px; width: 48px; height: 48px; font-size: 40px; line-height: 1; color: #f3e9df; }
.lightbox-nav { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(243, 233, 223, .3); color: #f3e9df; font-size: 20px; }
[dir="rtl"] .lightbox-nav span { display: inline-block; transform: scaleX(-1); }
.lightbox-nav:hover { background: var(--gold); border-color: var(--gold); }
@keyframes fade { from { opacity: 0; } }

/* ---------- واتساب ---------- */
.whatsapp { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(0,0,0,.4); transition: transform .3s var(--ease); }
.whatsapp:hover { transform: scale(1.08); }
.whatsapp svg { width: 30px; height: 30px; fill: currentColor; }

/* ---------- ظهور تدريجي ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
[data-section].is-off { display: none !important; }

.center-row { display: flex; justify-content: center; margin-top: 44px; }

/* ==========================================================
   صفحة المعرض
   ========================================================== */
.page-gallery main { padding-top: var(--header-h); }
.g-hero { background: var(--bg-alt); padding: clamp(56px, 8vw, 96px) 0 0; margin-bottom: clamp(40px, 5vw, 64px); position: relative; overflow: hidden; }
.g-hero::after { content: ""; position: absolute; inset-inline-end: -8%; top: -40%; width: 38vw; aspect-ratio: 1; border-radius: 50%; background: var(--aqua); opacity: .35; z-index: 0; }
[data-theme="dark"] .g-hero::after { background: transparent; border: 1px solid rgba(133, 206, 209, .4); opacity: 1; }
.g-hero .container { position: relative; z-index: 1; }
.g-hero h1 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 14px; }
.g-intro { color: var(--text-soft); max-width: 56ch; margin-bottom: 34px; }
.g-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.g-tab { position: relative; padding: 12px 18px 14px; font-size: 18px; color: var(--text-soft); transition: color .3s; }
[dir="ltr"] .g-tab { font-size: 15px; }
.g-tab b { font-family: var(--font-en); font-weight: 500; font-size: 13px; color: var(--gold); margin-inline-start: 4px; }
.g-tab::after { content: ""; position: absolute; inset-inline: 12px; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .35s var(--ease); }
.g-tab:hover, .g-tab.is-active { color: var(--text); }
.g-tab.is-active::after { transform: none; }
.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); padding-bottom: var(--section); }
.g-card { display: block; animation: fade .6s var(--ease) both; }
.g-card-img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--bg-alt); transition: border-radius .6s var(--ease); }
.g-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.g-card:hover .g-card-img { border-radius: 999px 999px var(--radius) var(--radius); }
.g-card:hover .g-card-img img { transform: scale(1.05); }
.g-card-body { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; padding-top: 16px; }
.g-num { grid-row: span 2; font-family: var(--font-en); font-style: italic; font-size: 30px; color: var(--gold); line-height: 1; }
.g-card h2 { font-size: 24px; max-width: none; }
[dir="ltr"] .g-card h2 { font-size: 21px; }
.g-card p { font-size: 15.5px; color: var(--text-soft); }
[data-theme="dark"] .g-card-img { outline: 1px solid rgba(133, 206, 209, .2); outline-offset: -1px; }

.g-project { padding-block: clamp(30px, 4vw, 50px) var(--section); }
.g-back { display: inline-flex; gap: 8px; align-items: center; color: var(--text-soft); font-size: 16px; margin-bottom: 26px; }
.g-back:hover { color: var(--accent); }
[dir="rtl"] .g-back > span:first-child { transform: scaleX(-1); }
.gp-head { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.gp-head h1 { font-size: clamp(36px, 5vw, 62px); }
.gp-cat { color: var(--text-soft); margin-top: 6px; }
.gp-layout { display: grid; grid-template-columns: 340px 1fr; gap: clamp(32px, 5vw, 70px); align-items: start; }
.gp-info { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 26px; }
.gp-desc { font-size: 19px; color: var(--text); }
[dir="ltr"] .gp-desc { font-size: 16.5px; }
.gp-facts { margin: 0; display: grid; }
.gp-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gp-facts dt { color: var(--text-soft); font-size: 15px; }
.gp-facts dd { margin: 0; font-weight: 700; text-align: end; }
.gp-images { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.gp-img { margin: 0; }
.gp-img button { display: block; width: 100%; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--bg-alt); }
.gp-img img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.gp-img button:hover img { transform: scale(1.02); }
.gp-img figcaption { font-family: var(--font-en); font-style: italic; color: var(--gold); font-size: 15px; padding-top: 8px; }
.gp-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(50px, 7vw, 90px); padding-top: 30px; border-top: 1px solid var(--line); }
.gp-nav-link { display: grid; gap: 2px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); transition: all .3s var(--ease); }
.gp-nav-link.next { text-align: end; }
.gp-nav-link small { color: var(--gold); font-size: 14px; }
.gp-nav-link span { font-size: 22px; font-weight: 700; }
.gp-nav-link:hover { border-color: var(--accent); background: var(--bg-alt); }

@media (max-width: 960px) {
  .g-grid { grid-template-columns: 1fr 1fr; }
  .gp-layout { grid-template-columns: 1fr; }
  .gp-info { position: static; }
}
@media (max-width: 600px) {
  .g-grid { grid-template-columns: 1fr; }
  .g-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .g-tab { white-space: nowrap; }
  .gp-nav { grid-template-columns: 1fr; }
  .gp-nav-link.next { text-align: start; }
}

/* ==========================================================
   المقدمة المتحركة: قوس يُرسم ← ضوء يملؤه ← الشعار يظهر في الضوء
   ← يتّسع القوس كبوابة فتعبر منه إلى الموقع
   ========================================================== */
.intro { display: none; }
.intro-on .intro {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 500; overflow: hidden;
  --i-bg: #f4fafa; --i-line: #0f4c50; --i-gold: #b8924a; --i-text: #12302f; --i-glow: rgba(133, 206, 209, .55);
}
.intro-on[data-theme="dark"] .intro { --i-bg: #050c0d; --i-line: #85CED1; --i-gold: #d9bd86; --i-text: #eaf6f6; --i-glow: rgba(133, 206, 209, .28); }
.intro-on body { overflow: hidden; }

.intro-arch { position: relative; width: min(68vw, 360px); aspect-ratio: 400 / 520; margin-top: -4vh; transform-origin: 50% 62%; will-change: transform; }
/* البوابة: كل ما حولها مطليّ بظل ضخم بلون الخلفية، فحين تتّسع يظهر الموقع من خلالها */
.portal { position: absolute; left: 5%; right: 5%; top: 3.85%; bottom: 0; border-radius: 999px 999px 0 0; background: var(--i-bg); box-shadow: 0 0 0 300vmax var(--i-bg); overflow: hidden; transition: background-color .7s var(--ease); }
.portal-glow { position: absolute; inset: 0; opacity: 0; background: radial-gradient(70% 55% at 50% 72%, var(--i-glow), transparent 75%), linear-gradient(to top, color-mix(in srgb, var(--i-gold) 14%, transparent), transparent 55%); animation: glowIn 1.6s .9s ease-out forwards; }

.arch-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.al { stroke: var(--i-line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.al-floor { stroke: var(--i-gold); animation: draw 1.1s .15s cubic-bezier(.65, 0, .35, 1) forwards; }
.al-outer { animation: draw 1.5s .45s cubic-bezier(.65, 0, .35, 1) forwards; }
.al-inner { stroke: var(--i-gold); opacity: .6; animation: draw 1.5s .75s cubic-bezier(.65, 0, .35, 1) forwards; }
.keystone { fill: var(--i-gold); opacity: 0; transform-origin: 200px 20px; transform: scale(0); animation: keyIn .6s 1.85s cubic-bezier(.34, 1.56, .64, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes keyIn { to { opacity: 1; transform: scale(1); } }
@keyframes glowIn { to { opacity: 1; } }

.intro-logo { position: absolute; left: 50%; top: 56%; width: 82%; aspect-ratio: 674 / 316; transform: translate(-50%, -50%); }
.il { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; filter: blur(5px);
  -webkit-mask-image: linear-gradient(100deg, #000 40%, rgba(0, 0, 0, .35) 50%, transparent 60%); mask-image: linear-gradient(100deg, #000 40%, rgba(0, 0, 0, .35) 50%, transparent 60%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 100% 0; mask-position: 100% 0;
  animation: lightReveal 1.7s 1.3s cubic-bezier(.55, 0, .25, 1) forwards; }
@keyframes lightReveal { 15% { opacity: 1; } to { opacity: 1; filter: blur(0); -webkit-mask-position: 0 0; mask-position: 0 0; } }
.il-shine { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: var(--logo-mask); mask-image: var(--logo-mask); -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 240, 205, .95) 50%, transparent 62%) no-repeat; background-size: 260% 100%; background-position: 140% 0;
  animation: shine 1.1s 2.85s ease-in-out forwards; }
@keyframes shine { to { background-position: -40% 0; } }

.intro-line { position: absolute; bottom: 12vh; margin: 0; font-size: clamp(17px, 2vw, 22px); color: var(--i-text); }
.intro-line span { display: inline-block; letter-spacing: .5em; opacity: 0; animation: lineIn 1.2s 2.7s var(--ease) forwards; }
[dir="ltr"] .intro-line { font-family: var(--font-en); font-style: italic; }
@keyframes lineIn { to { opacity: .85; letter-spacing: .06em; } }
.intro-skip { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 24px; padding: 7px 18px; border: 1px solid color-mix(in srgb, var(--i-text) 25%, transparent); border-radius: 999px; color: var(--i-text); font-size: 14px; opacity: .6; transition: opacity .3s; }
.intro-skip:hover { opacity: 1; border-color: var(--i-gold); }

/* الخروج: يختفي الشعار والخطوط، يصبح القوس شفافًا ثم يتّسع حتى يملأ الشاشة */
.intro .intro-logo, .intro .arch-lines, .intro .intro-line, .intro .intro-skip { transition: opacity .5s var(--ease); }
.intro.is-leaving .intro-logo, .intro.is-leaving .arch-lines, .intro.is-leaving .intro-line, .intro.is-leaving .intro-skip { opacity: 0; }
.intro.is-leaving .portal { background-color: transparent; }
.intro.is-leaving .portal-glow { opacity: 0 !important; transition: opacity .6s; animation: none; }
.intro.is-leaving .intro-arch { transform: scale(9); transition: transform 1.35s cubic-bezier(.7, 0, .2, 1) .3s; }
.intro-on .hero-visual, .intro-on .hero-text > * { transition-delay: 0s; }

/* ---------- الشاشات ---------- */
@media (max-width: 1150px) {
  .main-nav ul { gap: 16px; }
  .main-nav a:not(.btn) { font-size: 16.5px; }
  .main-nav .nav-cta { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 74px; }
  .menu-toggle { display: block; }
  .main-nav { position: fixed; inset: 0; z-index: 110; background: var(--burgundy); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
  [data-theme="dark"] .main-nav { background: #071112; }
  .main-nav.is-open { opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 22px; text-align: center; }
  .main-nav .nav-cta { display: block; }
  .main-nav a:not(.btn) { font-size: 28px; color: #f3e9df; }
  [dir="ltr"] .main-nav a:not(.btn) { font-size: 24px; }
  .main-nav a.is-current { color: var(--gold-soft); }
  .main-nav a:not(.btn)::after { background: var(--gold-soft); }
  .main-nav .btn { background: var(--gold); color: #fff; box-shadow: none; margin-top: 10px; }
  .menu-open .site-header { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-open .header-tools .tool { position: relative; z-index: 120; color: #f3e9df; border-color: rgba(243, 233, 223, .35); }
  .menu-open .brand { position: relative; z-index: 120; }
  .menu-open .brand .logo-on-light { display: none !important; }
  .menu-open .brand .logo-on-dark { display: block !important; }

  .hero { padding-top: calc(var(--header-h) + 24px); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { text-align: center; }
  .hero-text .eyebrow { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-visual { height: auto; min-height: 0; width: min(80%, 400px); margin-top: 20px; }
  .hero-curve { top: auto; bottom: -10%; inset-inline: -40% auto; width: 180vw; height: 52%; border-radius: 50% 50% 0 0 / 60% 60% 0 0; }
  [data-theme="dark"] .hero-curve { border-inline-end: 1px solid rgba(201, 163, 91, .55); border-bottom: 0; }
  [data-theme="dark"] .hero-curve::before { border-radius: 50% 50% 0 0 / 60% 60% 0 0; border-inline-end: 1px solid rgba(201, 163, 91, .25); inset: 9% 6% 0 6%; }

  .about-grid, .ba-grid, .social-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 460px; margin-inline: auto; width: 100%; }
  .vm-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 250px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ba-text { text-align: center; }
  .ba-text p { margin-inline: auto; }
}

@media (max-width: 600px) {
  body { font-size: 18px; }
  .brand { height: 46px; }
  .tool { min-width: 40px; height: 40px; padding-inline: 10px; font-size: 13.5px; }
  .hero h1 { font-size: 42px; }
  [dir="ltr"] .hero h1 { font-size: 36px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-trust { gap: 18px; }
  .hero-trust strong { font-size: 20px; }
  .hero-trust span { font-size: 14px; }
  .hero-badge { inset-inline-start: -6%; top: 6%; padding: 8px 14px 8px 10px; font-size: 13.5px; }
  .hero-badge-num { width: 38px; height: 38px; }
  .hero-round { inset-inline-end: -10%; }
  .ticker span { font-size: 19px; }
  .about-media { padding-inline-end: 34px; padding-bottom: 40px; }
  .services-grid, .projects-grid, .steps { grid-template-columns: 1fr; }
  .project.tall { grid-row: span 1; }
  .project.wide { grid-column: span 1; }
  .projects-grid { grid-auto-rows: 300px; }
  .project figcaption { opacity: 1; transform: none; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .social-links { justify-content: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .faq-list summary { font-size: 20px; }
  .lightbox-nav { position: absolute; bottom: 18px; }
  .lightbox-nav.prev { inset-inline-start: calc(50% - 60px); }
  .lightbox-nav.next { inset-inline-end: calc(50% - 60px); }
}

@media (hover: none) { .project figcaption { opacity: 1; transform: none; } }

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

/* ==========================================================
   استوديو الخامات
   ========================================================== */
.studio { padding-block: clamp(36px, 5vw, 64px) var(--section); }
.studio-head { margin-bottom: clamp(26px, 4vw, 44px); max-width: 760px; }
.studio-head h1 { font-size: clamp(32px, 4.4vw, 56px); margin-bottom: 12px; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.studio-stage { position: sticky; top: calc(var(--header-h) + 16px); min-width: 0; }
.stage-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-alt); box-shadow: var(--shadow); display: grid; place-items: center; min-height: 240px; }
.stage-frame canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100svh - var(--header-h) - 120px); cursor: crosshair; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 45%, transparent); }
.stage-loading span { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--aqua); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-hint { position: absolute; inset: auto 12px 12px 12px; margin: 0; padding: 8px 14px; border-radius: 10px; background: rgba(6, 20, 21, .78); color: #eaf6f6; font-size: 15px; text-align: center; pointer-events: none; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.stage-actions { display: flex; gap: 8px; }
.muted-note { color: var(--text-soft); font-size: 14.5px; margin: 0; }

.studio-panel { display: grid; gap: 14px; min-width: 0; }
.panel-block { background: var(--surface); border: 1px solid var(--card-border); border-radius: 14px; padding: 18px; }
.panel-title { display: flex; align-items: baseline; gap: 10px; font-size: 19px; margin: 0 0 14px; max-width: none; }
.panel-title span { font-family: var(--font-en); font-style: italic; color: var(--gold); font-size: 16px; font-weight: 500; }
[dir="ltr"] .panel-title { font-size: 17px; }

.room-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.room-card { display: grid; gap: 6px; text-align: center; font-size: 13.5px; line-height: 1.3; color: var(--text-soft); }
.room-card img, .room-card .own-icon { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 2px solid transparent; transition: border-color .25s; }
.room-card .own-icon { display: grid; place-items: center; font-size: 30px; color: var(--accent); background: var(--bg-alt); border: 2px dashed var(--line); }
.room-card.is-active img, .room-card.is-active .own-icon { border-color: var(--aqua); border-style: solid; }
.room-card.is-active { color: var(--text); font-weight: 700; }
.tol-row { display: grid; gap: 4px; margin-top: 12px; font-size: 14px; color: var(--text-soft); }
.tol-row input { accent-color: var(--accent); }

.zone-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-chip { position: relative; min-height: 40px; padding: 4px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 16px; transition: all .25s; }
[dir="ltr"] .zone-chip { font-size: 14px; }
.zone-chip:hover { border-color: var(--accent); }
.zone-chip.is-active { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.zone-chip.has-choice::after { content: ""; position: absolute; top: 4px; inset-inline-end: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

.mat-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.mat-tab { padding: 6px 12px 9px; font-size: 15.5px; color: var(--text-soft); position: relative; }
[dir="ltr"] .mat-tab { font-size: 13.5px; }
.mat-tab.is-active { color: var(--text); font-weight: 700; }
.mat-tab.is-active::after { content: ""; position: absolute; inset-inline: 8px; bottom: -1px; height: 2px; background: var(--aqua); }
.mat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 420px; overflow-y: auto; padding: 2px; }
.swatch { display: grid; gap: 4px; text-align: start; padding: 6px; border-radius: 10px; border: 1px solid transparent; transition: all .2s; }
.swatch:hover { border-color: var(--line); }
.swatch.is-active { border-color: var(--aqua); background: var(--bg-alt); }
.swatch .chip { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.swatch .chip-tint { display: block; overflow: hidden; position: relative; }
.swatch .chip-tint img { width: 100%; height: 100%; object-fit: cover; display: block; mix-blend-mode: multiply; filter: brightness(1.55) contrast(1.15); }
.swatch .chip-tint::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,0) 45%, rgba(0,0,0,.18)); }
.sw-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.sw-meta { font-size: 11.5px; color: var(--text-soft); font-family: var(--font-en); line-height: 1.3; }
.sw-meta b { color: var(--gold); font-weight: 600; }
.mat-credit { font-size: 12px; color: var(--text-soft); margin: 10px 0 0; line-height: 1.6; }
.choice-list { display: grid; gap: 4px; margin-bottom: 14px; font-size: 15px; }
.choice-list li::before { content: "✦ "; color: var(--gold); font-size: 11px; }
.choice-list li.muted-note::before { content: ""; }
.studio-cta { padding-block: clamp(56px, 7vw, 90px); text-align: center; background: var(--bg-alt); }
.studio-cta h2 { margin: 0 auto 14px; }
.studio-cta p { color: var(--text-soft); max-width: 56ch; margin: 0 auto 26px; }

@media (max-width: 960px) {
  .studio-layout { grid-template-columns: 1fr; }
  .studio-stage { position: sticky; top: var(--header-h); z-index: 5; background: var(--bg); padding-bottom: 6px; }
  .stage-frame canvas { max-height: 46svh; }
  .stage-bar .muted-note { display: none; }
  .mat-grid { grid-template-columns: repeat(4, 1fr); max-height: none; }
}
@media (max-width: 520px) {
  .mat-grid { grid-template-columns: repeat(3, 1fr); }
  .room-picker { grid-template-columns: repeat(4, 1fr); }
  .room-card { font-size: 12px; }
}

.sel-tools { margin-top: 12px; display: grid; gap: 8px; }
.sel-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sel-mode { min-height: 40px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line); font-size: 14.5px; line-height: 1.2; transition: all .2s; }
.sel-mode.is-active { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
#ai-status { min-height: 1.4em; }

.mat-group { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13.5px; font-weight: 700; color: var(--gold); }
.uv-panel { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); display: grid; gap: 6px; }
.uv-title { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
.uv-row { display: grid; grid-template-columns: 92px 1fr 46px; align-items: center; gap: 8px; font-size: 14px; color: var(--text-soft); }
.uv-row input { accent-color: var(--accent); width: 100%; }
.uv-row b { font-family: var(--font-en); font-weight: 500; font-size: 12.5px; text-align: end; color: var(--text); }
.uv-row[hidden] { display: none; }
.uv-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-soft); cursor: pointer; }
.uv-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.uv-panel .btn { justify-self: start; margin-top: 4px; }
