/* ==========================================================
   Al Arabia for Furniture & Decoration (AFD) — website styles
   Palette is sampled from the logo (saw-blade gold + charcoal-brown)
   ========================================================== */

:root {
  /* brand — logo gold & its tints / shades */
  --g950: #1c1304;
  --g900: #2b1d08;   /* logo ink */
  --g800: #4a3208;
  --g700: #6e4a00;
  --g600: #8f6000;   /* logo saw-blade gold */
  --g500: #a87400;
  --g400: #c29a3a;
  --g300: #d9be74;
  --g200: #ebdbae;
  --g100: #f6eeda;
  --g50:  #fbf7ec;
  --white: #ffffff;

  --bg: var(--g50);
  --bg-alt: var(--white);
  --text: #3a2d17;
  --muted: #7a6a4f;
  --line: rgba(143, 96, 0, .18);

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px -12px rgba(43, 29, 8, .35);
  --shadow-lg: 0 24px 60px -20px rgba(43, 29, 8, .45);

  --font-head: "Playfair Display", "Amiri", Georgia, serif;
  --font-body: "Inter", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 76px;
}

html:lang(ar) {
  --font-head: "Amiri", "Playfair Display", Georgia, serif;
  --font-body: "Cairo", "Inter", system-ui, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--g900); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--g400); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

svg.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  transition: transform .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--g600); color: #fff; box-shadow: 0 8px 20px -8px rgba(143, 96, 0, .8); }
.btn-primary:hover { background: var(--g700); }
.btn-light { background: var(--g100); color: var(--g900); }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: rgba(246, 238, 218, .55); color: var(--g100); }
.btn-ghost:hover { background: rgba(246, 238, 218, .12); border-color: var(--g100); }
.btn-outline { border-color: var(--g600); color: var(--g700); }
.btn-outline:hover { background: var(--g600); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: rgba(28, 19, 4, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 190, 116, .22);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(28, 19, 4, .96); box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .6); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--g100); }
.brand-mark {
  width: 54px; height: 54px; border-radius: 50%; background: var(--g50);
  display: grid; place-items: center; padding: 3px; box-shadow: 0 0 0 2px var(--g500);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-family: var(--font-head); font-size: 1.1rem; letter-spacing: .04em; }
.brand-text small { display: block; font-size: .7rem; color: var(--g300); letter-spacing: .08em; text-transform: uppercase; }
html:lang(ar) .brand-text small { letter-spacing: 0; text-transform: none; font-size: .78rem; }

.nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: .5em .85em; color: var(--g200); font-size: .93rem; font-weight: 500; border-radius: 8px;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; inset-inline: .85em; bottom: .15em; height: 2px; background: var(--g400);
  transform: scaleX(0); transform-origin: center; transition: transform .25s;
}
.nav a:hover, .nav a.active { color: #fff; }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .45em .95em; border-radius: 999px; border: 1.5px solid var(--g400);
  background: transparent; color: var(--g200); font-weight: 600; font-size: .88rem;
  transition: background .2s, color .2s;
}
.lang-toggle:hover { background: var(--g400); color: var(--g950); }
.menu-btn { display: none; background: none; border: 0; color: var(--g100); padding: 8px; }
.menu-btn svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 120px; color: var(--g100); isolation: isolate; overflow: hidden;
  background: var(--g950);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("../assets/img/pergolas/pergolas-35.jpg") center / cover no-repeat;
  animation: kenburns 28s ease-in-out infinite alternate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(28, 19, 4, .93) 0%, rgba(28, 19, 4, .78) 45%, rgba(28, 19, 4, .35) 100%),
    linear-gradient(0deg, rgba(28, 19, 4, .85) 0%, transparent 35%);
}
[dir="rtl"] .hero::before {
  background:
    linear-gradient(260deg, rgba(28, 19, 4, .93) 0%, rgba(28, 19, 4, .78) 45%, rgba(28, 19, 4, .35) 100%),
    linear-gradient(0deg, rgba(28, 19, 4, .85) 0%, transparent 35%);
}
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
.hero-content { max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .8em; font-size: .82rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--g300); margin-bottom: 1.2rem;
}
html:lang(ar) .eyebrow { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.eyebrow::before { content: ""; width: 38px; height: 2px; background: currentColor; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); color: #fff; margin-bottom: .45em; letter-spacing: -.01em; }
html:lang(ar) .hero h1 { line-height: 1.35; letter-spacing: 0; }
.hero h1 em { font-style: normal; color: var(--g300); }
.hero p.lead { font-size: 1.15rem; color: var(--g200); max-width: 60ch; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(28, 19, 4, .9), rgba(28, 19, 4, .55));
  border-top: 1px solid rgba(217, 190, 116, .28); backdrop-filter: blur(6px);
}
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 22px 16px; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; inset-inline-start: 0; top: 24%; bottom: 24%; width: 1px; background: rgba(217, 190, 116, .3); }
.stat b { direction: ltr; unicode-bidi: isolate; display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--g300); line-height: 1.1; }
.stat span { font-size: .85rem; color: var(--g200); letter-spacing: .04em; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(70px, 9vw, 120px) 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--g950); color: var(--g200); }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .eyebrow { color: var(--g300); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head .eyebrow { color: var(--g600); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section.dark .section-head p { color: var(--g200); opacity: .85; }

/* saw-tooth divider echoing the logo's blade */
.saw-top::before, .saw-bottom::after {
  content: ""; position: absolute; inset-inline: 0; height: 14px; z-index: 3; pointer-events: none; background-repeat: repeat-x;
}
.saw-top::before {
  top: -13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 14 L28 14 L28 0 Z' fill='%231c1304'/%3E%3C/svg%3E");
}
.saw-bottom::after {
  bottom: -13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 0 L28 0 L0 14 Z' fill='%231c1304'/%3E%3C/svg%3E");
}
[dir="rtl"] .saw-top::before, [dir="rtl"] .saw-bottom::after { transform: scaleX(-1); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-media { position: relative; padding-bottom: 12%; }
.about-media .img-main { border-radius: var(--radius-lg); aspect-ratio: 4 / 5; object-fit: cover; width: 86%; box-shadow: var(--shadow-lg); }
.about-media .img-sub {
  position: absolute; inset-inline-end: 0; bottom: 0; width: 52%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg); border: 6px solid var(--bg-alt); box-shadow: var(--shadow-lg);
}
.about-badge {
  position: absolute; top: 6%; inset-inline-end: 4%; width: 116px; height: 116px; border-radius: 50%;
  background: var(--g50); padding: 6px; box-shadow: var(--shadow), 0 0 0 3px var(--g500);
}
.about-text h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.about-text p { color: var(--muted); }
.about-text p strong { color: var(--g700); }

.timeline { margin-top: 2rem; border-inline-start: 2px solid var(--g300); padding-inline-start: 28px; display: grid; gap: 22px; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; inset-inline-start: -37px; top: .45em; width: 14px; height: 14px;
  border-radius: 50%; background: var(--g600); box-shadow: 0 0 0 4px var(--g100), 0 0 0 5px var(--g400);
}
.tl-year { font-family: var(--font-head); font-weight: 700; color: var(--g600); font-size: 1.35rem; line-height: 1.2; }
.tl-item p { margin: .15em 0 0; color: var(--muted); font-size: .98rem; }

/* ---------- Mission & vision ---------- */
#vision { padding-top: 0; }
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mv-card {
  position: relative; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg);
  background: var(--g100); border: 1px solid var(--line); overflow: hidden;
}
.mv-card.vision { background: var(--g900); color: var(--g200); border-color: transparent; }
.mv-card.vision h3 { color: #fff; }
.mv-card .ico {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--g600); color: #fff; margin-bottom: 1.2rem;
}
.mv-card .ico svg { width: 28px; height: 28px; }
.mv-card h3 { font-size: 1.8rem; }
.mv-card ul { display: grid; gap: .7em; margin-top: 1em; }
.mv-card li { display: flex; gap: .7em; align-items: flex-start; }
.mv-card li svg { margin-top: .32em; color: var(--g500); width: 1.1em; height: 1.1em; }
.mv-card.vision li svg { color: var(--g300); }
.mv-card > p { color: inherit; opacity: .9; }

/* ---------- Products ---------- */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.p-card {
  background: var(--bg-alt); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s;
}
.p-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.p-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--g800); }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.p-card:hover .p-media img { transform: scale(1.08); }
.p-media.pattern {
  display: grid; place-items: center; color: var(--g300);
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(88deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 14px),
    linear-gradient(135deg, var(--g700), var(--g900));
}
.p-media.pattern svg { width: 72px; height: 72px; stroke-width: 1.2; opacity: .9; }
.p-num {
  position: absolute; top: 12px; inset-inline-start: 12px; font-family: var(--font-head); font-weight: 700;
  background: rgba(28, 19, 4, .78); color: var(--g300); padding: .1em .65em; border-radius: 999px; font-size: .9rem;
  backdrop-filter: blur(4px);
}
.p-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.p-body h3 { font-size: 1.25rem; margin-bottom: .35em; display: flex; align-items: center; gap: .5em; }
.p-body h3 svg { color: var(--g600); }
.p-body p { color: var(--muted); font-size: .94rem; margin-bottom: 1em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1em; }
.tags span { font-size: .76rem; padding: .2em .75em; border-radius: 999px; background: var(--g100); color: var(--g700); font-weight: 600; border: 1px solid var(--line); }
.p-link { margin-top: auto; display: inline-flex; align-items: center; gap: .4em; color: var(--g600); font-weight: 600; font-size: .92rem; }
.p-link:hover { color: var(--g800); gap: .7em; }
.p-link { transition: gap .2s, color .2s; }
.p-cta {
  background: linear-gradient(160deg, var(--g600), var(--g800)); color: #fff; border: 0; padding: 30px 26px;
  display: flex; flex-direction: column; justify-content: center; gap: 1rem; text-align: start;
}
.p-cta h3 { color: #fff; font-size: 1.5rem; margin: 0; }
.p-cta p { color: var(--g100); margin: 0; }

/* ---------- Portfolio / gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter {
  padding: .55em 1.2em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg-alt);
  font-weight: 600; font-size: .92rem; color: var(--g700); transition: all .2s;
}
.filter:hover { border-color: var(--g500); }
.filter.active { background: var(--g600); border-color: var(--g600); color: #fff; }
.filter small { opacity: .7; margin-inline-start: .35em; font-weight: 500; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.g-item {
  position: relative; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  background: var(--g200); box-shadow: var(--shadow); animation: pop .5s both;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.g-item:hover img { transform: scale(1.09); }
.g-item::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: linear-gradient(0deg, rgba(28, 19, 4, .85), transparent 60%);
}
.g-cap {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 14px 16px; text-align: start; color: #fff;
  transform: translateY(8px); opacity: 0; transition: all .3s; font-size: .88rem; line-height: 1.35;
}
.g-cap b { display: block; font-size: .98rem; }
.g-cap span { color: var(--g300); font-size: .8rem; }
.g-item:hover::after, .g-item:focus-visible::after { opacity: 1; }
.g-item:hover .g-cap, .g-item:focus-visible .g-cap { transform: none; opacity: 1; }
@media (hover: none) { .g-item::after { opacity: 1; } .g-cap { opacity: 1; transform: none; } }
.more-wrap { text-align: center; margin-top: 36px; }

/* ---------- Factory ---------- */
.factory-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 120px; gap: 14px; margin-top: 8px; }
.f-item { position: relative; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--g800); }
.f-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.f-item:hover img { transform: scale(1.07); }
.f-item.a { grid-column: span 6; grid-row: span 3; }
.f-item.b { grid-column: span 3; grid-row: span 2; }
.f-item.c { grid-column: span 3; grid-row: span 2; }
.f-item.d { grid-column: span 3; grid-row: span 1; }
.f-item.e { grid-column: span 3; grid-row: span 1; }
.f-item.f { grid-column: span 3; grid-row: span 2; }
.f-item.g { grid-column: span 3; grid-row: span 2; }
.f-item.h { grid-column: span 6; grid-row: span 2; }
.f-tag {
  position: absolute; inset-inline-start: 10px; bottom: 10px; background: rgba(28, 19, 4, .82); color: var(--g200);
  padding: .2em .8em; border-radius: 999px; font-size: .78rem; backdrop-filter: blur(4px);
}
.factory-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.factory-intro .section-head { margin: 0; }
.cap-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.cap-list li { display: flex; gap: .6em; align-items: center; color: var(--g200); font-size: .95rem; }
.cap-list svg { color: var(--g400); }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card {
  padding: 30px 28px; border-radius: var(--radius-lg); background: var(--bg-alt); border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s, border-color .3s; position: relative; overflow: hidden;
}
.why-card::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--g600), var(--g300)); transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
[dir="rtl"] .why-card::before { transform-origin: right; }
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--g300); }
.why-card:hover::before { transform: scaleX(1); }
.why-card .ico {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--g100); color: var(--g600); border: 1px solid var(--line);
}
.why-card h3 { font-size: 1.2rem; }
.why-card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- Clients & partners ---------- */
.logos-block + .logos-block { margin-top: 64px; }
.logos-title { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; font-family: var(--font-head); font-size: 1.5rem; color: var(--g900); }
.logos-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.logos { --cols: 6; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.logo-cell {
  flex: 0 0 calc((100% - (var(--cols) - 1) * 16px) / var(--cols));
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 16 / 10;
  display: grid; place-items: center; padding: 16px 20px; transition: all .3s;
}
.logo-cell img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(1) opacity(.75); transition: filter .3s, transform .3s; }
.logo-cell:hover { box-shadow: var(--shadow); border-color: var(--g300); }
.logo-cell:hover img { filter: none; transform: scale(1.06); }

