/* ============================================================
   Awab Food Industries — shared design system
   "The Factory Spec Sheet"
   Bilingual RTL(ar) / LTR(en). Logical properties throughout.
   ============================================================ */

/* ---- Tokens ---------------------------------------------- */
:root{
  --tinplate:#2B2E33;
  --seam:#C7CBD1;
  --gold:#C6912E;
  --gold-deep:#A6761E;
  --crust:#8A4B24;
  --bone:#F5F1E8;
  --bone-panel:#EFE9DB;
  --olive:#3D4A2A;
  --ink:#2B2E33;
  --muted:#6B6659;

  --line: #d8d2c4;                 /* hairline on bone */
  --accent: var(--gold);           /* per-line override */
  --secondary: var(--seam);        /* per-line override */

  --wrap: 1180px;
  --pad-i: clamp(1.1rem, 4vw, 3rem);
  --gap: clamp(1.4rem, 3.5vw, 2.6rem);

  --r: 3px;                        /* factories aren't round */
  --seam-h: 6px;

  --f-body: "IBM Plex Sans Arabic","Segoe UI",Tahoma,system-ui,sans-serif;
  --f-mono: "IBM Plex Mono",ui-monospace,"Cascadia Mono",Consolas,monospace;
}

/* ---- Reset ----------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0}
img{max-inline-size:100%;display:block;height:auto}
button{font:inherit;color:inherit}
a{color:inherit}
h1,h2,h3,p,ul{margin:0}
ul{padding:0;list-style:none}
:focus:not(:focus-visible){outline:none}
:focus-visible{outline:3px solid var(--olive);outline-offset:3px;border-radius:2px}

/* ---- Base type ------------------------------------------- */
body{
  font-family:var(--f-body);
  color:var(--ink);
  background:var(--bone);
  line-height:1.65;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
}
[dir="rtl"] body{line-height:1.9}          /* Arabic breathes more */

