/* مطبعة سينا — تنسيق الموقع (للموبايل أول)
   يعتمد على fonts/alexandria.css و tokens/tokens.css (الألوان والخط والكلاسات الجاهزة).
   الستايل العريض، نفس ستوريات إنستغرام: خلفية بأحمر سينا وعليها نقشة الزولية
   بالعنابي، لسان أبيض بيه الشعار، عناوين بيضاء عريضة (Alexandria 800–900)،
   رسومات ثلاثية الأبعاد، وأزرار وبطاقات بيضاء.
   الحركة كلها مأخوذة من عالم الطباعة: قالب ينفتح، تسجيل ألوان، مرور الحبر، خط طي، ونسيج. */

:root {
  --gutter: clamp(16px, 4.5vw, 40px);
  --maxw: 1160px;
  --header-h: 64px;
  --tab-w: 58px;                     /* لسان الشعار الأبيض بالهيدر */
  --tab-drop: 24px;                  /* شكد ينزل اللسان تحت الهيدر بأول الصفحة */
  --muted: rgba(255, 255, 255, .86); /* نص ثانوي على الأحمر ≈ 5.7:1 */
  --line: rgba(255, 255, 255, .38);  /* خطوط رفيعة على الأحمر */
  --ink-muted: var(--sina-muted);    /* نص ثانوي داخل البطاقات البيضاء */
  --card-line: var(--sina-line);
  --stroke: #8C807A;                 /* رصاصي أيقونة القياسات */
  --w-heavy: 800;
  --w-black: 900;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--sina-red);
}
/* شريط فوق الهيدر بلون الصفحة، يغطي منطقة الساعة والشبكة لما الموقع ياخذ الشاشة كلها */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: env(safe-area-inset-top, 0px);
  background: var(--sina-red);
}

/* الأحمر على body هم، مو بس html: بعض الاستضافات والمعاينات تحط للـ body خلفية بيضاء من عندها فتغطي لون الصفحة */
body {
  position: relative;
  z-index: 0;
  margin: 0;
  min-height: 100vh;
  background: var(--sina-red);
  color: var(--sina-white);
  font-family: var(--sina-font);
  font-size: 1rem;
  font-weight: var(--sina-w-regular);
  line-height: var(--sina-leading-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
html body { background-color: var(--sina-red); }   /* أقوى من body{background:#fff} مهما كان ترتيبه */
/* نقشة الزولية المفرغة بالعنابي فوق الأحمر، مثل الستوريات. نقشة وحدة للصفحة كلها وتمشي ويا التمرير،
   وحتى ورا مسرح القصة الثابت (المسرح شفاف)، فتحس الصفحة دا تنزل والعلبة واقفة تتحرك بمكانها */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--sina-red-deep);
  opacity: .42;
  -webkit-mask: url("../assets/pattern/sina-zoulia-mono-tile.svg") repeat 0 0 / 300px 135px;
          mask: url("../assets/pattern/sina-zoulia-mono-tile.svg") repeat 0 0 / 300px 135px;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: var(--w-black); line-height: 1.3; text-wrap: balance; }
p { text-wrap: pretty; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
button, input, textarea { font: inherit; color: inherit; }

a { color: var(--sina-white); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--sina-white); }
:focus-visible { outline: 3px solid var(--sina-white); outline-offset: 3px; }
::selection { background: var(--sina-white); color: var(--sina-red); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--sina-radius-pill);
  background: var(--sina-white);
  color: var(--sina-red);
  font-weight: var(--w-heavy);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--sina-red); }

.icon { width: 20px; height: 20px; flex: none; }

