/* =============================================================================
   SOFTAXIS — THEME LAYER (site-wide redesign)
   Loaded AFTER styles.css (and after any page-scoped inline styles) on every
   page. It restyles the shared design tokens and components: geometric type,
   white/grey canvas, pill buttons, tinted rounded cards, dark feature panels.
   Page markup and class names are unchanged, so every existing page inherits
   the new look.
   ============================================================================= */

/* ---------- Tokens ---------- */
:root {
  --font:            'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ink:             #14171f;
  --ink-2:           #3b4252;
  --ink-3:           #6b7385;
  --text-dark:       #14171f;
  --text-secondary:  #4b5367;
  --text-muted:      #7b8396;
  --bg-light:        #f5f7fa;
  --bg-dark:         #0f1320;
  --bg-dark-2:       #181e30;
  --border:          #e5e8ef;
  --border-light:    #e5e8ef;
  --accent:          #ff7a45;

  --gradient-primary: linear-gradient(135deg, #5071ba, #5071ba);
  --gradient-text:    linear-gradient(135deg, #5071ba, #5071ba);
  --gradient-hero:    radial-gradient(900px 420px at 85% 0%, #eaf0fb, transparent 70%), #ffffff;
  --gradient-card:    #f5f7fa;

  --shadow-xs: none;
  --shadow-sm: 0 4px 16px rgba(15,19,32,.06);
  --shadow-md: 0 10px 30px rgba(15,19,32,.08);
  --shadow-lg: 0 18px 44px rgba(15,19,32,.10);
  --shadow-xl: 0 24px 56px rgba(15,19,32,.12);
  --shadow-primary:    none;
  --shadow-primary-lg: 0 10px 24px rgba(0,0,0,.18);

  --radius: 20px; --radius-sm: 12px; --bg-soft: #f5f7fa; --line: #e5e8ef;
  --brand: #5071ba; --brand-ink: #3d5a9e; --brand-soft: #eaf0fb; --maxw: 1240px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 20px;
  --max-w: 1240px;
  --section-y: 104px;
  --header-h: 80px;
}

body { font-family: var(--font); color: var(--ink); font-size: 17px; font-weight: 400; }
h1, h2, h3, h4 { font-family: var(--font); }

/* ---------- Type ---------- */
.section-label {
  background: none; border: 0; padding: 0; border-radius: 0;
  font-size: .85rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 16px;
}
.section-title, .page-hero-title, .cta-banner-title, .hero-title {
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; color: var(--ink);
}
.section-title { font-size: clamp(2rem, 3.8vw, 3.1rem); margin-bottom: 18px; }
.page-hero-title { font-size: clamp(2.4rem, 5vw, 4rem); }
.section-subtitle, .page-hero-sub { font-weight: 300; font-size: 1.2rem; line-height: 1.6; color: var(--ink-3); max-width: 640px; }
.text-gradient { background: none; -webkit-text-fill-color: var(--primary); color: var(--primary); }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 500; font-size: 1rem; padding: 13px 26px; letter-spacing: 0; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-sm { padding: 10px 20px; font-size: .95rem; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: none; }
.btn-primary::after { display: none; }
.btn-primary:hover { background: #000; box-shadow: 0 10px 24px rgba(0,0,0,.18); transform: translateY(-2px); }
.btn-ghost, .btn-outline {
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none;
}
.btn-ghost:hover, .btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }
.btn-ghost-white { border-radius: 999px; }

/* ---------- Header ---------- */
.header {
  background: rgba(255,255,255,.98); border-bottom: 1px solid var(--border);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.header.scrolled { background: #fff; box-shadow: 0 6px 24px rgba(15,19,32,.06); backdrop-filter: none; -webkit-backdrop-filter: none; }
.header-inner { height: var(--header-h); gap: 24px; }
.logo-sub { display: none; }
.logo-img { height: 40px; }
.nav { gap: 4px; margin-inline-start: auto; margin-inline-end: 12px; }
.nav-link {
  font-size: 1rem; font-weight: 500; color: var(--ink); padding: 10px 14px; border-radius: 8px;
}
.nav-link::after { display: none; }
.nav-link:hover, .nav-link.active { background: var(--bg-light); color: var(--ink); }
.nav-link.active { font-weight: 500; }
.nav-chevron { opacity: .7; }
.nav-dropdown {
  left: 0; transform: translateY(8px); border-radius: 16px; min-width: 270px; padding: 10px;
  box-shadow: 0 20px 50px rgba(15,19,32,.14); top: 100%;
}
.nav-item:hover > .nav-dropdown, .nav-item.open > .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s 0s;
}
.nav-item:hover .nav-chevron, .nav-item.open .nav-chevron { transform: rotate(180deg); }
.nav-dropdown-item { padding: 10px 14px; border-radius: 8px; font-size: .98rem; color: var(--ink); }
.nav-dropdown-item:hover, .nav-dropdown-item.active { background: #eaf0fb; color: var(--primary-dark); }
.header-actions { gap: 12px; }
.menu-btn span { background: var(--ink); }
.lang-trigger { border-radius: 999px; }

/* ---------- Hero (home) ---------- */
.hero { background: var(--gradient-hero); min-height: 0; padding: calc(var(--header-h) + 56px) 0 56px; }
#hero-canvas, .hero-orb { display: none; }

/* ---------- Inner page hero ---------- */
.page-hero { background: var(--gradient-hero); border-bottom: 0; padding: calc(var(--header-h) + 64px) 0 72px; }
.page-hero::before { display: none; }

/* ---------- Sections / backgrounds ---------- */
.services, .industries, .why-choose, .case-studies, .rebranding, .about-values, .team-section { background: #fff; }
.services, .why-choose, .about-values { background: var(--bg-light); }

/* ---------- Cards ---------- */
.service-card, .industry-card, .feature-card, .case-card, .value-card, .team-card, .cs-card {
  background: var(--bg-light); border: 0; border-radius: 20px; backdrop-filter: none; box-shadow: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.services .service-card, .why-choose .feature-card, .about-values .value-card { background: #fff; }
.service-card:hover, .industry-card:hover, .feature-card:hover, .case-card:hover, .value-card:hover, .team-card:hover {
  transform: translateY(-6px); box-shadow: 0 24px 50px rgba(15,19,32,.09); border: 0;
}
.service-card::before, .case-card::after { display: none; }
.svc-icon { width: 58px; height: 58px; border-radius: 14px; background: var(--primary); }
.svc-icon svg { color: #fff; width: 28px; height: 28px; }
.service-card:hover .svc-icon { background: var(--primary-dark); transform: none; }
.svc-title { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }
.svc-desc { font-size: 1rem; color: var(--ink-3); line-height: 1.6; }
.svc-link { color: var(--ink); font-weight: 500; }
.feat-icon { border-radius: 14px; background: #eaf0fb; }
.feat-title { font-weight: 500; font-size: 1.2rem; }
.case-title { font-weight: 500; }

/* ---------- Dark feature panels (Vrodux / Partner) ---------- */
.partner-promo { background: var(--bg-dark); }
.partner-promo-title { font-weight: 500; font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.02em; line-height: 1.1; }
.partner-promo-badge { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #b9cbf2; }

/* ---------- CTA banner → rounded brand block ---------- */
.cta-banner { background: #fff; padding: 24px 0 var(--section-y); }
.cta-banner::before { display: none; }
.cta-banner > .container > .cta-banner-inner,
.cta-banner-inner {
  max-width: none; background: var(--primary); color: #fff; border-radius: 32px; padding: 88px 40px;
  position: relative; overflow: hidden;
}
.cta-banner-inner::after {
  content: ''; position: absolute; inset: auto -10% -60% -10%; height: 90%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.22), transparent 70%);
}
.cta-banner-inner > * { position: relative; z-index: 1; }
.cta-banner-title { color: #fff; font-size: clamp(2rem, 4vw, 3.1rem); }
.cta-banner-title .text-gradient { -webkit-text-fill-color: #fff; color: #fff; }
.cta-banner-sub { color: #e6edfb; font-weight: 300; font-size: 1.2rem; max-width: 52ch; margin-left: auto; margin-right: auto; }
.cta-banner-inner .btn-primary { background: #fff; color: var(--ink); }
.cta-banner-inner .btn-primary:hover { background: #fff; }
.cta-banner-inner .btn-ghost, .cta-banner-inner .btn-outline { color: #fff; border-color: #fff; }
.cta-banner-inner .btn-ghost:hover, .cta-banner-inner .btn-outline:hover { background: #fff; color: var(--primary-dark); }

/* ---------- Trust / registration ---------- */
.trust-bar { background: #fff; }
.reg-trust { background: #fff; }
.reg-cert-card { border-radius: 20px; }

/* ---------- Forms ---------- */
input, textarea, select { border-radius: 12px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-dark); padding: 80px 0 32px; }
.footer .footer-col-title { font-weight: 500; font-size: 1.05rem; color: #fff; letter-spacing: 0; text-transform: none; }
.footer .footer-link { color: #aab2c8; }
.footer .footer-link:hover { color: #fff; padding-left: 0; }
.footer .footer-tagline { color: #aab2c8; font-weight: 300; }

/* ---------- Misc ---------- */
.scroll-top { border-radius: 999px; background: var(--ink); color: #fff; }

/* ---------- Responsive nav ---------- */
@media (max-width: 1080px) {
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; padding: 12px 24px 28px; border-bottom: 1px solid var(--border); margin: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; display: none; gap: 2px;
  }
  .nav.open { display: flex; }
  .nav-item { display: block; }
  .nav-dropdown {
    position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none; box-shadow: none;
    border: 0; min-width: 0; padding: 0 0 0 12px; display: none;
  }
  .nav-item.open > .nav-dropdown { display: block; transform: none; }
  .header-actions .btn { display: none; }
}
@media (max-width: 680px) {
  :root { --section-y: 72px; }
  .cta-banner-inner { padding: 60px 24px; border-radius: 24px; }
  .page-hero { padding-top: calc(var(--header-h) + 40px); }
}

/* ---------- Optional page-hero photo (appears only when the image file exists) ---------- */
.page-hero { position: relative; }
.page-hero-photo {
  position: absolute; z-index: 0; object-fit: cover; border-radius: 28px;
  right: max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
  top: calc(var(--header-h) + 40px); width: 36%; max-width: 480px; height: calc(100% - var(--header-h) - 88px); min-height: 240px;
  box-shadow: 0 30px 60px rgba(15,19,32,.16);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-photo ~ .container .page-hero-content { max-width: 600px; }
.page-hero-photo ~ .container .page-hero-title { font-size: clamp(2.2rem, 4vw, 3.4rem); }
@media (max-width: 1180px) { .page-hero-photo { display: none; } }

/* CTA block: eyebrow label on the blue panel */
.cta-banner-inner .section-label { color: #cfe0ff; }

/* Buttons that sit on dark surfaces */
.partner-promo .btn-primary, .blog-cta .btn-primary, .dmg-bundle .btn-primary, .article-cta-box .btn-primary, .sidebar-contact-card .btn-primary, .footer .btn-primary {
  background: #fff; color: var(--ink); box-shadow: none;
}
.partner-promo .btn-primary:hover, .blog-cta .btn-primary:hover, .dmg-bundle .btn-primary:hover, .article-cta-box .btn-primary:hover, .footer .btn-primary:hover { background: #fff; color: var(--ink); }
.partner-promo .btn-ghost, .partner-promo .btn-outline, .blog-cta .btn-ghost, .blog-cta .btn-outline, .dmg-bundle .btn-ghost, .dmg-bundle .btn-outline,
.article-cta-box .btn-ghost, .article-cta-box .btn-outline { color: #fff; border-color: rgba(255,255,255,.7); background: transparent; }
.partner-promo .btn-ghost:hover, .partner-promo .btn-outline:hover, .blog-cta .btn-ghost:hover, .blog-cta .btn-outline:hover, .dmg-bundle .btn-ghost:hover, .dmg-bundle .btn-outline:hover,
.article-cta-box .btn-ghost:hover, .article-cta-box .btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* Section titles used on light blog/author pages (previously reused the footer class) */
.blog-col-title { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Arabic / RTL ---------- */
[dir="rtl"] body, [dir="rtl"] * { font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif; }
[dir="rtl"] .hm-hv-code, [dir="rtl"] .hm-hv-code * { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; direction: ltr; text-align: left; }
[dir="rtl"] .header-inner, [dir="rtl"] .nav, [dir="rtl"] .header-actions { flex-direction: row; }
[dir="rtl"] .nav-dropdown { left: auto; right: 0; }
[dir="rtl"] .nav-dropdown-item { text-align: right; }
[dir="rtl"] .hm-link-arrow svg, [dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .hm-hero-ctas, [dir="rtl"] .hm-dp-btns { flex-direction: row; }
[dir="rtl"] .hm-section-head.hm-center, [dir="rtl"] .hm-proof-title { text-align: center; }
[dir="rtl"] .hm-card, [dir="rtl"] .hm-case, [dir="rtl"] .hm-why, [dir="rtl"] .hm-ind { text-align: right; }
[dir="rtl"] .hm-licence-l { flex-direction: row; }
@media (max-width: 1080px) {
  [dir="rtl"] .nav-item .nav-dropdown { padding: 0 12px 0 0; }
}

/* ---------- Weight normalisation: generated pages (blog, article, service, tool, compare)
   shipped with 700–800 weights from page-scoped CSS; align them with the site's medium type ---------- */
.blog-hero-title, .blog-featured-title, .blog-card-title, .blog-cta-title, .blog-stat-num,
.article-title, .article-body h2, .article-body h3, .article-cta-box h3, .use-case-title,
.related-card-title, .sidebar-contact-card h4, .article-author-name,
.slp-stat-value, .impl-step-title, .price-tier-range, .slp-factors h3, .tech-stack-name, .slp-faq-q,
.cmp-product-name, .cmp-when-title, .tool-hero-title, .tool-q-text, .tool-result-title, .tool-result-estimate,
.tool-vendor-name, .tool-option-label { font-weight: 500; }
.article-body strong { font-weight: 600; }
.blog-featured-badge, .blog-category, .blog-tag, .blog-read-link, .article-category-badge, .article-breadcrumb a,
.sidebar-toc-title, .article-infobox-title, .use-case-industry, .related-card-cat, .related-card-link,
.price-tier-badge, .tool-vendors-label, .tool-vendor-tag, .tool-hero-badge, .cmp-badge, .cmp-category-row { font-weight: 600; }
.blog-hero-title, .article-title { letter-spacing: -0.02em; }
