/* Home sections below the intro (redesigned October 2026): "Selected work" project cards and the contact footer.
   Shares the intro's label, arrow and call-to-action styles (home-intro.css). Motion: initHomeSections (home-video-base.js). */
.home-work,.footer-wrap{--intro-muted:#5f6267}

/* Selected work */
.home-work{padding-top:calc(var(--section-padding) * .35);padding-bottom:calc(var(--section-padding) * .9)}
.hw-head{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;margin-bottom:clamp(32px,4vw,56px)}
.hw-title{margin:0;max-width:16em;font-size:clamp(28px,3vw,46px);font-weight:450;line-height:1.15;letter-spacing:-.02em;color:var(--color-dark);text-wrap:balance}
html[data-lang=ar] .hw-title{font-size:clamp(26px,2.7vw,40px);line-height:1.45;letter-spacing:normal}
html[data-lang=ar] .hw-title .ar{font-weight:600}
.hw-all{display:inline-flex;align-items:center;gap:.6em;flex:none;min-height:44px;color:var(--color-dark);font-size:17px;text-decoration:none;border-bottom:1px solid currentColor;transition:color .35s cubic-bezier(.4,0,.2,1)}
.hw-all:hover,.hw-all:focus-visible{border-bottom-width:2px}
.hw-all:hover .intro-arrow{transform:translateX(4px)}
html[dir=rtl] .hw-all:hover .intro-arrow{transform:scaleX(-1) translateX(4px)}

.hw-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(28px,3vw,44px) clamp(16px,1.8vw,28px)}
.hw-card a{display:flex;flex-direction:column;height:100%;color:var(--color-dark);text-decoration:none}
.hw-media{display:block;overflow:hidden;aspect-ratio:4/3;border-radius:14px;background:#eef0f2;box-shadow:inset 0 0 0 1px rgba(28,29,32,.06)}
.hw-media img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center;transition:transform .8s cubic-bezier(.4,0,.2,1)}
.hw-body{display:flex;flex:1;flex-direction:column;gap:8px;padding-top:18px}
.hw-top{display:flex;gap:.9em;font-size:14px;color:var(--intro-muted)}
.hw-index{font-variant-numeric:tabular-nums}
.hw-name{font-size:clamp(21px,1.7vw,26px);line-height:1.2;letter-spacing:-.01em;transition:color .35s cubic-bezier(.4,0,.2,1)}
html[data-lang=ar] .hw-name .ar{font-weight:600;letter-spacing:normal}
.hw-line{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:15px;line-height:1.55;color:var(--intro-muted)}
html[data-lang=ar] .hw-line{line-height:1.8}
.hw-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:14px;border-top:1px solid var(--color-border);font-size:14px}
.hw-meta .intro-arrow{width:18px;height:18px}
.hw-card a:hover .hw-media img{transform:scale(1.04)}
.hw-card a:hover .hw-name,.hw-card a:focus-visible .hw-name{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.2em}
.hw-card a:hover .hw-meta .intro-arrow{transform:translate(3px,-3px)}
html[dir=rtl] .hw-card a:hover .hw-meta .intro-arrow{transform:scaleX(-1) translate(3px,-3px)}
.hw-card a:focus-visible{outline:2px solid #1c1d20;outline-offset:6px;border-radius:14px}
.hw-foot{display:none}

@media (max-width:1024px){.hw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Phones: one swipeable row with the next card peeking in; the call to action moves under it. */
@media (max-width:720px){
  .hw-head{display:block}
  .hw-all{display:none}
  .hw-grid{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;margin-inline:calc(var(--container-padding) * -1);padding-inline:var(--container-padding);scroll-padding-inline:var(--container-padding);scrollbar-width:none}
  .hw-grid::-webkit-scrollbar{display:none}
  .hw-card{flex:0 0 84%;scroll-snap-align:start}
  .hw-foot{display:block;margin-top:32px}
}

/* Contact footer */
.footer .container.medium.hf{display:block;padding-bottom:calc(var(--section-padding) * .35)}
.hf-eyebrow{color:rgba(255,255,255,.62)}
.footer .hf h2{margin:0}
.hf-lead{margin:clamp(20px,2vw,28px) 0 0;max-width:34em;font-size:clamp(17px,1.3vw,20px);line-height:1.6;color:rgba(255,255,255,.72)}
html[data-lang=ar] .hf-lead{line-height:1.9}
.hf-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:clamp(32px,3.5vw,48px)}
.hf-btn{display:inline-flex;align-items:center;gap:.65em;min-height:56px;padding:0 1.5em;border:1px solid rgba(255,255,255,.24);border-radius:999px;color:#fff;font-size:17px;line-height:1;text-decoration:none;transition:background-color .35s cubic-bezier(.4,0,.2,1),border-color .35s cubic-bezier(.4,0,.2,1),color .35s cubic-bezier(.4,0,.2,1)}
.hf-btn:hover,.hf-btn:focus-visible{background:#f5f4ef;border-color:#f5f4ef;color:#1c1d20}
.hf-btn.is-primary{background:#f5f4ef;border-color:#f5f4ef;color:#1c1d20}
.hf-eyebrow .intro-dot{background:#f5f4ef}
.hf-btn.is-primary:hover,.hf-btn.is-primary:focus-visible{background:#fff;border-color:#fff;color:#1c1d20}
.hf-btn:focus-visible,.hf-more:focus-visible{outline:2px solid #f5f4ef;outline-offset:4px}
.hf-icon{flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.hf-ltr{direction:ltr;unicode-bidi:isolate}
.hf-more{display:inline-flex;align-items:center;gap:.6em;margin-top:28px;padding-bottom:4px;border-bottom:1px solid rgba(255,255,255,.3);color:rgba(255,255,255,.75);font-size:16px;text-decoration:none;transition:color .35s,border-color .35s}
.hf-more:hover{color:#fff;border-color:#fff}
.hf-more:hover .intro-arrow{transform:translateX(4px)}
html[dir=rtl] .hf-more:hover .intro-arrow{transform:scaleX(-1) translateX(4px)}
html[data-lang=ar] #timeSpan{direction:rtl}
/* Footer avatar: the bobblehead head video with no frame. The clip's background is the footer colour, and a soft
   elliptical mask hides any seam, so the head and its spring move freely beside the heading. */
.footer .profile-picture{width:.86em;height:1.3em;margin:-.3em .06em -.12em 0;vertical-align:middle;border-radius:0;overflow:visible;background:url("../video/bassuoni-footer-head-poster.jpg") center/contain no-repeat;transform:translateY(.1em);-webkit-mask-image:radial-gradient(ellipse 62% 62% at 50% 50%,#000 78%,transparent 100%);mask-image:radial-gradient(ellipse 62% 62% at 50% 50%,#000 78%,transparent 100%)}
html[dir=rtl] .footer .profile-picture{margin:-.3em 0 -.12em .06em}
.footer .profile-picture .profile-video{transform:none;border-radius:0;object-fit:contain}

@media (max-width:720px){
  .hf-actions{flex-direction:column}
  .hf-btn{justify-content:center;width:100%}
}

/* Opening: short pinned stretch. The story is the opening plus about one screen of scroll, which drives the
   scene (initBassuoniVideoStory). Reduced motion removes the stretch, so the page scrolls straight on. */
.bassuoni-story.story-enhanced{height:max(1280px,190svh)}
.bassuoni-story.story-enhanced.story-static{height:auto}
.video-story-enhanced .walk-on-scene{transform-origin:50% 60%;will-change:transform}
@media screen and (max-width:900px){.bassuoni-story.story-enhanced{height:max(1150px,185svh)}}

/* Menu button: its hover/open fill is now sand, so the bars turn ink to stay visible. */
.btn-hamburger .btn-click:hover .btn-bars::before,.btn-hamburger .btn-click:hover .btn-bars::after,
.btn-hamburger.active .btn-bars::before,.btn-hamburger.active .btn-bars::after{background:#1c1d20}

/* Selected work on sand, carrying the work page's breathing circles and moving strips of real screens
   (decorative copies: aria-hidden, untabbable). Both pause off screen and on hover (strips); reduced motion
   stops them and lets the strips scroll by hand. */
.home-work{position:relative;isolation:isolate;overflow:hidden;background:#f5f4ef}
.home-work + .footer-rounded-div .rounded-div{background:#f5f4ef}
.home-work .hw-media{background:#fff}
.hw-bg{position:absolute;inset:0 0 auto;z-index:-1;height:min(100%,1100px);overflow:hidden;pointer-events:none;-webkit-mask-image:linear-gradient(#000 65%,transparent);mask-image:linear-gradient(#000 65%,transparent)}
.hw-bg span{position:absolute;aspect-ratio:1;border-radius:50%;transform:scale(var(--from));animation:hw-breathe var(--time) ease-in-out var(--delay,0s) infinite alternate;will-change:transform}
.hw-bg .c1{width:min(92vw,620px);top:-16%;right:-30%;background:#e9e7de;--from:.86;--to:1.18;--time:8s}
.hw-bg .c2{width:min(122vw,840px);top:-26%;right:-44%;border:1.5px solid rgba(28,29,32,.14);--from:1.12;--to:.84;--time:8s}
.hw-bg .c3{width:min(68vw,440px);top:40%;left:-24%;background:rgba(28,29,32,.04);--from:.74;--to:1.2;--time:6.5s;--delay:-3s}
.hw-bg .c4{width:min(26vw,170px);bottom:16%;right:6%;background:#e9e7de;--from:.6;--to:1.3;--time:5s;--delay:-1.5s}
.hw-bg .c5{width:min(44vw,280px);bottom:-8%;left:34%;border:1.5px solid rgba(28,29,32,.14);--from:1.25;--to:.75;--time:6s;--delay:-4s}
@media (min-width:1040px){
  .hw-bg .c1{top:-30%;right:-8%}
  .hw-bg .c2{top:-46%;right:-19%}
  .hw-bg .c3{top:auto;bottom:-10%;left:-8%}
  .hw-bg .c4{bottom:30%;right:46%}
  .hw-bg .c5{bottom:auto;top:12%;left:38%}
}
html[dir=rtl] .hw-bg{transform:scaleX(-1)}
@keyframes hw-breathe{to{transform:scale(var(--to))}}

.hw-strip{display:grid;gap:12px;margin:clamp(28px,3.5vw,48px) calc(var(--container-padding) * -1) clamp(48px,6vw,88px);direction:ltr;-webkit-mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent);mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent)}
.hw-strip-row{overflow:hidden}
.hw-strip-track{display:flex;width:max-content;animation:hw-strip-move 60s linear infinite}
.hw-strip-row+.hw-strip-row .hw-strip-track{animation-duration:52s;animation-direction:reverse}
.hw-strip-track a{flex:none;width:172px;aspect-ratio:4/3;margin-right:12px;overflow:hidden;border:1px solid rgba(28,29,32,.14);border-radius:10px;background:#fff;box-shadow:0 12px 26px -18px rgba(28,29,32,.45);transition:transform .3s cubic-bezier(.4,0,.2,1)}
.hw-strip-track img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
.hw-strip-track a:hover{transform:translateY(-4px)}
.hw-strip:hover .hw-strip-track,.bassuoni-opening.is-paused .hw-strip-track,.home-work.is-paused .hw-bg span{animation-play-state:paused}
@keyframes hw-strip-move{to{transform:translateX(-50%)}}
@media (min-width:720px){.hw-strip{gap:16px}.hw-strip-track a{width:248px;margin-right:16px;border-radius:12px}}
@media (prefers-reduced-motion:reduce){.hw-strip-track,.hw-bg span{animation:none}.hw-strip-row{overflow-x:auto;scrollbar-width:none}}

/* Opening: the two moving strips run along the bottom of the first slide, under the walk-on video. Smaller
   screens than on the work page. */
.bassuoni-opening{--strip-thumb:120px;--strip-gap:10px;--strip-bottom:84px;--strip-h:calc(var(--strip-thumb) * 1.5 + var(--strip-gap))}
.bassuoni-opening .opening-strip{position:absolute;z-index:2;left:0;right:0;bottom:var(--strip-bottom);margin:0;gap:var(--strip-gap)}
.bassuoni-opening .opening-strip .hw-strip-track a{width:var(--strip-thumb);margin-right:var(--strip-gap);border-radius:8px;box-shadow:0 10px 22px -18px rgba(28,29,32,.45)}
/* The strips start hidden and rise in during the opening's scroll stretch (initBassuoniVideoStory), as the
   character moves up into the space the fading name leaves; the walk-on keeps its full size. */
.bassuoni-opening .opening-strip{opacity:0}
.story-static .bassuoni-opening .opening-strip{display:none}
@media screen and (max-width:900px){
  .bassuoni-opening{--strip-thumb:96px;--strip-gap:8px;--strip-bottom:70px}
}
/* Each track holds the row four times (two per loop half) so even wide screens never see its end; the loop
   distance doubles, so the durations double to keep the work page's pace. */
.bassuoni-opening .opening-strip .hw-strip-track{animation-duration:120s}
.bassuoni-opening .opening-strip .hw-strip-row+.hw-strip-row .hw-strip-track{animation-duration:104s}

/* Opening top bar (October 2026): the greeting moved beside the name, so the bar holds only the controls. */
.bassuoni-opening .nav-bar{justify-content:flex-end}
.bassuoni-opening .nav-bar .links-wrap{align-items:center;gap:4px}

/* Language switch: one control showing both languages; an ink pill slides to the current one. */
.lang-switch{position:relative;isolation:isolate;display:inline-grid;grid-template-columns:1fr 1fr;align-items:stretch;height:40px;padding:3px;border:1px solid rgba(28,29,32,.18);border-radius:999px;background:rgba(255,255,255,.6);color:#1c1d20;font:500 13px/1 'Dennis Sans',sans-serif;opacity:1;cursor:pointer;transition:border-color .35s cubic-bezier(.4,0,.2,1)}
.lang-switch::before{content:"";position:absolute;z-index:-1;top:3px;bottom:3px;left:3px;width:calc(50% - 3px);border-radius:999px;background:#1c1d20;transition:transform .4s cubic-bezier(.4,0,.2,1)}
html[data-lang=ar] .lang-switch::before{transform:translateX(100%)}
.ls-opt{display:grid;place-items:center;min-width:46px;padding:0 12px;border-radius:999px;color:rgba(28,29,32,.62);transition:color .35s cubic-bezier(.4,0,.2,1)}
.ls-opt[data-opt=ar]{font-family:Cairo,sans-serif;font-weight:600;letter-spacing:normal}
html[data-lang=en] .ls-opt[data-opt=en],html[data-lang=ar] .ls-opt[data-opt=ar]{color:#f5f4ef}
.lang-switch:hover{border-color:#1c1d20;opacity:1}
.lang-switch:hover .ls-opt{color:#1c1d20}
html[data-lang=en] .lang-switch:hover .ls-opt[data-opt=en],html[data-lang=ar] .lang-switch:hover .ls-opt[data-opt=ar]{color:#f5f4ef}
.lang-switch:focus-visible{outline:2px solid #1c1d20;outline-offset:3px}
@media (max-width:540px){.lang-switch{height:38px;font-size:12px}.ls-opt{min-width:40px;padding:0 10px}.home-lang-toggle.lang-switch{padding:3px}}

/* Menu: a dark pill with a two-line icon; it turns sand with an ink outline on hover, like the other dark buttons. */
.bassuoni-opening .btn-menu .menu-pill{display:inline-flex;align-items:center;gap:10px;height:40px;padding:0 18px 0 15px;border:0;border-radius:999px;background:#1c1d20;color:#f5f4ef;font:500 14px/1 'Dennis Sans',sans-serif;cursor:pointer;transition:background-color .35s cubic-bezier(.4,0,.2,1),color .35s cubic-bezier(.4,0,.2,1),box-shadow .35s cubic-bezier(.4,0,.2,1)}
.bassuoni-opening .btn-menu .menu-pill::after{display:none}
.bassuoni-opening .btn-menu .menu-pill .btn-text-inner{color:inherit}
html[data-lang=ar] .bassuoni-opening .btn-menu .menu-pill .ar{font-weight:600}
.bassuoni-opening .btn-menu .menu-pill:hover{background:#f5f4ef;color:#1c1d20;box-shadow:inset 0 0 0 1px #1c1d20}
.bassuoni-opening .btn-menu .menu-pill:focus-visible{outline:2px solid #1c1d20;outline-offset:3px}
.menu-icon{display:grid;gap:4px;width:15px}
.menu-icon i{display:block;height:1.5px;border-radius:2px;background:currentColor;transform-origin:0 50%;transition:transform .35s cubic-bezier(.4,0,.2,1)}
.menu-pill:hover .menu-icon i:last-child{transform:scaleX(.6)}
@media (max-width:540px){.bassuoni-opening .btn-menu .menu-pill{height:38px;padding:0 15px 0 13px;font-size:13px}}

/* Greeting directly above the name, aligned with its first letter. */
.bassuoni-opening .name-stack{display:inline-flex;flex-direction:column;align-items:flex-start;max-width:100%}
.hero-greeting{display:flex;align-items:center;gap:10px;margin:0 0 .5em;font-size:clamp(12px,1vw,15px);line-height:1.3;letter-spacing:.16em;text-transform:uppercase;color:rgba(28,29,32,.72)}
.hero-greeting::before{content:"";flex:none;width:26px;height:1px;background:currentColor}
html[data-lang=ar] .hero-greeting{letter-spacing:normal}
html[data-lang=ar] .hero-greeting .ar{font-family:Cairo,sans-serif;font-weight:600;font-size:1.1em}
.home-header.bassuoni-opening.video-first-opening .big-name{top:82px}
@media screen and (max-width:900px){.home-header.bassuoni-opening.video-first-opening .big-name{top:84px}}

/* Every language switch keeps EN on the left and عربي on the right. The floating menu's switch is the dark
   variant: a sand pill on the dark menu. */
.lang-switch{direction:ltr}
.menu-lang-toggle.lang-switch.is-dark{height:44px;padding:3px;border-color:rgba(255,255,255,.24);background:rgba(255,255,255,.06);color:#f5f4ef;font-size:14px}
.lang-switch.is-dark::before{background:#f5f4ef}
.lang-switch.is-dark .ls-opt{min-width:52px;color:rgba(255,255,255,.62)}
.lang-switch.is-dark:hover{background:rgba(255,255,255,.06);border-color:#f5f4ef;color:#f5f4ef}
.lang-switch.is-dark:hover .ls-opt{color:#f5f4ef}
html[data-lang=en] .lang-switch.is-dark .ls-opt[data-opt=en],html[data-lang=ar] .lang-switch.is-dark .ls-opt[data-opt=ar],
html[data-lang=en] .lang-switch.is-dark:hover .ls-opt[data-opt=en],html[data-lang=ar] .lang-switch.is-dark:hover .ls-opt[data-opt=ar]{color:#1c1d20}
.lang-switch.is-dark:focus-visible{outline-color:#f5f4ef}
@media (prefers-reduced-motion:reduce){.lang-switch::before,.lang-switch .ls-opt{transition:none}}