h1,h2,h3{font-weight:600;line-height:1.18;letter-spacing:-0.01em}
[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3{
  letter-spacing:0;line-height:1.4;font-weight:600;
}
h1{font-size:clamp(2.1rem,6vw,3.6rem)}
h2{font-size:clamp(1.5rem,3.6vw,2.3rem)}
h3{font-size:clamp(1.12rem,2.2vw,1.35rem)}
p{max-inline-size:62ch}

/* ---- Batch-stamp eyebrow (signature) --------------------- */
.stamp{
  font-family:var(--f-mono);
  font-size:.74rem;
  color:var(--accent);
  display:inline-flex;
  align-items:center;
  gap:.55em;
  font-weight:500;
}
.stamp::before{
  content:"";inline-size:1.6em;block-size:1px;
  background:currentColor;opacity:.6;
}
[dir="ltr"] .stamp{text-transform:uppercase;letter-spacing:.16em}
[dir="rtl"] .stamp{letter-spacing:0;font-size:.82rem}  /* no uppercase, no wide tracking */

/* ---- The Seam (signature divider) ------------------------ */
.seam{
  block-size:var(--seam-h);
  background:
    linear-gradient(var(--seam),var(--seam)) 0 0    / 100% 1px no-repeat,
    linear-gradient(var(--seam),var(--seam)) 0 100% / 100% 1px no-repeat;
}
.seam--gold{
  background:
    linear-gradient(var(--gold),var(--gold)) 0 0    / 100% 1px no-repeat,
    linear-gradient(var(--gold),var(--gold)) 0 100% / 100% 1px no-repeat;
}

/* ---- Layout ---------------------------------------------- */
.wrap{max-inline-size:var(--wrap);margin-inline:auto;padding-inline:var(--pad-i)}
.section{padding-block:clamp(3rem,7vw,5.5rem)}
.section-head{margin-block-end:clamp(1.6rem,4vw,2.6rem)}
.section-head h2{margin-block-start:.5rem}
.lede{color:var(--muted);font-size:1.05rem;margin-block-start:.8rem}

/* ---- Buttons --------------------------------------------- */
.btn{
  display:inline-flex;align-items:center;gap:.6em;
  padding-block:.85em;padding-inline:1.5em;
  font-weight:600;font-size:.98rem;
  border:1px solid transparent;border-radius:var(--r);
  text-decoration:none;cursor:pointer;
  transition:background .18s ease,color .18s ease,border-color .18s ease;
}
.btn-primary{background:var(--gold);color:var(--tinplate);border-color:var(--gold)}
.btn-primary:hover{background:var(--gold-deep);border-color:var(--gold-deep)}
.btn-ghost{background:transparent;color:var(--ink);border-color:var(--seam)}
.btn-ghost:hover{border-color:var(--ink)}
.btn .arw{transition:transform .18s ease}
[dir="rtl"] .btn .arw{transform:scaleX(-1)}
.btn:hover .arw{transform:translateX(.25em)}
[dir="rtl"] .btn:hover .arw{transform:scaleX(-1) translateX(.25em)}

/* ---- Header / nav ---------------------------------------- */
.site-head{
  position:sticky;inset-block-start:0;z-index:20;
  background:color-mix(in srgb,var(--bone) 88%,transparent);
  backdrop-filter:blur(8px);
  border-block-end:1px solid var(--line);
}
.site-head .bar{
  display:flex;align-items:center;gap:1rem;
  padding-block:.7rem;min-block-size:60px;
}
.brand{
  display:inline-flex;align-items:baseline;gap:.5ch;
  text-decoration:none;font-weight:700;letter-spacing:.02em;
}
.brand .mark{
  font-family:var(--f-mono);font-weight:600;color:var(--gold);
  border:1px solid var(--gold);border-radius:2px;
  padding:.05em .4em;font-size:.8em;letter-spacing:0;
}
.brand .b-name{font-size:1.05rem}
.nav{margin-inline-start:auto;display:flex;align-items:center;gap:clamp(.4rem,2vw,1.4rem)}
.nav a{text-decoration:none;font-size:.95rem;color:var(--muted);padding-block:.3em}
.nav a:hover{color:var(--ink)}
.nav .swap{color:var(--ink);font-weight:600}
.lang-toggle{
  font-family:var(--f-mono);font-size:.8rem;
  background:transparent;border:1px solid var(--seam);
  border-radius:2px;padding:.35em .7em;cursor:pointer;letter-spacing:0;
}
.lang-toggle:hover{border-color:var(--ink)}

/* ---- Hero ------------------------------------------------ */
.hero{padding-block:clamp(2.4rem,6vw,4.5rem) clamp(2rem,5vw,3.5rem)}
.hero-grid{display:grid;gap:var(--gap);align-items:center}
.hero h1{margin-block:.6rem}
.hero .sub{color:var(--muted);font-size:1.12rem;margin-block-end:1.6rem}
.hero .cta-row{display:flex;flex-wrap:wrap;gap:.8rem}
@media(min-width:820px){
  .hero-grid{grid-template-columns:1.05fr .95fr}
}

/* ---- Placeholder frames ---------------------------------- */
.ph{
  position:relative;display:grid;place-items:center;
  background:repeating-linear-gradient(135deg,#e9e3d4 0 14px,#efeadd 14px 28px);
  border:1px solid var(--seam);border-radius:var(--r);
  aspect-ratio:4/3;overflow:hidden;min-block-size:180px;
}
.ph::before{content:"";position:absolute;inset:12px;border:1px dashed #cbc3ae}
.ph .ph-tag{
  position:relative;font-family:var(--f-mono);font-size:.72rem;
  color:var(--muted);background:var(--bone);
  border:1px solid var(--seam);border-radius:2px;
  padding:.35em .7em;letter-spacing:0;text-align:center;
}
.ph--tall{aspect-ratio:3/4}
.ph--wide{aspect-ratio:16/9}

/* ---- Product cards + spec strip -------------------------- */
.grid{display:grid;gap:var(--gap)}
.cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr))}
.card{
  background:var(--bone-panel);
  border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;display:flex;flex-direction:column;
}
.card .ph{border:0;border-block-end:1px solid var(--seam);border-radius:0}
.card-body{padding:1.1rem 1.15rem 1.25rem;display:flex;flex-direction:column;gap:.6rem;flex:1}
.card h3{font-size:1.15rem}
.card p{color:var(--muted);font-size:.95rem}
.spec{
  margin-block-start:auto;
  border-block-start:1px solid var(--seam);
  padding-block-start:.7rem;
  display:flex;flex-wrap:wrap;gap:.4rem .9rem;
  font-family:var(--f-mono);font-size:.76rem;color:var(--tinplate);
  letter-spacing:0;
}
.spec b{color:var(--muted);font-weight:400}
.spec span{white-space:nowrap}