/* أيقونة العلبة الإيزومترية: الحافة المقصودة بالأحمر */
.box-icon { flex: none; overflow: visible; }
.box-icon .edge {
  fill: none;
  stroke: var(--sina-red);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* شريط الزولية بصيغة WebP */
.sina-band { background-image: url("../assets/pattern/border-band-tile.webp"); }

/* نقشة الزولية المفرغة بشفافية خفيفة داخل البطاقات البيضاء، تتلاشى على الأطراف */
.weave {
  position: absolute;
  pointer-events: none;
  z-index: -1;
  -webkit-mask: radial-gradient(closest-side, #000 35%, transparent 100%);
          mask: radial-gradient(closest-side, #000 35%, transparent 100%);
}
.weave > .sina-pattern-mono {
  width: 100%;
  height: 100%;
  -webkit-mask-size: 240px 108px;
          mask-size: 240px 108px;
}

/* شعار سينا مفرّغ بخط أبيض، مقصوص على حافة القسم ورا المحتوى */
.deco {
  position: absolute;
  z-index: -1;
  width: 560px;
  height: 470px;                   /* نسبة الشعار 489 × 410.61 */
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--sina-white);
  stroke-width: 2.4;
  stroke-linejoin: miter;
  max-width: none;
  opacity: .9;
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border: 2px solid var(--sina-white);
  border-radius: var(--sina-radius-pill);
  font-size: 1rem;
  font-weight: var(--w-heavy);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn--solid { background: var(--sina-white); color: var(--sina-red); }
.btn--solid:hover { background: var(--sina-cream-200); border-color: var(--sina-cream-200); color: var(--sina-red-deep); }
.btn--line { background: transparent; color: var(--sina-white); }
.btn--line:hover { background: var(--sina-white); color: var(--sina-red); }
.btn--sm { min-height: 42px; padding: 8px 18px; font-size: .9375rem; gap: 8px; }
.btn--sm .icon { width: 18px; height: 18px; }
.btn--block { width: 100%; }

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 6px;
  border-bottom: 2px solid var(--line);
  font-weight: var(--w-heavy);
  text-decoration: none;
  transition: border-color .25s var(--ease);
}
.link-cta:hover { border-bottom-color: var(--sina-white); }
.link-cta .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.link-cta:hover .icon { transform: translateX(-4px); }

/* ---------- التسمية فوق العناوين: إطار أبيض مدوّر بنصه معين ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 7px;
  border: 2px solid var(--sina-white);
  border-radius: var(--sina-radius-pill);
  color: var(--sina-white);
  font-size: var(--sina-size-xs);
  font-weight: var(--w-heavy);
  line-height: 1.5;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}

/* ---------- الهيدر: لسان أبيض بيه الشعار ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(166, 35, 40, .9);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
          backdrop-filter: saturate(1.2) blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .16);
}
/* خط تقدّم القصة تحت الهيدر */
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background: var(--sina-white);
  transform: scaleX(var(--story, 0));
  transform-origin: right center;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.site-header.in-story::after { opacity: 1; }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  color: var(--sina-white);
  text-decoration: none;
}
.brand:hover { color: var(--sina-white); }
.brand__tab {
  position: relative;
  align-self: flex-start;
  display: flex;
  flex: none;
  align-items: flex-end;
  justify-content: center;
  width: var(--tab-w);
  height: calc(var(--header-h) + var(--tab-drop));
  padding-bottom: 13px;
  background: var(--sina-white);
  transition: height .35s var(--ease), padding-bottom .35s var(--ease);
}
.brand__tab img { width: 66%; }
.brand__tab::after {                  /* الشريط الأبيض تحت اللسان، مثل الستوريات */
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -12px;
  height: 6px;
  background: var(--sina-white);
  transition: opacity .3s var(--ease);
}
.site-header.is-scrolled .brand__tab { height: var(--header-h); padding-bottom: 12px; }
.site-header.is-scrolled .brand__tab::after { opacity: 0; }
.brand__name { font-size: 1.0625rem; font-weight: var(--w-black); white-space: nowrap; }

.nav { display: none; }

/* ======================================================================
   الرئيسية: قصة العلبة
   بدون سكربت: صورة العلبة والنصوص بالترتيب. مع السكربت (is-live): مسرح
   ثابت بطول الشاشة، والتمرير يحرك العلبة. مع تقليل الحركة (is-static):
   رسمة القالب ثابتة والنصوص تحتها.
   ====================================================================== */
.story {
  position: relative;
  margin-top: calc(-1 * var(--header-h));     /* المسرح يبدأ ورا الهيدر */
}
.story__stage {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 32px;
  padding: calc(var(--header-h) + var(--tab-drop) + 28px) var(--gutter) 72px;
  text-align: center;                           /* بدون خلفية: نقشة الصفحة تبين وراه وتمشي ويا التمرير */
}
.story__svg,
.story__corner,
.story__dots,
.story__cue { display: none; }
.story__fallback { width: min(78vw, 380px); }
.story__captions { display: grid; gap: 44px; }
.story:not(.is-live):not(.is-static) .story__intro { order: -1; }

.story__intro h1 {
  font-size: clamp(1.5rem, .9rem + 3.5vw, 2.75rem);   /* ≈ 28px بموبايل عرضه 390 */
  line-height: 1.3;
}
.story__intro h1 .line { display: block; }
.story__intro h1 .accent { font-size: .74em; font-weight: var(--sina-w-bold); }

.story__cap { text-align: center; }
.story__num {                                   /* رقم المرحلة بمربع أبيض */
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--sina-white);
  color: var(--sina-red);
  font-size: 1.25rem;
  font-weight: var(--w-black);
  line-height: 1;
}
.story__cap h2 {
  margin-top: 10px;
  font-size: clamp(1.375rem, .95rem + 1.9vw, 2.125rem);   /* ≈ 22.6px بموبايل عرضه 390 */
  line-height: 1.3;
}
.story__cap p {
  max-width: 25em;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.65;
}
.story__lead {
  max-width: 23em;
  margin-inline: auto;
  color: var(--muted);
  font-size: .9375rem;
}
.story__lead strong { color: var(--sina-white); font-weight: var(--w-black); }
.story__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.story__actions .btn { min-height: 48px; padding: 10px 22px; }
.story__cap .story__count {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  margin: 0;
  color: var(--sina-white);
  line-height: 1;
}
.story__count span { font-size: clamp(2.75rem, 1.9rem + 4.2vw, 5rem); font-weight: var(--w-black); }
.story__count small { margin-top: 8px; color: var(--muted); font-size: .8125rem; font-weight: var(--sina-w-medium); }
.story__cap .story__count + h2 { margin-top: 10px; }

