/* ========================================================
   QMS — Corporate Site Styles (professional, trustworthy, multilingual-forward)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=Manrope:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand — Qalbi palette: gold + blue + navy */
  --navy: #0A2540;
  --navy-2: #15355A;
  --blue: #0095DC;
  --blue-soft: #E0F4FF;
  --teal: #F5C200;
  --teal-soft: #FFF8DC;

  /* Neutrals */
  --ink: #0A2540;
  --slate: #475569;
  --slate-2: #64748B;
  --line: #E5E9F0;
  --line-2: #D6DCE6;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --bg-soft-2: #EEF3F9;

  /* Status / accents */
  --success: #F5C200;
  --gold: #F5C200;

  /* Type */
  --display: 'Sora', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --pad-x: clamp(20px, 5vw, 80px);
  --pad-y: clamp(64px, 9vw, 120px);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(10,37,64,0.04), 0 2px 8px rgba(10,37,64,0.04);
  --shadow-md: 0 4px 12px rgba(10,37,64,0.06), 0 12px 32px rgba(10,37,64,0.06);
  --shadow-lg: 0 12px 40px rgba(10,37,64,0.10), 0 24px 60px rgba(10,37,64,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ============== Layout ============== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding-block: var(--pad-y); }
.section-sm { padding-block: clamp(48px, 6vw, 80px); }

/* ============== Type ============== */
h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--navy);
}
.h-display { font-size: clamp(40px, 6vw, 72px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.h-1 { font-size: clamp(32px, 4.5vw, 56px); }
.h-2 { font-size: clamp(26px, 3.2vw, 40px); }
.h-3 { font-size: clamp(20px, 2.2vw, 26px); }
.lede { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; color: var(--slate); max-width: 60ch; }
.body { color: var(--slate); }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow.alt { color: #F5C200; }
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* ============== Header ============== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 0 rgba(245,194,0,0.5), 0 2px 8px rgba(10,37,64,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}
.logo img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}
/* Legacy fallback — hidden when logo image is present */
.logo-mark { display: none; }
.logo > div { display: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--navy); background: var(--bg-soft); }
.nav a.active { color: var(--blue); background: var(--blue-soft); }
.nav-cta {
  padding: 11px 20px;
  background: #F5C200;
  color: #0A2540;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }

.menu-toggle {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  color: var(--navy);
}
.menu-toggle .bars { display: inline-flex; flex-direction: column; gap: 3px; }
.menu-toggle .bars span { width: 14px; height: 1.5px; background: var(--navy); }

@media (max-width: 980px) {
  .nav, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    inset: 100% 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 16px var(--pad-x) 24px;
    gap: 0;
  }
  .nav.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 16px;
  }
}

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: #F5C200; color: #0A2540; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--blue); color: #fff; }
.btn-accent:hover { background: var(--navy); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--navy); background: var(--bg-soft); }
.btn-light { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.22); }
.btn-light:hover { background: rgba(255,255,255,0.2); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============== Tags & badges ============== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag.teal { background: #FFF8DC; color: #c49800; }
.tag.gold { background: #FFF8DC; color: #c49800; }

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-2);
  letter-spacing: 0.08em;
}

/* ============== Cards ============== */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.2s, transform 0.3s, box-shadow 0.3s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }

/* ============== Pattern boxes (replace image slots) ============== */
.pattern {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-soft);
}
.pattern svg { width: 100%; height: 100%; display: block; }
.pattern.blue { background: var(--blue-soft); }
.pattern.teal { background: var(--teal-soft); }
.pattern.navy { background: var(--navy); }
.pattern.gradient {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
}

/* ============== Page hero ============== */
.page-hero {
  padding-block: clamp(80px, 11vw, 140px) clamp(48px, 6vw, 80px);
  background: linear-gradient(180deg, #f0f8ff 0%, #fff 100%);
  border-bottom: 3px solid #F5C200;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: -100px -100px auto auto;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,194,0,0.1) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.7;
}
.page-hero .container { display: grid; gap: 24px; position: relative; z-index: 1; }
.crumbs {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--slate-2);
  display: flex;
  gap: 10px;
  align-items: center;
}
.crumbs span:last-child { color: var(--blue); font-weight: 500; }

