/* ==========================================================================
   Kufiyat Al Quds — design system & components
   Layout: mobile-first, logical properties (works for RTL Arabic and LTR English)
   ========================================================================== */

/* ---- 1. Fonts (self-hosted; same families as the brand: Lalezar, Cairo, Aref Ruqaa) ---- */
@font-face { font-family: "Lalezar"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/lalezar-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "Lalezar"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/lalezar-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/cairo-var-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/cairo-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Aref Ruqaa"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/aref-ruqaa-700-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "Aref Ruqaa"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/aref-ruqaa-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---- 2. Design tokens ---- */
:root {
  /* colour — brand browns & caramel from the menu and logo */
  --ink: #2B1A14;          /* deepest brown: text on light */
  --brown: #4A2B23;        /* primary: logo brown */
  --brown-2: #6B4436;      /* primary hover */
  --brown-deep: #22140F;   /* dark surfaces */
  --caramel: #C4935F;      /* accent fills */
  --caramel-2: #D9AE7E;    /* accent hover / on-dark accent text */
  --caramel-ink: #8A5A2E;  /* accent text on light (WCAG AA) */
  --cream: #F8F2E9;        /* page background */
  --cream-2: #EFE4D3;      /* raised tint */
  --paper: #FFFBF5;        /* cards */
  --line: #E6D7C2;         /* hairlines */
  --muted: #6E554A;        /* secondary text (AA on cream & paper) */
  --on-dark: #F3E8DA;      /* body text on dark surfaces */
  --on-dark-muted: #CDB9A6;
  --whatsapp: #15703A;     /* darkened WhatsApp green: passes AA (≥4.5:1) with white text */

  /* type */
  --font-display: "Lalezar", "Cairo", system-ui, sans-serif;
  --font-body: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-accent: "Aref Ruqaa", "Cairo", serif;
  --fs-xs: .8125rem;   /* 13 */
  --fs-sm: .9375rem;   /* 15 */
  --fs-md: 1.0625rem;  /* 17 */
  --fs-lg: 1.25rem;    /* 20 */
  --fs-xl: clamp(1.4rem, 1.1rem + 1vw, 1.75rem);
  --fs-2xl: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --fs-hero: clamp(3.4rem, 2rem + 6vw, 7.5rem);

  /* spacing — 4px base */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
  --gutter: max(1rem, env(safe-area-inset-left));
  --section-y: clamp(4rem, 3rem + 4vw, 7rem);

  /* shape */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 36px; --r-pill: 999px;
  --r-arch: 999px 999px var(--r-lg) var(--r-lg);

  /* depth */
  --sh-1: 0 1px 2px rgba(43, 26, 20, .06), 0 2px 8px rgba(43, 26, 20, .05);
  --sh-2: 0 10px 30px rgba(43, 26, 20, .10);
  --sh-3: 0 24px 60px rgba(43, 26, 20, .20);

  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: 180ms; --t-med: 320ms; --t-slow: 700ms;

  --header-h: 76px;

  /* brand patterns */
  --kufiya: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M0 0L44 44M44 0L0 44' stroke='%234A2B23' stroke-opacity='.07' stroke-width='1.2'/%3E%3Cg fill='%234A2B23' fill-opacity='.08'%3E%3Cellipse cx='11' cy='11' rx='2.3' ry='5' transform='rotate(-45 11 11)'/%3E%3Cellipse cx='33' cy='33' rx='2.3' ry='5' transform='rotate(-45 33 33)'/%3E%3Cellipse cx='33' cy='11' rx='2.3' ry='5' transform='rotate(45 33 11)'/%3E%3Cellipse cx='11' cy='33' rx='2.3' ry='5' transform='rotate(45 11 33)'/%3E%3C/g%3E%3C/svg%3E");
  --kufiya-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M0 0L44 44M44 0L0 44' stroke='%23F8F2E9' stroke-opacity='.07' stroke-width='1.2'/%3E%3Cg fill='%23F8F2E9' fill-opacity='.08'%3E%3Cellipse cx='11' cy='11' rx='2.3' ry='5' transform='rotate(-45 11 11)'/%3E%3Cellipse cx='33' cy='33' rx='2.3' ry='5' transform='rotate(-45 33 33)'/%3E%3Cellipse cx='33' cy='11' rx='2.3' ry='5' transform='rotate(45 33 11)'/%3E%3Cellipse cx='11' cy='33' rx='2.3' ry='5' transform='rotate(45 11 33)'/%3E%3C/g%3E%3C/svg%3E");
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='18' viewBox='0 0 24 18'%3E%3Cg fill='none' stroke='%234A2B23' stroke-width='2'%3E%3Cpath d='M0 5q6-5 12 0t12 0'/%3E%3Cpath d='M0 13q6-5 12 0t12 0'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

/* ---- 3. Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-3)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: clip;
  font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.75; font-weight: 400;
  color: var(--ink); background: var(--cream);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.65; }
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 400; text-wrap: balance; }
h2 { font-family: var(--font-display); font-size: var(--fs-2xl); }
h3 { font-family: var(--font-display); font-size: var(--fs-xl); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-block-end: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
bdi { unicode-bidi: isolate; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 2rem; } }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
::selection { background: var(--caramel); color: var(--ink); }

.skip {
  position: absolute; inset-inline-start: var(--s-3); top: -100px; z-index: 200;
  background: var(--brown); color: var(--cream); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); text-decoration: none;
}
.skip:focus { top: var(--s-3); }

/* ---- 4. Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-2) var(--s-5); border-radius: var(--r-pill);
  font: 700 1rem/1.2 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 2px solid transparent;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { min-height: 56px; padding-inline: var(--s-6); font-size: 1.0625rem; }
.btn-primary { background: var(--brown); color: var(--cream); }
.btn-primary:hover { background: var(--brown-2); box-shadow: var(--sh-2); }
.btn-accent { background: var(--caramel); color: var(--ink); }
.btn-accent:hover { background: var(--caramel-2); box-shadow: 0 10px 30px rgba(196, 147, 95, .35); }
.btn-ghost { border-color: var(--brown); color: var(--brown); }
.btn-ghost:hover { background: var(--brown); color: var(--cream); }
.btn-light { background: var(--cream); color: var(--brown); }
.btn-light:hover { background: #fff; }
.btn-glass {
  background: rgba(248, 242, 233, .12); color: var(--cream); border-color: rgba(248, 242, 233, .4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(248, 242, 233, .22); border-color: var(--cream); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #0F5A2D; }

/* ---- 5. Header ---- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  transition: background-color var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  background: linear-gradient(to bottom, rgba(34, 20, 15, .55), rgba(34, 20, 15, 0));
  color: var(--cream);
}
.site-header.is-solid {
  background: rgba(248, 242, 233, .94); color: var(--ink);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(43, 26, 20, .06);
}
.header-inner { display: flex; align-items: center; gap: var(--s-4); height: 100%; }
.brand { position: relative; display: block; flex: none; }
.brand img { height: 46px; width: auto; transition: opacity var(--t-med); }
.brand-dark { position: absolute; inset: 0; opacity: 0; }
.is-solid .brand-dark { opacity: 1; }
.is-solid .brand-light { opacity: 0; }
.nav { display: flex; gap: var(--s-1); margin-inline-start: auto; }
.nav a {
  position: relative; padding: var(--s-2) var(--s-3); border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; inset-inline: var(--s-3); bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--caramel); transform: scaleX(0); transition: transform var(--t-med) var(--ease);
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.lang-switch {
  display: inline-grid; place-items: center; min-width: 48px; height: 44px; padding-inline: var(--s-3);
  border-radius: var(--r-pill); border: 2px solid currentColor; text-decoration: none;
  font: 800 .875rem/1 var(--font-body); letter-spacing: .03em;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.lang-switch:hover { background: var(--cream); color: var(--brown); border-color: var(--cream); }
.is-solid .lang-switch:hover { background: var(--brown); color: var(--cream); border-color: var(--brown); }
.site-header:not(.is-solid) .header-cta { background: var(--caramel); color: var(--ink); }
.nav-toggle { display: none; }

@media (max-width: 1180px) {
  .header-inner { gap: var(--s-2); }
  .header-cta { display: none; }
  .lang-switch { margin-inline-start: auto; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 48px; padding: 0 12px; border: 0; border-radius: var(--r-md); cursor: pointer;
    background: rgba(248, 242, 233, .14); color: inherit;
  }
  .is-solid .nav-toggle { background: var(--cream-2); }
  .nav-toggle span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--t-med) var(--ease), opacity var(--t-fast); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top)) 0 auto; margin: 0;
    flex-direction: column; gap: 0; padding: var(--s-2) var(--gutter) var(--s-5);
    background: var(--cream); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: var(--sh-3);
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
  }
  .nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a { padding: var(--s-3) var(--s-2); border-radius: var(--r-sm); font-size: var(--fs-md); border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .site-header.menu-open { background: var(--cream); color: var(--ink); }
  .menu-open .brand-dark { opacity: 1; }
  .menu-open .brand-light { opacity: 0; }
}

/* ---- 6. Hero video banner ---- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(620px, 100svh, 980px); display: flex; align-items: flex-end;
  color: var(--cream); background: var(--brown-deep);
}
.hero-media, .hero-video, .hero-shade, .hero-poster { position: absolute; inset: 0; }
.hero-media { z-index: -1; }
.hero-poster img, .hero-video { width: 100%; height: 100%; object-fit: cover; }
/* the poster is the first paint; the video fades in over it once frames are actually playing */
.hero-video { opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.hero-video.is-playing { opacity: 1; }
.hero-shade {
  background:
    linear-gradient(to top, rgba(26, 15, 11, .96) 0%, rgba(26, 15, 11, .72) 32%, rgba(26, 15, 11, .25) 62%, rgba(26, 15, 11, .55) 100%),
    var(--kufiya-light);
}
.hero-inner { display: grid; gap: var(--s-6); padding-block: calc(var(--header-h) + var(--s-7)) var(--s-6); }
.eyebrow {
  display: inline-block; margin-block-end: var(--s-4); padding: var(--s-1) var(--s-4);
  border: 1px solid rgba(248, 242, 233, .35); border-radius: var(--r-pill);
  background: rgba(248, 242, 233, .08); font-size: var(--fs-sm); font-weight: 700; color: var(--on-dark);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero h1 { display: grid; gap: var(--s-2); }
.hero-name {
  font-family: var(--font-display); font-size: var(--fs-hero); line-height: 1; letter-spacing: -.005em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .35);
}
html[lang="en"] .hero-name { letter-spacing: -.02em; }
.hero-tag { font-family: var(--font-accent); font-weight: 700; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); color: var(--caramel-2); line-height: 1.3; }
.hero-tag-en { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-lg); color: var(--on-dark-muted); letter-spacing: .02em; }
.hero-lead { max-width: 36em; margin-block: var(--s-4) var(--s-5); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.process {
  border: 1px solid rgba(248, 242, 233, .18); border-radius: var(--r-lg); padding: var(--s-4);
  background: rgba(26, 15, 11, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.process-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-block-end: var(--s-3); }
.process-title { margin: 0; font-family: var(--font-display); font-size: var(--fs-lg); color: var(--caramel-2); }
.hero-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(248, 242, 233, .4); background: rgba(248, 242, 233, .1); color: var(--cream);
}
.hero-toggle:hover { background: rgba(248, 242, 233, .2); }
.hero-toggle .icon-play { display: none; }
.hero-toggle[aria-pressed="true"] .icon-play { display: block; }
.hero-toggle[aria-pressed="true"] .icon-pause { display: none; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); counter-reset: step; }
.step {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s-1) var(--s-2);
  width: 100%; min-height: 64px; padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-md);
  background: rgba(248, 242, 233, .06); color: var(--on-dark-muted); text-align: start; cursor: pointer;
  transition: background-color var(--t-med), color var(--t-med);
}
.step:hover { background: rgba(248, 242, 233, .12); color: var(--cream); }
.step.is-active { background: rgba(248, 242, 233, .14); color: var(--cream); }
.step-num { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--caramel-2); line-height: 1; }
.step-label { font-weight: 700; font-size: var(--fs-sm); line-height: 1.35; }
.step-bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: rgba(248, 242, 233, .18); overflow: hidden; }
.step-bar i { display: block; height: 100%; background: var(--caramel); transform: scaleX(var(--p, 0)); transform-origin: var(--origin, left); }
[dir="rtl"] .step-bar i { --origin: right; }
.step.is-done .step-bar i { transform: scaleX(1); }

