/* طبقة المشهد الهندسي: تُحمَّل بعد site.css في كل الصفحات.
   تحفظ ألوان الصورة وإضاءتها الطبيعية، وتضع هوية النادي في النصوص والأزرار والتنقل. */

:root {
  --u: min(calc(100vh / 800), calc(100vw / 716));
  --cream: #F7F5EF;
  --on-scene: rgb(249 249 249 / 0.9);
  --night: #0a0b0c;
  --ease-film: cubic-bezier(.16, 1, .3, 1);
}
html, body { overflow-x: clip; }

/* ---------- الترويسة ---------- */
.has-scene .site-head {
  position: fixed; inset-inline: 0; inset-block-start: 0;
  background: transparent; border-color: transparent; color: var(--cream);
  /* تظهر فورًا: القائمة أول ما يبحث عنه الزائر، فلا تنتظر اكتمال المشهد */
  transition: background-color .45s ease, color .45s ease, border-color .45s ease;
}
.scene-ready .site-head, .no-scene .site-head { opacity: 1; transform: none; }
.has-scene .site-head .brand img { filter: brightness(0) invert(1); transition: filter .45s ease; }
.has-scene .site-head .nav-desk a:hover { background: rgb(255 255 255 / .12); }
.has-scene .site-head .nav-mobile summary { border-color: rgb(247 245 239 / .5); }
.has-scene .site-head.solid,
.has-scene .site-head:has(.nav-mobile[open]) { background: var(--paper); color: var(--ink); border-color: var(--line); }
.has-scene .site-head.solid .brand img,
.has-scene .site-head:has(.nav-mobile[open]) .brand img { filter: none; }
.has-scene .site-head.solid .nav-desk a:hover { background: var(--paper-2); }
.has-scene .site-head.solid .nav-mobile summary { border-color: var(--line-2); }
.has-scene .site-head .nav-desk a[aria-current="page"] { color: inherit; }
.has-scene .site-head.solid .nav-desk a[aria-current="page"] { color: var(--brand); }

/* ---------- المسار والمشهد ---------- */
.track { position: relative; height: 300vh; background: var(--night); }
.scene { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: var(--night); }
/* صورة المكتب تُحمَّل فقط في الصفحات التي تعرضها؛ الصفحات التي لها صورتها (data-img) لا تنزّلها */
html:not(.scene-ready) .track:not([data-img]) .scene { background: var(--night) url(../hero.webp) 46% 72% / cover; }
.scene-ready .scene { background-image: none; }
.cam { position: absolute; left: 0; top: 0; width: 1672px; height: 941px; transform-origin: 0 0; will-change: transform; }
.cam-img { width: 100%; height: 100%; max-width: none; user-select: none; -webkit-user-drag: none; }
.bloom {
  position: absolute; left: 72.7%; top: 35.6%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 244 214 / .95) 0, rgb(255 206 130 / .55) 9%, rgb(255 160 80 / .18) 28%, transparent 62%);
  mix-blend-mode: screen; pointer-events: none; will-change: transform, opacity;
}
.streak {
  position: absolute; left: 72.7%; top: 35.6%; width: 1800px; height: 46px; margin: -23px 0 0 -900px;
  background: radial-gradient(ellipse at center, rgb(255 226 170 / .6), transparent 70%); mix-blend-mode: screen; pointer-events: none;
}
.layer { position: absolute; inset: 0; pointer-events: none; }
.tint { background: linear-gradient(180deg, rgb(0 0 0 / .14), rgb(0 0 0 / .02) 30%, rgb(0 0 0 / .02) 70%, rgb(0 0 0 / .12)); }
.scrim { background: radial-gradient(ellipse 70% 80% at 50% 50%, rgb(14 10 6 / .42), rgb(10 7 4 / .72)); opacity: .2; }
.vignette { background: radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / .45)); }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.cloud { position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; max-width: none; opacity: 0; will-change: transform, opacity; }
.cloud.l { transform-origin: 0 50%; } .cloud.r { transform-origin: 100% 50%; } .cloud.b { transform-origin: 50% 100%; }
.whiteout { background: var(--paper); opacity: 0; }
.curtain { background: var(--night); opacity: 1; transition: opacity 1.1s ease; }
.track.mini .ln > span { transition-duration: .9s; }
.track.mini .intro-lead { transition-delay: .25s; }
.scene-ready .curtain { opacity: 0; }

