/* ============================================================
   Al-Arak Engineering — Standalone Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --navy: #36363a;
  --navy-deep: #25252a;
  --steel: #6b6b73;
  --gold: #f3a200;
  --gold-soft: #f7c04a;

  --bg: #ffffff;
  --fg: #36363a;
  --muted: #f3f3f5;
  --muted-fg: #6b6b73;
  --border: #e7e7ea;
  --card: #ffffff;

  --radius: 0.625rem;
  --shadow-card: 0 10px 30px -12px rgba(37, 37, 42, 0.18);
  --shadow-elegant: 0 20px 50px -20px rgba(37, 37, 42, 0.35);
  --gradient-hero: linear-gradient(135deg, rgba(37,37,42,0.92), rgba(54,54,58,0.78));
  --gradient-gold: linear-gradient(135deg, var(--gold), var(--gold-soft));
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; border: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Almarai', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: 'Montserrat', system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; color: inherit; }
input, textarea { font: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

section { padding: 6rem 0; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { height: 2.75rem; width: auto; object-fit: contain; }
.brand-text { display: none; flex-direction: column; line-height: 1.2; color: #fff; }
.scrolled .brand-text { color: var(--navy); }
.brand-text strong { font-weight: 800; font-size: 1rem; }
.brand-text small { font-size: 0.7rem; opacity: 0.8; }
@media (min-width: 640px) { .brand-text { display: flex; } }

.nav-links { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links button.link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  transition: color 0.2s;
}
.scrolled .nav-links button.link { color: var(--navy); }
.nav-links button.link:hover { color: var(--gold); }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  transition: var(--transition);
  margin: 0 0.5rem;
}
.scrolled .lang-btn { border-color: rgba(54,54,58,0.2); color: var(--navy); }
.lang-btn:hover { background: rgba(255,255,255,0.1); }
.scrolled .lang-btn:hover { background: var(--navy); color: #fff; }

.cta-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--gold);
  color: var(--navy);
  transition: var(--transition);
}
.cta-btn:hover { filter: brightness(0.95); }

.menu-toggle { display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.menu-toggle .lang-btn { margin: 0; padding: 0.375rem 0.625rem; font-size: 0.875rem; }
.menu-toggle .icon-btn {
  padding: 0.5rem;
  border-radius: var(--radius);
  color: #fff;
}
.scrolled .menu-toggle .icon-btn { color: var(--navy); }

.mobile-menu {
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.mobile-menu ul { padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu button {
  width: 100%;
  text-align: start;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--navy);
}
.mobile-menu button:hover { background: var(--muted); }
.mobile-menu .cta-btn { margin-top: 0.5rem; padding: 0.75rem 1.25rem; text-align: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy-deep);
  overflow: hidden;
  padding: 7rem 0 5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--gradient-hero);
}
.hero-inner { position: relative; z-index: 1; color: #fff; max-width: 48rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold-soft);
}
.badge .dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 800;
  margin-top: 1.5rem;
}
.hero h1 .accent { color: var(--gold); }
.hero p {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(255,255,255,0.85);
  line-height: 1.9;
  max-width: 42rem;
}
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-elegant);
  transition: var(--transition);
}
.btn-primary:hover { filter: brightness(0.95); }
.btn-outline {
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-weight: 500;
  transition: var(--transition);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.hero-stats {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 36rem;
}
[dir="rtl"] .hero-stat { border-right: 2px solid var(--gold); padding-right: 1rem; }
[dir="ltr"] .hero-stat { border-left: 2px solid var(--gold); padding-left: 1rem; }
.hero-stat .num { font-size: 1.875rem; font-weight: 800; color: var(--gold); }
.hero-stat .lbl { font-size: 0.875rem; color: rgba(255,255,255,0.75); margin-top: 0.25rem; }

/* ---------- Section heading ---------- */
.heading { max-width: 48rem; margin: 0 auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.heading h2 {
  font-size: clamp(1.875rem, 3.5vw, 3rem);
  color: var(--navy);
}
.heading .rule {
  margin: 1rem auto 0;
  height: 4px; width: 5rem;
  background: var(--gold);
  border-radius: 9999px;
}
.heading .desc {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--muted-fg);
  line-height: 1.9;
}
@media (min-width: 640px) { .heading .desc { font-size: 1.125rem; } }

/* ---------- About ---------- */
#about { background: rgba(243, 243, 245, 0.5); }
.about-grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .about-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative;
  background: var(--card);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); }
.card-icon {
  width: 3.5rem; height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: var(--gradient-gold);
  color: var(--navy);
}
.card h3 { font-size: 1.5rem; color: var(--navy); margin-bottom: 1rem; }
.card p { color: var(--muted-fg); line-height: 1.9; font-size: 0.9375rem; }