@media (min-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; gap: var(--s-8); padding-block-end: var(--s-8); }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 58px; }
}
@media (max-width: 420px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---- 7. Facts strip ---- */
.facts { background: var(--cream); }
.facts-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3);
  padding-block: var(--s-6); text-align: center;
}
.facts-list li { display: grid; gap: var(--s-1); }
.facts-list strong { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); line-height: 1; color: var(--brown); }
.facts-list span { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); line-height: 1.4; }
.wave-strip { height: 18px; background: var(--wave) repeat-x center / 24px 18px; opacity: .8; }

/* ---- 8. Sections ---- */
.section { padding-block: var(--section-y); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto var(--s-7); }
.kicker {
  display: inline-flex; align-items: center; gap: var(--s-3); margin-block-end: var(--s-2);
  font: 800 var(--fs-xs)/1.2 var(--font-body); letter-spacing: .22em; color: var(--caramel-ink); text-transform: uppercase;
}
.kicker:lang(ar) { letter-spacing: 0; font-size: var(--fs-sm); }
.kicker::before, .kicker::after { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.kicker--light { color: var(--caramel-2); }
.section-sub { margin-block-start: var(--s-3); color: var(--muted); }

/* ---- 9. Menu ---- */
.tabs {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-1);
  width: 100%; margin: 0 auto var(--s-6); padding: var(--s-1);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
@media (min-width: 640px) {
  .tabs { display: flex; width: fit-content; max-width: 100%; border-radius: var(--r-pill); }
}
.tab {
  position: relative; z-index: 1; min-height: 46px; padding: var(--s-2) var(--s-5); border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--brown); font-weight: 700; font-size: var(--fs-sm); cursor: pointer;
  transition: color var(--t-med), background-color var(--t-fast);
}
.tab:hover { background: var(--cream-2); }
.tab[aria-selected="true"] { color: var(--cream); background: var(--brown); }
.tabs.has-ink .tab[aria-selected="true"] { background: transparent; }
.tab-ink {
  position: absolute; z-index: 0; top: var(--s-1); bottom: var(--s-1); inset-inline-start: 0;
  width: var(--ink-w, 0); transform: translateX(var(--ink-x, 0)); border-radius: var(--r-pill); background: var(--brown);
  transition: transform var(--t-med) var(--ease), width var(--t-med) var(--ease); opacity: 0;
}
.tabs.has-ink .tab-ink { opacity: 1; }
.panel[hidden] { display: none; }
.panel:focus-visible { outline-offset: 8px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: var(--s-5); }
.cards--compact { grid-template-columns: repeat(auto-fill, minmax(min(46%, 210px), 1fr)); gap: var(--s-4); }
/* desktop: column count chosen per section so rows fill evenly (7 → 4+3, 5 → 3+2, 9 → 3×3) */
@media (min-width: 1080px) {
  .cards--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.card {
  display: flex; flex-direction: column; overflow: hidden; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; border-end-start-radius: 48px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-stage {
  display: grid; place-items: center; aspect-ratio: 4 / 3; padding: var(--s-5); margin: var(--s-2) var(--s-2) 0;
  border-radius: var(--r-md) var(--r-md) var(--r-md) 48px;
  background: radial-gradient(120% 100% at 50% 0%, #EDD5B4 0%, var(--caramel) 100%);
  position: relative; isolation: isolate;
}
[dir="rtl"] .card-stage { border-radius: var(--r-md) var(--r-md) 48px var(--r-md); }
.card-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--kufiya); opacity: .9; }
.card-stage img {
  /* absolutely placed so the stage keeps its 4:3 shape whatever the photo's proportions */
  position: absolute; inset: var(--s-5); width: calc(100% - 2 * var(--s-5)); height: calc(100% - 2 * var(--s-5)); object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(43, 26, 20, .28));
  transition: transform var(--t-slow) var(--ease);
}
.card:hover .card-stage img { transform: translateY(-4px) rotate(-1.5deg) scale(1.03); }
.card-body { display: flex; flex-direction: column; flex: 1; gap: var(--s-2); padding: var(--s-4) var(--s-5) var(--s-5); }
.card-body h3 { font-size: 1.45rem; }
.card-desc { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.price {
  margin: auto 0 0; align-self: flex-start; display: inline-flex; align-items: baseline; gap: var(--s-1);
  padding: var(--s-1) var(--s-4); border-radius: var(--r-pill); background: var(--cream-2); color: var(--brown);
  font-weight: 700; font-size: var(--fs-sm);
}
.price-num { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.cards--compact .card-body { padding: var(--s-3) var(--s-4) var(--s-4); }
.cards--compact .card-body h3 { font-size: 1.2rem; }
.cards--compact .card-stage img { inset: var(--s-4); width: calc(100% - 2 * var(--s-4)); height: calc(100% - 2 * var(--s-4)); }
.note { margin-block-start: var(--s-6); text-align: center; font-size: var(--fs-sm); color: var(--muted); }

/* ---- 10. Signature ---- */
.signature { background: var(--brown-deep) var(--kufiya-light); color: var(--cream); }
.signature-grid, .story-grid, .profile-grid { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 900px) {
  .signature-grid { grid-template-columns: .9fr 1.1fr; gap: var(--s-8); }
  .story-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .profile-grid { grid-template-columns: 1.15fr .85fr; gap: var(--s-8); }
}
.signature-media img {
  width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 140px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
}
[dir="rtl"] .signature-media img { border-radius: var(--r-xl) var(--r-xl) 140px var(--r-xl); }
.signature-copy .kicker { color: var(--caramel-2); }
.signature-copy h2 { margin-block-end: var(--s-5); }
.signature-copy > p { color: var(--on-dark); }
.checks { display: grid; gap: var(--s-3); margin-block: var(--s-5) var(--s-6); }
.checks li { position: relative; padding-inline-start: var(--s-6); font-weight: 700; }
.checks li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: .6em; width: 12px; height: 12px;
  background: var(--caramel); transform: rotate(45deg);
}

/* ---- 11. Story ---- */
.story-copy h2 { margin-block-end: var(--s-5); }
.story-copy > p { color: var(--brown-2); }
.values { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-block-start: var(--s-4); }
.values li { padding: var(--s-1) var(--s-4); border-radius: var(--r-pill); background: var(--cream-2); font-weight: 700; font-size: var(--fs-sm); color: var(--brown); }
.motto { margin-block-start: var(--s-5); font-family: var(--font-accent); font-weight: 700; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); color: var(--caramel-ink); }
.story-art { padding: var(--s-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-2); transform: rotate(1deg); }
[dir="rtl"] .story-art { transform: rotate(-1deg); }
.story-art img { width: 100%; border-radius: var(--r-lg); }

