/* ==========================================================================
   العمران المتقن — home page (front-page.php + template-parts/home/*)
   Desktop-first like main.css: base = desktop, then max-width overrides
   (≤1099 tablet · ≤699 mobile; hero composition ≤999, process timeline ≤899).
   Section rhythm: hero (dark) · stats card · products (sand) · why (white)
   · clients (sand) · process (dark) · projects (white) · quality (sand).
   ========================================================================== */

/* Editor-only hints for hidden sections */
.home-hint{padding-block:6px}

/* ---------- 1. Hero ---------- */
.home-hero{--home-overlap:0px;position:relative;isolation:isolate;display:flex;align-items:center;min-height:clamp(600px,100vh,1000px);min-height:clamp(600px,100svh,1000px);padding:calc(var(--header-h) + clamp(24px,4vh,64px)) 0 calc(var(--home-overlap) + clamp(32px,6vh,88px));background:var(--c-forest-900);color:#fff;overflow:hidden}
.home-hero--has-stats,.home-stats{--home-overlap:clamp(44px,5vw,72px)}
.home-hero__media{position:absolute;inset:0;z-index:-1;overflow:hidden}
.home-hero__picture,.home-hero__img,.home-hero__video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.home-hero__video{opacity:0;transition:opacity 1.2s var(--ease)}
.home-hero__video.is-playing{opacity:1}
.home-hero__overlay{position:absolute;inset:0;pointer-events:none}
.home-hero--overlay-light{--o1:.74;--o2:.42;--o3:.08}
.home-hero--overlay-medium{--o1:.86;--o2:.58;--o3:.2}
.home-hero--overlay-strong{--o1:.93;--o2:.8;--o3:.48}
/* Dark gradient behind the text (inline-start = right), lighter towards the image side. */
.home-hero--image .home-hero__overlay,.home-hero--video .home-hero__overlay{background:linear-gradient(to left,rgba(13,21,18,var(--o1)) 0%,rgba(13,21,18,var(--o2)) 46%,rgba(13,21,18,var(--o3)) 100%),linear-gradient(to top,rgba(13,21,18,.55),rgba(13,21,18,0) 34%),linear-gradient(to bottom,rgba(13,21,18,.42),rgba(13,21,18,0) 24%)}

/* Brand default: dark green, warm glow and thin rings behind the stone circles (inline-end side). */
.home-hero--motif{background:radial-gradient(ellipse 58% 68% at 24% 50%,rgba(217,159,62,.14),transparent 62%),linear-gradient(160deg,var(--c-forest-800) 0%,var(--c-forest-900) 52%,var(--c-forest-950) 100%)}
.home-hero--motif .home-hero__media::before,.home-hero--motif .home-hero__media::after{content:"";position:absolute;aspect-ratio:1;border-radius:50%;pointer-events:none}
.home-hero--motif .home-hero__media::before{width:min(76vw,960px);inset-inline-end:calc(24% - min(38vw,480px));top:calc(50% - min(38vw,480px));border:1px solid rgba(255,255,255,.07)}
.home-hero--motif .home-hero__media::after{width:min(50vw,620px);inset-inline-end:calc(24% - min(25vw,310px));top:calc(50% - min(25vw,310px));border:1px solid rgba(217,159,62,.16)}
.home-hero--motif:not(.home-hero--video) .home-hero__overlay{background:linear-gradient(to left,rgba(21,32,28,.55),rgba(21,32,28,0) 55%)}

/* Desktop composition: 3 × 2 stone circles, middle column offset (staggered). */
.home-hero .stone-motif--hero{--dot:clamp(112px,10.6vw,150px);--g:clamp(14px,1.25vw,20px);inset:auto;inset-inline-end:max(var(--gutter),calc((100% - var(--container)) / 2));top:calc(50% + (var(--header-h) - var(--home-overlap)) / 2 - var(--dot) / 4);transform:translateY(-50%);display:grid;grid-template-columns:repeat(3,var(--dot));gap:var(--g)}
.home-hero .stone-motif--hero .stone-motif__dot{position:relative;inset:auto;width:var(--dot);opacity:1;animation:home-dot-in 1s var(--ease) both}
.home-hero .stone-motif--hero .stone-motif__dot:nth-child(3n+2){translate:0 calc(var(--dot) / 2);animation-delay:.12s}
.home-hero .stone-motif--hero .stone-motif__dot:nth-child(3n+1){opacity:.5;animation-delay:.24s}
.home-hero .stone-motif--hero .stone-motif__dot--2{outline:1px solid rgba(232,182,90,.5);outline-offset:10px}
@keyframes home-dot-in{from{opacity:0;scale:.9}}

.home-hero__inner{position:relative}
.home-hero__content{max-width:min(640px,54%)}
.home-hero__palette{display:none}
.home-hero__eyebrow{margin-bottom:18px}
.home-hero__title{font-size:clamp(36px,min(4.5vw,8.6vh),70px);line-height:1.18;font-weight:700;color:#fff}
.home-hero__title .accent{display:block;color:var(--c-gold-400)}
.home-hero__sub{max-width:600px;margin:clamp(14px,2.4vh,22px) 0 0;color:rgba(255,255,255,.84);font-size:clamp(16px,1.3vw,19px);line-height:1.85}
.home-hero__actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 14px;margin-top:clamp(22px,4vh,36px)}
.home-hero__catalog{border-color:rgba(255,255,255,.3);background:transparent;color:rgba(255,255,255,.88);font-weight:500;backdrop-filter:none}
.home-hero__catalog .icon{width:19px;height:19px;opacity:.85}
.home-hero .admin-hint{max-width:560px;margin-top:22px;color:#fff;background:rgba(217,159,62,.12)}
.home-hero .admin-hint a{color:var(--c-gold-300)}
.home-hero .admin-hint small{color:rgba(255,255,255,.6)}

/* ---------- Stats strip (raised card over the hero's bottom edge) ---------- */
.home-stats{position:relative;z-index:2;margin-top:calc(-1 * var(--home-overlap))}
.home-stats__card{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:clamp(22px,2.4vw,34px) 0;background:var(--c-sand-50);border-radius:var(--radius-l);box-shadow:var(--shadow-l)}
.home-stats__card--1{grid-template-columns:minmax(0,1fr)}
.home-stats__card--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.home-stats__card--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.home-stats__item{padding:6px clamp(14px,2.2vw,32px);text-align:center}
.home-stats__item+.home-stats__item{border-inline-start:1px solid var(--c-line)}
.home-stats .stat__value{justify-content:center;flex-wrap:wrap;color:var(--c-forest-800);font-size:clamp(30px,3.2vw,46px)}
.home-stats .stat__prefix,.home-stats .stat__unit{color:var(--c-bronze)}
.home-stats .stat__prefix:empty,.home-quality .stat__prefix:empty{display:none}
.home-stats .stat__label{margin-top:10px;color:var(--c-ink-2);font-size:15px;line-height:1.6}

/* ---------- 2. Products carousel ---------- */
.home-products{padding-top:clamp(56px,7vw,100px)}
.home-products__all{flex:none;margin-bottom:4px}
.home-products .carousel__track{padding-block:10px 24px;margin-block:-10px -24px}
.home-products__slide{display:flex}
.home-products__slide>.product-card{flex:1;width:100%}
.home-products__carousel.is-static .carousel__controls{display:none}

/* ---------- 3. Why (split editorial layout) ---------- */
.home-why__grid{display:grid;grid-template-columns:minmax(0,6fr) minmax(0,4fr);gap:clamp(36px,6vw,96px);align-items:start}
.home-why__content{grid-column:1;grid-row:1}
.home-why__visual{grid-column:2;grid-row:1;position:sticky;top:calc(var(--header-h) + 28px)}
.home-why--text .home-why__grid{grid-template-columns:minmax(0,1fr)}
.home-why--text .home-why__content{max-width:780px}
.home-why__stage{aspect-ratio:4/5;max-height:min(620px,calc(100vh - var(--header-h) - 130px));box-shadow:var(--shadow)}
.home-why__stage .fade-slider__slide,.home-why__stage .fade-slider__slide.is-active{position:absolute;inset:0}
.home-why__picture{display:block;width:100%;height:100%}
.home-why__caption{position:absolute;top:16px;inset-inline-start:16px;display:inline-flex;align-items:center;gap:10px;max-width:calc(100% - 32px);padding:7px 14px;border-radius:var(--radius-pill);background:rgba(15,24,21,.74);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:#fff;font-size:var(--fs-sm);font-weight:500;line-height:1.5}
.home-why__caption-num{color:var(--c-gold-400);font-weight:700;font-variant-numeric:tabular-nums}
.home-why .section-head{margin-bottom:clamp(24px,3vw,40px)}
.home-why__pillars{list-style:none;border-top:1px solid var(--c-line)}
.home-why__pillar{display:grid;grid-template-columns:clamp(46px,4.6vw,68px) minmax(0,1fr);gap:12px;padding-block:clamp(18px,2vw,26px);border-bottom:1px solid var(--c-line)}
.home-why__num{font-size:clamp(22px,2vw,28px);font-weight:700;line-height:1.25;color:var(--c-gold-700);font-variant-numeric:tabular-nums}
.home-why__pillar-title{font-size:var(--fs-h3);line-height:1.45}
.home-why__pillar-text{max-width:60ch;margin-top:6px;color:var(--c-ink-2);font-size:15.5px;line-height:1.8}
.home-why__actions{margin-top:clamp(28px,3.4vw,40px)}

/* ---------- 4. Clients (horizontal logo strip) ---------- */
.home-clients{padding-block:clamp(48px,6vw,84px);background:var(--c-sand-100)}
.home-clients__title{display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:clamp(26px,3.4vw,44px);color:var(--c-ink-2);font-size:clamp(17px,1.5vw,20px);font-weight:600;line-height:1.6;text-align:center}
.home-clients__title::before,.home-clients__title::after{content:"";flex:1 1 40px;max-width:200px;height:1px;background:var(--c-line-strong)}
.home-clients__list{display:flex;align-items:center;gap:clamp(28px,4vw,60px);list-style:none;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding-block:8px}
.home-clients__list::-webkit-scrollbar{display:none}
.home-clients__item{flex:0 1 clamp(110px,11vw,160px);min-width:96px;margin-inline:auto}
.home-clients__logo{display:grid;place-items:center;width:100%;height:clamp(52px,5vw,68px);color:var(--c-ink-2)}
.home-clients__logo img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;filter:grayscale(1);opacity:.7;transition:filter .3s var(--ease),opacity .3s var(--ease)}
.home-clients__logo:hover img,.home-clients__logo:focus-visible img{filter:none;opacity:1}
.home-clients__logo--text span{font-size:15px;font-weight:600;line-height:1.4;text-align:center}
.home-clients__strip.is-overflowing{-webkit-mask-image:linear-gradient(to left,transparent,#000 7%,#000 93%,transparent);mask-image:linear-gradient(to left,transparent,#000 7%,#000 93%,transparent)}
.home-clients__strip.is-overflowing .home-clients__item{margin-inline:0}

/* ---------- 5. Supply journey (process timeline) ---------- */
.home-process__steps{--node:64px;--sgap:clamp(20px,2.6vw,40px);display:grid;grid-template-columns:repeat(var(--steps,4),minmax(0,1fr));gap:var(--sgap);list-style:none}
.home-process__step{position:relative}
.home-process__num{display:block;height:20px;margin-bottom:14px;color:var(--c-gold-400);font-size:var(--fs-sm);font-weight:700;line-height:20px;font-variant-numeric:tabular-nums}
.home-process__node{position:relative;z-index:1;display:grid;place-items:center;width:var(--node);height:var(--node);border:1px solid rgba(217,159,62,.55);border-radius:50%;background:var(--c-forest-800);color:var(--c-gold-400)}
.home-process__node .icon{width:26px;height:26px}
.home-process__step:not(:last-child)::after{content:"";position:absolute;top:calc(34px + var(--node) / 2);inset-inline-start:calc(var(--node) + 12px);inset-inline-end:calc(12px - var(--sgap));height:1px;background:linear-gradient(to left,rgba(217,159,62,.65),rgba(255,255,255,.16))}
.home-process__title{margin-top:22px;font-size:var(--fs-h3);line-height:1.45;color:#fff}
.home-process__text{margin-top:8px;color:rgba(255,255,255,.72);font-size:15.5px;line-height:1.85}

/* ---------- 6. Projects (showcase grid) ---------- */
.home-projects__grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);grid-auto-rows:minmax(clamp(250px,22vw,300px),auto);gap:clamp(16px,2vw,24px)}
.home-projects__item{display:flex;min-width:0}
.home-projects__item:first-child{grid-row:span 2}
.home-projects__card{flex:1;min-height:0}
.home-projects__card--featured .project-card__body{padding:clamp(24px,3vw,40px)}
.home-projects__card--featured .project-card__title{font-size:clamp(22px,2.2vw,30px)}
.home-projects__grid--1{grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(clamp(320px,36vw,480px),auto)}
.home-projects__grid--1 .home-projects__item:first-child,.home-projects__grid--2 .home-projects__item:first-child{grid-row:auto}
.home-projects__grid--2{grid-auto-rows:minmax(clamp(320px,32vw,440px),auto)}
.home-projects__actions{display:flex;justify-content:center;margin-top:clamp(32px,4vw,52px)}

/* ---------- 7. Quality & accreditations ---------- */
.home-quality__top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,6vw,96px);align-items:start}
.home-quality__top--single{grid-template-columns:minmax(0,1fr)}
.home-quality__intro .section-head{margin-bottom:0}
.home-quality__method{padding:clamp(24px,3vw,40px);border:1px solid var(--c-line);border-radius:var(--radius-l);background:var(--c-sand-50)}
.home-quality__subtitle{margin-bottom:16px;font-size:var(--fs-h3);line-height:1.45}
.home-quality__list{display:grid;list-style:none}
.home-quality__list li{display:flex;align-items:flex-start;gap:14px;padding-block:13px;border-bottom:1px solid var(--c-line);font-size:var(--fs-base);line-height:1.75}
.home-quality__list li:first-child{padding-top:0}
.home-quality__list li:last-child{padding-bottom:0;border-bottom:0}
.home-quality__list .icon{width:26px;height:26px;margin-top:1px;padding:5px;border-radius:50%;background:var(--c-forest-800);color:var(--c-gold-400);stroke-width:2.6}
.home-quality__stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 32px;margin-top:32px;padding-top:28px;border-top:1px solid var(--c-line)}
.home-quality .stat__value{color:var(--c-forest-800);font-size:clamp(28px,2.8vw,40px)}
.home-quality .stat__prefix,.home-quality .stat__unit{color:var(--c-bronze)}
.home-quality__certs{margin-top:clamp(48px,6vw,80px)}
.home-quality .admin-hint{margin-top:clamp(32px,4vw,48px)}
.home-certs{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:clamp(14px,1.8vw,24px);list-style:none}
.home-certs>li{display:flex}
.home-cert{flex:1;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--c-line);border-radius:var(--radius);background:var(--c-sand-50);color:var(--c-ink);transition:border-color .25s var(--ease),box-shadow .25s var(--ease),transform .25s var(--ease)}
.home-cert--link:hover{border-color:var(--c-gold-500);box-shadow:var(--shadow);transform:translateY(-3px);color:var(--c-ink)}
.home-cert__logo{display:grid;place-items:center;height:120px;padding:20px;border-bottom:1px solid var(--c-line);background:#fff;color:var(--c-gold-600)}
.home-cert__logo img{width:auto;height:auto;max-width:100%;max-height:80px;object-fit:contain}
.home-cert__logo .icon{width:44px;height:44px;stroke-width:1.3}
.home-cert__body{display:flex;flex:1;flex-direction:column;gap:4px;padding:18px 20px 20px}
.home-cert__title{font-size:var(--fs-md);font-weight:700;line-height:1.5}
.home-cert__issuer{color:var(--c-bronze);font-size:var(--fs-sm);font-weight:600}
.home-cert__desc{margin-top:4px;color:var(--c-ink-2);font-size:15px;line-height:1.75}
.home-cert__action{display:inline-flex;align-items:center;gap:8px;margin-top:auto;padding-top:12px;color:var(--c-forest-700);font-size:var(--fs-sm);font-weight:600}
.home-cert__action .icon{width:16px;height:16px;color:var(--c-gold-600)}

/* ---------- ≤1099: tablet ---------- */
@media (max-width:1099px){
	.home-stats__card--3,.home-stats__card--4{grid-template-columns:repeat(2,minmax(0,1fr))}
	.home-stats__card{padding:6px 0}
	.home-stats__item{padding:20px 14px}
	.home-stats__card--3 .home-stats__item:nth-child(odd),.home-stats__card--4 .home-stats__item:nth-child(odd){border-inline-start:0}
	.home-stats__card--3 .home-stats__item:nth-child(n+3),.home-stats__card--4 .home-stats__item:nth-child(n+3){border-top:1px solid var(--c-line)}
	.home-stats__card--3 .home-stats__item:last-child{grid-column:1/-1}

	.home-why__grid{gap:clamp(28px,4vw,48px)}
	.home-why__pillar-title{font-size:var(--fs-md)}

	.home-projects__grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto}
	.home-projects__item:first-child{grid-column:1/-1;grid-row:auto}
	.home-projects__card{min-height:clamp(280px,36vw,340px)}
	.home-projects__card--featured{min-height:clamp(340px,50vw,480px)}
	.home-projects__grid--1 .home-projects__item:first-child{grid-column:auto}

	.home-quality__top{grid-template-columns:minmax(0,1fr)}
}

