/* =========================================================
   Sahla Systems Tech — "Engineered & precise"
   Design system + styles
   ========================================================= */

:root {
  /* core palette (5 named values) */
  --navy:   #0a1a2f;   /* darkest surface / ink — blue-black, tied to brand */
  --blue:   #0e63d6;   /* brand / primary / interactive */
  --blue-700:#0a4fa8;  /* hover */
  --yellow: #ffd400;   /* single signal accent */
  --paper:  #f4f7fb;   /* cool off-white surface */

  /* derived */
  --ink:    #0a1a2f;
  --muted:  #5a6b82;
  --muted-d:#9fb0c6;   /* muted on dark */
  --line:   #e3e9f2;
  --line-d: rgba(255,255,255,.12);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;

  --maxgap: clamp(64px, 9vw, 120px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Inter", sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }

::selection { background: var(--yellow); color: var(--navy); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.35rem;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  border: 1.5px solid transparent;
}
.btn i { font-size: 1.05em; }
.btn-lg { padding: .9rem 1.7rem; font-size: 1rem; }

.btn-brand { background: var(--blue); color: #fff; }
.btn-brand:hover { background: var(--blue-700); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,99,214,.3); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost:hover { border-color: #fff; color: #fff; transform: translateY(-2px); }

.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #ffdf3d; color: var(--navy); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,212,0,.35); }

.btn-outline-ink { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline-ink:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--yellow); color: var(--navy); }

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand-mark { display: block; flex: 0 0 auto; width: 46px; height: auto; }
.brand-lockup { display: flex; flex-direction: column; line-height: 1.1; }
.brand-en {
  font-family: var(--font-display);
  font-weight: 600; font-size: .98rem; letter-spacing: .04em;
  color: var(--ink);
}
.brand-en .thin { font-weight: 400; color: var(--blue); }
.brand-ar {
  font-family: var(--font-ar);
  direction: rtl; font-size: .82rem; color: var(--muted); font-weight: 500;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header .navbar { padding: 1rem 0; }
/* over the dark hero, brand text goes light */
.site-header .brand-en { color: #fff; }
.site-header .brand-ar { color: var(--muted-d); }
.navbar-nav .nav-link {
  color: rgba(255,255,255,.82);
  font-weight: 500; font-size: .95rem;
  margin: 0 .7rem; position: relative; padding: .3rem 0;
  transition: color .2s ease;
}
.navbar-nav .nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--yellow); transition: width .25s ease;
}
.navbar-nav .nav-link:hover { color: #fff; }
.navbar-nav .nav-link.active { color: #fff; }
.navbar-nav .nav-link.active::after { width: 100%; }
.navbar-toggler { color: #fff; border-color: rgba(255,255,255,.3); font-size: 1.4rem; }
.navbar-toggler:focus { box-shadow: none; }

/* scrolled state */
.site-header.scrolled {
  background: rgba(10,26,47,.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.07);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  padding: clamp(150px, 20vh, 230px) 0 clamp(90px, 12vh, 150px);
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 40%, transparent 100%);
}
.hero-glow {
  position: absolute; width: 720px; height: 720px; right: -140px; top: -180px;
  background: radial-gradient(circle, rgba(14,99,214,.55) 0%, rgba(14,99,214,0) 68%);
  filter: blur(10px); pointer-events: none;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: .8rem; color: var(--yellow); letter-spacing: .02em;
  margin: 0 0 1.4rem; display: inline-flex; align-items: center; gap: .6rem;
}
.hero-kicker::before { content: ""; width: 26px; height: 1px; background: var(--yellow); }
.hero-title {
  font-weight: 600;
  font-size: clamp(2.5rem, 5.6vw, 4.9rem);
  line-height: 1.02;
  margin: 0; max-width: 16ch;
}
.hero-sub {
  color: #c4d1e3; font-family: var(--font-body);
  font-size: clamp(1rem, 1.3vw, 1.18rem); line-height: 1.6;
  margin: 1.7rem 0 2.3rem; max-width: 56ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* rotating seal */
.hero-seal { position: relative; width: 220px; height: 220px; }
.seal-ring { width: 100%; height: 100%; animation: spin 22s linear infinite; }
.hero-seal:hover .seal-ring { animation-play-state: paused; }
.seal-text { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 3px; fill: rgba(255,255,255,.72); text-transform: uppercase; }
.seal-core {
  position: absolute; inset: 0; margin: auto;
  width: 86px; height: 86px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; transition: transform .25s ease, background .25s ease;
  box-shadow: 0 10px 30px rgba(14,99,214,.45);
}
.seal-core:hover { background: var(--yellow); color: var(--navy); transform: scale(1.08); }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   TRUST STRIP
   ========================================================= */
.trust { background: #fff; padding: 46px 0 40px; border-bottom: 1px solid var(--line); }
.trust-label {
  text-align: center; color: var(--muted); font-size: .9rem; margin: 0 0 26px;
}
.marquee { width: 100%; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 58px; width: max-content; animation: scroll-x 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.logo-item { display: inline-flex; align-items: center; gap: .5rem; color: #9aa7b8; font-weight: 600; font-size: 1.25rem; white-space: nowrap; }
.logo-item i { font-size: 1.3rem; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* =========================================================
   SECTION scaffolding
   ========================================================= */
.section { padding: var(--maxgap) 0; }
.section-dark { background: var(--navy); color: #fff; }
.section-head { max-width: 760px; margin-bottom: 1.5rem; }
.section-head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.4rem;
}
.section-title { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; margin: 0 0 .7rem; }
.section-note { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 0; max-width: 60ch; }
.section-dark .section-note { color: var(--muted-d); }
.divider { border: 0; border-top: 1px solid var(--line-d); margin: 2.2rem 0 2.8rem; }

/* =========================================================
   SERVICES (lifecycle)
   ========================================================= */
.service-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.service-item {
  display: flex; align-items: center; gap: 1.4rem;
  padding: 1.1rem 0; cursor: pointer;
  border-top: 1px solid var(--line);
  transition: padding-left .25s ease;
}
.service-item:last-child { border-bottom: 1px solid var(--line); }
.service-item .step {
  font-family: var(--font-mono); font-size: .85rem; color: var(--muted);
  flex: 0 0 auto; transition: color .2s ease;
}
.service-item .label {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.1; color: var(--ink);
  transition: color .2s ease;
}
.service-item::after {
  content: "\F138"; font-family: "bootstrap-icons"; margin-left: auto;
  color: var(--line); font-size: 1.3rem; transition: color .2s ease, transform .2s ease;
}
.service-item:hover, .service-item.active { padding-left: 1rem; }
.service-item:hover .label, .service-item.active .label { color: var(--blue); }
.service-item:hover .step, .service-item.active .step { color: var(--blue); }
.service-item.active::after { color: var(--yellow); transform: translateX(2px); }

.service-panel { position: relative; }
.chip-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.4rem; }
.chip {
  font-size: .82rem; font-weight: 500; color: #30435c;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: .4rem .9rem;
}
.service-desc { color: var(--muted); font-size: 1.12rem; line-height: 1.6; max-width: 52ch; margin-bottom: 1.3rem; }

.link-arrow { display: inline-flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--ink); }
.link-arrow .dot {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--yellow);
  display: inline-flex; align-items: center; justify-content: center; transition: background .2s ease;
}
.link-arrow:hover .dot { background: var(--yellow); }

.service-preview {
  margin-top: 2.2rem; background: linear-gradient(135deg, var(--yellow), #ffc400);
  border-radius: var(--r-md); padding: 30px 30px 0; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(10,26,47,.4);
}
.service-preview img { border-radius: 10px 10px 0 0; box-shadow: 0 -4px 30px rgba(0,0,0,.15); }

/* =========================================================
   INDUSTRIES
   ========================================================= */
.industries-intro { color: var(--muted-d); font-size: 1.05rem; line-height: 1.65; }
.industry-scroller {
  display: flex; gap: 1.4rem; overflow-x: auto; padding-bottom: 1.2rem;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--blue) transparent;
}
.industry-scroller::-webkit-scrollbar { height: 5px; }
.industry-scroller::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 10px; }
.industry-card {
  flex: 0 0 318px; scroll-snap-align: start;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-d);
  border-radius: var(--r-md); padding: 14px 14px 22px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.industry-card:hover { transform: translateY(-6px); border-color: rgba(255,212,0,.5); background: rgba(255,255,255,.06); }
.industry-cover {
  height: 196px; border-radius: 14px; background-size: cover; background-position: center;
  margin-bottom: 1.2rem;
}
.industry-card h3 { color: #fff; font-size: 1.45rem; margin: 0 0 .6rem; padding: 0 .4rem; }
.industry-card p { color: var(--muted-d); font-size: .95rem; line-height: 1.6; margin: 0; padding: 0 .4rem; }

/* =========================================================
   WHY / STATS
   ========================================================= */
.why-image { position: relative; border-radius: var(--r-lg); overflow: hidden; height: 100%; min-height: 420px; }
.why-image img { width: 100%; height: 100%; object-fit: cover; }
.why-overlay-btn { position: absolute; left: 22px; bottom: 22px; }

.stats-grid { }
.stat {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.8rem 1.6rem; height: 100%;
  position: relative; overflow: hidden; background: #fff;
  transition: border-color .25s ease, transform .25s ease;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; width: 42px; height: 4px; background: var(--yellow); border-radius: 0 0 4px 0; }
.stat:hover { transform: translateY(-4px); border-color: var(--blue); }
.stat-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: var(--ink); display: block; margin-top: .5rem; }
.stat p { color: var(--muted); font-size: .95rem; margin: .7rem 0 0; max-width: 24ch; }

/* =========================================================
   CASE STUDIES
   ========================================================= */
.case-card { display: block; }
.case-cover {
  height: 218px; border-radius: var(--r-md); background-size: cover; background-position: center;
  background-color: #dce6f3; position: relative; display: flex; align-items: flex-start; gap: .5rem;
  padding: 1rem; margin-bottom: 1.1rem; overflow: hidden;
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.case-card:hover .case-cover { transform: translateY(-6px); }
.case-chip {
  font-size: .74rem; font-weight: 600; letter-spacing: .01em;
  background: rgba(10,26,47,.78); color: #fff; backdrop-filter: blur(4px);
  border-radius: 999px; padding: .4rem .85rem;
}
.case-body { padding: 0 .2rem; }
.case-cat { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.case-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-top: .4rem; }
.case-foot h3 { font-size: 1.3rem; line-height: 1.18; margin: 0; transition: color .2s ease; }
.case-card:hover .case-foot h3 { color: var(--blue); }
.case-foot i { font-size: 1.4rem; color: var(--ink); flex: 0 0 auto; transition: transform .2s ease, color .2s ease; }
.case-card:hover .case-foot i { color: var(--blue); transform: translate(2px,-2px); }
.case-desc { color: var(--muted); font-size: .92rem; line-height: 1.55; margin: .6rem 0 0; }

/* =========================================================
   TECHNOLOGY STACK
   ========================================================= */
.tech-tabs, .approach-tabs { list-style: none; margin: 0; padding: 0; }
.tech-tab {
  font-family: var(--font-display); font-weight: 500; font-size: 1.3rem;
  padding: .85rem 0 .85rem 1.1rem; color: var(--muted); cursor: pointer;
  border-left: 2px solid var(--line); transition: color .2s ease, border-color .2s ease;
}
.tech-tab:hover { color: var(--ink); }
.tech-tab.active { color: var(--ink); border-left-color: var(--yellow); font-weight: 600; }

.tech-group + .tech-group { margin-top: 2.4rem; }
.tech-group-title { font-size: 1.5rem; margin: 0 0 1.3rem; color: var(--ink); }
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.tech-pill {
  background: var(--navy); color: #fff; border-radius: 14px; padding: 1.25rem 1.2rem;
  display: flex; align-items: center; gap: .9rem; min-height: 82px;
  border: 1px solid rgba(255,255,255,.06); transition: transform .2s ease, background .2s ease;
}
.tech-pill:hover { transform: translateY(-3px); background: #112a4a; }
.tech-pill i { font-size: 1.7rem; color: var(--yellow); flex: 0 0 auto; }
.tech-pill .tp-name { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .01em; }

/* =========================================================
   APPROACH
   ========================================================= */
.approach-lead { color: var(--muted-d); font-size: 1.08rem; line-height: 1.65; }
.approach-tab {
  font-family: var(--font-display); font-weight: 500; font-size: 1.25rem;
  padding: .75rem 0 .75rem 1.1rem; color: var(--muted-d); cursor: pointer;
  border-left: 2px solid var(--line-d); transition: color .2s ease, border-color .2s ease;
}
.approach-tab:hover { color: #fff; }
.approach-tab.active { color: var(--yellow); border-left-color: var(--yellow); font-weight: 600; }

.approach-illu {
  width: 230px; height: 230px; border-radius: 50%;
  border: 1px solid var(--line-d);
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(14,99,214,.25), transparent 70%);
}
.approach-illu i { font-size: 6rem; color: #fff; }

.approach-title { font-size: 2.2rem; color: #fff; margin: 0 0 1.1rem; }
.approach-desc { color: var(--muted-d); font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem; }
.approach-checks { list-style: none; margin: 0; padding: 0; }
.approach-checks li { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; font-size: 1.05rem; }
.approach-checks i { color: var(--yellow); font-size: 1.2rem; }

/* =========================================================
   CTA BAND
   ========================================================= */
.cta-band { background: var(--navy); padding: 0 0 clamp(70px,9vw,110px); }
.cta-inner {
  background: linear-gradient(120deg, var(--blue) 0%, #0a4fb0 55%, var(--navy) 130%);
  border-radius: var(--r-lg); padding: clamp(2.4rem, 5vw, 4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-inner::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,212,0,.25), transparent 65%);
}
.cta-title { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin: 0 0 .5rem; position: relative; }
.cta-sub { color: #d6e2f5; margin: 0; font-size: 1.08rem; max-width: 46ch; position: relative; }
.cta-band .btn { position: relative; z-index: 2; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--navy); color: var(--muted-d); padding: clamp(60px,8vw,90px) 0 0; }
.footer-mark { width: 56px; }
.footer-brandlink .brand-en { color: #fff; }
.footer-brandlink .brand-en .thin { color: #7fb0ff; }
.footer-brandlink .brand-ar { color: var(--muted-d); }
.footer-tag { font-size: .95rem; color: #aab8ca; margin: 1.1rem 0 1.3rem; max-width: 34ch; }
.social { display: flex; gap: .7rem; }
.social a {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.07);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
  transition: background .2s ease, transform .2s ease;
}
.social a:hover { background: var(--yellow); color: var(--navy); transform: translateY(-3px); }

.site-footer h4 { color: #fff; font-size: 1.05rem; margin: 0 0 1.1rem; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .62rem; }
.footer-links a { color: #aeb9c8; font-size: .93rem; transition: color .2s ease; }
.footer-links a:hover { color: var(--yellow); }
.footer-contact li { font-size: .92rem; margin-bottom: .85rem; display: flex; gap: .65rem; align-items: flex-start; }
.footer-contact i { color: #7c8aa0; margin-top: 3px; flex: 0 0 auto; }
.footer-contact a { color: #aeb9c8; transition: color .2s ease; }
.footer-contact a:hover { color: var(--yellow); }

.footer-bottom { border-top: 1px solid var(--line-d); margin-top: 52px; padding: 22px 0; font-size: .85rem; }
.foot-legal a { color: #aeb9c8; } .foot-legal a:hover { color: var(--yellow); }
.foot-legal .sep { color: #43566f; margin: 0 .6rem; }
.copyright { color: #8294aa; }

/* =========================================================
   REVEAL (one orchestrated hero load only)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(16px); }
.hero .reveal { animation: rise .7s cubic-bezier(.2,.7,.3,1) forwards; }
.hero .hero-kicker { animation-delay: .05s; }
.hero .hero-title  { animation-delay: .16s; }
.hero .hero-sub    { animation-delay: .28s; }
.hero .hero-actions{ animation-delay: .4s; }
.hero .hero-seal   { animation-delay: .5s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .seal-ring { animation: none; }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(10,26,47,.97); backdrop-filter: blur(14px);
    border: 1px solid var(--line-d); border-radius: 16px; padding: 1.1rem 1.3rem; margin-top: .9rem;
  }
  .navbar-nav .nav-link { margin: .35rem 0; }
  .navbar-collapse .btn-brand { margin-top: .8rem; width: fit-content; }
  .hero-seal { margin-top: 2.5rem; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .why-image { min-height: 320px; }
}
@media (max-width: 575.98px) {
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .industry-card { flex-basis: 84%; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .hero-seal { width: 180px; height: 180px; }
  .seal-core { width: 72px; height: 72px; font-size: 1.4rem; }
}