.hud {
  position: absolute; inset-inline: var(--gutter); bottom: 28px; display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 13px; font-weight: 600; color: var(--cream); pointer-events: none;
  opacity: 0; transition: opacity 1s ease 1s; text-shadow: 0 2px 10px rgb(0 0 0 / .4);
}
.scene-ready .hud { opacity: 1; }
.stage { display: flex; gap: 14px; align-items: center; }
.stage b { font: 500 22px/1 var(--mono); }
.stage .sw { position: relative; overflow: hidden; height: 22px; width: 120px; }
.stage .sw span { position: absolute; inset: 0; transition: transform .7s var(--ease-film), opacity .7s; }
.stage .sw span.out { transform: translateY(-100%); opacity: 0; }
.stage .sw span.wait { transform: translateY(100%); opacity: 0; }
.bar { width: 160px; height: 2px; background: rgb(247 245 239 / .25); position: relative; margin-bottom: 8px; }
.bar i { position: absolute; inset: 0; background: var(--cream); transform-origin: 100% 50%; transform: scaleX(0); }
.cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--cream); transition: opacity .5s; pointer-events: none;
}
.cue i { width: 1px; height: 46px; background: linear-gradient(var(--cream), transparent); transform-origin: top; animation: cue 2.2s var(--ease-film) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- المحتوى فوق المشهد ---------- */
.track .content { position: absolute; inset: 0; z-index: 2; pointer-events: none; color: var(--cream); }
.track .content a, .track .content button { pointer-events: auto; }
.intro { position: absolute; top: calc(940vh / 8); left: 50%; width: calc(1280 * var(--u)); margin-left: calc(-640 * var(--u)); text-align: center; }
.eyebrow {
  font-size: calc(12 * var(--u)); font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--cream); margin-block-end: calc(14 * var(--u));
  text-shadow: 0 calc(4 * var(--u)) calc(14 * var(--u)) rgb(0 0 0 / .5); opacity: 0; transform: translateY(10px);
  transition: opacity 1s ease .05s, transform 1.2s var(--ease-film) .05s;
}
.intro.in .eyebrow { opacity: 1; transform: none; }
.scene-title {
  font-size: calc(68 * var(--u)); line-height: calc(84 * var(--u)); font-weight: 700; color: var(--cream); max-width: none; text-wrap: balance;
}
/* القناع يمتد 0.35em تحت السطر حتى تبقى نقاط الياء والفاء ظاهرة أثناء الكشف،
   والنص المخفي يبدأ على بعد 145% فلا يطل شيء منه من تحت القناع (حتى مع الميل 2°) */
.ln { display: block; clip-path: inset(-1em -1em -0.35em -1em); }
.ln > span { display: inline-block; transform: translateY(145%) rotate(-2deg); transform-origin: 100% 100%; transition: transform 1.25s var(--ease-film); }
.scene-title .ln { white-space: nowrap; }
.scene-title .ln > span { text-shadow: 0 calc(12 * var(--u)) calc(32 * var(--u)) rgb(0 0 0 / .5); }
.in .ln > span, .in.mask .ln > span { transform: none; }
.in .ln, .mask.in .ln { clip-path: inset(-1em -1em -1em -1em); transition: clip-path 0s 1.6s; }
/* عناوين الأقسام أسرع من عنوان المشهد: القارئ يصلها وهو يمرّر ويريد قراءتها فورًا، لا أن ينتظر حركتها */
.sheet-head .h2 .ln > span, .ab-head h2 .ln > span { transition-duration: .8s; }
.sheet-head .h2.in .ln, .ab-head h2.in .ln { transition-delay: 1.1s; }
.scene-title .ln:nth-child(2) > span { transition-delay: .09s; }
.scene-title .ln:nth-child(3) > span { transition-delay: .18s; }
.scene-title .ln:nth-child(4) > span { transition-delay: .27s; }
.intro-lead {
  font-size: calc(15 * var(--u)); line-height: 1.75; max-width: 46ch; margin: calc(26 * var(--u)) auto 0; color: var(--on-scene);
  text-shadow: 0 3px 14px rgb(0 0 0 / .6); opacity: 0; transform: translateY(14px); transition: opacity 1s ease .45s, transform 1.2s var(--ease-film) .45s;
}
.intro .actions { justify-content: center; margin-block-start: calc(26 * var(--u)); opacity: 0; transform: translateY(14px); transition: opacity 1s ease .6s, transform 1.2s var(--ease-film) .6s; }
.intro.in .intro-lead, .intro.in .actions { opacity: 1; transform: none; }
.track .btn-ring { border-color: rgb(247 245 239 / .7); }
.track .btn-ring:hover { background: rgb(255 255 255 / .12); }

