/* Homepage · Selected projects: three bands through the scope (handoff 26 Nov 2026, built to spec) */
.sp{position:relative;overflow:hidden;height:940px;
  background:
    radial-gradient(60% 50% at 50% 46%,rgba(30,52,130,.30),transparent 72%),
    radial-gradient(90% 60% at 50% 108%,rgba(42,70,180,.34),transparent 70%),
    linear-gradient(180deg,#05070F 0%,#070C1C 52%,#050811 100%)}

.sp-grid{position:absolute;left:0;right:0;bottom:0;height:46%;opacity:.5;pointer-events:none;
  background:
    repeating-linear-gradient(90deg,rgba(120,160,255,.16) 0 1px,transparent 1px 64px),
    repeating-linear-gradient(0deg,rgba(120,160,255,.13) 0 1px,transparent 1px 44px);
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 55%,#000 100%);
          mask-image:linear-gradient(180deg,transparent 0,#000 55%,#000 100%);
  transform:perspective(520px) rotateX(62deg);transform-origin:bottom}

/* 2 · bands (direction:ltr so the Arabic page loops the same way, with no gap) */
.sp-band{position:absolute;left:0;right:0;height:230px;overflow:hidden;z-index:1;direction:ltr}
.sp-top{top:46px}
.sp-bot{bottom:46px}
.sp-mid{top:50%;transform:translateY(-50%);z-index:2}
.sp-track{display:flex;gap:30px;width:max-content;will-change:transform;direction:ltr}

.sp-card{position:relative;flex:none;width:408px;height:230px;border-radius:9px;overflow:hidden;display:block;
  box-shadow:0 10px 34px rgba(0,0,0,.5);transition:transform .4s ease,box-shadow .4s ease,opacity .4s ease,filter .4s ease;color:#fff;text-decoration:none}
.sp-card img{width:100%;height:100%;object-fit:cover;display:block}
.sp-card:hover{transform:translateY(-5px);box-shadow:0 16px 44px rgba(0,0,0,.62)}
.sp-card:focus-visible{outline:2px solid #9AB0FF;outline-offset:3px}

/* name and line: live text over the photo */
.sp-cap{position:absolute;left:0;right:0;bottom:0;padding:54px 22px 17px;text-align:left;pointer-events:none;
  background:linear-gradient(180deg,transparent 0%,rgba(4,6,12,.55) 42%,rgba(4,6,12,.9) 100%)}
.sp-cap b{display:block;font-family:Nasalization,var(--disp,sans-serif);font-weight:400;font-size:23px;line-height:1.1;letter-spacing:.01em;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.7);unicode-bidi:plaintext}
.sp-cap span{display:block;margin-top:6px;font-size:14px;line-height:1.3;color:#CBD4E4;text-shadow:0 1px 10px rgba(0,0,0,.7);unicode-bidi:plaintext}

/* direction and speed */
.sp-t1{animation:spRunL 46s linear infinite}
.sp-t2{animation:spRunR 52s linear infinite}
.sp-t3{animation:spRunL 50s linear infinite}
@keyframes spRunL{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}
@keyframes spRunR{from{transform:translate3d(-50%,0,0)}to{transform:translate3d(0,0,0)}}

/* 3 · the middle band goes pale across the centre */
.sp-mid{
  -webkit-mask-image:linear-gradient(90deg,#000 0%,#000 33%,rgba(0,0,0,.34) 42%,rgba(0,0,0,.09) 49%,rgba(0,0,0,.09) 51%,rgba(0,0,0,.34) 58%,#000 67%,#000 100%);
          mask-image:linear-gradient(90deg,#000 0%,#000 33%,rgba(0,0,0,.34) 42%,rgba(0,0,0,.09) 49%,rgba(0,0,0,.09) 51%,rgba(0,0,0,.34) 58%,#000 67%,#000 100%)}

/* 5 · settling layers */
.sp-glow{position:absolute;left:50%;top:50%;translate:-50% -50%;width:900px;height:520px;z-index:3;pointer-events:none;
  background:radial-gradient(closest-side,rgba(5,7,15,.9),rgba(5,7,15,.6) 50%,transparent 78%)}
.sp-scrim{position:absolute;left:50%;top:50%;translate:-50% -50%;width:920px;height:920px;z-index:4;pointer-events:none;
  background:radial-gradient(circle,rgba(5,7,15,.80) 0%,rgba(5,7,15,.66) 34%,rgba(5,7,15,.30) 58%,transparent 76%)}

/* 6 · the ring */
.sp-hud{position:absolute;left:50%;top:50%;translate:-50% -50%;width:830px;height:830px;z-index:5;pointer-events:none}
.sp-hud svg{display:block;width:100%;height:100%;overflow:visible}
.sp-hud svg path,.sp-hud svg circle{fill:none}
.sp-spin{animation:spSpin 60s linear infinite;transform-origin:50% 50%;transform-box:view-box}
.sp-spinR{animation:spSpin 86s linear infinite reverse;transform-origin:50% 50%;transform-box:view-box}
@keyframes spSpin{to{transform:rotate(360deg)}}

/* title block: unchanged design, on top */
.sp .sp-centre{z-index:6!important}
.sp .sp-centre:before{display:none!important}

/* filter chips dim what does not match */
.sp-card.is-dim{opacity:.22;filter:grayscale(1)}

/* 9 · paused while off screen */
.sp.is-off .sp-track,.sp.is-off .sp-spin,.sp.is-off .sp-spinR{animation-play-state:paused}

/* 8 · phones and tablets */
@media (max-width:900px){
  .sp{height:720px}
  .sp-band{height:180px}
  .sp-card{width:320px;height:180px}
  .sp-cap{padding:40px 16px 13px}
  .sp-cap b{font-size:19px}
  .sp-cap span{font-size:12.5px}
  .sp-hud{width:560px;height:560px}
  .sp-scrim{width:650px;height:650px}
}
/* phones: the filter chips wrap to two lines, so the section is 60px taller to keep the outer bands clear of the title */
@media (max-width:600px){.sp{height:780px}}
@media (prefers-reduced-motion:reduce){
  .sp-t1,.sp-t2,.sp-t3,.sp-spin,.sp-spinR{animation:none}
  .sp-band{overflow-x:auto;scrollbar-width:none}
}