/* مفتاح خطوط القالب داخل النص */
.lg {
  display: inline-block;
  width: 20px;
  height: 0;
  margin-inline-end: 7px;
  vertical-align: middle;
  border-top: 2px solid var(--sina-white);
}
.lg--fold { border-top-style: dashed; }
.legend { display: flex; justify-content: center; gap: 18px; margin-bottom: 2px; color: var(--sina-white); font-weight: var(--sina-w-bold); }
.legend > span { display: inline-flex; align-items: center; }

/* عناصر الرسم: العلبة كريمية مطبوعة بالأحمر، والقالب على ورقة بيضاء */
.story__svg text { font-family: var(--sina-font); }
.story__svg .sf__line { fill: none; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.story__svg .sf__logo { fill: var(--sina-red); }
.story__svg .sf__logo--light { fill: var(--sina-white); }
.story__svg .sf__slogan { fill: var(--sina-red); font-family: var(--sina-font); font-weight: var(--w-black); }
.story__svg .sf__shade { fill: #000; }
.story__svg .story__sheet { fill: var(--sina-white); }
.story__svg .story__sheet-shadow { fill: var(--sina-red-deep); }
.story__svg .story__cm-line { fill: none; stroke: var(--sina-red); stroke-width: 1; opacity: .4; }
.dl__cut { fill: none; stroke: var(--sina-red); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; }
.dl__fold { fill: none; stroke: var(--sina-red); stroke-width: 1.1; stroke-dasharray: 5 4; }
.dl__dimline { fill: none; stroke: var(--sina-red); stroke-width: .9; }
.dl__tips { fill: var(--sina-red); }
.dl__label { fill: var(--sina-red); font-size: 12px; font-weight: var(--sina-w-bold); }
.dl__crop { fill: none; stroke: var(--sina-ink); stroke-width: .8; opacity: .55; }
.mini__edge { fill: none; stroke: rgba(240, 231, 213, .85); stroke-width: .8; vector-effect: non-scaling-stroke; }
.mini__line { fill: none; stroke: rgba(122, 24, 31, .38); stroke-width: .8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* --- مع السكربت: مسرح ثابت --- */
.story.is-live { height: 640vh; height: 640svh; }
.story.is-live .story__stage {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  display: block;
  height: calc(100vh - env(safe-area-inset-top, 0px));
  height: calc(100svh - env(safe-area-inset-top, 0px));
  padding: 0;
  overflow: hidden;
}
.story.is-live .story__svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.story.is-live .story__fallback { display: none; }

.story.is-live .story__intro {
  position: absolute;
  z-index: 2;
  top: calc(var(--header-h) + var(--tab-drop) + 22px);   /* العنوان يبدي تحت لسان الشعار */
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s;
}
.story.is-live:not([data-beat="0"]) .story__intro {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s .45s;
}

.story.is-live .story__captions {
  position: absolute;
  z-index: 2;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid;
  align-items: end;
  gap: 0;
}
.story.is-live .story__cap {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s;
}
.story[data-beat="0"] .story__cap[data-cap="0"],
.story[data-beat="1"] .story__cap[data-cap="1"],
.story[data-beat="2"] .story__cap[data-cap="2"],
.story[data-beat="3"] .story__cap[data-cap="3"],
.story[data-beat="4"] .story__cap[data-cap="4"],
.story[data-beat="5"] .story__cap[data-cap="5"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .6s var(--ease) .1s, transform .6s var(--ease) .1s, visibility 0s;
}

.story.is-live .story__cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: .8125rem;
}
.story__cue-line {
  position: relative;
  order: 2;
  width: 2px;
  height: 30px;
  overflow: hidden;
  background: var(--line);
}
.story__cue-line::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -40%;
  height: 40%;
  background: var(--sina-white);
  animation: cue 1.9s var(--ease) infinite;
}

.story.is-live .story__dots {
  position: absolute;
  z-index: 2;
  inset-inline-start: 10px;
  top: 50%;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .5s var(--ease);
}
.story.is-live:not([data-beat="0"]) .story__dots { opacity: 1; }
.story__dots li {
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--sina-white);
  transform: rotate(45deg);
  transition: background-color .35s var(--ease);
}
.story[data-beat="1"] .story__dots li:nth-child(-n+1),
.story[data-beat="2"] .story__dots li:nth-child(-n+2),
.story[data-beat="3"] .story__dots li:nth-child(-n+3),
.story[data-beat="4"] .story__dots li:nth-child(-n+4),
.story[data-beat="5"] .story__dots li { background: var(--sina-white); }

