/* ==========================================================================
   Teksa Portal — Design System
   Brand: #0075FF (primary), #090422/#131826 (navy), #54B8F6 (sky)
   Fonts: IBM Plex Sans Arabic (AR), Inter (EN). RTL + LTR via logical props.
   ========================================================================== */

:root {
  /* Brand */
  --c-primary: #0075FF;
  --c-primary-700: #0057c4;
  --c-primary-50: #eaf3ff;
  --c-sky: #54B8F6;
  --c-sky-50: #f3fafe;
  --c-navy: #090422;
  --c-navy-2: #131826;
  --c-navy-3: #01071a;
  --c-green: #51ae65;

  /* Neutrals */
  --c-white: #ffffff;
  --c-bg: #ffffff;
  --c-bg-soft: #f5f8fc;
  --c-line: #e6ebf2;
  --c-text: #16213a;
  --c-text-muted: #5b6678;
  --c-text-invert: #ffffff;
  --c-text-invert-muted: #b9c4d6;

  /* Radius */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Spacing & layout */
  --container: 1200px;
  --gutter: 24px;
  --section-y: clamp(48px, 7vw, 96px);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(9, 4, 34, .06);
  --shadow-md: 0 14px 40px rgba(9, 4, 34, .10);
  --shadow-blue: 0 18px 40px rgba(0, 117, 255, .28);

  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Inter", "Segoe UI", system-ui, sans-serif;
  --font: var(--font-ar);
}

[lang="en"] { --font: var(--font-en); }

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* Layout helpers ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--c-bg-soft); }
.section--sky { background: var(--c-sky-50); }
.section--navy { background: var(--c-navy); color: var(--c-text-invert); }
.eyebrow {
  display: inline-block; color: var(--c-primary); font-weight: 600;
  font-size: .9rem; letter-spacing: .04em; margin-bottom: 14px;
}
.section--navy .eyebrow { color: var(--c-sky); }
.section-head { text-align: center; max-width: 720px; margin-inline: auto; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.section-head p { color: var(--c-text-muted); margin-top: 14px; font-size: 1.05rem; }
.section--navy .section-head p { color: var(--c-text-invert-muted); }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--r-full);
  font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-blue); }