/* ---------- Developments we served ---------- */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.dev {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--g800);
  box-shadow: var(--shadow);
}
.dev img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.dev:hover img { transform: scale(1.1); }
.dev::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(28, 19, 4, .9), transparent 62%); }
.dev span { position: absolute; z-index: 2; inset-inline: 12px; bottom: 10px; color: #fff; font-weight: 600; font-size: .92rem; line-height: 1.3; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.contact-list { display: grid; gap: 14px; margin: 26px 0 30px; }
.c-row {
  display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius);
  background: rgba(246, 238, 218, .06); border: 1px solid rgba(217, 190, 116, .2); transition: background .2s, border-color .2s;
}
a.c-row:hover { background: rgba(246, 238, 218, .13); border-color: var(--g400); }
.c-row .ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--g600); color: #fff; flex: none; }
.c-row small { display: block; color: var(--g300); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
html:lang(ar) .c-row small { letter-spacing: 0; text-transform: none; font-size: .85rem; }
.c-row b { font-weight: 600; color: #fff; word-break: break-word; }
.c-row bdi { unicode-bidi: isolate; }

.form-card { background: var(--g50); color: var(--text); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-lg); }
.section.dark .form-card h3, .form-card h3 { font-size: 1.6rem; color: var(--g900); }
.form-card p.sub { color: var(--muted); font-size: .95rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--g800); }
.field input, .field textarea {
  width: 100%; font: inherit; padding: .8em 1em; border-radius: 10px; border: 1.5px solid var(--g200);
  background: #fff; color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--g500); box-shadow: 0 0 0 4px rgba(168, 116, 0, .18); }
.field textarea { min-height: 120px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn-wa { background: #1f8a4c; color: #fff; }
.btn-wa:hover { background: #17703d; }
.form-note { margin: 14px 0 0; font-size: .85rem; color: var(--muted); min-height: 1.4em; }
.form-note a, .form-note .note-link { color: var(--g300); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.form-note a:hover, .form-note .note-link:hover { color: var(--g100); }

/* ---------- Footer ---------- */
.site-footer { background: var(--g950); color: var(--g200); padding: 56px 0 28px; border-top: 1px solid rgba(217, 190, 116, .2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(217, 190, 116, .18); }
.foot-brand { display: flex; gap: 16px; align-items: center; }
.foot-brand .brand-mark { width: 74px; height: 74px; }
.foot-brand p { margin: 0; font-size: .92rem; color: var(--g300); max-width: 36ch; }
.site-footer h4 { color: #fff; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 1em; }
html:lang(ar) .site-footer h4 { font-family: var(--font-body); }
.site-footer li { margin-bottom: .45em; font-size: .94rem; }
.site-footer li a:hover { color: var(--g300); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; font-size: .85rem; color: var(--g300); opacity: .85; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 10, 2, .95); display: none;
  align-items: center; justify-content: center; padding: 56px 70px 70px;
}
.lightbox.open { display: flex; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 170px); border-radius: 10px; box-shadow: 0 20px 70px rgba(0, 0, 0, .7); object-fit: contain; }
.lightbox figcaption { color: var(--g200); text-align: center; font-size: .98rem; }
.lightbox figcaption b { color: #fff; display: block; font-size: 1.1rem; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(217, 190, 116, .5);
  background: rgba(28, 19, 4, .7); color: var(--g100); display: grid; place-items: center; transition: background .2s;
}
.lb-btn:hover { background: var(--g600); }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { inset-inline-start: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 24px; inset-inline-start: 24px; color: var(--g300); font-size: .9rem; }

/* ---------- Back to top & reveal ---------- */
.to-top {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  background: var(--g600); color: #fff; border: 0; display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--g700); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .logos { --cols: 4; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .menu-btn { display: inline-flex; margin-inline-start: auto; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: rgba(28, 19, 4, .98); flex-direction: column; align-items: stretch;
    padding: 12px 20px 24px; gap: 0; margin: 0;
    transform: translateY(calc(-100% - var(--header-h) - 12px)); visibility: hidden; transition: transform .35s, visibility 0s linear .35s;   /* fully off-screen, and out of the tab order while closed */
    border-bottom: 1px solid rgba(217, 190, 116, .25); max-height: calc(100vh - var(--header-h)); overflow: auto;
  }
  .nav.open { transform: none; visibility: visible; transition: transform .35s, visibility 0s; }
  .nav a { padding: .9em .4em; border-bottom: 1px solid rgba(217, 190, 116, .12); font-size: 1.02rem; }
  .nav a::after { display: none; }
  .lang-toggle { margin-top: 14px; justify-content: center; }
  .about-grid, .contact-grid, .factory-intro, .mv-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 520px; margin-inline: auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 130px; }
  .stat { padding: 14px 4px; }
  .stat span { font-size: .78rem; }
  .products-grid, .why-grid { grid-template-columns: 1fr; }
  .logos { --cols: 2; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .factory-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
  .f-item.a, .f-item.h { grid-column: span 2; grid-row: span 2; }
  .f-item.b, .f-item.c, .f-item.d, .f-item.e, .f-item.f, .f-item.g { grid-column: span 1; grid-row: span 1; }
  .cap-list { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .lightbox { padding: 60px 12px 64px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
  .lb-prev { inset-inline-start: calc(50% - 60px); }
  .lb-next { inset-inline-end: calc(50% - 60px); }
  .foot-grid { grid-template-columns: 1fr; }
}
/* ---------- arriving from the gateway ----------
   The gateway leaves a flag; the page's head script turns it into <html data-enter="light|dark">.
   A cover in the page's own colour (the same colour the gateway just filled the screen with)
   dissolves, then the header drops in and the hero rises into place. */
html[data-enter]::after {
  content: ""; position: fixed; inset: 0; z-index: 99999; pointer-events: none; background: #1c1304;
  animation: coverFade 1s cubic-bezier(.4, 0, .2, 1) .1s both;
}
html[data-enter="light"]::after { background: #fbf7ec; }
@keyframes coverFade { 0% { opacity: 1; visibility: visible; } 99% { opacity: 0; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@keyframes enterUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes enterDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes enterScale { from { opacity: 0; transform: translateY(24px) scale(.95); } to { opacity: 1; transform: none; } }
/* fill-mode "backwards": hidden during the delay, and afterwards the elements go back to their normal styles (hover effects keep working) */
html[data-enter] .site-header { animation: enterDown .9s cubic-bezier(.2, .7, .2, 1) .55s backwards; }
html[data-enter] .hero-content > * { animation: enterUp 1s cubic-bezier(.2, .7, .2, 1) backwards; }
html[data-enter] .hero-content > :nth-child(1) { animation-delay: .5s; }
html[data-enter] .hero-content > :nth-child(2) { animation-delay: .6s; }
html[data-enter] .hero-content > :nth-child(3) { animation-delay: .7s; }
html[data-enter] .hero-content > :nth-child(4) { animation-delay: .8s; }
html[data-enter] .hero-stats { animation: enterUp 1s cubic-bezier(.2, .7, .2, 1) .95s backwards; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .g-item { animation: none; }
  html[data-enter]::after { display: none; }
  html[data-enter] .site-header, html[data-enter] .hero-content > *, html[data-enter] .hero-stats { animation: none; }
}