/* زوايا مثل حواف ورقة الطباعة */
.story.is-live .story__corner {
  display: block;
  position: absolute;
  z-index: 1;
  width: 16px;
  height: 16px;
  opacity: .55;
  pointer-events: none;
}
.story__corner::before,
.story__corner::after { content: ""; position: absolute; background: var(--sina-white); }
.story__corner::before { width: 16px; height: 1.5px; }
.story__corner::after { width: 1.5px; height: 16px; }
.story__corner--a { top: calc(var(--header-h) + var(--tab-drop) + 16px); left: 8px; }
.story__corner--b { top: calc(var(--header-h) + var(--tab-drop) + 16px); right: 8px; }
.story__corner--c { bottom: calc(8px + env(safe-area-inset-bottom)); left: 8px; }
.story__corner--d { bottom: calc(8px + env(safe-area-inset-bottom)); right: 8px; }
.story__corner--a::before, .story__corner--a::after { top: 0; left: 0; }
.story__corner--b::before, .story__corner--b::after { top: 0; right: 0; }
.story__corner--c::before, .story__corner--c::after { bottom: 0; left: 0; }
.story__corner--d::before, .story__corner--d::after { bottom: 0; right: 0; }

/* --- تقليل الحركة: رسمة ثابتة والنصوص تحتها --- */
.story.is-static .story__stage { display: flex; flex-direction: column; align-items: stretch; }
.story.is-static .story__intro { order: 1; }
.story.is-static .story__svg { display: block; order: 2; width: 100%; height: min(64svh, 520px); }
.story.is-static .story__captions { order: 3; }
.story.is-static .story__fallback { display: none; }

/* ---------- الأقسام ---------- */
.section {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(84px, 12vw, 136px);
}
.section__band { position: absolute; inset: 0 0 auto; }   /* شريط منسوج بين القصة وباقي الصفحة */

.section-head {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}
.section-head h2 {
  margin-top: 16px;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.875rem);
}
.section-head p:not(.eyebrow) {
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--sina-size-md);
}

/* ---------- شغلنا ---------- */
.works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 340px));
  justify-content: center;
  gap: 64px 40px;
  margin-top: clamp(44px, 6vw, 72px);
}
.work {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* الصورة بقوس أبيض، وحوله خط أبيض ثاني */
.work .sina-arch {
  position: relative;
  width: 100%;
  padding: 10px;
  border: 2px solid var(--sina-white);
  overflow: hidden;
}
.work .sina-arch > img { background: var(--sina-white); }
.work__title { margin-top: 24px; font-size: 1.5rem; }
.work__meta { margin-top: 4px; color: var(--muted); }
.work .link-cta { margin-top: 14px; }

.arch-fill {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 36 / 34;
  overflow: hidden;
  border-radius: var(--sina-arch);
  background: var(--sina-white);
}
.weave--fill { inset: -10%; opacity: .1; }
.insta-badge {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--sina-red);
  color: var(--sina-white);
  box-shadow: 0 0 0 10px rgba(166, 35, 40, .12);
}
.insta-badge svg { width: 42px; height: 42px; }

