:root {
  --navy-950: #050910;
  --navy-900: #08131f;
  --navy-800: #0d1c2e;
  --navy-700: #16304a;
  --gold: #d4af37;
  --gold-bright: #f0d56a;
  --gold-dim: rgba(212, 175, 55, 0.22);
  --teal: #3ecfc4;
  --teal-dim: rgba(62, 207, 196, 0.18);
  --silver: #c5ccd4;
  --white: #f6f8fb;
  --muted: #93a0b0;
  --line: rgba(212, 175, 55, 0.22);
  --line-soft: rgba(197, 204, 212, 0.12);
  --header-h: 84px;
  --font-en: "Rajdhani", "Manrope", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-ar: "Tajawal", "Manrope", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  color: var(--white);
  background: var(--navy-950);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

html[lang="ar"] body { font-family: var(--font-ar); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
ul { list-style: none; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: var(--navy-950);
  padding: 8px 12px;
  z-index: 200;
}
.skip-link:focus { top: 12px; }

h1, h2, h3, .display {
  font-family: var(--font-en);
  letter-spacing: 0.03em;
  line-height: 1.1;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { font-family: var(--font-ar); letter-spacing: 0; }

.site-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 90% -10%, rgba(212, 175, 55, 0.12), transparent 50%),
    radial-gradient(ellipse 70% 45% at -10% 90%, rgba(62, 207, 196, 0.1), transparent 50%),
    linear-gradient(180deg, #050910 0%, #08131f 50%, #050910 100%);
}
.site-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 207, 196, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
}
.site-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.012) 2px,
    rgba(255, 255, 255, 0.012) 4px
  );
}

main, footer { position: relative; z-index: 1; }

/* Wordmark */
.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  text-align: center;
}
.wordmark strong {
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--white);
}
.wordmark span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--gold);
  font-size: 0.62em;
}
.wordmark span::before,
.wordmark span::after {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

html[lang="ar"] .wordmark strong,
html[lang="ar"] .wordmark span {
  font-family: var(--font-ar);
  letter-spacing: 0.08em;
}

.logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.logo-stack img { width: min(220px, 70%); height: auto; filter: drop-shadow(0 12px 30px rgba(212, 175, 55, 0.28)); }
.logo-stack .wordmark { font-size: 1.55rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-h);
  background: rgba(5, 9, 16, 0.78);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  min-width: 118px;
}
.brand img { height: 42px; width: auto; }
.brand .wordmark { font-size: 0.72rem; }
.brand .wordmark span { font-size: 0.58em; gap: 5px; }
.brand .wordmark span::before,
.brand .wordmark span::after { width: 10px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--silver);
}
.nav-links a:hover { color: var(--gold-bright); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 7px 11px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
}
.lang-toggle button.active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--navy-950);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  padding: 12px 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(180deg, #f0d56a, #c49a2a);
  color: var(--navy-950);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.28);
}
.btn-silver {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(62, 207, 196, 0.55);
  box-shadow: 0 0 18px rgba(62, 207, 196, 0.12);
}
.btn-whatsapp { background: #128c4b; color: #fff; }

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  position: relative;
  margin: 0 auto;
}
.menu-btn span::before,
.menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: center;
  padding: 56px 0 72px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,9,16,0.92) 0%, rgba(5,9,16,0.72) 46%, rgba(5,9,16,0.45) 100%),
    linear-gradient(180deg, rgba(5,9,16,0.35), rgba(5,9,16,0.78)),
    url("../assets/hero-command.jpg") center/cover no-repeat;
}
html[dir="rtl"] .hero-bg {
  background:
    linear-gradient(270deg, rgba(5,9,16,0.92) 0%, rgba(5,9,16,0.72) 46%, rgba(5,9,16,0.45) 100%),
    linear-gradient(180deg, rgba(5,9,16,0.35), rgba(5,9,16,0.78)),
    url("../assets/hero-command.jpg") center/cover no-repeat;
}
.hero-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(62, 207, 196, 0.08), transparent);
  animation: scan 7s linear infinite;
  mix-blend-mode: screen;
}
@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0.04em; text-transform: none; }
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  font-weight: 700;
  max-width: 13ch;
  margin-bottom: 16px;
  text-shadow: 0 10px 40px rgba(0,0,0,0.45);
}
html[lang="ar"] .hero h1 { max-width: 16ch; }
.hero-lead {
  color: var(--silver);
  font-size: 1.08rem;
  max-width: 50ch;
  margin-bottom: 26px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.hero-phone { display: flex; flex-direction: column; gap: 4px; }
.hero-phone span { color: var(--muted); font-size: 0.8rem; }
.hero-phone a {
  color: var(--gold-bright);
  text-decoration: none;
  font-family: var(--font-en);
  font-size: 1.4rem;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}

.hud-frame {
  position: relative;
  padding: 22px;
  background: rgba(8, 19, 31, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.4), inset 0 0 40px rgba(62, 207, 196, 0.05);
}
.hud-frame::before,
.hud-frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--gold);
}
.hud-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.stat {
  padding: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(5, 9, 16, 0.4);
}
.stat strong {
  display: block;
  font-family: var(--font-en);
  color: var(--gold-bright);
  font-size: 1.2rem;
}
.stat span { color: var(--muted); font-size: 0.8rem; }