/* Tablet: exactly two product cards (brief: desktop 3 + peek · tablet 2 · mobile 1 + peek). */
@media (min-width:700px) and (max-width:1099px){
	.home-products .carousel__track{grid-auto-columns:calc((100% - var(--gap)) / 2)}
}
/* 5–6 supply stages don't fit one line on a landscape tablet: 3 per row, without connectors. */
@media (min-width:900px) and (max-width:1099px){
	.home-process__steps--many{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:44px}
	.home-process__steps--many .home-process__step::after{display:none}
}

/* ---------- ≤999: hero switches to a compact stone palette above the text ---------- */
@media (max-width:999px){
	.home-hero .stone-motif--hero{display:none}
	.home-hero__content{max-width:640px}
	.home-hero__palette{display:block;margin-bottom:22px}
	.home-hero .stone-motif--palette{position:relative;inset:auto;display:flex}
	.home-hero .stone-motif--palette .stone-motif__dot{position:relative;width:clamp(44px,7vw,58px);aspect-ratio:1;border:2px solid var(--c-forest-900);box-shadow:0 8px 20px rgba(0,0,0,.3)}
	.home-hero .stone-motif--palette .stone-motif__dot+.stone-motif__dot{margin-inline-start:-12px}
	.home-hero--image,.home-hero--video{align-items:flex-end}
	.home-hero--image .home-hero__overlay,.home-hero--video .home-hero__overlay{background:linear-gradient(to top,rgba(13,21,18,var(--o1)) 0%,rgba(13,21,18,var(--o2)) 55%,rgba(13,21,18,var(--o3)) 100%),linear-gradient(to bottom,rgba(13,21,18,.5),rgba(13,21,18,0) 26%)}
	.home-hero--motif .home-hero__media::before{inset-inline-end:-30%;top:-10%;width:110vw}
	.home-hero--motif .home-hero__media::after{inset-inline-end:-12%;top:4%;width:70vw}
}