/* ---------- Services ---------- */
.svc-card {
  position: relative;
  background: var(--card);
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elegant); border-color: rgba(243,162,0,0.6); }
.svc-card .head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.svc-icon {
  flex-shrink: 0;
  width: 3.5rem; height: 3.5rem;
  border-radius: 0.75rem;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.svc-card:hover .svc-icon { background: var(--gold); color: var(--navy); }
.svc-card h3 { font-size: 1.25rem; color: var(--navy); padding-top: 0.5rem; line-height: 1.3; }
.svc-card p { color: var(--muted-fg); line-height: 1.9; font-size: 0.9rem; }

/* ---------- Team ---------- */
#team {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}
#team::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, white 1px, transparent 1px),
                    radial-gradient(circle at 80% 60%, white 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.1;
}
#team .container { position: relative; }
#team .heading h2 { color: #fff; }
#team .text { margin-top: 2rem; color: rgba(255,255,255,0.85); line-height: 1.9; }
.team-stats {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (min-width: 1024px) { .team-stats { grid-template-columns: repeat(4, 1fr); } }
.team-stat {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: background 0.3s;
}
.team-stat:hover { background: rgba(255,255,255,0.1); }
.team-stat .ico {
  width: 3rem; height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 0.75rem;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-stat .num { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.team-stat .lbl { font-size: 0.875rem; color: rgba(255,255,255,0.75); margin-top: 0.25rem; }

/* ---------- Projects ---------- */
#projects { background: rgba(243, 243, 245, 0.5); }
.timeline { margin-top: 4rem; max-width: 56rem; margin-left: auto; margin-right: auto; position: relative; }
[dir="rtl"] .timeline::before { content: ""; position: absolute; top: 0; bottom: 0; right: 1rem; width: 1px; background: var(--border); }
[dir="ltr"] .timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 1rem; width: 1px; background: var(--border); }
@media (min-width: 768px) {
  [dir] .timeline::before { right: 50%; left: auto; transform: translateX(50%); }
}
.timeline ul { display: flex; flex-direction: column; gap: 2rem; }
.timeline li { position: relative; }
.timeline .dot {
  position: absolute;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(243, 243, 245, 0.5);
  top: 1.5rem;
  z-index: 2;
}
[dir="rtl"] .timeline .dot { right: 0.625rem; }
[dir="ltr"] .timeline .dot { left: 0.625rem; }
@media (min-width: 768px) {
  [dir] .timeline .dot { right: 50%; left: auto; transform: translateX(50%); }
}
.timeline .item { background: var(--card); border-radius: 0.75rem; padding: 1.5rem; border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.timeline .item .row { display: flex; gap: 0.75rem; align-items: flex-start; }
.timeline .item .row svg { color: var(--gold); flex-shrink: 0; margin-top: 0.125rem; }
.timeline .item p { color: var(--navy); font-weight: 500; line-height: 1.9; }
[dir="rtl"] .timeline > ul > li > div { padding-right: 3rem; }
[dir="ltr"] .timeline > ul > li > div { padding-left: 3rem; }
@media (min-width: 768px) {
  .timeline > ul > li > div { width: 50%; padding-left: 0; padding-right: 0; }
  [dir] .timeline > ul > li:nth-child(odd) > div { margin-inline-end: auto; padding-inline-end: 3rem; }
  [dir] .timeline > ul > li:nth-child(even) > div { margin-inline-start: auto; padding-inline-start: 3rem; }
}

/* ---------- Contact ---------- */
#contact {
  background: var(--navy-deep);
  color: #fff;
  padding-top: 6rem;
  padding-bottom: 0;
}
#contact .heading h2 { color: #fff; }
.contact-grid {
  margin-top: 4rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }

.form-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 2rem;
}
.form-card h3 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.875rem; color: rgba(255,255,255,0.8); margin-bottom: 0.5rem; }
.field input, .field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  transition: var(--transition);
  resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.5); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.15);
}
.send-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  transition: var(--transition);
}
.send-btn:hover { filter: brightness(0.95); }

.info-list { display: flex; flex-direction: column; gap: 1.25rem; }
.info-list h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.info-list .lead { color: rgba(255,255,255,0.75); line-height: 1.9; }
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}
a.info-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(243,162,0,0.4); }
.info-card .ic {
  flex-shrink: 0;
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.info-card:hover .ic { transform: scale(1.1); }
.info-card .lbl { font-size: 0.75rem; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.info-card .val { margin-top: 0.25rem; font-weight: 500; word-break: break-word; }

.legal-section { margin-top: 4rem; max-width: 72rem; margin-left: auto; margin-right: auto; }
.legal-section h3 { font-size: 1.125rem; color: rgba(255,255,255,0.9); margin-bottom: 1.25rem; }
.legal-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .legal-grid { grid-template-columns: repeat(3, 1fr); } }
.legal-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
.legal-item .ic {
  flex-shrink: 0;
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.5rem;
  background: rgba(243,162,0,0.15);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}
.legal-item .lbl { font-size: 0.75rem; color: rgba(243,162,0,0.9); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.legal-item .val { margin-top: 0.25rem; font-weight: 600; }

footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 2rem 0;
}
footer .row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}
@media (min-width: 640px) { footer .row { flex-direction: row; } }
footer .brand-foot { display: flex; align-items: center; gap: 0.75rem; }
footer .brand-foot img { height: 2.5rem; width: auto; object-fit: contain; }
footer .brand-foot strong { color: #fff; font-weight: 700; }

/* utilities */
.ltr { direction: ltr; text-align: left; }
.hidden { display: none; }
