/* ==========================================================================
   WAVENDO — نظام التصميم
   مستخرج من هوية الشركة: كحلي عميق + كهرماني
   ========================================================================== */

:root {
  /* الألوان */
  --navy-900: #04162c;
  --navy-800: #051b34;
  --navy-700: #072344;
  --navy-600: #0d2c51;
  --navy-500: #123a67;
  --amber:    #ffa600;
  --amber-lt: #fcb813;
  --amber-dk: #96460a;
  --white:    #ffffff;
  --grey-100: #f5f5f5;
  --grey-400: #9aa5b4;
  --grey-500: #70747a;

  /* أدوار */
  --bg:          var(--navy-800);
  --bg-alt:      var(--navy-700);
  --surface:     rgba(255,255,255,.045);
  --surface-brd: rgba(255,255,255,.10);
  --text:        var(--white);
  --text-muted:  var(--grey-400);
  --accent:      var(--amber);

  /* الخطوط */
  --font-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-disp: 'Barlow Condensed', 'Bahnschrift', 'Montserrat', sans-serif;

  /* المقاسات */
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 4px;

  /* الحركة */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- إعادة الضبط ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1,h2,h3,h4 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { margin: 0 0 1.1em; }

/* ---------- أدوات ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(72px, 11vw, 140px); }
.text-amber { color: var(--accent); }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--navy-900);
  padding: 12px 20px; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* عنوان القسم الصغير */
.eyebrow {
  font-family: var(--font-disp);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: ''; flex: 0 0 44px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.center .eyebrow { justify-content: center; }
.center .eyebrow::before {
  content: ''; flex: 0 0 44px; height: 1px;
  background: linear-gradient(270deg, var(--accent), transparent);
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px;
  font-weight: 700; font-size: .9rem;
  letter-spacing: .06em; text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: all .28s var(--ease);
  will-change: transform;
}
.btn-primary { background: var(--accent); color: var(--navy-900); }
.btn-primary:hover {
  background: var(--amber-lt);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -8px rgba(255,166,0,.55);
}
.btn-ghost { border-color: rgba(255,255,255,.28); color: var(--white); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 16px; height: 16px; }

/* ---------- الشعار ---------- */
.logo { display: inline-flex; align-items: center; }
.logo svg { height: 34px; width: auto; }
.logo img { height: 40px; width: auto; object-fit: contain; }

/* ---------- الهيدر ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-block: 18px;
  transition: background .35s var(--ease), padding .35s var(--ease),
              box-shadow .35s var(--ease), backdrop-filter .35s var(--ease);
}
.site-header.scrolled {
  background: rgba(5,27,52,.92);
  backdrop-filter: blur(14px);
  padding-block: 10px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.nav-list { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block;
  padding: 9px 16px;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  border-radius: var(--radius);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav-list a:hover { color: var(--accent); }
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a {
  background: var(--accent);
  color: var(--navy-900);
}

/* زر القائمة للموبايل */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
  position: relative; z-index: 210;
}
.nav-toggle span {
  display: block; height: 2px; width: 26px;
  margin: 6px auto; background: var(--white);
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- البطل ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  background: var(--navy-900);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center right; }
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--navy-900) 8%, rgba(4,22,44,.82) 42%, rgba(4,22,44,.25) 75%),
    linear-gradient(0deg, var(--navy-900) 2%, transparent 42%);
}
.hero-inner { position: relative; z-index: 2; padding-block: 140px 90px; width: 100%; }
.hero h1 { margin-bottom: 18px; text-transform: uppercase; }
.hero-sub {
  font-size: clamp(1rem, 2.1vw, 1.45rem);
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.9); font-weight: 500;
  margin-bottom: 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%;
  translate: -50% 0; z-index: 3;
  width: 24px; height: 40px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 13px;
}
.scroll-cue::after {
  content: ''; position: absolute; top: 7px; left: 50%;
  translate: -50% 0;
  width: 3px; height: 7px; border-radius: 2px;
  background: var(--accent);
  animation: cue 1.9s infinite;
}
@keyframes cue {
  0%,100% { transform: translateY(0); opacity: 1; }
  55%     { transform: translateY(13px); opacity: 0; }
}

