/* ==========================================================================
   Digistry Solutions — Landing Page
   Brand palette derived from the layered emblem:
   deep navy #0B2447 · blues #1B5E96 / #2E86C1 · amber accent #F4A261
   ========================================================================== */

:root {
  /* Brand */
  --navy-900: #081a36;
  --navy-850: #0b2447;
  --navy-800: #0e2c54;
  --blue-700: #1b5e96;
  --blue-500: #2e86c1;
  --blue-400: #4aa6dd;
  --teal-400: #38bdf8;
  --amber: #f4a261;
  --amber-soft: #f6b380;

  /* Surfaces */
  --bg: #07142b;
  --bg-2: #0b2042;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #eaf2fb;
  --text-soft: #a9bdd6;
  --text-dim: #7892b3;

  /* Effects */
  --grad-brand: linear-gradient(135deg, var(--blue-400), var(--teal-400));
  --grad-warm: linear-gradient(135deg, var(--blue-500), var(--amber));
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(74, 166, 221, 0.25), 0 20px 60px -20px rgba(46, 134, 193, 0.45);

  --container: 1180px;
  --radius: 16px;
  --radius-lg: 22px;
  --ease: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Plus Jakarta Sans', var(--font-body);
  --font-ar: 'IBM Plex Sans Arabic', var(--font-body);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 600px at 80% -10%, rgba(46, 134, 193, 0.18), transparent 60%),
    radial-gradient(700px 500px at 0% 10%, rgba(27, 94, 150, 0.16), transparent 55%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

::selection { background: rgba(244, 162, 97, 0.35); color: #fff; }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: clamp(72px, 11vw, 130px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); }
.section-alt::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head);
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: 12px 22px; cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 0.875rem; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }

.btn-primary {
  color: #04101f;
  background: var(--grad-brand);
  box-shadow: 0 10px 30px -10px rgba(74, 166, 221, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(74, 166, 221, 0.9); }

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--blue-400); background: rgba(255, 255, 255, 0.15); }

/* Language toggle */
.lang-toggle {
  min-width: 42px; height: 38px; padding: 0 12px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.lang-toggle:hover { color: #fff; border-color: var(--blue-400); background: rgba(74, 166, 221, 0.16); }

/* ===== Navbar ===== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 300;
  transition: background var(--ease), border-color var(--ease), backdrop-filter var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 18, 38, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.brand-text { font-family: var(--font-head); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.02em; }
.brand-dot { color: var(--amber); }

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative; font-size: 0.92rem; font-weight: 500;
  color: var(--text-soft); padding: 8px 14px; border-radius: 999px;
  transition: color var(--ease), background var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--ease), opacity var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.34; }
.orb-1 { width: 460px; height: 460px; top: -140px; right: -80px; background: radial-gradient(circle, var(--blue-500), transparent 70%); }
.orb-2 { width: 400px; height: 400px; top: 120px; left: -120px; background: radial-gradient(circle, var(--blue-700), transparent 70%); }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--text-soft);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 15px 7px 12px; border-radius: 999px; margin-bottom: 26px;
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(244,162,97,0.18); }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 800; line-height: 1.06; letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--text-soft); max-width: 560px; margin-bottom: 14px; }
.hero-lead em { color: var(--amber-soft); font-style: normal; font-weight: 600; }
.hero-lead-ar {
  font-family: var(--font-ar); font-size: 1.02rem; color: var(--text-dim);
  max-width: 560px; margin-bottom: 30px; line-height: 1.9;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero visual / emblem */
.hero-visual { display: flex; justify-content: center; }
.emblem-card {
  width: 100%; max-width: 360px;
  background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border-strong);
  border-radius: 26px; padding: 38px 34px;
  box-shadow: var(--shadow-glow); backdrop-filter: blur(14px);
}
.emblem-stack { position: relative; width: 110px; height: 96px; margin: 0 auto 26px; }
.emblem-sq { position: absolute; width: 66px; height: 66px; border-radius: 16px; display: grid; place-items: center; }
.sq-back { left: 0; top: 22px; background: var(--blue-700); opacity: 0.9; }
.sq-mid { left: 20px; top: 11px; background: var(--blue-500); opacity: 0.92; }
.sq-front {
  left: 40px; top: 0; background: var(--navy-850);
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.9rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 14px 30px -10px rgba(0,0,0,0.6);
}
.emblem-pulse {
  position: absolute; right: 30px; bottom: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(244,162,97,0.5);
  animation: ping 2.4s ease-out infinite;
}
.emblem-meta { text-align: center; }
.emblem-name { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; letter-spacing: -0.02em; }
.emblem-tag { display: block; font-size: 0.66rem; font-weight: 600; color: var(--blue-400); letter-spacing: 0.18em; margin-top: 4px; }
.emblem-line { height: 1.5px; background: linear-gradient(90deg, transparent, var(--amber), transparent); margin: 18px 0; }
.emblem-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.emblem-chips span {
  font-size: 0.74rem; font-weight: 600; color: var(--text-soft);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px;
}

/* ===== Section heads ===== */
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-kicker {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue-400); margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.9rem, 3.8vw, 2.7rem); line-height: 1.12; letter-spacing: -0.02em;
}
.section-sub { color: var(--text-soft); font-size: 1.05rem; margin-top: 16px; }

/* ===== Cards ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
  transition: transform var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow-lg); }

/* Service card */
.service-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(74,166,221,0.22), rgba(46,134,193,0.08));
  border: 1px solid var(--border-strong); color: var(--blue-400); margin-bottom: 20px;
  transition: transform var(--ease), color var(--ease);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card:hover .service-icon { transform: scale(1.08) rotate(-3deg); color: var(--teal-400); }