/* مكوّن القياسات (يظهر بالأعمال اللي إلها قياس) */
.dims-view {
  --box-stroke: rgba(255, 255, 255, .8);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin-top: 18px;
}
.dims-view + .dims-view { margin-top: 14px; }
.dims-view__label {                 /* اسم العلبة لما بالصورة أكثر من وحدة */
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--sina-white);
  font-size: .875rem;
  font-weight: var(--w-heavy);
}
.dims-view__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dims-view__cell + .dims-view__cell { border-inline-start: 1px solid var(--line); }
.dims-view__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .875rem;
}
.dims-view__head .box-icon { width: 16px; height: 18px; }
.dims-view .box-icon .edge { stroke: var(--sina-white); }
.dims-view__val { display: inline-flex; align-items: baseline; gap: 4px; color: var(--sina-white); }
.dims-view__val .n { font-size: 1.75rem; font-weight: var(--w-black); line-height: 1.2; }
.dims-view__val .u { font-size: .875rem; font-weight: var(--sina-w-medium); }

/* ---------- طريقة الطلب: خطوات بمربعات بيضاء على خط طي ---------- */
.steps {
  position: relative;
  display: grid;
  gap: 6px;
  max-width: 40rem;
  margin: clamp(40px, 6vw, 72px) auto 0;
  --line: 1;
}
.steps::before {                                   /* خط الطي المتقطع، ينرسم ويا التمرير */
  content: "";
  position: absolute;
  inset-inline-start: 21px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .75) 0 6px, transparent 6px 11px);
  clip-path: inset(0 0 calc((1 - var(--line)) * 100%) 0);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) clamp(88px, 25vw, 140px);
  align-items: center;
  column-gap: 14px;
  padding-block: 8px;
}
.step__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--sina-white);
  color: var(--sina-red);
  font-size: 1.5rem;
  font-weight: var(--w-black);
  line-height: 1;
}
.step h3 { font-size: 1.125rem; line-height: 1.35; }
.step p { margin-top: 4px; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.step__art { width: 100%; height: auto; }

/* ---------- حدد علبتك ---------- */
.order {
  display: grid;
  gap: 36px;
  margin-top: clamp(40px, 6vw, 72px);
}

/* بطاقة بيضاء بيها الرسم والقياسات */
.spec {
  --box-stroke: var(--stroke);
  background: var(--sina-white);
  color: var(--sina-ink);
  box-shadow: 0 28px 60px -32px rgba(31, 26, 29, .6);
}
.spec :focus-visible { outline-color: var(--sina-red); }
.spec__stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 8px 0 34px;
  border-bottom: 1px solid var(--card-line);
  background: var(--sina-cream-50);
}
.weave--stage { inset: -20% -10%; opacity: .07; }
.box3d {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 360px;
  margin-inline: auto;
}
.box3d .face--top { fill: var(--sina-cream-200); }
.box3d .face--l { fill: var(--sina-cream-100); }
.box3d .face--w { fill: var(--sina-white); }
.box3d .outline {
  fill: none;
  stroke: var(--stroke);
  stroke-width: 1.25;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.box3d .edge {
  fill: none;
  stroke: var(--sina-red);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: stroke-width .25s var(--ease), opacity .25s var(--ease);
}
.box3d[data-focus] .edge { opacity: .25; }
.box3d[data-focus="length"] .edge--length,
.box3d[data-focus="width"] .edge--width,
.box3d[data-focus="height"] .edge--height { opacity: 1; stroke-width: 4.5; }

.spec__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 12px;
  color: var(--ink-muted);
  font-size: .8125rem;
  text-align: center;
}