/* ---- 12. Video gallery ---- */
.videos { background: var(--brown-deep) var(--kufiya-light); color: var(--cream); }
.videos .section-sub { color: var(--on-dark-muted); }
.videos .kicker { color: var(--caramel-2); }
.video-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(72%, 260px); gap: var(--s-4);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1); padding: var(--s-2) var(--gutter) var(--s-4);
  scrollbar-width: thin; scrollbar-color: var(--caramel) transparent;
}
.video-card { scroll-snap-align: start; display: grid; gap: var(--s-3); align-content: start; }
/* five vertical videos sit in one row only when each card can be at least ~200px wide */
@media (min-width: 1100px) {
  .video-grid { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); overflow: visible; margin: 0; padding: 0; }
  .video-play { width: 60px; height: 60px; }
  .video-card--featured .video-open { box-shadow: 0 0 0 2px var(--caramel), 0 30px 60px rgba(0, 0, 0, .45); }
}
.video-open {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; overflow: hidden; cursor: pointer;
  border: 0; border-radius: var(--r-arch); background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35); isolation: isolate;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med);
}
.video-open img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease), filter var(--t-med); }
.video-open::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 45%); }
.video-open:hover { transform: translateY(-4px); }
.video-open:hover img { transform: scale(1.05); filter: brightness(1.05); }
.video-play {
  position: absolute; z-index: 2; inset: 0; margin: auto; width: 72px; height: 72px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(248, 242, 233, .92); color: var(--brown); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform var(--t-med) var(--ease), background-color var(--t-fast);
}
.video-play .icon { width: 28px; height: 28px; margin-inline-start: 3px; }
[dir="rtl"] .video-play .icon { margin-inline-start: 0; margin-inline-end: 3px; }
.video-open:hover .video-play { transform: scale(1.08); background: var(--caramel); }
.video-meta { position: absolute; z-index: 2; inset: auto var(--s-3) var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.video-chip {
  display: inline-flex; align-items: center; gap: var(--s-1); padding: 2px var(--s-3); border-radius: var(--r-pill);
  background: rgba(26, 15, 11, .7); color: var(--cream); font-size: var(--fs-xs); font-weight: 700;
}
.video-chip .icon { width: 14px; height: 14px; }
.video-caption h3 { font-size: 1.35rem; }
.video-caption p { margin: var(--s-1) 0 0; font-size: var(--fs-sm); color: var(--on-dark-muted); line-height: 1.55; }

/* ---- 13. Profile ---- */
.profile { background: var(--cream) var(--kufiya); border-block: 1px solid var(--line); }
.profile-cover {
  display: block; overflow: hidden; border-radius: var(--r-lg); box-shadow: var(--sh-3);
  transform: perspective(1200px) rotateY(-6deg) rotate(-1deg); transition: transform var(--t-slow) var(--ease);
}
[dir="rtl"] .profile-cover { transform: perspective(1200px) rotateY(6deg) rotate(1deg); }
.profile-cover:hover, [dir="rtl"] .profile-cover:hover { transform: none; }
.profile-cover img { width: 100%; }
.profile-copy h2 { margin-block-end: var(--s-4); }
.profile-copy > p { color: var(--brown-2); }
.profile-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block: var(--s-5) var(--s-4); }
.profile-meta { font-size: var(--fs-sm); color: var(--muted); }
.profile-meta a { color: var(--caramel-ink); font-weight: 700; text-underline-offset: 4px; }

