@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

/* ─────────────────────────────────────────────────────────────
   Design tokens — single source of truth.
   Canonical brand: primary #102647, accent #00b7c7.
   tailwind.config.js mirrors these. Inline <script>tailwind.config
   blocks in HTML files must match. Do not introduce a third value.
   ───────────────────────────────────────────────────────────── */
:root {
  --color-primary: #102647;
  --color-primary-2: #173866;
  --color-accent: #00b7c7;
  --color-accent-2: #0597a6;
  --color-bg-light: #f5f8fc;
  --color-bg-deep: #081223;
  --color-text: #1f324d;
  --color-muted: #5f7189;
  --color-border: #d9e3ef;
  --color-success: #10b981;
  --shadow-soft: 0 10px 30px rgba(16, 38, 71, 0.08);
  --shadow-hover: 0 16px 40px rgba(16, 38, 71, 0.14);

  /* Spacing scale — use these via Tailwind gap-N / py-N / mb-N.
     Canonical ladder: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128 (px)
     Tailwind  → 1 / 2 / 3 / 4 / 6 / 8 / 12 / 16 / 24 / 32       */
  --space-xs: 0.5rem;     /*  8px */
  --space-sm: 0.75rem;    /* 12px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Manrope', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(1200px 600px at 90% -10%, #e8f4ff 0%, transparent 52%),
    radial-gradient(900px 560px at -5% -25%, #eef8fa 0%, transparent 56%),
    #ffffff;
  line-height: 1.65;
}

[dir="rtl"] body {
  font-family: 'IBM Plex Sans Arabic', 'Manrope', system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: 'Sora', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color: var(--color-primary);
  line-height: 1.15;
}

/* Tracking ladder — tighter at display sizes, neutral at small.
   Sora and Manrope both bunch at display sizes; ease off as size shrinks. */
h1 { letter-spacing: -0.035em; line-height: 1.08; }
h2 { letter-spacing: -0.025em; line-height: 1.12; }
h3 { letter-spacing: -0.015em; line-height: 1.2; }
h4 { letter-spacing: -0.01em; line-height: 1.25; }
h5,
h6 { letter-spacing: 0; line-height: 1.3; }

/* Arabic doesn't take negative tracking the same way — neutralize. */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
  font-family: 'IBM Plex Sans Arabic', 'Sora', system-ui, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.container-main {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-main {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section-padding {
  padding: 5.5rem 0;
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 7.25rem 0;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--color-accent), var(--color-accent-2));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.84rem 1.55rem;
  box-shadow: 0 10px 24px rgba(0, 183, 199, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 183, 199, 0.35);
  filter: saturate(1.07);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 38, 71, 0.18);
  color: var(--color-primary);
  background: #ffffff;
  font-weight: 700;
  padding: 0.82rem 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-accent-2);
  font-weight: 700;
  transition: gap 0.25s ease, color 0.25s ease;
}

.btn-ghost:hover {
  color: var(--color-primary);
  gap: 0.65rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-accent {
  background: rgba(0, 183, 199, 0.11);
  color: var(--color-accent-2);
}

.badge-navy {
  background: rgba(16, 38, 71, 0.09);
  color: var(--color-primary);
}

.gradient-text {
  background-image: linear-gradient(120deg, #007a89, #0f3062);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 1.1rem;
  padding: 1.55rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #bfd1e5;
  box-shadow: var(--shadow-hover);
}

.card-dark {
  position: relative;
  background: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.2rem;
  padding: 1.55rem;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* Top-left directional light — consistent across all dark surfaces. */
.card-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

.bg-grid {
  background-image: radial-gradient(circle, #d6e2ef 1px, transparent 1px);
  background-size: 22px 22px;
}

.bg-grid-dark {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
}

.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.82));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.metric-chip {
  border: 1px solid rgba(16, 38, 71, 0.12);
  background: rgba(255, 255, 255, 0.74);
  border-radius: 0.9rem;
  padding: 0.95rem;
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(36px);
  pointer-events: none;
}

.hero-orb-a {
  width: 280px;
  height: 280px;
  background: rgba(0, 183, 199, 0.22);
  top: 48px;
  right: -80px;
}

.hero-orb-b {
  width: 240px;
  height: 240px;
  background: rgba(24, 85, 154, 0.2);
  left: -85px;
  bottom: 40px;
}

.stat-number {
  font-family: 'Sora', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-primary);
}

.trust-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 0.8rem;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.8);
  color: #7a8da6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mobile-menu {
  background: rgba(8, 18, 35, 0);
  backdrop-filter: blur(0);
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.mobile-menu.is-open {
  background: rgba(8, 18, 35, 0.72);
  backdrop-filter: blur(4px);
}