.trust-bar {
  border-block: 1px solid var(--line);
  background: rgba(8, 19, 31, 0.85);
  padding: 16px 0;
  backdrop-filter: blur(10px);
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  color: var(--silver);
  font-weight: 600;
  font-size: 0.88rem;
}
.trust-row span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline-end: 8px;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  transform: translateY(-1px);
}

section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.kicker {
  color: var(--teal);
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 10px;
}
html[lang="ar"] .kicker { font-family: var(--font-ar); letter-spacing: 0.06em; text-transform: none; }
.section-head h2 { font-size: clamp(2rem, 3.4vw, 3.2rem); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.04rem; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.service-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: rgba(13, 28, 46, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28), 0 0 24px var(--gold-dim);
}
.service-card .media {
  position: relative;
  height: 168px;
  overflow: hidden;
}
.service-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.4s ease;
}
.service-card:hover .media img { transform: scale(1.1); }
.service-card .media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(5,9,16,0.85));
}
.service-card .body { padding: 18px 18px 22px; }
.service-card h3 { font-size: 1.28rem; margin-bottom: 8px; color: var(--gold-bright); }
.service-card p { color: var(--muted); font-size: 0.94rem; }

.sector-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 12px;
}
.sector {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line-soft);
}
.sector::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,9,16,0.1), rgba(5,9,16,0.82));
}
.sector span { position: relative; }
.sector:nth-child(1) { grid-row: 1 / 3; background-image: url("../assets/about-villa.jpg"); }
.sector:nth-child(2) { background-image: url("../assets/service-access.jpg"); }
.sector:nth-child(3) { background-image: url("../assets/service-automation.jpg"); }
.sector:nth-child(4) { background-image: url("../assets/service-cctv.jpg"); }
.sector:nth-child(5) { background-image: url("../assets/service-intercom.jpg"); }

.process { position: relative; }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.step {
  border: 1px solid var(--line-soft);
  padding: 22px;
  background: rgba(13, 28, 46, 0.55);
  position: relative;
}
.step .num {
  font-family: var(--font-en);
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--muted); }

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}
.about-copy p { color: var(--muted); margin-bottom: 14px; }
.checklist { display: grid; gap: 10px; margin-top: 16px; }
.checklist li { display: flex; gap: 10px; font-weight: 600; }
.checklist svg { flex-shrink: 0; margin-top: 3px; }