.dims__legend {
  display: block;
  width: 100%;
  padding: 18px 16px 0;
  color: var(--sina-ink);
  font-size: .9375rem;
  font-weight: var(--w-heavy);
  text-align: center;
}
.dims__legend span { color: var(--ink-muted); font-weight: var(--sina-w-regular); }
.dims__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 22px;
  cursor: text;
}
.dim + .dim { border-inline-start: 1px solid var(--card-line); }
.dim__head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: .9375rem;
  font-weight: var(--sina-w-medium);
}
.dim__head .box-icon { width: 20px; height: 22px; }
.dim__value {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--sina-red);
}
.dim__input {
  width: 4ch;
  min-width: 0;
  padding: 2px 0 4px;
  border: 0;
  border-bottom: 2px solid var(--card-line);
  border-radius: 0;
  background: transparent;
  color: var(--sina-red);
  font-size: clamp(1.5rem, .9rem + 3vw, 2.75rem);
  font-weight: var(--w-heavy);
  line-height: 1.15;
  text-align: center;
  transition: border-color .2s var(--ease);
}
.dim__input::placeholder { color: #C9BEB6; opacity: 1; }
.dim__input:focus { outline: none; border-bottom-color: var(--sina-red); }
.dim__input[aria-invalid="true"] { border-bottom-color: var(--sina-red); }
.dim__unit { font-size: var(--sina-size-sm); font-weight: var(--sina-w-medium); }

.details { display: grid; gap: 28px; align-content: start; }
.field__label {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: var(--w-heavy);
}
.field__label span { color: var(--muted); font-weight: var(--sina-w-regular); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--sina-white);
  border-radius: 12px;
  background: var(--sina-white);
  color: var(--sina-ink);
  line-height: 1.6;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input::placeholder { color: #8C807A; opacity: 1; }
.input:focus { outline: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .4); }
.input[aria-invalid="true"] { border-color: var(--sina-red-deep); box-shadow: 0 0 0 3px var(--sina-white); }
textarea.input { min-height: 108px; resize: vertical; }

.qty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qty__input {
  flex: 1 1 120px;
  max-width: 200px;
  color: var(--sina-red);
  font-size: 1.25rem;
  font-weight: var(--w-heavy);
  text-align: right;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 6px 16px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: var(--sina-radius-pill);
  background: transparent;
  color: var(--sina-white);
  font-size: .9375rem;
  font-weight: var(--w-heavy);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { border-color: var(--sina-white); }
.chip[aria-pressed="true"] { border-color: var(--sina-white); background: var(--sina-white); color: var(--sina-red); }

.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice label { position: relative; display: inline-flex; }
.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: var(--sina-radius-pill);
  font-weight: var(--sina-w-bold);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.choice span::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  transform: rotate(45deg);
  transition: background-color .2s var(--ease);
}
.choice label:hover span { border-color: var(--sina-white); }
.choice input:checked + span { border-color: var(--sina-white); background: var(--sina-white); color: var(--sina-red); }
.choice input:checked + span::before { background: var(--sina-red); }
.choice input:focus-visible + span { outline: 3px solid var(--sina-white); outline-offset: 3px; }

.hint { margin-top: 8px; color: var(--muted); font-size: .875rem; }
/* رسالة الخطأ على الأحمر: شارة بيضاء بيها كلام أحمر */
.field-error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 12px 6px;
  border-radius: 8px;
  background: var(--sina-white);
  color: var(--sina-red);
  font-size: .875rem;
  font-weight: var(--w-heavy);
}
.field-error::before { content: ""; flex: none; width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }
.field-error:empty { display: none; }
.spec .field-error { display: flex; justify-content: center; margin: 0; padding: 0 16px 16px; border-radius: 0; background: none; }
.spec .field-error:empty { display: none; }
.order__submit .hint { text-align: center; }

/* ---------- تواصل ---------- */
.contact__inner { display: grid; gap: 56px; align-items: center; }
.contact__text { text-align: center; }
.contact h2 { margin-top: 16px; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.875rem); }
.contact__lead { margin-top: 14px; color: var(--muted); font-size: var(--sina-size-md); }
.contact-list {
  max-width: 34rem;
  margin: 36px auto;
  border-top: 1px solid var(--line);
  text-align: start;
}
.contact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
}
.contact-list__key { color: var(--muted); font-size: .9375rem; }
.contact-list__val {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sina-white);
  font-size: 1.125rem;
  font-weight: var(--w-heavy);
  text-decoration: none;
}
.contact-list__val .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
a.contact-list__val:hover .icon { transform: translateX(-4px); }

/* المكان والتوصيل برسومات ثلاثية الأبعاد */
.places {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 18px;
  align-items: start;
}
.place { display: flex; flex-direction: column; align-items: center; text-align: center; }
.place__art { width: auto; height: clamp(116px, 34vw, 180px); object-fit: contain; margin-bottom: 12px; }
.place h3 { font-size: 1.125rem; line-height: 1.4; }
.place p { margin-top: 4px; color: var(--muted); font-size: .875rem; line-height: 1.6; }