/* الكتل المتقابلة حول محور المشهد */
.ico { width: calc(36 * var(--u)); height: calc(36 * var(--u)); margin-bottom: calc(24 * var(--u)); color: #F9F9F9;
  filter: drop-shadow(0 calc(4 * var(--u)) calc(10 * var(--u)) rgb(0 0 0 / .45)); }
.ico .d { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease-film) .1s; }
.ico .f { transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform .9s var(--ease-film) .35s; }
/* المشهد القصير في الصفحات الداخلية: العنوان ظاهر من أول شاشة */
.track.mini .intro { top: 34vh; }
.track.mini .scene-title { font-size: clamp(44px, calc(76 * var(--u)), 112px); line-height: 1.2; }
.track.mini .scene-title .ln { white-space: normal; }

/* ---------- الخروج من الغيوم إلى الصفحة ---------- */
.rise { position: relative; z-index: 3; margin-block-start: -68vh; }
.rise::before { content: ""; display: block; height: 30vh; background: linear-gradient(rgb(251 250 248 / 0), var(--paper)); }
.rise { background: linear-gradient(transparent 30vh, var(--paper) 30vh); }
.page-head.rise { padding-block-start: 0; }
.page-head.rise > .wrap { padding-block-start: clamp(8px, 2vw, 24px); }
.page-head.rise .page-head-text .lead:first-child { margin-block-start: 0; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); max-width: 30ch; font-weight: 500; }
.page-head.rise .page-head-text { display: grid; gap: 16px; justify-items: start; }
.page-head.rise .page-head-text .lead { margin: 0; }

/* التعريف بالنادي: أول ما يظهر بعد الغيوم */
.about-band .rise-body { padding-block: 24px var(--section); }
.ab-head { display: grid; gap: 28px; padding-block-end: clamp(32px, 4vw, 56px); border-block-end: 1px solid var(--line-2); }
/* العربية تحتاج سعة بين الأسطر: نقاط الياء والكاف والفاء تتداخل مع السطر المجاور تحت 1.25 تقريبًا */
.ab-head h2 { font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5.5rem); line-height: 1.38; }
.ab-head h2 .ln:last-child { color: var(--brand); }
.ab-head h2 .ln:nth-child(2) > span { transition-delay: .08s; }
.ab-head h2 .ln:nth-child(3) > span { transition-delay: .16s; }
.ab-note { display: grid; gap: 18px; justify-items: start; align-content: end; }
.ab-note p { font-size: var(--t-lead); line-height: 1.7; }
.ab-note .ksu { block-size: 54px; inline-size: auto; }
@media (min-width: 960px) {
  .ab-head { grid-template-columns: 1fr 380px; gap: 64px; align-items: end; }
}
.ab-media { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block-start: clamp(32px, 4vw, 56px); }
.ab-media .ph:first-child { grid-column: 1 / -1; }
.ab-media figcaption { grid-column: 1 / -1; font-size: var(--t-small); color: var(--ink-soft); }
@media (min-width: 960px) {
  .ab-media { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
  .ab-media .ph:first-child { grid-column: auto; grid-row: span 2; aspect-ratio: auto; }
  .ab-media .ph:first-child img { position: absolute; inset: 0; }
}
.about-band .stats2 dd { font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4.5rem); }