/* ---- 14. Photo gallery ---- */
.gallery-section { background: var(--paper); }
.gallery { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; grid-auto-flow: dense; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; gap: var(--s-4); } }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }
.g-item button { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; background: var(--cream-2); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.g-item button:hover img { transform: scale(1.06); }

/* ---- 15. Branches ---- */
.branches { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.branch {
  position: relative; display: grid; gap: var(--s-1); justify-items: center; text-align: center;
  padding: var(--s-6) var(--s-5) var(--s-5); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med);
}
.branch:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.branch-pin { display: grid; place-items: center; width: 56px; height: 56px; margin-block-end: var(--s-2); border-radius: 50%; background: var(--brown); color: var(--cream); }
.branch-pin .icon { width: 26px; height: 26px; }
.branch-area { margin: 0; font-weight: 700; color: var(--brown-2); }
.branch-landmark { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--fs-sm); }
.branch-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-block-start: auto; }
.branch-phone, .branch-map {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill); font-weight: 700; font-size: var(--fs-sm); text-decoration: none;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.branch-phone { background: var(--cream-2); color: var(--brown); }
.branch-phone:hover { background: var(--caramel); color: var(--ink); }
.branch-map { border: 2px solid var(--line); color: var(--caramel-ink); }
.branch-map:hover { border-color: var(--caramel); }