/* ---------- الفوتر ---------- */
.site-footer { position: relative; text-align: center; }
.footer__inner { padding-block: 24px 44px; }

/* شريط المعلومات، مثل أسفل الستوريات */
.infobar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  max-width: 46rem;
  margin: 0 auto 52px;
  padding-block: 24px;
  border-block: 1px solid var(--line);
}
.infobar > li:first-child { grid-column: 1 / -1; }
.infobar > li { display: flex; justify-content: center; }
.infobar__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sina-white);
  text-align: start;
  text-decoration: none;
}
.infobar__ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
}
.infobar__ico svg { width: 34px; height: 34px; }
.infobar__ico--solid { border-radius: 10px; background: var(--sina-white); color: var(--sina-red); }
.infobar__ico--solid svg { width: 26px; height: 26px; }
.infobar__text { display: flex; flex-direction: column; line-height: 1.35; }
.infobar__text small { color: var(--muted); font-size: .8125rem; }
.infobar__text b { font-size: 1.0625rem; font-weight: var(--w-black); }

.footer__brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--sina-white);
  text-decoration: none;
}
.footer__brand:hover { color: var(--sina-white); }
.footer__weave {                     /* شعار الزولية بمربع أبيض */
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  background: var(--sina-white);
}
.footer__weave img { width: 92px; transform: translate(3.5%, -2.5%); }  /* زحّة بصرية للشعار وحده بالنص */
.footer__name { font-size: 1.25rem; font-weight: var(--w-black); }
.footer__tag { margin-top: 4px; font-size: var(--sina-size-md); font-weight: var(--sina-w-medium); }
.footer__meta { margin-top: 18px; color: var(--muted); font-size: .875rem; }

/* ---------- زخرفة الشعار المفرّغ: بس بالشاشات العريضة، على الحافة الفاضية من القسم.
   بالموبايل الأقسام مليانة والخطوط تطلع وكأنها إطارات حول الصور، فتنخفي ---------- */
.deco { display: none; }

/* ---------- الموبايل الصغير ---------- */
@media (max-width: 639.98px) {
  .dim__value { gap: 4px; }
  .dim__input { width: 3.7ch; }
  .dim__unit { font-size: var(--sina-size-xs); }
  .dim { padding-inline: 4px; }
  .choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
  .choice label { display: flex; }
  .choice span { flex: 1; justify-content: center; gap: 8px; padding: 10px; font-size: .875rem; }

  /* «شغلنا» شريط يتسحب للجانب: عمل واحد بكل مرة، وطرف العمل الجاي يبين حتى يعرف إن أكو بعد */
  .works {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    justify-content: start;
    gap: 18px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }
  .works > .work { scroll-snap-align: start; --d: 0ms !important; }
}

@media (max-width: 379.98px) {
  .brand__name { font-size: .9375rem; }
  .header__inner { gap: 10px; }
  .step { column-gap: 12px; }
}

@media (max-height: 700px) and (max-width: 959.98px) {
  .story__intro h1 { font-size: clamp(1.375rem, .8rem + 3vw, 2.125rem); }
  .story__cap h2 { font-size: 1.25rem; }
  .story__cap p, .story__lead { font-size: .875rem; }
  .story.is-live .story__cue { display: none; }
}

/* ---------- الشاشات الأكبر ---------- */
@media (min-width: 640px) {
  .dims__legend { padding-top: 22px; }
  .dim { padding: 16px 12px 26px; }
  .infobar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .infobar > li:first-child { grid-column: auto; }
}

@media (min-width: 880px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 22px; max-width: none; }
  .steps::before {
    inset-inline: 22px;
    top: 194px;                                   /* بنص المربعات: الرسمة 150 + 22 + نص المربع */
    bottom: auto;
    width: auto;
    height: 2px;
    background: repeating-linear-gradient(to left, rgba(255, 255, 255, .75) 0 6px, transparent 6px 11px);
    clip-path: inset(0 0 0 calc((1 - var(--line)) * 100%));
  }
  .step { grid-template-columns: 1fr; align-content: start; justify-items: start; padding: 0; }
  .step__art { order: -1; width: auto; max-width: 100%; height: 150px; object-fit: contain; margin-bottom: 22px; justify-self: center; }
  .step__num { margin-bottom: 16px; }
  .step h3 { font-size: 1.25rem; }

  /* على الحافة اليمين: يبين جزء الألف ومنحنى النون من الشعار، بدون ما يقطع الكلام */
  .deco { display: block; }
  .deco--how { inset-inline-start: -230px; top: 24px; width: 420px; height: 353px; }
  /* «شغلنا» مليان أعمال، فشعاره بالزاوية فوق جنب العنوان، وبس لما الشاشة تكفي حتى ما يقطع الكلام */
  .deco--work { display: none; inset-inline-start: -250px; top: -70px; width: 480px; height: 403px; }
}
@media (min-width: 1200px) {
  .deco--work { display: block; }
}

