/* ==========================================================================
   Kawader Technology — kawadertech.net
   Design direction 1a "Corporate Classic". Every colour below is sampled
   from the approved mockup rather than chosen fresh.

   The site commits to one light visual world on purpose: it is brand
   surface, not a reading app. Every colour is therefore painted
   explicitly and nothing is left to inherit.
   ========================================================================== */

:root {
  --navy: #1e2a5a;
  --navy-deep: #161f44;
  --navy-soft: #33406f;
  --teal: #00a8a6;
  --teal-dark: #018b89;
  --teal-wash: #e4f5f4;
  --white: #ffffff;
  --mist: #f5f7fa;
  --slate: #5a6485;
  --slate-soft: #8891ac;
  --rule: #e2e6ef;
  --rule-soft: #edf0f6;

  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --gut: 32px;
  --measure: 1200px;
  --radius: 12px;
  --radius-sm: 8px;

  color-scheme: light;
}

/* The Arabic build swaps both faces; Manrope has no Arabic coverage. */
html[lang^="ar"] {
  --font-display: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
:target { scroll-margin-top: 104px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.005em; }
h4 { font-size: 0.95rem; font-weight: 700; }
p { margin: 0; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}

.kw-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 18px;
  font-family: var(--font-display); font-weight: 700;
}
.kw-skip:focus { left: 12px; top: 12px; color: #fff; text-decoration: none; }

/* ---------- layout primitives ---------- */

.kw-shell { max-width: var(--measure); margin: 0 auto; padding-inline: var(--gut); }

.kw-section { padding-block: 96px; background: var(--white); }
.kw-section--mist { background: var(--mist); }
.kw-section--tight { padding-block: 64px; }

.kw-section-head { max-width: 62ch; margin-bottom: 44px; }
.kw-section-head p { margin-top: 12px; font-size: 1.1rem; }

.kw-eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal);
  display: block; margin-bottom: 18px;
}
html[lang^="ar"] .kw-eyebrow { letter-spacing: 0; text-transform: none; }

/* ---------- buttons ---------- */

.kw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 15px 30px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  text-decoration: none;
}
.kw-btn:hover { text-decoration: none; }
.kw-btn--navy { background: var(--navy); color: #fff; }
.kw-btn--navy:hover { background: var(--navy-deep); color: #fff; }
.kw-btn--teal { background: var(--teal); color: #fff; }
.kw-btn--teal:hover { background: var(--teal-dark); color: #fff; }
.kw-btn--ghost { background: transparent; color: var(--navy); border-color: var(--rule); }
.kw-btn--ghost:hover { background: var(--mist); color: var(--navy); border-color: var(--slate-soft); }
.kw-btn--sm { padding: 10px 20px; font-size: 0.92rem; }

/* ---------- header ---------- */

.kw-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.kw-header__inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 88px;
}
.kw-logo { display: inline-flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.kw-logo:hover { text-decoration: none; }
.kw-logo img {
  display: block;
  height: 58px; width: 58px;
  max-height: 58px;
  object-fit: contain;
}

.kw-nav { display: flex; align-items: center; gap: 34px; margin-inline-start: auto; }
.kw-nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  color: var(--navy); text-decoration: none;
}
.kw-nav a:hover { color: var(--teal); text-decoration: none; }
.kw-nav a[aria-current="page"] { color: var(--teal); }

.kw-header__actions { display: flex; align-items: center; gap: 18px; }
.kw-lang {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  color: var(--navy); background: none; border: 0; cursor: pointer; padding: 6px 2px;
}
.kw-lang:hover { color: var(--teal); }

.kw-burger {
  display: none; background: none; border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 9px 11px; cursor: pointer;
}
.kw-burger span {
  display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px;
}
.kw-burger span + span { margin-top: 4px; }

/* ---------- hero ---------- */

.kw-hero { background: var(--white); padding-block: 88px 76px; }
.kw-hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 64px; align-items: center;
}
.kw-hero h1 { margin-bottom: 26px; }
.kw-hero__body { font-size: 1.22rem; max-width: 34ch; margin-bottom: 36px; }
.kw-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.kw-hero__media { display: flex; justify-content: center; }

/* ---------- homepage constellation ----------
   A square stage. Nodes are placed by percentage from content.py, so the
   ring is a property of the data rather than eight hard-coded coordinates,
   and it stays a true circle at every width. */

.kw-constel {
  position: relative; width: 100%; max-width: 520px; aspect-ratio: 1;
}
.kw-constel__web {
  position: absolute; inset: 0; width: 100%; height: 100%;
  stroke: var(--rule); stroke-width: 0.25;
}

.kw-constel__core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40%; aspect-ratio: 1; border-radius: 50%;
  background: var(--white); border: 1px solid var(--rule);
  box-shadow: 0 18px 44px -30px rgba(30, 42, 90, 0.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center; padding: 6%;
}
.kw-constel__mark { width: 46%; height: auto; }
.kw-constel__wordmark {
  font-family: var(--font-display); font-weight: 700; color: var(--navy);
  font-size: 0.86rem; letter-spacing: 0.22em; margin-top: 6px;
}
html[lang^="ar"] .kw-constel__wordmark { letter-spacing: 0; }
.kw-constel__built {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.66rem; color: var(--slate-soft); margin-top: 5px;
}
.kw-constel__built img { width: 13px; height: 13px; border-radius: 3px; }

.kw-constel__node {
  position: absolute; left: var(--kw-x); top: var(--kw-y);
  transform: translate(-50%, -50%);
  width: 23%; display: flex; flex-direction: column; align-items: center;
  gap: 7px; text-decoration: none; text-align: center;
}
.kw-constel__disc {
  width: 54%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--kw-tint);
  background: color-mix(in srgb, var(--kw-tint) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--kw-tint) 32%, #fff);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kw-constel__disc svg { width: 52%; height: 52%; }
.kw-constel__label {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.7rem; line-height: 1.25; color: var(--slate);
  transition: color 0.18s ease;
}
.kw-constel__node:hover .kw-constel__disc,
.kw-constel__node:focus-visible .kw-constel__disc {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--kw-tint) 70%, transparent);
}
.kw-constel__node:hover .kw-constel__label { color: var(--kw-tint); }
.kw-constel__node:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 4px; border-radius: var(--radius-sm);
}