.about-visual {
  position: relative;
  min-height: 420px;
  background: url("../assets/about-villa.jpg") center/cover no-repeat;
  border: 1px solid var(--line);
}
.about-panel {
  position: absolute;
  inset: auto 18px 18px 18px;
  background: rgba(5, 9, 16, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  padding: 22px;
}
.about-panel h3 { font-size: 1.45rem; margin-bottom: 8px; color: var(--gold-bright); }
.about-panel p { color: var(--silver); margin-bottom: 14px; }
.about-panel a.phone {
  color: var(--white);
  font-family: var(--font-en);
  font-size: 1.55rem;
  font-weight: 700;
  text-decoration: none;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  margin-bottom: 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
}
.contact-card,
.form-card {
  background: rgba(13, 28, 46, 0.7);
  border: 1px solid var(--line);
  padding: 26px;
}
.contact-visual {
  height: 160px;
  margin-bottom: 16px;
  background: url("../assets/social/post-05.jpg") center/cover no-repeat;
  border: 1px solid var(--line-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  aspect-ratio: 4 / 5;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-grid a:hover img { transform: scale(1.06); }

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  color: var(--gold-bright);
}
.social:hover { background: rgba(212, 175, 55, 0.08); }

@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
.contact-methods { display: grid; gap: 10px; }
.contact-methods a,
.coverage {
  display: block;
  text-decoration: none;
  padding: 14px;
  border: 1px solid var(--line-soft);
  font-weight: 700;
}
.contact-methods a small,
.coverage small {
  display: block;
  font-weight: 500;
  color: var(--muted);
}
.ltr { direction: ltr; unicode-bidi: isolate; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 6px; color: var(--silver); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 12px 14px;
  background: rgba(5, 9, 16, 0.7);
  color: var(--white);
}
input:focus, select:focus, textarea:focus {
  outline: 1px solid var(--gold);
}
textarea { min-height: 120px; resize: vertical; }
.form-note { color: var(--muted); font-size: 0.84rem; margin-top: 10px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 110px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.footer-brand { text-decoration: none; }
.footer-brand img { height: 64px; width: auto; margin-inline: auto; }
.footer-brand .wordmark { font-size: 1rem; margin-top: 8px; }
.footer-meta { text-align: end; }
html[dir="rtl"] .footer-meta { text-align: start; }
.footer-meta a { color: var(--gold-bright); text-decoration: none; font-weight: 700; }

.mobile-cta {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  background: rgba(8, 19, 31, 0.94);
  border: 1px solid var(--line);
  padding: 8px;
  gap: 8px;
  backdrop-filter: blur(12px);
}
.mobile-cta a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  padding: 12px 8px;
}
.mobile-cta .call { background: var(--navy-700); }
.mobile-cta .wa { background: #128c4b; }

@media (max-width: 980px) {
  :root { --header-h: 72px; }
  .brand {
    flex-direction: row;
    gap: 8px;
    min-width: 0;
  }
  .brand img { height: 36px; }
  .brand .wordmark { font-size: 0.64rem; align-items: flex-start; text-align: start; }
  .hero-grid, .about-grid, .contact-grid, .service-grid, .steps, .form-grid, .sector-grid {
    grid-template-columns: 1fr;
  }
  .sector-grid { grid-template-rows: none; }
  .sector:nth-child(1) { grid-row: auto; }
  .sector { min-height: 150px; }
  .nav-links, .btn-header-call { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .nav-links.open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 90;
    background: #0d1c2e;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 16px;
    border-bottom: 2px solid var(--gold);
    gap: 0;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65);
  }
  .nav-links.open a {
    padding: 14px 4px;
    font-size: 1.08rem;
    color: var(--white);
    border-bottom: 1px solid var(--line-soft);
  }
  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: rgba(0, 0, 0, 0.55);
    z-index: 70;
  }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 28px 0 96px; }
  .hero h1 { max-width: none; font-size: clamp(2rem, 9vw, 3.1rem); }
  .hero-phone, .hero-actions .btn-whatsapp { display: none; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { flex: 1; min-width: 140px; }
  .logo-stack img { width: min(160px, 48%); }
  .mobile-cta { display: flex; }
}

@media (max-width: 640px) {
  .container { width: min(1180px, calc(100% - 24px)); }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-meta { text-align: center; }
  section { padding: 64px 0; }
  .about-visual { min-height: 360px; }
}