/* ============== Footer ============== */
.footer {
  background: linear-gradient(160deg, #0A2540 0%, #0d1f35 100%);
  color: rgba(255,255,255,0.85);
  padding-block: clamp(64px, 8vw, 96px) 32px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: -200px auto auto -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,149,220,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.footer-logo img {
  height: 44px;
  width: auto;
  opacity: 0.9;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}
.footer .container { position: relative; z-index: 1; display: grid; gap: 56px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .h-2 { color: #fff; max-width: 22ch; margin-bottom: 16px; font-weight: 500; }
.footer-brand p { font-size: 14px; max-width: 38ch; opacity: 0.7; }
.footer h4 {
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0.75;
}
.footer ul { list-style: none; display: grid; gap: 12px; font-size: 14px; }
.footer ul a { opacity: 0.75; transition: opacity 0.2s, color 0.2s; }
.footer ul a:hover { opacity: 1; color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============== CTA band ============== */
.cta-band {
  padding-block: clamp(64px, 8vw, 112px);
  background: linear-gradient(135deg, #0A2540 0%, #0095DC 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: '';
  position: absolute;
  inset: auto -200px -300px auto;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(245,194,0,0.2) 0%, transparent 60%);
  pointer-events: none;
}
.cta-band .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.cta-band h2 { color: #fff; font-weight: 500; }
.cta-band p { color: rgba(255,255,255,0.75); max-width: 50ch; margin-top: 16px; font-size: 17px; }
.cta-band .btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: end; }
@media (max-width: 880px) {
  .cta-band .container { grid-template-columns: 1fr; }
  .cta-band .btns { justify-content: start; }
}

/* ============== Stats / numbers ============== */
.stat-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--navy);
  background: linear-gradient(135deg, #0A2540 0%, #0095DC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-2);
  margin-top: 8px;
}

/* ============== Utility ============== */
.divider { height: 1px; background: var(--line); width: 100%; }
.center-text { text-align: center; }
.max-prose { max-width: 64ch; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }

/* ============== Animations ============== */
[data-animate] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
[data-animate="left"] { transform: translateX(-40px); }
[data-animate="right"] { transform: translateX(40px); }
[data-animate="scale"] { transform: scale(0.92); }
[data-animate].is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }
[data-animate-delay="5"] { transition-delay: 0.5s; }
[data-animate-delay="6"] { transition-delay: 0.6s; }

/* Counter animation */
.count-up { display: inline-block; }

/* Floating animation for hero illustration */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.float-anim { animation: float 4s ease-in-out infinite; }

/* Shimmer for logo bar */
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.logo-ticker { overflow: hidden; }
.logo-ticker-inner {
  display: flex;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
  width: max-content;
  animation: scroll-left 22s linear infinite;
}
.logo-ticker-inner:hover { animation-play-state: paused; }

/* Gradient border cards on hover */
.pillar, .ind {
  position: relative;
}
.pillar::before, .ind::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #F5C200, #0095DC);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}
.pillar:hover::before, .ind:hover::before { opacity: 1; }

/* Step hover */
.step { position: relative; }
.step::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F5C200, #0095DC);
  border-radius: 0 0 var(--r-md) var(--r-md);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.step:hover::after { transform: scaleX(1); }

/* Cursor (static fallback only) */
.cursor { display:inline-block; width:2px; height:1em; background:#F5C200; margin-left:3px; vertical-align:middle; opacity: 1; }

/* Page hero enhanced */
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,194,0,0.12);
  border: 1px solid rgba(245,194,0,0.35);
  color: #c49800;
  padding: 7px 16px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 8px;
  backdrop-filter: blur(8px);
}
.page-hero-badge svg { flex-shrink: 0; }

/* Improved page hero */
.page-hero {
  padding-block: clamp(80px, 11vw, 140px) clamp(48px, 6vw, 80px);
  background: linear-gradient(160deg, #0A2540 0%, #0d2d50 60%, #0095DC 100%);
  border-bottom: none;
  position: relative;
  overflow: hidden;
}
.page-hero h1, .page-hero .lede { color: #fff; }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: rgba(255,255,255,0.8); }
.page-hero .crumbs { color: rgba(255,255,255,0.5); }
.page-hero .crumbs span:last-child { color: #F5C200; }
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 400px at 80% 50%, rgba(245,194,0,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 500px 500px at 10% -20%, rgba(0,149,220,0.2) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, #F5C200, #0095DC, #F5C200);
  background-size: 200% 100%;
  animation: slide-grad 4s linear infinite;
}
@keyframes slide-grad {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
.page-hero .tag { background: rgba(245,194,0,0.2); color: #F5C200; border: 1px solid rgba(245,194,0,0.3); }

/* Hero stats strip */
.hero-stats-strip {
  display: flex;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 32px;
}
.hero-stat {
  flex: 1;
  padding-right: 32px;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.hero-stat:last-child { border-right: none; padding-right: 0; padding-left: 32px; }
.hero-stat:first-child { padding-left: 0; }
.hero-stat .n { font-family: var(--display); font-size: 36px; font-weight: 700; color: #F5C200; line-height: 1; }
.hero-stat .l { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 6px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 640px) { .hero-stats-strip { flex-wrap: wrap; gap: 24px; } .hero-stat { border-right: none; padding: 0 !important; flex-basis: 40%; } }

/* ============== Design enhancements ============== */

/* Refined header gold accent line */
.header {
  box-shadow: 0 1px 0 0 rgba(245,194,0,0.6), 0 2px 12px rgba(10,37,64,0.07);
}

/* Smoother card focus ring on interactive elements */
.channel:focus-within,
.svc-card:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Service card top accent bar on hover */
.svc-card {
  position: relative;
}
.svc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F5C200, #0095DC);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.svc-card:hover::before { opacity: 1; }

/* Pillar card subtle gold top on hover */
.pillar-card {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pillar-card:hover {
  border-color: rgba(245,194,0,0.4);
  box-shadow: 0 4px 20px rgba(245,194,0,0.08), var(--shadow-sm);
}

/* Enhanced footer brand typography */
.footer-brand .h-2 {
  background: linear-gradient(135deg, #fff 0%, rgba(245,194,0,0.9) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Workflow step number circle — gold accent on hover */
.step:hover .num-circle {
  background: #F5C200;
  color: #0A2540;
}

/* Page-hero badge refined */
.page-hero-badge {
  backdrop-filter: blur(8px);
}

/* Smooth focus states for form elements */
form input:focus, form select:focus, form textarea:focus {
  box-shadow: 0 0 0 3px rgba(0,149,220,0.15);
}

/* Industry card icon — gold on hover */
.ind:hover .ind-icon {
  background: rgba(245,194,0,0.15);
  color: #c49800;
}

/* Office card refined */
.office {
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.office:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