.btn--primary:hover { background: var(--c-primary-700); }
.btn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.btn--light { background: #fff; color: var(--c-primary); }
.btn--outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn .arrow { transition: transform .2s ease; }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 4, 34, .85); backdrop-filter: blur(12px);
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .bar { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; }
.nav a { color: #d8def0; font-size: .96rem; font-weight: 500; transition: color .2s; }
.nav a:hover, .nav a.is-active { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-full); padding: 8px 16px; font-size: .9rem; font-weight: 600;
}
.lang-switch:hover { background: rgba(255,255,255,.2); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
/* Faded Teksa brand-mark watermarks (Figma "Companies" hero) */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  background: url("/assets/img/brand-mark.svg") no-repeat center / contain;
  opacity: .08;
}
.hero::before { width: 560px; height: 560px; inset-block-start: -170px; inset-inline-start: -150px; transform: rotate(162deg); }
.hero::after  { width: 680px; height: 680px; inset-block-start: -90px;  inset-inline-end: -190px;  transform: rotate(-29deg); }
.hero--dark { background: radial-gradient(120% 120% at 80% 0%, #16234a 0%, var(--c-navy) 55%); color: #fff; }
.hero--gradient { background: linear-gradient(135deg, var(--c-primary) 0%, #3f96ff 60%, var(--c-sky) 100%); color: #fff; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-block: clamp(56px, 8vw, 104px); }
.hero--center .hero__inner { grid-template-columns: 1fr; text-align: center; max-width: 820px; margin-inline: auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.15; }
.hero p { margin-top: 20px; font-size: 1.15rem; color: rgba(255,255,255,.85); max-width: 56ch; }
.hero--center p { margin-inline: auto; }
.hero__cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero--center .hero__cta { justify-content: center; }
.hero__media { display: flex; justify-content: center; }
.hero__media img { filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); }
.hero__blob { position: absolute; inset-inline-end: -8%; top: -10%; width: 50%; opacity: .25; pointer-events: none; }

/* Toggle pills (merchant hero) */
.toggle-pills { display: inline-flex; background: rgba(255,255,255,.12); border-radius: var(--r-full); padding: 5px; margin-top: 26px; gap: 4px; }
.toggle-pills button { border: 0; background: transparent; color: rgba(255,255,255,.8); padding: 10px 20px; border-radius: var(--r-full); font-weight: 600; font-size: .92rem; }
.toggle-pills button.is-active { background: #fff; color: var(--c-primary); }

/* Split ------------------------------------------------------------------- */
.split__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.split p { margin-top: 18px; color: var(--c-text-muted); font-size: 1.08rem; }
.section--navy .split p { color: var(--c-text-invert-muted); }
.split__media img { border-radius: var(--r-lg); box-shadow: var(--shadow-md); width: 100%; }
.split--media-end .split__media { order: 2; }

/* Feature grid ------------------------------------------------------------ */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.feature-card {
  background: var(--c-primary); color: #fff; border-radius: var(--r-lg);
  padding: 30px 26px; box-shadow: var(--shadow-blue);
  transition: transform .2s ease;
}
.feature-card:hover { transform: translateY(-6px); }
.feature-card .ico { width: 52px; height: 52px; border-radius: var(--r-md); background: rgba(255,255,255,.16); display: grid; place-items: center; margin-bottom: 18px; }
.feature-card .ico svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.2rem; }
.feature-card p { margin-top: 10px; color: rgba(255,255,255,.85); font-size: .98rem; }
.feature-grid--tinted .feature-card { background: #fff; color: var(--c-text); box-shadow: var(--shadow-sm); border: 1px solid var(--c-line); }
.feature-grid--tinted .feature-card .ico { background: var(--c-primary-50); color: var(--c-primary); }
.feature-grid--tinted .feature-card p { color: var(--c-text-muted); }

/* Service grid ------------------------------------------------------------ */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
  padding: 26px 18px; text-align: center; transition: .2s ease;
}
.service-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-blue); transform: translateY(-4px); }
.service-card .ico { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: var(--r-md); background: var(--c-primary-50); color: var(--c-primary); display: grid; place-items: center; }
.service-card .ico svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1rem; font-weight: 600; }

/* Steps ------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 28px 24px; position: relative; }
.step-card .num { width: 44px; height: 44px; border-radius: var(--r-full); background: var(--c-primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; margin-bottom: 16px; }
.step-card h3 { font-size: 1.12rem; }
.step-card p { margin-top: 8px; color: var(--c-text-muted); font-size: .97rem; }

/* Partners ---------------------------------------------------------------- */
.partners-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(28px, 5vw, 64px); }
.partners-logos img { height: 40px; width: auto; opacity: .7; filter: grayscale(1); transition: .2s; }
.partners-logos img:hover { opacity: 1; filter: none; }