/* ---------- شبكة الخدمات ---------- */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.card {
  position: relative;
  padding: 38px 32px 34px;
  background: var(--surface);
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.card::before {
  content: '';
  position: absolute; inset: 0 auto 0 0;
  width: 3px; background: var(--accent);
  scale: 1 0; transform-origin: bottom;
  transition: scale .4s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,166,0,.35); background: rgba(255,255,255,.07); }
.card:hover::before { scale: 1 1; transform-origin: top; }

.card-num {
  font-family: var(--font-disp);
  font-size: 3.4rem; font-weight: 700; line-height: 1;
  color: rgba(255,166,0,.16);
  position: absolute; top: 18px; right: 24px;
  transition: color .35s var(--ease);
}
.card:hover .card-num { color: rgba(255,166,0,.4); }

.card-icon {
  width: 46px; height: 46px; margin-bottom: 20px;
  color: var(--accent);
}
.card-icon svg { width: 100%; height: 100%; stroke-width: 1.4; }
.card h3 { text-transform: uppercase; letter-spacing: .02em; margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: .93rem; margin: 0; line-height: 1.75; }

/* ---------- أقسام مميزة ---------- */
.section-alt { background: var(--bg-alt); }
.section-deep { background: var(--navy-900); }

.split {
  display: grid; gap: clamp(36px, 6vw, 76px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
}
.split-media img { border-radius: var(--radius); width: 100%; }

/* رؤية / رسالة */
.pillar {
  padding: 34px 30px;
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius);
  background: var(--surface);
}
.pillar .eyebrow { margin-bottom: 10px; }
.pillar h3 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 14px; }
.pillar p { color: var(--text-muted); margin: 0; }

/* ---------- الأرقام ---------- */
.stats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { text-align: center; padding: 30px 18px; border: 1px solid var(--surface-brd); border-radius: var(--radius); }
.stat-num {
  font-family: var(--font-disp);
  font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 700;
  color: var(--accent); line-height: 1; display: block;
}
.stat-label {
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 10px; display: block;
}

/* ---------- العملاء ---------- */
.logo-grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--surface-brd);
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius);
  overflow: hidden;
}
.logo-cell {
  background: var(--bg);
  aspect-ratio: 16/9;
  display: grid; place-items: center;
  padding: 22px;
  transition: background .3s var(--ease);
}
.logo-cell:hover { background: var(--navy-600); }
.logo-cell img {
  max-height: 60px; width: auto;
  filter: grayscale(1) brightness(1.7); opacity: .6;
  transition: filter .35s var(--ease), opacity .35s var(--ease);
}
.logo-cell:hover img { filter: none; opacity: 1; }
.logo-cell span {
  font-family: var(--font-disp);
  font-size: 1.05rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  transition: color .3s var(--ease);
}
.logo-cell:hover span { color: var(--accent); }

/* ---------- الأعمال ---------- */
.work-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.work {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  background: var(--navy-600);
}
.work img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease); }
.work:hover img { scale: 1.06; }
.work-cap {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 24px 22px;
  background: linear-gradient(0deg, rgba(4,22,44,.96), transparent);
}
.work-cap h3 { margin: 0 0 4px; font-size: 1.15rem; text-transform: uppercase; }
.work-cap span { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }

/* ---------- نداء الإجراء ---------- */
.cta {
  position: relative;
  background: linear-gradient(120deg, var(--navy-700), var(--navy-500));
  overflow: hidden;
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 78% 50%, rgba(255,166,0,.20), transparent 62%);
}
.cta .wrap { position: relative; z-index: 2; }
.cta h2 { margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,.82); max-width: 54ch; margin-inline: auto; }