/* ---------- trust strip ---------- */

.kw-trust { background: var(--mist); border-block: 1px solid var(--rule); }
.kw-trust__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 28px;
  padding-block: 26px;
}
.kw-trust span {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--slate-soft);
}
html[lang^="ar"] .kw-trust span { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }

/* ---------- cards ---------- */

.kw-grid { display: grid; gap: 24px; }
.kw-grid--2 { grid-template-columns: repeat(2, 1fr); }
.kw-grid--3 { grid-template-columns: repeat(3, 1fr); }
.kw-grid--4 { grid-template-columns: repeat(4, 1fr); }

.kw-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.kw-card--link { text-decoration: none; transition: border-color 0.16s ease; }
.kw-card--link:hover { border-color: var(--teal); text-decoration: none; }
.kw-card p { font-size: 0.98rem; color: var(--slate); }

.kw-icon {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--teal-wash); color: var(--teal);
  display: grid; place-content: center; margin-bottom: 8px;
}
.kw-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }

.kw-card__sector {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-soft);
}
html[lang^="ar"] .kw-card__sector { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
.kw-card__depth {
  font-size: 0.88rem; color: var(--slate-soft);
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule-soft);
}
.kw-card__more {
  font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; color: var(--teal);
}

/* ---------- module chips ---------- */

.kw-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kw-chip {
  background: var(--mist); border-radius: var(--radius-sm);
  padding: 22px 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  color: var(--navy);
}
.kw-section--mist .kw-chip { background: var(--white); }

/* ---------- stats ---------- */

.kw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.kw-stat { display: flex; flex-direction: column; gap: 6px; }
.kw-stat__figure {
  font-family: var(--font-display); font-weight: 800;
  font-size: 3.2rem; line-height: 1; letter-spacing: -0.03em;
  color: var(--teal); font-variant-numeric: tabular-nums;
}
.kw-stat__label { font-size: 0.98rem; color: var(--slate); max-width: 22ch; }

/* ---------- method ---------- */

.kw-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.kw-step {
  padding: 0 24px; border-inline-start: 2px solid var(--rule);
  display: flex; flex-direction: column; gap: 8px;
}
.kw-step:first-child { padding-inline-start: 0; border-inline-start: 0; }
.kw-step__n {
  font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  color: var(--teal); font-variant-numeric: tabular-nums;
}
.kw-step p { font-size: 0.95rem; }

/* ---------- platform layers ---------- */

.kw-layer {
  border-inline-start: 2px solid var(--teal);
  padding-inline-start: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.kw-layer p { font-size: 0.97rem; }

/* ---------- solution detail ---------- */

.kw-page-hero { background: var(--mist); border-bottom: 1px solid var(--rule); padding-block: 72px; }
.kw-page-hero h1 { margin-bottom: 20px; }
.kw-page-hero__lede { font-size: 1.2rem; max-width: 62ch; }
.kw-page-hero__depth {
  margin-top: 26px; font-family: var(--font-display); font-weight: 600;
  font-size: 0.95rem; color: var(--slate-soft);
}
.kw-back {
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-soft);
  display: inline-block; margin-bottom: 20px;
}
.kw-back:hover { color: var(--teal); text-decoration: none; }
html[lang^="ar"] .kw-back { letter-spacing: 0; text-transform: none; }