.service-title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.service-title-ar { font-family: var(--font-ar); font-size: 0.9rem; color: var(--text-dim); margin: 2px 0 12px; }
.service-desc { color: var(--text-soft); font-size: 0.96rem; }

/* Work card */
.work-card { display: flex; flex-direction: column; }
.work-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; opacity: 0.85;
  background: var(--grad-brand);
}
.work-card.accent-navy::before { background: linear-gradient(90deg, var(--blue-700), var(--blue-500)); }
.work-card.accent-teal::before { background: linear-gradient(90deg, var(--teal-400), var(--blue-400)); }
.work-card.accent-amber::before { background: linear-gradient(90deg, var(--amber), var(--amber-soft)); }
.work-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.work-cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-400); background: rgba(74,166,221,0.12); border: 1px solid rgba(74,166,221,0.22);
  padding: 4px 10px; border-radius: 999px;
}
.work-year { font-size: 0.82rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.work-name { font-family: var(--font-head); font-weight: 700; font-size: 1.32rem; line-height: 1.2; }
.work-tag { font-size: 0.82rem; color: var(--amber-soft); font-weight: 600; margin: 4px 0 12px; }
.work-summary { color: var(--text-soft); font-size: 0.94rem; flex-grow: 1; }
.work-tech { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 18px; }
.work-tech li {
  font-size: 0.74rem; color: var(--text-soft);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 3px 9px;
}
.work-link {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-weight: 600; font-size: 0.9rem; color: var(--blue-400);
  transition: gap var(--ease), color var(--ease);
}
.work-link:hover { gap: 10px; color: var(--teal-400); }

/* Sector card */
.sector-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 34px 22px; }
.sector-icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(244,162,97,0.18), rgba(46,134,193,0.08));
  border: 1px solid var(--border-strong); color: var(--amber-soft);
  transition: transform var(--ease);
}
.sector-icon svg { width: 28px; height: 28px; }
.sector-card:hover .sector-icon { transform: translateY(-3px) scale(1.06); }
.sector-name { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; }

/* Process */
.process-grid { gap: 26px; }
.process-step { position: relative; padding: 30px 26px 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.process-step::after {
  content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 2px;
  background: var(--grad-brand); opacity: 0; transition: opacity var(--ease);
}
.process-step:hover::after { opacity: 1; }
.process-num {
  font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; line-height: 1;
  background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.9;
}
.process-title { font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; margin: 14px 0 8px; }
.process-desc { color: var(--text-soft); font-size: 0.93rem; }

/* ===== CTA ===== */
.cta {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  padding: clamp(44px, 7vw, 80px) clamp(28px, 6vw, 72px);
  text-align: center;
  background: linear-gradient(140deg, var(--navy-800), var(--navy-900));
}
.cta-bg {
  position: absolute; inset: 0; z-index: 0; opacity: 0.6;
  background:
    radial-gradient(500px 300px at 15% 10%, rgba(46,134,193,0.4), transparent 60%),
    radial-gradient(500px 300px at 90% 90%, rgba(244,162,97,0.28), transparent 60%);
}
.cta-content { position: relative; z-index: 1; }
.cta-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; max-width: 700px; margin: 0 auto; }
.cta-sub { color: var(--text-soft); font-size: 1.06rem; max-width: 560px; margin: 18px auto 32px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 56px 0 30px; background: rgba(4, 11, 25, 0.5); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 30px; }
.footer-tag { color: var(--text-dim); font-size: 0.92rem; margin-top: 14px; white-space: nowrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: flex-start; }
.footer-links a { color: var(--text-soft); font-size: 0.92rem; transition: color var(--ease); }
.footer-links a:hover { color: var(--blue-400); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 26px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.86rem;
}
.footer-contact { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-mail { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); transition: color var(--ease); }
.footer-mail:hover { color: #25d366; }
.wa-icon { flex-shrink: 0; }

/* ===== Animations ===== */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.animate-float { animation: float 5s ease-in-out infinite; }

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(244,162,97,0.55); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(244,162,97,0); }
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.revealed { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; }
  .emblem-card { max-width: 320px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-actions .btn-primary { display: none; }
  .nav-toggle { display: flex; }

  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 72px; left: 16px; right: 16px;
    background: rgba(7, 18, 38, 0.97); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: 18px; padding: 14px;
  }
  .nav.menu-open .nav-links a { padding: 12px 16px; }

  .hero { padding-top: 124px; }
}

@media (max-width: 520px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .btn-lg { width: 100%; justify-content: center; }
  .hero-cta, .cta-actions { width: 100%; }
}

/* ===== RTL / Arabic ===== */
[dir="rtl"] {
  --font-body: 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', sans-serif;
}
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] .hero-title,
[dir="rtl"] .section-title,
[dir="rtl"] .cta-title,
[dir="rtl"] .brand-text,
[dir="rtl"] .emblem-name { letter-spacing: normal; }
[dir="rtl"] .section-kicker { letter-spacing: 0.04em; }
[dir="rtl"] .hero-title { line-height: 1.25; }

/* Brand wordmark stays left-to-right even in RTL */
[dir="rtl"] .brand-text,
[dir="rtl"] .emblem-name,
[dir="rtl"] .emblem-tag,
[dir="rtl"] .work-name,
[dir="rtl"] .work-tech,
[dir="rtl"] .work-year { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .work-name,
[dir="rtl"] .work-tech { text-align: right; }

/* Flip directional arrows */
[dir="rtl"] .cta-arrow,
[dir="rtl"] .link-arrow { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .animate-float, .emblem-pulse { animation: none; }
}