/* ---------- التواصل ---------- */
.contact-grid { display: grid; gap: clamp(34px, 6vw, 64px); grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

.info-item { display: flex; gap: 16px; margin-bottom: 28px; align-items: flex-start; }
.info-item .ico {
  flex: 0 0 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,166,0,.3);
  border-radius: var(--radius);
  color: var(--accent);
}
.info-item .ico svg { width: 19px; height: 19px; }
.info-item h4 {
  margin: 0 0 4px; font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.info-item p, .info-item a { margin: 0; color: var(--text-muted); font-size: .95rem; line-height: 1.6; }
.info-item a:hover { color: var(--accent); }

/* النموذج */
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.field { display: block; margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 7px;
  font-size: .74rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius);
  color: var(--white); font: inherit; font-size: .95rem;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,.08);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.3); }
.hp-field { position: absolute; left: -9999px; }

.notice { padding: 15px 18px; border-radius: var(--radius); margin-bottom: 22px; font-size: .92rem; }
.notice-ok  { background: rgba(46,160,90,.15); border: 1px solid rgba(46,160,90,.45); color: #7ee2a8; }
.notice-err { background: rgba(224,70,70,.13); border: 1px solid rgba(224,70,70,.4); color: #ff9c9c; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--surface-brd); line-height: 0; }
.map-embed iframe { width: 100%; height: 340px; border: 0; filter: grayscale(1) invert(.92) contrast(.85); }

/* ---------- الفوتر ---------- */
.site-footer { background: var(--navy-900); padding-block: clamp(56px, 8vw, 88px) 0; }
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1.6fr 1fr 1.2fr 1.4fr;
  padding-bottom: 52px;
}
.footer-col h4 {
  font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 20px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 11px; }
.footer-col a, .footer-col p { color: var(--text-muted); font-size: .9rem; }
.footer-col a { transition: color .22s var(--ease), padding-inline-start .22s var(--ease); }
.footer-col a:hover { color: var(--accent); padding-inline-start: 5px; }
.footer-about p { max-width: 34ch; margin-top: 18px; }

.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--surface-brd);
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: all .28s var(--ease);
}
.socials a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); padding: 0; }
.socials svg { width: 17px; height: 17px; }

.footer-bar {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-block: 24px;
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
}
.footer-bar p, .footer-bar a { margin: 0; font-size: .82rem; color: var(--grey-500); }
.footer-bar a:hover { color: var(--accent); }
.footer-legal { display: flex; gap: 22px; }

/* ---------- ترويسة الصفحات الداخلية ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(150px, 20vw, 220px) clamp(56px, 8vw, 84px);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 25%, rgba(255,166,0,.14), transparent 55%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { text-transform: uppercase; margin: 0; font-size: clamp(2.2rem, 6vw, 4.2rem); }
.crumbs { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 14px; }
.crumbs a:hover { color: var(--accent); }

/* ---------- محتوى المقالات ---------- */
.entry-content { max-width: 72ch; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 24px;
  border-inline-start: 3px solid var(--accent);
  color: var(--text-muted); font-style: italic;
}
.entry-content img { border-radius: var(--radius); margin-block: 1.5em; }

/* ---------- الظهور التدريجي ----------
   المحتوى ظاهر افتراضياً. الإخفاء يحدث فقط عندما يؤكد
   الجافاسكريبت أنه يعمل (بإضافة .js على <html>)، حتى لا
   يختفي الموقع أبداً إذا فشل السكربت أو حجبه المتصفح. */
.reveal { opacity: 1; transform: none; }

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- الاستجابة ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0;
    background: rgba(4,22,44,.985);
    backdrop-filter: blur(10px);
    display: grid; place-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity .32s var(--ease);
    z-index: 200;
  }
  .nav-open .site-nav { opacity: 1; pointer-events: auto; }
  .nav-list { flex-direction: column; gap: 8px; }
  .nav-list a { font-size: 1.05rem; padding: 12px 26px; }
  .hero-bg img { object-position: 72% center; }
  .hero-bg::after {
    background:
      linear-gradient(90deg, var(--navy-900) 12%, rgba(4,22,44,.72) 62%, rgba(4,22,44,.42) 100%),
      linear-gradient(0deg, var(--navy-900) 4%, transparent 48%);
  }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bar { flex-direction: column; align-items: flex-start; }
  .card { padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .js .reveal { opacity: 1 !important; transform: none !important; }
}