/* ---- 16. Contact ---- */
.contact { padding-block: var(--s-8); background: var(--brown) var(--kufiya-light); color: var(--cream); }
.contact-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5); }
.contact-copy p { color: var(--on-dark); margin-block-start: var(--s-2); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.phone-big {
  display: inline-flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-6); border-radius: var(--r-pill);
  background: var(--caramel); color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); line-height: 1.2;
  transition: background-color var(--t-fast), transform var(--t-fast) var(--ease);
}
.phone-big .icon { width: 30px; height: 30px; }
.phone-big:hover { background: var(--caramel-2); transform: translateY(-2px); }
.social-row {
  flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  padding-block-start: var(--s-5); border-top: 1px solid rgba(248, 242, 233, .15);
}
.social-row > span { font-weight: 700; color: var(--on-dark); }
.social-pill {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: var(--s-2) var(--s-5);
  border-radius: var(--r-pill); border: 2px solid rgba(248, 242, 233, .35); color: var(--cream); text-decoration: none; font-weight: 700;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.social-pill:hover { background: rgba(248, 242, 233, .1); border-color: var(--cream); }

/* ---- 17. Footer ---- */
.site-footer { background: var(--brown-deep); color: var(--on-dark-muted); padding-block-start: var(--s-8); }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; padding-block-end: var(--s-7); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand img { height: 80px; width: auto; }
.footer-tag { margin-block-start: var(--s-3); font-family: var(--font-accent); font-weight: 700; font-size: 1.6rem; color: var(--caramel-2); }
.footer-title { margin-block-end: var(--s-3); font-family: var(--font-body); font-weight: 800; font-size: var(--fs-sm); letter-spacing: .04em; color: var(--cream); }
.footer-col ul { display: grid; gap: var(--s-1); }
.footer-col a { display: inline-block; padding-block: 2px; text-decoration: none; transition: color var(--t-fast); }
.footer-col a:hover { color: var(--caramel-2); text-decoration: underline; text-underline-offset: 4px; }
.footer-social { display: grid; gap: var(--s-2); }
.footer-col .footer-social-link { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; }
.footer-bottom { padding-block: var(--s-4); border-top: 1px solid rgba(248, 242, 233, .12); font-size: var(--fs-sm); text-align: center; }
.footer-bottom p { margin: 0; }

/* ---- 18. Mobile order bar ---- */
.mobile-bar { display: none; }
@media (max-width: 767px) {
  .mobile-bar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s-2);
    padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
    background: rgba(248, 242, 233, .96); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    transform: translateY(110%); visibility: hidden;
    transition: transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
  }
  .mobile-bar.is-visible { transform: none; visibility: visible; transition-delay: 0s; }
  .mobile-bar .btn-light { border-color: var(--brown); }
  .site-footer { padding-block-end: 84px; }
}