/* ---------- عناوين الأقسام بلغة المشهد ---------- */
.sheet-head .h2 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem); line-height: 1.3; }
.mask .ln { display: inline-block; vertical-align: top; }
.has-scene .page-head .h1 .ln, .ab-head h2 .ln { display: block; }
.sheet-head .lead { opacity: 1; }

/* الصور تنكشف من الأسفل مع تقريب هادئ */
.js .rv .ph img, .js .ph.rv img, .js .rv.ph img {
  clip-path: inset(100% 0 0 0); transform: scale(1.14);
  transition: clip-path .7s var(--ease-film), transform .8s var(--ease-film), filter .4s ease;
  transition-delay: calc(var(--i, 0) * 70ms + 60ms);
}
.js .rv.in .ph img, .js .ph.rv.in img, .js .rv.in.ph img { clip-path: inset(0 0 0 0); transform: none; }
@media (hover: hover) and (pointer: fine) {
  .js .rv.in a:hover .ph img, .js a.rv.in:hover .ph img { transform: scale(1.03); transition: transform .3s var(--ease-out), filter .3s ease; }
  .js .rv.in a:hover .ph.whole img, .js a.rv.in.whole:hover img { transform: none; }
}
.sv { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .7s var(--ease-film); transition-delay: calc(var(--i, 0) * 70ms); }
.sv.in { opacity: 1; transform: none; }

/* ---------- انضم إلى النادي: حقل بنفسجي فوقه المشهد نفسه ---------- */
.join-band { position: relative; overflow: hidden; isolation: isolate; }
.jb-bg { position: absolute; inset: -12% 0; z-index: -1; background: url(../hero/blueprint.webp) 70% 40% / cover; opacity: .2; mix-blend-mode: luminosity; will-change: transform; }
.join-band .sheet-head .h2 { font-size: clamp(2.75rem, 1.2rem + 5vw, 6rem); }

/* ---------- الجوال والعرض الطولي ---------- */
@media (max-width: 609px), (orientation: portrait) {
  :root { --u: min(calc(100vw / 390), 1.6px); }
  .track .content { padding: 112vh 22px 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .intro { position: static; width: auto; margin: 0; }
  .track.mini .content { padding-block-start: 30vh; }
  .track.mini .intro { position: static; }
  .eyebrow { font-size: 14px; }
  .scene-title { font-size: clamp(44px, calc(56 * var(--u)), 80px); line-height: 1.22; }
  .intro-lead { font-size: 16px; }
  .hud .bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ln > span, .sv, .eyebrow, .intro-lead, .intro .actions, .ico .d, .ico .f, .js .rv .ph img, .js .ph.rv img { transition: none !important; }
  .ln > span { transform: none; }
  .ln { clip-path: none !important; }
  .cue i { animation: none; }
}

/* الجوال: عنوان المشهد القصير أصغر، وظل خفيف خلف الترويسة الشفافة حتى لا تتداخل مع النصوص المارّة تحتها */
@media (max-width: 609px), (orientation: portrait) {
  .track.mini .scene-title { font-size: clamp(40px, 12vw, 60px); }
  .has-scene .site-head:not(.solid) { background: linear-gradient(rgb(10 11 12 / .55), rgb(10 11 12 / 0)); }
}

/* ---------- الصفحات التي تفتح مباشرة على عنوانها (الرعاة، الإنجازات، الانضمام) ---------- */
.no-scene .page-plain { padding-block-start: clamp(28px, 4vw, 64px); }
.page-plain .h1 { margin: 0; }
.page-plain .page-head-text { display: grid; gap: 16px; justify-items: start; }
.page-plain .page-head-text .lead { margin: 0; }
/* الرعاة: العنوان ثم الشعارات في الشاشة الأولى */
.sp-open .lead { margin-block-start: 14px; max-width: 52ch; }
.sp-open .sponsors { margin-block-start: clamp(24px, 3vw, 40px); }
.sp-open { padding-block-end: clamp(48px, 6vw, 96px); }