@media (min-width: 960px) {
  :root { --header-h: 76px; --tab-w: 66px; --tab-drop: 28px; }
  .nav { display: flex; gap: 30px; }
  .nav a {
    padding-block: 6px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: .9375rem;
    font-weight: var(--sina-w-bold);
    text-decoration: none;
    transition: color .2s var(--ease), border-color .2s var(--ease);
  }
  .nav a:hover { color: var(--sina-white); border-bottom-color: var(--sina-white); }

  /* القصة: النص يمين والرسم يسار */
  .story.is-live .story__intro {
    top: auto;
    bottom: calc(50vh + 56px);                    /* العنوان فوق كلام المرحلة (يبدي بنص الشاشة) بمسافة ثابتة */
    inset-inline: 6vw auto;
    width: min(40vw, 560px);
    text-align: start;
  }
  .story__intro h1 { font-size: clamp(2.375rem, 3.2vw, 3rem); }
  .story__cap p, .story__lead { font-size: 1rem; }
  .story.is-live .story__captions {
    top: 50vh;
    bottom: 8vh;
    inset-inline: 6vw auto;
    width: min(36vw, 480px);
    align-items: start;
  }
  .story.is-live .story__cap { text-align: start; }
  .story.is-live .story__cap p,
  .story.is-live .story__lead { margin-inline: 0; }
  .story.is-live .story__actions { justify-content: flex-start; }
  .story.is-live .story__cap .story__count,
  .story.is-live .story__cue { align-items: flex-start; }
  .story.is-live .legend { justify-content: flex-start; }
  .story.is-live .story__dots { inset-inline-start: 2.5vw; }
  .story.is-live .story__cap--end { align-self: center; }

  .order { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .spec { position: sticky; top: calc(var(--header-h) + 24px); }
  .details { padding-top: 8px; }
  .order__submit .btn--block { width: auto; min-width: 300px; }
  .order__submit .hint { text-align: start; }

  .contact__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 72px; }
  .contact__text { text-align: start; }
  .contact-list { margin-inline: 0; }
}

/* ---------- الحركة (تنطفي إذا الجهاز يطلب تقليل الحركة) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .story.is-live .story__intro > * { animation: rise .9s var(--ease) both; }
  .story.is-live .story__cap--start { animation: rise .9s var(--ease) .25s both; }

  .js [data-reveal] { opacity: 0; transform: translateY(18px); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .reveal-ready [data-reveal] {
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--d, 0s);
  }

  /* تسجيل الألوان: نسخة عنابية مزاحة من العنوان ترجع لمكانها، مثل ضبط الطبعة */
  .js [data-reveal] > h2 { text-shadow: 7px -5px 0 rgba(122, 24, 31, .75); }
  .reveal-ready [data-reveal].is-in > h2 {
    text-shadow: 0 0 0 rgba(122, 24, 31, 0);
    transition: text-shadow 1.3s var(--ease) .25s;
  }

  /* مرور الحبر: صورة العمل تنطبع من تحت لفوق وخط رفيع يمشي وياها */
  .js .work .sina-arch { clip-path: inset(100% 0 0 0); }
  .js .work .sina-arch::after {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 2px solid var(--sina-red);
    transform: translateY(100%);
    pointer-events: none;
  }
  .reveal-ready .work.is-in .sina-arch { clip-path: inset(0 0 0 0); transition: clip-path 1.5s var(--ease) .2s; }
  .reveal-ready .work.is-in .sina-arch::after {
    transform: translateY(0);
    opacity: 0;
    transition: transform 1.5s var(--ease) .2s, opacity .4s ease 1.6s;
  }

  /* نسيج: شعار الزولية بالفوتر ينحاك صف صف */
  .js .footer__weave img { clip-path: inset(0 0 100% 0); }
  .reveal-ready .footer__weave.is-in img { clip-path: inset(0 0 0 0); transition: clip-path 1.9s steps(18, end) .35s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes cue { to { top: 100%; } }