/* ---------- ≤899: vertical process timeline ---------- */
@media (max-width:899px){
	.home-process__steps{--node:54px;grid-template-columns:minmax(0,1fr);gap:0;max-width:640px;margin-inline:auto}
	.home-process__step{display:grid;grid-template-columns:var(--node) minmax(0,1fr);column-gap:20px;padding-bottom:32px}
	.home-process__step:last-child{padding-bottom:0}
	.home-process__node{grid-column:1;grid-row:1/span 2}
	.home-process__num{grid-column:2;grid-row:1;height:auto;margin:2px 0 2px}
	.home-process__body{grid-column:2;grid-row:2}
	.home-process__title{margin-top:0}
	.home-process__step:not(:last-child)::after{top:calc(var(--node) + 8px);bottom:8px;inset-inline-start:calc(var(--node) / 2);inset-inline-end:auto;width:1px;height:auto;background:linear-gradient(to bottom,rgba(217,159,62,.65),rgba(255,255,255,.16))}
}

/* ---------- ≤699: mobile ---------- */
@media (max-width:699px){
	.home-hero__title{font-size:clamp(32px,9.4vw,40px)}
	.home-hero__sub{font-size:16px;line-height:1.8}
	.home-hero__actions .btn{flex:1 1 100%}

	.home-stats .stat__value{font-size:28px}
	.home-stats__item{padding:18px 8px}
	.home-stats .stat__label{font-size:14px}

	.home-why__grid{grid-template-columns:minmax(0,1fr)}
	.home-why__visual,.home-why__content{grid-column:auto;grid-row:auto}
	.home-why__visual{position:static}
	.home-why__stage{aspect-ratio:4/3;max-height:none}
	.home-why__actions .btn{width:100%}

	.home-clients__title::before,.home-clients__title::after{display:none}
	.home-clients__logo{height:50px}

	.home-projects__grid,.home-projects__grid--1,.home-projects__grid--2{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:86%;grid-auto-rows:auto;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;margin-inline:calc(-1 * var(--gutter));padding-inline:var(--gutter);scroll-padding-inline:var(--gutter)}
	.home-projects__grid::-webkit-scrollbar{display:none}
	.home-projects__grid--1{grid-auto-columns:100%}
	.home-projects__item,.home-projects__item:first-child{grid-column:auto;grid-row:auto;scroll-snap-align:start}
	.home-projects__card,.home-projects__card--featured{min-height:400px}
	.home-projects__actions .btn{width:100%}

	.home-quality__stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
	.home-certs{grid-template-columns:minmax(0,1fr)}
	.home-cert{flex-direction:row}
	.home-cert__logo{flex:none;width:112px;height:auto;min-height:112px;padding:14px;border-bottom:0;border-inline-end:1px solid var(--c-line)}
	.home-cert__logo img{max-height:64px}
}

@media (prefers-reduced-motion:reduce){
	.home-hero .stone-motif--hero .stone-motif__dot{animation:none}
}