.mobile-menu-panel {
  width: min(88vw, 360px);
  height: 100%;
  margin-left: auto;
  background: #ffffff;
  padding: 1.4rem;
  border-left: 1px solid #e1e8f1;
  box-shadow: -20px 0 45px rgba(10, 20, 37, 0.22);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

/* RTL: panel slides from the left */
[dir="rtl"] .mobile-menu-panel {
  margin-left: 0;
  margin-right: auto;
  border-left: 0;
  border-right: 1px solid #e1e8f1;
  box-shadow: 20px 0 45px rgba(10, 20, 37, 0.22);
  transform: translateX(-100%);
}

[dir="rtl"] .mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.text-balance {
  text-wrap: balance;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseSoft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.animate-pulse-soft {
  animation: pulseSoft 3s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #becfdf;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9fb5ca;
}

[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

/* ─────────────────────────────────────────────────────────────
   Hero state-switcher — tab strip + animated panel swap inside
   the glass-panel dashboard mockup on the homepage.
   ───────────────────────────────────────────────────────────── */
.hero-tabs {
  display: inline-flex;
  padding: 4px;
  background: rgba(16, 38, 71, 0.06);
  border: 1px solid rgba(16, 38, 71, 0.08);
  border-radius: 999px;
  gap: 2px;
}

.hero-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-tab:hover {
  color: var(--color-primary);
}

.hero-tab.is-active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 1px 2px rgba(16, 38, 71, 0.06), 0 4px 12px rgba(16, 38, 71, 0.08);
}

.hero-panel {
  display: none;
  animation: heroPanelIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-panel.is-active {
  display: block;
}

@keyframes heroPanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────────────────────
   Certification badge marks — replaces text-only chips in footer.
   ───────────────────────────────────────────────────────────── */
.cert-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem 0.3rem 0.5rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cert-mark svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   Framework chip row — replaces the dishonest trust-logo row.
   Used in a single homepage row right under the hero.
   ───────────────────────────────────────────────────────────── */
.framework-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.framework-chip:hover {
  border-color: rgba(16, 38, 71, 0.35);
  transform: translateY(-1px);
}

.framework-chip svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent-2);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   Image frame — premium presentation for hero/section images.
   Rounded corners, soft border, depth shadow, and an inner
   highlight so photos read as crafted UI, not raw stock.
   ───────────────────────────────────────────────────────────── */
.image-frame {
  position: relative;
  display: block;
  border-radius: 1.4rem;
  overflow: hidden;
  border: 1px solid rgba(16, 38, 71, 0.08);
  box-shadow:
    0 20px 50px -20px rgba(16, 38, 71, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  background: var(--color-bg-light);
}

.image-frame > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-frame:hover > img {
  transform: scale(1.025);
}

/* Subtle tinted gradient that pulls the photo toward our palette and
   prevents bright photos from clashing with surrounding navy/cyan. */
.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg,
    rgba(16, 38, 71, 0.06) 0%,
    rgba(16, 38, 71, 0) 35%,
    rgba(0, 183, 199, 0.04) 100%);
  pointer-events: none;
}

/* Floating accent chip pinned over an image-frame. Used on industry
   hero compositions to identify the scene without text overlay. */
.image-frame-tag {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(16, 38, 71, 0.08);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 2;
}

.image-frame-tag svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent-2);
}

[dir="rtl"] .image-frame-tag {
  left: auto;
  right: 1rem;
}

/* ─────────────────────────────────────────────────────────────
   Icon tile — upgraded container for inline SVG icons.
   Gradient background, inner highlight, subtle shadow. Variants
   for each semantic color. Replaces the older flat bg-cyan-50
   pattern across feature cards.
   ───────────────────────────────────────────────────────────── */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(16, 38, 71, 0.06);
  box-shadow:
    0 1px 2px rgba(16, 38, 71, 0.05),
    0 6px 14px -6px rgba(16, 38, 71, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover .icon-tile {
  transform: translateY(-1px);
}

.icon-tile svg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-tile-lg {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
}

.icon-tile-lg svg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-tile-accent {
  background: linear-gradient(160deg, #e6fafd 0%, #cdf3f7 100%);
  color: var(--color-accent-2);
}

.icon-tile-primary {
  background: linear-gradient(160deg, #e8eef9 0%, #d0dcf0 100%);
  color: var(--color-primary);
}

.icon-tile-success {
  background: linear-gradient(160deg, #e6faef 0%, #c8f0d8 100%);
  color: var(--color-success);
}

.icon-tile-warning {
  background: linear-gradient(160deg, #fef3df 0%, #fde2b5 100%);
  color: #b45309;
}

.icon-tile-violet {
  background: linear-gradient(160deg, #efeaff 0%, #dccffb 100%);
  color: #6d28d9;
}

.icon-tile-rose {
  background: linear-gradient(160deg, #ffe9ec 0%, #fdd1d8 100%);
  color: #be123c;
}

/* ─────────────────────────────────────────────────────────────
   Industry hero — two-column layout pattern used on About,
   Solutions, Security, and Customers pages. Hero text on the
   start side, image-frame on the end side.
   ───────────────────────────────────────────────────────────── */
.industry-hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .industry-hero {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

/* The image side gets a stacked composition: an offset accent shape
   behind the photo for depth, then the framed image on top. */
.industry-hero-art {
  position: relative;
}

.industry-hero-art::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, rgba(0, 183, 199, 0.18), rgba(16, 38, 71, 0.18));
  z-index: 0;
  filter: blur(2px);
}

[dir="rtl"] .industry-hero-art::before {
  inset: 1.25rem 1.25rem -1.25rem -1.25rem;
}

.industry-hero-art > .image-frame {
  position: relative;
  z-index: 1;
}

.industry-hero-art > .image-frame > img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: 100%;
}