.kw-caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.kw-cap { background: var(--white); padding: 28px 30px 30px; display: flex; flex-direction: column; gap: 10px; }
.kw-cap p { font-size: 0.97rem; }

/* ---------- prose ---------- */

.kw-prose { max-width: 68ch; display: flex; flex-direction: column; gap: 20px; }
.kw-prose p { font-size: 1.08rem; }
.kw-prose h2 { margin-top: 20px; }
.kw-prose ul { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 10px; }
.kw-prose li { font-size: 1.04rem; }

/* ---------- CTA band ---------- */

.kw-cta { background: var(--navy); color: #fff; padding-block: 72px; }
.kw-cta__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
}
.kw-cta h2 { color: #fff; margin-bottom: 12px; }
.kw-cta p { color: #b9c2df; font-size: 1.12rem; max-width: 52ch; }

/* ---------- forms ---------- */

.kw-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 720px; }
.kw-field { display: flex; flex-direction: column; gap: 7px; }
.kw-field--wide { grid-column: 1 / -1; }
.kw-field label {
  font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; color: var(--navy);
}
.kw-field input, .kw-field select, .kw-field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--navy);
  background: var(--white);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: 13px 15px; width: 100%;
}
.kw-field textarea { min-height: 130px; resize: vertical; }
.kw-field input:focus, .kw-field select:focus, .kw-field textarea:focus {
  border-color: var(--teal); outline: 2px solid rgba(0, 168, 166, 0.25); outline-offset: 0;
}
.kw-field__error { font-size: 0.87rem; color: #c0392b; min-height: 1px; }
.kw-form__status {
  grid-column: 1 / -1; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
}
.kw-form__status--ok { color: var(--teal-dark); }
.kw-form__status--err { color: #c0392b; }

.kw-contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 64px; align-items: start; }
.kw-contact-block { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }
.kw-contact-block dt {
  font-family: var(--font-display); font-weight: 700; font-size: 0.76rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-soft);
}
html[lang^="ar"] .kw-contact-block dt { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.kw-contact-block dd { margin: 0; font-size: 1.05rem; color: var(--navy); }

/* ---------- footer ---------- */

.kw-footer { background: var(--white); border-top: 1px solid var(--rule); padding-block: 60px 34px; }
.kw-footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.kw-footer__logo { width: 88px; height: 88px; margin-bottom: 16px; }
.kw-footer p { font-size: 0.96rem; max-width: 34ch; }
.kw-footer h4 { margin-bottom: 14px; color: var(--navy); }
.kw-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.kw-footer li a { color: var(--slate); font-size: 0.96rem; }
.kw-footer li a:hover { color: var(--teal); text-decoration: none; }
.kw-footer__bar {
  margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.92rem; color: var(--slate-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .kw-grid--4, .kw-chips { grid-template-columns: repeat(2, 1fr); }
  .kw-stats { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
  .kw-steps { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .kw-step:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .kw-footer__top { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --gut: 22px; }
  .kw-hero__grid, .kw-contact-grid, .kw-page-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .kw-constel { aspect-ratio: auto; max-width: none;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 10px; }
  .kw-constel__web { display: none; }
  .kw-constel__core {
    position: static; transform: none; grid-column: 1 / -1;
    width: 100%; aspect-ratio: auto; border-radius: var(--radius);
    flex-direction: row; justify-content: center; gap: 14px; padding: 18px;
  }
  .kw-constel__mark { width: 54px; }
  .kw-constel__wordmark, .kw-constel__built { margin-top: 0; }
  .kw-constel__node { position: static; transform: none; width: auto; }
  .kw-constel__disc { width: 46px; }
  .kw-hero__body { max-width: none; }
  .kw-grid--3, .kw-caps { grid-template-columns: 1fr; }
  .kw-caprow__inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .kw-caprow__media { max-width: 440px; }
  .kw-section { padding-block: 68px; }
  .kw-nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gut) 18px;
  }
  .kw-nav.is-open { display: flex; }
  .kw-nav a { padding: 13px 0; border-top: 1px solid var(--rule-soft); }
  .kw-burger { display: block; margin-inline-start: auto; order: 3; }
  .kw-header__actions { order: 2; }
  .kw-header__inner { position: relative; flex-wrap: wrap; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .kw-logo img { height: 46px; width: 46px; max-height: 46px; }
  .kw-grid--2, .kw-grid--4, .kw-chips, .kw-stats, .kw-steps, .kw-form { grid-template-columns: 1fr; }
  .kw-constel { grid-template-columns: repeat(2, 1fr); }
  .kw-step { padding-inline: 0; border-inline-start: 0; }
  .kw-footer__top { grid-template-columns: 1fr; gap: 30px; }
  .kw-header__actions .kw-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