/* ---- 19. Dialogs: lightbox & video player ---- */
.lightbox, .player { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; color: var(--cream); }
.lightbox::backdrop, .player::backdrop { background: rgba(18, 10, 7, .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox[open], .player[open] { animation: pop var(--t-med) var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.lightbox-figure { display: grid; justify-items: center; gap: var(--s-3); }
.lightbox-figure img { width: auto; max-width: min(92vw, 960px); max-height: 80vh; object-fit: contain; border-radius: var(--r-md); }
.lightbox-figure figcaption { max-width: 60ch; text-align: center; font-size: var(--fs-sm); color: var(--on-dark); padding-inline: var(--s-4); }
.lb-btn {
  position: fixed; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--cream); color: var(--brown); cursor: pointer; box-shadow: var(--sh-2);
  transition: background-color var(--t-fast), transform var(--t-fast) var(--ease);
}
.lb-btn:hover { background: var(--caramel); }
.lb-btn .icon { width: 24px; height: 24px; }
.lb-close { top: max(var(--s-4), env(safe-area-inset-top)); inset-inline-end: var(--s-4); }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { inset-inline-start: var(--s-3); }
.lb-next { inset-inline-end: var(--s-3); }
[dir="ltr"] .lb-next .icon, [dir="rtl"] .lb-prev .icon { transform: scaleX(-1); }
.player-frame { width: min(92vw, calc(84vh * 9 / 16)); aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--sh-3); }
.player-frame.is-wide { width: min(92vw, calc(80vh * 16 / 9)); aspect-ratio: 16 / 9; }
.player-frame { position: relative; }
.player-frame video, .player-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-error {
  position: absolute; inset: auto var(--s-4) var(--s-6); margin: 0; padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); background: var(--cream); color: var(--ink); text-align: center; font-weight: 700;
}

