/* =========================================================
   1H — مواد بناء | Style sheet
   Palette: logo red + concrete greys + white space
   ========================================================= */

:root{
  --red:#D31217;
  --red-dark:#8E0B0F;
  --red-soft:#FDECEC;
  --ink:#16181C;
  --slate:#5A6069;
  --line:#E3E5E9;
  --mist:#F4F5F7;
  --paper:#FFFFFF;

  --wrap:1180px;
  --cut:30px;                 /* قصّة الزاوية المستوحاة من الشعار */
  --r:4px;

  --f-head:"Almarai","IBM Plex Sans Arabic",system-ui,sans-serif;
  --f-body:"IBM Plex Sans Arabic","Almarai",system-ui,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--f-body);font-size:17px;line-height:1.85;
  font-weight:400;letter-spacing:0;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{font-family:var(--f-head);font-weight:800;line-height:1.3;margin:0;letter-spacing:-.01em}
p{margin:0 0 1em}
ul{margin:0;padding:0;list-style:none}

.wrap{max-width:var(--wrap);margin:0 auto;padding:0 22px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- شريط علوي ---------- */
.topbar{background:var(--ink);color:#fff;font-size:14.5px}
.topbar .wrap{display:flex;gap:18px;align-items:center;justify-content:space-between;min-height:42px;flex-wrap:wrap}
.topbar span{color:#C9CCD2}
.topbar a{color:#fff;font-weight:600}
.topbar a:hover{color:#FF7A7D}

/* ---------- الهيدر ---------- */
.site-head{position:sticky;top:0;z-index:60;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.head-in{display:flex;align-items:center;gap:20px;min-height:76px}
.brand{display:flex;align-items:center;gap:12px;margin-inline-end:auto}
.brand img{width:42px;height:auto}
.brand b{font-family:var(--f-head);font-size:19px;font-weight:800;display:block;line-height:1.25}
.brand small{display:block;font-size:12.5px;color:var(--slate);line-height:1.2}

.nav{display:flex;gap:6px;align-items:center}
.nav a{padding:9px 13px;font-size:16px;font-weight:600;color:#2C3037;border-radius:var(--r)}
.nav a:hover{background:var(--mist);color:var(--red-dark)}
.nav a.on{color:var(--red);box-shadow:inset 0 -3px 0 var(--red)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;
  font-family:var(--f-head);font-weight:800;font-size:16px;padding:13px 24px;border:0;cursor:pointer;
  clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px));
  transition:background .18s ease,color .18s ease}
.btn-red{background:var(--red);color:#fff}
.btn-red:hover{background:var(--red-dark)}
.btn-line{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 2px var(--ink);clip-path:none}
.btn-line:hover{background:var(--ink);color:#fff}
.btn-ghost{background:#fff;color:var(--red);box-shadow:inset 0 0 0 2px var(--red);clip-path:none}
.btn-ghost:hover{background:var(--red);color:#fff}
.head-cta{display:none}

.burger{display:none;width:44px;height:40px;background:#fff;border:1px solid var(--line);cursor:pointer;padding:0}
.burger i{display:block;width:20px;height:2px;background:var(--ink);margin:4px auto;transition:.2s}
.burger[aria-expanded="true"] i:nth-child(1){transform:translateY(6px) rotate(45deg)}
.burger[aria-expanded="true"] i:nth-child(2){opacity:0}
.burger[aria-expanded="true"] i:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* ---------- الهيرو ---------- */
.hero{padding:66px 0 58px;border-bottom:1px solid var(--line);overflow:hidden}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:52px;align-items:center}
.hero h1{font-size:clamp(30px,4.4vw,50px);margin-bottom:18px}
.hero .lede{font-size:19px;color:var(--slate);max-width:56ch;margin-bottom:26px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.rule{width:64px;height:6px;background:var(--red);margin-bottom:22px}

.hero-media{position:relative}
.hero-media img{width:100%;height:420px;object-fit:cover;
  clip-path:polygon(var(--cut) 0,100% 0,100% 100%,0 100%,0 var(--cut))}
.stamp{position:absolute;inset-inline-end:-6px;bottom:-18px;background:var(--red);color:#fff;
  padding:16px 22px;font-family:var(--f-head);font-weight:800;line-height:1.35;font-size:15px;
  clip-path:polygon(14px 0,100% 0,100% 100%,0 100%,0 14px)}

/* ---------- شريط الأرقام / المزايا السريعة ---------- */
.strip{background:var(--ink);color:#fff}
.strip ul{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#2A2E35}
.strip li{background:var(--ink);padding:22px 18px}
.strip b{display:block;font-family:var(--f-head);font-size:17px;font-weight:800}
.strip span{font-size:14.5px;color:#B9BDC5}

/* ---------- الأقسام ---------- */
.sec{padding:74px 0}
.sec-mist{background:var(--mist)}
.sec-head{margin-bottom:38px;max-width:62ch}
.sec-head h2{font-size:clamp(25px,3.2vw,35px);margin-bottom:12px}
.sec-head p{color:var(--slate);margin:0}

/* ---------- بطاقات المنتجين ---------- */
.products{display:grid;grid-template-columns:1fr 1fr;gap:26px}
.pcard{background:#fff;border:1px solid var(--line);display:flex;flex-direction:column;
  clip-path:polygon(var(--cut) 0,100% 0,100% 100%,0 100%,0 var(--cut))}
.pcard .ph{position:relative;height:230px;background:var(--mist)}
.pcard .ph img{width:100%;height:100%;object-fit:cover}
.pcard .tag{position:absolute;top:0;right:0;left:auto;background:var(--red);color:#fff;
  font-family:var(--f-head);font-weight:800;font-size:13.5px;padding:7px 14px}
.pcard .body{padding:26px 26px 28px;display:flex;flex-direction:column;flex:1}
.pcard h3{font-size:23px;margin-bottom:10px}
.pcard p{color:var(--slate);font-size:16.5px}
.pcard .specs{border-top:1px solid var(--line);margin:6px 0 20px}
.pcard .specs div{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid var(--line);font-size:15.5px}
.pcard .specs dt{color:var(--slate);margin:0}
.pcard .specs dd{margin:0;font-weight:600}
.pcard .go{margin-top:auto;display:flex;gap:10px;flex-wrap:wrap}

/* ---------- المزايا ---------- */
.feats{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--line);border-inline-start:1px solid var(--line)}
.feats article{border-bottom:1px solid var(--line);border-inline-end:1px solid var(--line);padding:30px 28px;background:#fff}
.feats h3{font-size:19px;margin-bottom:8px}
.feats p{color:var(--slate);font-size:16px;margin:0}
.feats .ic{width:38px;height:38px;margin-bottom:14px;color:var(--red)}
.feats .ic svg{width:100%;height:100%}

/* ---------- خطوات الطلب ---------- */
.steps{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,1fr);gap:22px;counter-reset:s}
.steps li{counter-increment:s;padding-top:20px;border-top:3px solid var(--line);position:relative}
.steps li::before{content:counter(s);position:absolute;top:-16px;inset-inline-start:0;
  font-family:var(--f-head);font-weight:800;font-size:15px;color:#fff;background:var(--ink);
  width:28px;height:28px;display:grid;place-items:center}
.steps li.k::before{background:var(--red)}
.steps h3{font-size:18px;margin-bottom:6px}
.steps p{color:var(--slate);font-size:15.5px;margin:0}

/* ---------- معرض الأعمال ---------- */
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.gallery figure{margin:0;background:#fff;border:1px solid var(--line)}
.gallery img{width:100%;height:250px;object-fit:cover}
.gallery figcaption{padding:14px 16px;font-size:15.5px;color:var(--slate)}
.gallery .wide{grid-column:span 2}
.gallery .wide img{height:250px}

/* ---------- الأسئلة ---------- */
.faq{border-top:1px solid var(--line);max-width:900px}
.checks,.usecases,.clines,.gallery{margin:0;padding:0}
.faq details{border-bottom:1px solid var(--line)}
.faq summary{cursor:pointer;list-style:none;padding:20px 0;font-family:var(--f-head);font-weight:800;font-size:18px;display:flex;justify-content:space-between;gap:16px;align-items:center}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";color:var(--red);font-size:26px;line-height:1;transition:transform .2s}
.faq details[open] summary::after{transform:rotate(45deg)}
.faq .ans{padding:0 0 20px;color:var(--slate)}

/* ---------- صفحة المنتج ---------- */
.phero{padding:52px 0;border-bottom:1px solid var(--line)}
.phero-grid{display:grid;grid-template-columns:1fr 1fr;gap:46px;align-items:center}
.phero h1{font-size:clamp(27px,3.8vw,42px);margin-bottom:16px}
.phero img{width:100%;height:400px;object-fit:cover;
  clip-path:polygon(var(--cut) 0,100% 0,100% 100%,0 100%,0 var(--cut))}
.crumb{font-size:14.5px;color:var(--slate);margin-bottom:14px}
.crumb a:hover{color:var(--red)}

.spec-table{width:100%;border-collapse:collapse;font-size:16.5px;background:#fff}
.spec-table th,.spec-table td{text-align:start;padding:14px 16px;border:1px solid var(--line)}
.spec-table th{background:var(--mist);font-family:var(--f-head);font-weight:800;width:36%}

.checks{display:grid;grid-template-columns:1fr 1fr;gap:14px 26px}
.checks li{position:relative;padding-inline-start:30px;color:#2C3037}
.checks li::before{content:"";position:absolute;inset-inline-start:0;top:11px;width:12px;height:12px;background:var(--red);
  clip-path:polygon(4px 0,100% 0,100% 100%,0 100%,0 4px)}

.usecases{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.usecases li{background:#fff;border:1px solid var(--line);padding:18px 20px;font-weight:600}
.usecases li span{display:block;font-weight:400;color:var(--slate);font-size:15.5px;margin-top:4px}

/* ---------- التواصل ---------- */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:34px}
.cbox{background:#fff;border:1px solid var(--line);padding:30px}
.cbox h3{font-size:21px;margin-bottom:14px}
.clines li{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid var(--line);align-items:flex-start}
.clines li:last-child{border-bottom:0}
.clines .k{font-weight:700;min-width:112px}
.clines .v{color:var(--slate)}
.clines a{color:var(--red-dark);font-weight:700}

.form label{display:block;font-weight:700;font-size:15.5px;margin-bottom:6px}
.form input,.form textarea,.form select{width:100%;padding:12px 14px;border:1px solid var(--line);background:#fff;
  font-family:var(--f-body);font-size:16px;margin-bottom:16px;border-radius:var(--r)}
.form input:focus,.form textarea:focus,.form select:focus{outline:2px solid var(--red);outline-offset:1px;border-color:transparent}
.form textarea{min-height:120px;resize:vertical}

/* ---------- CTA ---------- */
.cta{background:var(--ink);color:#fff;padding:62px 0}
.cta h2{font-size:clamp(24px,3.2vw,34px);margin-bottom:12px}
.cta p{color:#C0C4CB;max-width:58ch}
.cta .row{display:flex;gap:14px;flex-wrap:wrap;margin-top:24px}
.btn-white{background:#fff;color:var(--ink)}
.btn-white:hover{background:var(--red);color:#fff}

/* ---------- الفوتر ---------- */
.site-foot{background:#0F1114;color:#A8ACB4;padding:52px 0 26px;font-size:15.5px}
.foot-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:34px}
.site-foot h4{color:#fff;font-size:17px;margin-bottom:14px}
.site-foot a:hover{color:#fff}
.site-foot li{padding:5px 0}
.foot-brand{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.foot-brand img{width:40px}
.foot-brand b{color:#fff;font-family:var(--f-head);font-size:18px}
.copy{border-top:1px solid #23272D;margin-top:34px;padding-top:20px;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;font-size:14.5px}
.copy a{color:#C9CCD2}

/* ---------- واتساب عائم ---------- */
.wa{position:fixed;inset-inline-end:18px;bottom:18px;z-index:70;width:58px;height:58px;border-radius:50%;
  background:#25D366;display:grid;place-items:center;box-shadow:0 8px 22px rgba(0,0,0,.22)}
.wa svg{width:31px;height:31px;fill:#fff}
.wa::after{content:"";position:absolute;inset:0;border-radius:50%;box-shadow:0 0 0 0 rgba(37,211,102,.55);animation:pulse 2.6s infinite}
@keyframes pulse{70%{box-shadow:0 0 0 16px rgba(37,211,102,0)}100%{box-shadow:0 0 0 0 rgba(37,211,102,0)}}

/* ---------- حركة الظهور ---------- */
.rv{opacity:0;transform:translateY(14px);transition:opacity .55s ease,transform .55s ease}
.rv.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .rv{opacity:1;transform:none}
}

/* ---------- الجوال ---------- */
@media (min-width:1080px){
  .head-cta{display:inline-flex;padding:11px 20px;font-size:15px}
}

@media (max-width:1024px){
  .hero-grid,.phero-grid,.contact-grid{grid-template-columns:1fr;gap:34px}
  .hero-media img,.phero img{height:320px}
  .feats,.usecases,.gallery{grid-template-columns:1fr 1fr}
  .gallery .wide{grid-column:span 2}
  .steps{grid-template-columns:1fr 1fr;gap:26px}
  .foot-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:820px){
  body{font-size:16.5px}
  .burger{display:block}
  .nav{position:absolute;top:100%;inset-inline-start:0;inset-inline-end:0;background:#fff;border-bottom:1px solid var(--line);
    flex-direction:column;align-items:stretch;padding:10px 16px 18px;gap:2px;display:none;box-shadow:0 14px 24px rgba(0,0,0,.07)}
  .nav.open{display:flex}
  .nav a{padding:13px 8px;border-bottom:1px solid var(--line)}
  .nav a.on{box-shadow:none}
  .products{grid-template-columns:1fr}
  .strip ul{grid-template-columns:1fr 1fr}
  .sec{padding:56px 0}
  .hero{padding:44px 0 40px}
}
@media (max-width:560px){
  .feats,.usecases,.gallery,.checks{grid-template-columns:1fr}
  .gallery .wide{grid-column:auto}
  .steps{grid-template-columns:1fr}
  .foot-grid{grid-template-columns:1fr}
  .hero-actions .btn,.cta .row .btn{flex:1 1 100%}
  .stamp{position:static;display:inline-block;margin-top:14px}
  .topbar .wrap{justify-content:center;gap:10px}
}

/* صورة منتج على خلفية بيضاء */
.pcard .ph.on-white{background:#fff}
.pcard .ph.on-white img{object-fit:contain;padding:18px}
.phero img.contain{object-fit:contain;background:#fff;border:1px solid var(--line);padding:26px;height:380px}
@media (max-width:1024px){.phero img.contain{height:300px}}

/* لوحة أيقونة بديلة عن الصورة */
.icon-panel{background:linear-gradient(160deg,#fff 0%,var(--mist) 100%);border-bottom:1px solid var(--line);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;padding:20px}
.icon-panel .ip-ic{width:64px;height:64px;color:var(--red)}
.icon-panel .ip-ic svg{width:100%;height:100%}
.icon-panel span{font-family:var(--f-head);font-weight:800;font-size:18px;color:#2C3037}
.split .icon-panel{border:1px solid var(--line);border-bottom:1px solid var(--line);
  clip-path:polygon(var(--cut) 0,100% 0,100% 100%,0 100%,0 var(--cut))}
.split{display:grid;grid-template-columns:1fr 1fr;gap:44px;align-items:start}
.split img{width:100%;height:340px;object-fit:cover;
  clip-path:polygon(var(--cut) 0,100% 0,100% 100%,0 100%,0 var(--cut))}
.anchor{scroll-margin-top:120px}
.mini-title{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.mini-title span{background:var(--red);color:#fff;font-family:var(--f-head);font-weight:800;font-size:13.5px;padding:6px 13px}
.products{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}

/* ===== ضبط المقاسات: جوال / تابلت / سطح مكتب ===== */
.nav a{white-space:nowrap}
@media (min-width:821px) and (max-width:1180px){.nav a{padding:8px 8px;font-size:14px}.head-cta{display:none}}
@media (min-width:1181px){.nav a{padding:9px 11px;font-size:15px}.head-cta{display:none}}
@media (min-width:1520px){.head-cta{display:inline-flex;padding:11px 18px;font-size:15px}}
@media (min-width:1600px){:root{--wrap:1280px}}

/* الصور: ارتفاعات مرنة بدل أرقام ثابتة */
.hero-media img{height:clamp(230px,34vw,420px)}
.split img{height:clamp(220px,30vw,340px)}
.phero img{height:clamp(230px,32vw,400px)}
.gallery img,.gallery .wide img{height:clamp(180px,22vw,250px)}
.pcard .ph{height:clamp(190px,22vw,230px)}
.icon-panel{min-height:190px}
.phero .icon-panel,.split .icon-panel{gap:18px}
.phero .icon-panel .ip-ic,.split .icon-panel .ip-ic{width:92px;height:92px}
.phero .icon-panel span,.split .icon-panel span{font-size:21px}

/* صفوف المواصفات داخل البطاقات */
.pcard .specs div{flex-wrap:wrap}
.pcard .specs dd{min-width:0;overflow-wrap:anywhere;text-align:start}

/* الجداول لا تتجاوز عرض الشاشة */
.spec-table{table-layout:fixed}
.spec-table th,.spec-table td{word-break:break-word}
@media (max-width:640px){
  .spec-table th{width:42%;font-size:15px;padding:11px 12px}
  .spec-table td{font-size:15px;padding:11px 12px}
  .sec{padding:48px 0}
  .wrap{padding:0 18px}
  .topbar{font-size:13.5px}
  .icon-panel .ip-ic{width:52px;height:52px}
}
@media (max-width:400px){
  body{font-size:16px}
  .btn{padding:12px 18px;font-size:15px}
  .brand small{display:none}
  .wa{width:52px;height:52px;inset-inline-end:14px;bottom:14px}
  .wa svg{width:27px;height:27px}
}
@media (max-width:1024px){.split{grid-template-columns:1fr;gap:26px}.split img{height:280px}}
