@import url('../construction.css');
.home-timeline {--timeline-bg:#e7e9dc;--timeline-accent:#425b3f;--timeline-track:#a0aa98;--timeline-muted:#505d4d;--timeline-border:#889480;--timeline-text:#394637}
.project-section {
  padding-block:clamp(3rem,7vw,7rem);
  color:var(--home-fg,#f5f3ed);
  scroll-margin-top:0;
}
.project-section * { box-sizing:border-box; }
.project-heading, .project-controls, .project-update-head { display:flex; align-items:end; justify-content:space-between; gap:1rem; }
.project-heading { margin-block-end:clamp(1.4rem,3vw,2.8rem); }
.project-heading-copy { max-width:64ch; }
.project-section .home-section-title { margin:0; line-height:1.2; }
.project-intro { margin:.65rem 0 0; line-height:1.75; color:var(--home-muted,#c1bbb0); }
.project-controls { align-items:center; flex:none; gap:.55rem; }
.project-circle,.project-text-button,.project-play {
  color:#f8f5ef; border:1px solid #ffffff30; background:#262523; cursor:pointer;
}
.project-circle { display:grid; place-items:center; min-width:44px; height:44px; border-radius:50%; font-size:1.35rem; }
.project-text-button,.project-play { min-height:40px; padding:.3rem 1rem; border-radius:3rem; font-size:.88rem; white-space:nowrap; }
.project-circle:disabled { opacity:.32; cursor:default; }
.project-circle:hover:enabled,.project-text-button:hover,.project-play:hover { background:#44413c; }
.project-feature-rail,.project-updates,.project-thumbs {
  display:flex; overflow-x:auto; gap:16px; padding-block:.25rem .5rem;
  scrollbar-width:none; scroll-snap-type:x mandatory; overscroll-behavior-inline:contain;
}
.project-feature-rail::-webkit-scrollbar,.project-updates::-webkit-scrollbar,.project-thumbs::-webkit-scrollbar { display:none; }
.project-feature,.project-update,.project-reel-stage {
  position:relative; overflow:hidden; isolation:isolate; border-radius:4px; background:#292622;
}
.project-feature { flex:0 0 calc((100% - 32px)/3); aspect-ratio:4/5; scroll-snap-align:start; }
.project-feature>img,.project-feature>video,.project-update>video,.project-reel-stage>video {
  display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
}
.project-feature::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(0deg,#142119ed,transparent 64%); }
.project-feature-copy { position:absolute; inset:auto 0 0; z-index:1; padding:clamp(1.15rem,2.3vw,2rem); padding-inline-end:70px; color:white; }
.project-category,.project-feature h3,.project-update h4 { margin:0; }
.project-category { margin-block-end:.35rem; font-size:.85rem; color:inherit; opacity:.86; }
.project-feature h3 { max-width:18ch; font-family:var(--home-display,inherit); font-size:clamp(1.15rem,2.1vw,1.65rem); line-height:1.42; }
.project-plus { position:absolute; z-index:2; inset-inline-end:1rem; bottom:1rem; background:#292622d9; font:400 30px/1 system-ui,sans-serif; }
.project-sheet {
  width:min(760px,calc(100vw - 28px)); max-height:calc(100svh - 34px); padding:0; border:1px solid #ffffff25;
  border-radius:24px; background:#24221e; color:#f7f4ee; overflow:auto;
}
.project-sheet::backdrop { background:#100f0bbb; backdrop-filter:blur(8px); }
.project-sheet-content { position:relative; padding:clamp(1.25rem,4vw,3rem); }
.project-close { position:absolute; z-index:1; inset-inline-end:14px; top:14px; }
.project-sheet-content .project-category { margin-block-start:0; padding-inline-end:40px; }
.project-sheet h3 { margin:.6rem 0; padding-inline-end:28px; font:600 clamp(1.55rem,3vw,2.4rem)/1.35 var(--home-display,inherit); }
.project-body { margin:.65rem 0 1.3rem; line-height:1.75; color:#d9d3ca; }
.project-sheet-media>video,.project-sheet-media>img { width:100%; max-height:55svh; display:block; border-radius:14px; object-fit:contain; background:#171613; }
.project-time { display:block; appearance:none; border:0; height:3px; background:#ffffff26; border-radius:3px; overflow:hidden; }
.project-time::-webkit-progress-bar { background:transparent; }
.project-time::-webkit-progress-value { background:#d4bc96; }
.project-time::-moz-progress-bar { background:#d4bc96; }
.project-controls .project-circle, .project-text-button { border-color:#9da799; background:transparent; color:var(--ink) }
.project-controls .project-circle:hover:enabled, .project-text-button:hover { background:#dce1d4 }
.project-text-button { min-height:44px; border-radius:4px }
.project-reel-stage, .home-room-stage { border-start-end-radius:clamp(26px,4vw,65px) }
.project-update-head { align-items:center; margin-block:clamp(1.6rem,4vw,3rem) .7rem; }
.project-update-head h3 { margin:0; font-size:clamp(1.05rem,1.8vw,1.4rem); }
.project-update { flex:0 0 calc((100% - 48px)/4); aspect-ratio:16/12; scroll-snap-align:start; }
.project-update>div { position:absolute; inset:auto 0 0; padding:1.7rem .95rem .85rem; color:#fff; background:linear-gradient(transparent,#0f0d0ace); }
.project-update time { color:#f0dfbe; font-size:.8rem; }
.project-update h4 { font-size:1rem; line-height:1.4; }
.project-reel-stage { aspect-ratio:16/9; max-height:78svh; }
.project-reel-stage::after { content:""; position:absolute; inset:45% 0 0; pointer-events:none; background:linear-gradient(transparent,#000b); }
.project-reel-caption,.project-play,.project-time { position:absolute; z-index:1; }
.project-reel-caption { inset-inline-start:clamp(1rem,3vw,2.3rem); bottom:clamp(1rem,3vw,2.3rem); color:white; max-width:70%; }
.project-reel-caption h3 { font:600 clamp(1.12rem,3vw,2.5rem)/1.35 var(--home-display,inherit); margin:0; }
.project-play { inset-inline-end:clamp(.75rem,2.5vw,2rem); bottom:clamp(.75rem,2.5vw,2rem); background:#20201ce8; }
.project-time { top:1rem; inset-inline-start:3%; width:94%; }
.project-thumbs { margin-top:.75rem; justify-content:center; }
.project-thumb { display:grid; gap:.42rem; padding:3px; border:0; color:var(--home-muted,#c1bbb0); border-radius:12px; cursor:pointer; background:none; text-align:start; flex:1 0 0; max-width:200px; scroll-snap-align:start; }
.project-thumb img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; border:2px solid transparent; border-radius:9px; }
.project-thumb[aria-pressed="true"] { color:var(--home-fg,#fff); }
.project-thumb[aria-pressed="true"] img { border-color:var(--home-gold,#e3d3b4); }
.project-thumb span { font-size:.84rem; line-height:1.45; }
@media(max-width:900px) {
  .project-feature { flex-basis:calc((100% - 16px)/2.2); }
  .project-update { flex-basis:calc((100% - 24px)/2.45); }
}
@media(max-width:620px) {
  .project-heading { flex-wrap:wrap; align-items:start; }
  .project-controls { max-width:100%; gap:.5rem; flex-wrap:wrap; }
  .project-controls .project-text-button { max-width:100%; white-space:normal; }
  .project-feature { flex-basis:84%; }
  .project-update-head { gap:.7rem; }
  .project-update { flex-basis:80%; }
  .project-thumbs { justify-content:start; gap:.6rem; }
  .project-thumb { flex:0 0 94px; }
  .project-play { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) {
  .project-feature-rail,.project-updates,.project-thumbs { scroll-behavior:auto; }
}
/* Signature entrance for «مراحل تنفيذ المشروع» (owner, 1 Dec): the title is
   wiped in, the figure counts up (project-sections.js), the stage rules draw
   one after another and each marker lands with a soft pulse. */
@media(prefers-reduced-motion:no-preference) {
  #progress.section-arrived .progress-heading h2 {animation:progress-title 1.1s cubic-bezier(.16,1,.3,1) backwards}
  #progress.section-arrived .progress-finishing {animation:progress-rise .9s cubic-bezier(.16,1,.3,1) .3s backwards}
  #progress.section-arrived .progress-overall {animation:progress-rise .9s cubic-bezier(.16,1,.3,1) .15s backwards}
  #progress.section-arrived .progress-stage {--stage-delay:calc(.45s + var(--stage-index) * 240ms)}
  #progress.section-arrived .progress-stage::before {
    transform-origin:right center;
    animation:home-stage-rule .7s cubic-bezier(.65,0,.35,1) var(--stage-delay) backwards;
  }
  html[dir=ltr] #progress.section-arrived .progress-stage::before {transform-origin:left center}
  #progress.section-arrived .stage-marker {
    animation:home-stage-mark .6s cubic-bezier(.34,1.56,.64,1) var(--stage-delay) backwards,
      stage-ping 1.3s ease-out calc(var(--stage-delay) + .35s) 1 backwards;
  }
  #progress.section-arrived .progress-stage strong {animation:progress-rise .7s cubic-bezier(.16,1,.3,1) calc(var(--stage-delay) + .12s) backwards}
  #progress.section-arrived .progress-detail {animation:progress-rise .9s cubic-bezier(.16,1,.3,1) 1.45s backwards}
  #progress.section-arrived .project-update {animation:progress-card 1s cubic-bezier(.16,1,.3,1) backwards}
  #progress.section-arrived .project-update:nth-child(2) {animation-delay:.12s}
  #progress.section-arrived .project-update:nth-child(3) {animation-delay:.24s}
  #progress.section-arrived .project-update:nth-child(n+4) {animation-delay:.36s}
  @keyframes progress-title {from {opacity:0;clip-path:inset(0 0 100% 0);translate:0 .45em} to {clip-path:inset(-20% 0 -20% 0)}}
  @keyframes progress-rise {from {opacity:0;translate:0 18px}}
  @keyframes progress-card {from {opacity:0;translate:0 48px;scale:.96}}
  @keyframes home-stage-mark {from {opacity:0;transform:scale(.4)}}
  @keyframes stage-ping {from {box-shadow:0 0 0 0 rgb(221 200 163 / .6)} to {box-shadow:0 0 0 16px rgb(221 200 163 / 0)}}
  @keyframes home-stage-rule {from {transform:scaleX(0)} to {transform:scaleX(1)}}
  @keyframes home-stage-rule-down {from {transform:scaleY(0)} to {transform:scaleY(1)}}
}
@media(prefers-reduced-motion:no-preference) and (max-width:700px) {
  html[dir] #progress.section-arrived .progress-stage::before {transform-origin:center top;animation-name:home-stage-rule-down}
}
.project-plus-icon { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round }