/* ---- 20. 404 ---- */
.notfound { display: grid; place-items: center; min-height: 100vh; background: var(--cream) var(--kufiya); text-align: center; }
.notfound-main { display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-7) var(--gutter); max-width: 560px; }
.notfound-main img { height: 70px; width: auto; }
.notfound-code { margin: 0; font-family: var(--font-display); font-size: 6rem; line-height: 1; color: var(--caramel-ink); }
.notfound h1 { font-family: var(--font-display); font-size: var(--fs-2xl); }
.notfound-en { display: grid; justify-items: center; gap: var(--s-2); margin-block-start: var(--s-6); padding-block-start: var(--s-5); border-top: 1px solid var(--line); }
.notfound-en h2 { font-size: var(--fs-xl); }

/* ---- 21. Motion: reveal on scroll (only when JS is running) ---- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .profile-cover, [dir="rtl"] .profile-cover, .story-art, [dir="rtl"] .story-art { transform: none; }
}
@media (forced-colors: active) {
  .btn, .tab, .step, .lang-switch, .branch-phone, .branch-map, .social-pill { border: 1px solid ButtonText; }
}
@media print {
  .site-header, .mobile-bar, .hero-media, .process, .lightbox, .player { display: none !important; }
  .hero { min-height: 0; color: var(--ink); background: none; }
}