/* ---- Capabilities / trust badges ------------------------- */
.caps{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.cap{
  padding:1.3rem 1.35rem;border:1px solid var(--line);
  border-radius:var(--r);background:var(--bone);
  border-inline-start:3px solid var(--accent);
}
.cap h3{margin-block-end:.5rem}
.cap p{color:var(--muted);font-size:.95rem}
.verified{
  display:inline-flex;align-items:center;gap:.5em;
  font-family:var(--f-mono);font-size:.72rem;letter-spacing:0;
  color:var(--olive);margin-block-start:.9rem;
}
.verified::before{
  content:"";inline-size:1.05em;block-size:1.05em;border-radius:50%;
  background:var(--olive);
  -webkit-mask:no-repeat center/70% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
          mask:no-repeat center/70% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}

/* ---- Enquiry form ---------------------------------------- */
.enquiry{background:var(--tinplate);color:var(--bone)}
.enquiry .stamp{color:var(--gold)}
.enquiry h2{color:var(--bone)}
.enquiry .lede{color:#c7c2b6}
.form-grid{display:grid;gap:1rem;grid-template-columns:1fr 1fr;margin-block-start:1.6rem}
.field{display:flex;flex-direction:column;gap:.4rem}
.field.full{grid-column:1/-1}
.field label{font-size:.85rem;color:#cfcabe}
.field input,.field textarea,.field select{
  font:inherit;font-size:.98rem;
  background:#33373d;color:var(--bone);
  border:1px solid #4a4f57;border-radius:var(--r);
  padding:.7em .8em;
}
.field textarea{min-block-size:120px;resize:vertical}
.field input::placeholder,.field textarea::placeholder{color:#8b9099}
.field input:focus,.field textarea:focus,.field select:focus{
  border-color:var(--gold);outline:2px solid var(--gold);outline-offset:1px;
}
.hp{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.form-msg{margin-block-start:1rem;font-size:.95rem;min-block-size:1.4em}
.form-msg.ok{color:#a7c48a}
.form-msg.err{color:#e0a17e}

/* ---- Footer ---------------------------------------------- */
.site-foot{background:var(--tinplate);color:#cfcabe;padding-block:2.6rem}
.site-foot a{color:var(--bone);text-decoration:none}
.site-foot a:hover{text-decoration:underline}
.foot-grid{display:flex;flex-wrap:wrap;gap:2rem 3rem;justify-content:space-between}
.foot-grid .col{display:flex;flex-direction:column;gap:.4rem;font-size:.92rem}
.foot-grid .col b{color:var(--bone);font-weight:600}
.foot-mono{font-family:var(--f-mono);font-size:.78rem;letter-spacing:0}
.foot-copy{margin-block-start:1.8rem;font-family:var(--f-mono);font-size:.72rem;color:#8b9099;letter-spacing:0}

/* ============================================================
   GATEWAY (home)
   ============================================================ */
.gw{min-block-size:100dvh;display:flex;flex-direction:column}
.gw-top{
  display:flex;align-items:center;gap:1rem;
  padding:1rem var(--pad-i);
}
.gw-tagline{
  text-align:center;padding:0 var(--pad-i) 1.4rem;
  font-size:clamp(1.05rem,2.6vw,1.5rem);font-weight:500;color:var(--muted);
}
.gateway{
  flex:1;display:grid;gap:0;
  grid-template-columns:1fr;
}
.gw-seam{
  background:
    linear-gradient(var(--seam),var(--seam)) center / 1px 100% no-repeat;
  min-block-size:1px;
}
.door{
  position:relative;display:flex;flex-direction:column;justify-content:flex-end;
  gap:.7rem;text-decoration:none;color:inherit;
  padding:clamp(1.6rem,5vw,3.2rem);
  min-block-size:clamp(320px,42vh,520px);
  overflow:hidden;isolation:isolate;
  transition:background .25s ease;
}
.door .door-ph{
  position:absolute;inset:0;z-index:-2;border:0;border-radius:0;
  opacity:.9;filter:saturate(.9);
}
.door::after{      /* wash so text stays legible over image */
  content:"";position:absolute;inset:0;z-index:-1;
  transition:opacity .25s ease;
}
.door-tin{color:var(--bone)}
.door-tin::after{background:linear-gradient(to top,rgba(28,30,34,.92),rgba(28,30,34,.55) 55%,rgba(28,30,34,.35))}
.door-food{color:var(--bone)}
.door-food::after{background:linear-gradient(to top,rgba(58,28,12,.9),rgba(90,44,20,.5) 55%,rgba(90,44,20,.3))}
.door:hover::after,.door:focus-visible::after{opacity:.82}
.door .door-line{font-family:var(--f-mono);font-size:.8rem;color:var(--gold);letter-spacing:0}
[dir="ltr"] .door .door-line{letter-spacing:.14em;text-transform:uppercase}
.door .door-name{font-size:clamp(1.7rem,4vw,2.6rem);font-weight:600;line-height:1.15}
[dir="rtl"] .door .door-name{line-height:1.4}
.door .door-desc{color:#e7e2d6;max-inline-size:40ch}
.door .door-enter{
  display:inline-flex;align-items:center;gap:.5em;
  font-weight:600;color:var(--gold);margin-block-start:.3rem;
}
.door .door-enter .arw{transition:transform .2s ease}
[dir="rtl"] .door .door-enter .arw{transform:scaleX(-1)}
.door:hover .door-enter .arw{transform:translateX(.3em)}
[dir="rtl"] .door:hover .door-enter .arw{transform:scaleX(-1) translateX(.3em)}
.door .seam{position:absolute;inset-block-start:0;inset-inline:0;z-index:1}

@media(min-width:860px){
  .gateway{grid-template-columns:1fr 1px 1fr}
}

/* ============================================================
   Motion — "stamp in"
   ============================================================ */
.reveal{opacity:0;transform:translateY(6px);transition:opacity .45s ease,transform .14s ease-out}
.reveal.is-in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto !important}
  .reveal{opacity:1;transform:none;transition:none}
  .btn,.door,.door::after,.arw{transition:none !important}
}

/* ---- Utilities ------------------------------------------- */
.visually-hidden{
  position:absolute!important;inline-size:1px;block-size:1px;
  padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}
.skip-link{
  position:absolute;inset-inline-start:0;inset-block-start:-60px;
  background:var(--tinplate);color:var(--bone);padding:.7em 1.1em;z-index:100;
  transition:inset-block-start .15s ease;text-decoration:none;
}
.skip-link:focus{inset-block-start:0}

/* per-line theming */
.theme-tin{--secondary:var(--seam)}

/* ============================================================
   MERAS brand theme — monochrome (black / white / grey), scoped
   Follows the MERAS visual identity: no gold, neutral greys,
   rounded-square م icon, concentric-line motif.
   ============================================================ */
.theme-tin{
  --bone:#f4f4f5;          /* light colour used ON dark surfaces (footer/enquiry text) */
  --bone-panel:#161619;    /* card / surface (dark) */
  --ink:#f2f2f3;           /* primary text = light (page is dark) */
  --muted:#a2a2ab;         /* secondary text */
  --line:#2a2a30;
  --seam:#3a3a42;
  --accent:#ffffff;        /* white accent */
  --gold:#ffffff;          /* neutralize inherited gold usages */
  --gold-deep:#e6e6e6;
  --crust:#ffffff;
  --tinplate:#141417;      /* dark section bg (enquiry / footer) */
  --olive:#ffffff;         /* verified check -> white */
  background:#0e0e11;       /* page background: dark */
  color:var(--ink);
  font-size:1.06rem;       /* larger base type */
}
/* logo: rounded-square outline holding the م (the MERAS icon) */
.theme-tin .brand .mark{
  font-family:var(--f-body);font-weight:700;color:var(--ink);
  background:transparent;border:1.5px solid var(--ink);
  border-radius:7px;padding:.02em .44em;line-height:1;
}
.theme-tin .brand .b-name{letter-spacing:.02em}
/* buttons go monochrome */
.theme-tin .btn-primary{background:var(--ink);color:#fff;border-color:var(--ink)}
.theme-tin .btn-primary:hover{background:#000;border-color:#000}
/* dark sections keep light accents */
.theme-tin .enquiry .stamp{color:#fff}
.theme-tin .field input:focus,.theme-tin .field textarea:focus{border-color:#fff;outline-color:#fff}

/* brand hero panel — replaces the missing hero photo */
.brand-panel{
  position:relative;aspect-ratio:3/4;min-block-size:280px;
  border-radius:var(--r);overflow:hidden;
  background:#0e0e10;color:#fff;display:grid;place-items:center;
}
.brand-panel .bp-icon{
  position:relative;z-index:1;
  inline-size:clamp(92px,19vw,148px);aspect-ratio:1;
  border:2px solid #fff;border-radius:22%;
  display:grid;place-items:center;font-weight:700;line-height:1;
  font-size:clamp(3.2rem,8.5vw,5.2rem);color:#fff;
}
.brand-panel .bp-cap{
  position:absolute;inset-block-end:clamp(1rem,3vw,1.6rem);inset-inline:0;z-index:1;
  text-align:center;font-family:var(--f-mono);font-size:.68rem;
  letter-spacing:.16em;color:#c9c9cd;
}
.brand-panel .bp-lines{
  position:absolute;inset-block-start:0;inset-inline-start:0;
  inline-size:60%;max-inline-size:260px;opacity:.45;
}
.brand-panel .bp-lines path{fill:none;stroke:#fff;stroke-width:2}

/* dark-theme component fixes (elements that assumed a light background) */
.theme-tin .site-head{background:color-mix(in srgb,#0e0e11 90%,transparent)}
.theme-tin .btn-primary{background:#fff;color:#111;border-color:#fff}
.theme-tin .btn-primary:hover{background:#e4e4e6;border-color:#e4e4e6}
.theme-tin .cap{background:var(--bone-panel)}
.theme-tin .brand-panel{border:1px solid var(--line)}
.theme-tin .spec{color:#c7c7cf}
.theme-tin .enquiry .lede{color:#b9b9c0}

/* larger, more legible type on the MERAS page */
.theme-tin .hero .sub{font-size:1.24rem}
.theme-tin .lede{font-size:1.14rem}
.theme-tin .card p{font-size:1.02rem}
.theme-tin .card-body h3{font-size:1.2rem}
.theme-tin .nav a{font-size:1.02rem}
.theme-tin .stamp{font-size:.9rem}
.theme-tin .spec{font-size:.84rem}
.theme-tin .verified{font-size:.82rem}
.theme-tin .prodcat-title{font-size:1.35rem}
.theme-tin .field label{font-size:.98rem}
.theme-tin .field input,.theme-tin .field textarea,.theme-tin .field select{font-size:1.06rem}
.theme-tin .foot-grid .col{font-size:1.02rem}
.theme-tin .foot-mono{font-size:.84rem}

/* contact buttons (WhatsApp / call / email) */
.btn .ico{inline-size:1.2em;block-size:1.2em;flex:0 0 auto}
.contact-row{display:flex;flex-wrap:wrap;gap:.7rem;margin-block:1.4rem 0}
.contact-row .btn{font-size:1.02rem}

/* home landing — brand/line cards */
.brands{display:grid;gap:var(--gap);grid-template-columns:1fr}
@media(min-width:760px){.brands{grid-template-columns:1fr 1fr}}
.brandcard{
  background:var(--bone-panel);border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;display:flex;flex-direction:column;
}
.brandcard .brand-panel{aspect-ratio:16/10;min-block-size:0;border-radius:0}
.brandcard .bc-body{padding:1.4rem 1.4rem 1.6rem;display:flex;flex-direction:column;gap:.7rem;flex:1}
.brandcard .bc-body h3{font-size:1.4rem}
.brandcard .bc-body p{color:var(--muted);font-size:1.02rem}
.brandcard .bc-cta{margin-block-start:auto;padding-block-start:.8rem}
.brand-panel.is-soon{background:#151517}
.brand-panel.is-soon .bp-soon{font-family:var(--f-mono);letter-spacing:.22em;color:#8b8b93;font-size:1.05rem}
.soon-badge{
  display:inline-flex;align-items:center;gap:.5em;align-self:flex-start;
  font-family:var(--f-mono);font-size:.7rem;letter-spacing:.14em;
  color:var(--muted);border:1px solid var(--line);border-radius:2px;padding:.32em .7em;
}
[dir="ltr"] .soon-badge{text-transform:uppercase}
.home-values{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}

/* invalid form field highlight */
.field [aria-invalid="true"]{border-color:#e5484d !important;outline-color:#e5484d}

/* MERAS product catalogue — photo tiles + category groups */
.prodcat{margin-block-start:clamp(1.8rem,4vw,2.8rem)}
.prodcat:first-of-type{margin-block-start:0}
.prodcat-title{
  display:flex;align-items:baseline;flex-wrap:wrap;gap:.4rem .8rem;
  margin-block-end:1.1rem;font-size:1.2rem;font-weight:600;
  padding-block-end:.6rem;border-block-end:1px solid var(--line);
}
.prodcat-title .cnt{
  font-family:var(--f-mono);font-size:.72rem;font-weight:500;
  color:var(--muted);letter-spacing:0;
}
[dir="ltr"] .prodcat-title .cnt{letter-spacing:.02em}
.card .shot{
  aspect-ratio:1/1;background:#fff;overflow:hidden;
  border-block-end:1px solid var(--seam);
}
.card .shot img{width:100%;height:100%;object-fit:contain;padding:.5rem}
.card-body h3{font-size:1.05rem}
.theme-food{--secondary:var(--crust)}
.theme-food .cap{border-inline-start-color:var(--crust)}
.theme-food .stamp{--accent:var(--gold)}

/* ============================================================
   Small screens (down to 360px)
   ============================================================ */
@media (max-width:720px){
  .site-head .bar{flex-wrap:wrap;row-gap:.35rem}
  .nav{
    flex-basis:100%;margin-inline-start:0;justify-content:flex-start;
    gap:1rem;overflow-x:auto;white-space:nowrap;
    padding-block-start:.15rem;padding-block-end:.35rem;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .nav::-webkit-scrollbar{display:none}
  .nav a{flex:0 0 auto}
  .lang-toggle{flex:0 0 auto}
}
@media (max-width:560px){
  .form-grid{grid-template-columns:1fr}
  .foot-grid{gap:1.6rem}
}
@media (max-width:380px){
  .door{padding-inline:1.1rem}
  .wrap{--pad-i:1rem}
}