/* Products ---------------------------------------------------------------- */
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s ease; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product-card__media { background: linear-gradient(160deg, var(--c-sky-50), #e6f1ff); padding: 26px; }
.product-card__media img { margin-inline: auto; }
.product-card__body { padding: 22px 24px 28px; }
.product-card .tag { display: inline-block; background: var(--c-primary-50); color: var(--c-primary); font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: var(--r-full); margin-bottom: 12px; }
.product-card h3 { font-size: 1.18rem; }
.product-card p { margin-top: 8px; color: var(--c-text-muted); font-size: .97rem; }

/* FAQ --------------------------------------------------------------------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq-item { border: 1px solid var(--c-line); border-radius: var(--r-md); margin-bottom: 14px; background: #fff; overflow: hidden; }
.faq-q { width: 100%; text-align: start; background: none; border: 0; padding: 20px 24px; font-size: 1.05rem; font-weight: 600; color: var(--c-text); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q .chev { transition: transform .2s ease; flex: none; color: var(--c-primary); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--c-text-muted); padding-inline: 24px; }
.faq-item.open .faq-a { max-height: 320px; padding-block: 0 22px; }

/* Contact ----------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(28px, 5vw, 56px); align-items: stretch; }
.contact__aside { background: var(--c-navy); border-radius: var(--r-xl); padding: 36px; color: #fff; display: flex; align-items: center; justify-content: center; }
.contact__aside img { border-radius: var(--r-lg); }
.contact__form h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.contact__form > p { color: var(--c-text-muted); margin-top: 10px; margin-bottom: 26px; }
.form-row { margin-bottom: 18px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.form-control {
  width: 100%; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--r-md);
  background: var(--c-bg-soft); font-family: inherit; font-size: 1rem; color: var(--c-text);
}
.form-control:focus { outline: none; border-color: var(--c-primary); background: #fff; box-shadow: 0 0 0 3px var(--c-primary-50); }
textarea.form-control { min-height: 130px; resize: vertical; }

/* Newsletter -------------------------------------------------------------- */
.newsletter { background: linear-gradient(120deg, var(--c-primary), #2f86ff); color: #fff; border-radius: var(--r-xl); padding: clamp(32px, 5vw, 56px); text-align: center; }
.newsletter h2 { font-size: clamp(1.4rem, 3vw, 2rem); max-width: 640px; margin-inline: auto; }
.newsletter p { margin-top: 12px; color: rgba(255,255,255,.85); }
.newsletter form { margin-top: 26px; display: flex; gap: 12px; max-width: 560px; margin-inline: auto; background: rgba(255,255,255,.14); padding: 8px; border-radius: var(--r-full); }
.newsletter input { flex: 1; border: 0; background: #fff; border-radius: var(--r-full); padding: 14px 22px; font-family: inherit; font-size: 1rem; }
.newsletter input:focus { outline: none; }

/* CTA band ---------------------------------------------------------------- */
.cta-band { background: var(--c-navy); color: #fff; border-radius: var(--r-xl); padding: clamp(36px, 5vw, 60px); text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset-inline-end: -60px; bottom: -80px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(0,117,255,.5), transparent 70%); }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); position: relative; }
.cta-band p { margin-top: 12px; color: var(--c-text-invert-muted); position: relative; }
.cta-band .btn { margin-top: 26px; position: relative; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--c-navy); color: var(--c-text-invert-muted); padding-block: 64px 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: .95rem; max-width: 34ch; }
.footer-badges { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.footer-badge { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-md); padding: 8px 14px; color: #fff; font-size: .85rem; display: flex; align-items: center; gap: 8px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; font-size: .93rem; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); flex-wrap: wrap; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; border-radius: var(--r-full); background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: .2s; }
.footer-social a:hover { background: var(--c-primary); }
.footer-social svg { width: 18px; height: 18px; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .feature-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav, .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open { display: flex; position: absolute; inset-inline: 0; top: 72px; flex-direction: column; background: var(--c-navy); padding: 18px 24px; gap: 6px; }
  .nav.open a { padding: 10px 0; }
  .header-actions { margin-inline-start: auto; }
  .hero__inner, .split__inner, .contact { grid-template-columns: 1fr; }
  .split--media-end .split__media { order: 0; }
  .hero__media { order: -1; }
  .feature-grid, .feature-grid.cols-3, .service-grid, .steps, .products-grid { grid-template-columns: 1fr 1fr; }
  .form-row.two { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
  .newsletter form { flex-direction: column; background: none; padding: 0; }
  .newsletter input { width: 100%; }
}
@media (max-width: 460px) {
  .feature-grid, .service-grid, .steps, .products-grid { grid-template-columns: 1fr; }
}
