:root {
  --navy: #102e4e;
  --navy-deep: #0a2037;
  --navy-soft: #1a466f;
  --green: #11785a;
  --green-soft: #dff4e9;
  --gold: #b98a2f;
  --gold-light: #ead399;
  --ink: #152333;
  --muted: #627083;
  --line: #dce4ec;
  --surface: #ffffff;
  --wash: #f3f7f7;
  --warm: #fbf7ee;
  --shadow: 0 18px 55px rgba(16, 46, 78, 0.11);
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  min-width: 320px;
  background: #fff;
  color: var(--ink);
  font-family: "Tajawal", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
button, a, input { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, .wa-brand strong { color: var(--navy); font-family: "Noto Kufi Arabic", "Tajawal", sans-serif; line-height: 1.45; }
.wa-shell { width: min(1140px, calc(100% - 2rem)); margin-inline: auto; }

.wa-site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.wa-header-inner {
  width: min(1180px, calc(100% - 2rem));
  min-height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.wa-brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; flex: 0 0 auto; }
.wa-brand-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--green); }
.wa-brand span { display: flex; flex-direction: column; line-height: 1.35; }
.wa-brand strong { font-size: 0.85rem; }
.wa-brand small { color: var(--muted); font-size: 0.68rem; }
.wa-nav { display: flex; gap: 1.4rem; }
.wa-nav a, .wa-back-link { color: var(--muted); font-size: 0.86rem; font-weight: 700; text-decoration: none; }
.wa-nav a:hover, .wa-back-link:hover { color: var(--green); }
.wa-header-actions { display: flex; align-items: center; gap: 0.8rem; }
.wa-back-link { padding-inline-end: 0.8rem; border-inline-end: 1px solid var(--line); }
.wa-lang-button {
  min-width: 82px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
}

.wa-hero {
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.72fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  padding-block: clamp(4rem, 9vw, 7rem);
}
.wa-eyebrow { color: var(--green); font-size: 0.78rem; font-weight: 700; margin-bottom: 0.7rem; }
.wa-hero h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); letter-spacing: -0.045em; }
.wa-hero-lead { max-width: 730px; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.18rem); margin-top: 1.25rem; }
.wa-hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.7rem; }
.wa-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-button:hover { transform: translateY(-2px); }
.wa-button-primary { color: #fff; background: linear-gradient(135deg, var(--green), #0f5b58); box-shadow: 0 12px 28px rgba(17, 120, 90, 0.22); }
.wa-button-secondary { color: var(--navy); border-color: var(--line); background: #fff; }
.wa-button-light { color: var(--navy); background: #fff; box-shadow: 0 10px 30px rgba(4, 20, 35, 0.18); }
.wa-hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; margin-top: 1.2rem; color: var(--muted); font-size: 0.82rem; }
.wa-hero-points li::before { content: "✓"; color: var(--green); font-weight: 700; margin-inline-end: 0.4rem; }

.conversation-preview {
  border: 10px solid var(--navy-deep);
  border-radius: 32px;
  overflow: hidden;
  background: #e8ded4;
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}
[dir="rtl"] .conversation-preview { transform: rotate(-1.4deg); }
.preview-header { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem; background: #176b57; color: #fff; }
.preview-avatar, .wa-chat-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 700;
}
.preview-header div:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.preview-header small { opacity: 0.82; font-size: 0.7rem; }
.preview-body {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.2rem;
  background-image: radial-gradient(circle at 15% 20%, rgba(255,255,255,.35) 0 2px, transparent 3px);
}
.preview-message { max-width: 84%; padding: 0.62rem 0.8rem; border-radius: 12px; font-size: 0.84rem; box-shadow: 0 2px 4px rgba(0,0,0,.08); }
.preview-message.customer { align-self: flex-end; background: #d9fdd3; border-start-end-radius: 3px; }
.preview-message.assistant { align-self: flex-start; background: #fff; border-start-start-radius: 3px; }
.preview-insight { padding: 0.75rem 1rem; background: #fff; color: var(--green); text-align: center; font-size: 0.75rem; font-weight: 700; }

.outcome-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border-radius: 22px;
  background: var(--navy);
  box-shadow: 0 20px 45px rgba(16,46,78,.2);
}
.outcome-strip div { min-height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; border-inline-start: 1px solid rgba(255,255,255,.14); }
.outcome-strip div:first-child { border-inline-start: 0; }
.outcome-strip strong { color: var(--gold-light); font-size: 1.7rem; }
.outcome-strip span { font-size: 0.8rem; opacity: 0.9; }

.wa-section { padding-block: clamp(5rem, 9vw, 8rem); }
.wa-section-heading { max-width: 760px; margin-bottom: 2.3rem; }
.wa-section-heading h2, .scope-section h2, .wa-final-cta h2 { font-size: clamp(1.55rem, 3.5vw, 2.5rem); }
.wa-section-heading > p:last-child { color: var(--muted); margin-top: 0.7rem; }
.wa-centered { margin-inline: auto; text-align: center; }
.problem-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.problem-list { display: grid; gap: 0.8rem; }
.problem-list article { display: grid; grid-template-columns: 42px 1fr; gap: 0.9rem; align-items: center; padding: 1.1rem; border: 1px solid var(--line); border-radius: 16px; }
.problem-list span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--warm); color: var(--gold); font-weight: 700; }
.problem-list p { color: var(--muted); }

.wa-section-tint { background: var(--wash); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.how-grid article { min-height: 255px; display: flex; flex-direction: column; padding: 1.5rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.how-grid article > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--green); font-weight: 700; }
.how-grid h3 { font-size: 1rem; margin-top: auto; }
.how-grid p { color: var(--muted); font-size: 0.9rem; margin-top: 0.55rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature-grid article { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.feature-grid strong { color: var(--navy); font-family: "Noto Kufi Arabic", sans-serif; font-size: 0.9rem; }
.feature-grid p { color: var(--muted); font-size: 0.88rem; margin-top: 0.5rem; }

.scope-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 7vw, 6rem);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 30px;
  background: linear-gradient(140deg, var(--navy), var(--navy-soft));
}
.scope-section h2 { color: #fff; }
.scope-section .wa-eyebrow { color: var(--gold-light); }
.scope-section ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.scope-section li { color: rgba(255,255,255,.84); font-size: 0.9rem; padding: 0.8rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); }
.scope-section li::before { content: "✓"; color: var(--gold-light); margin-inline-end: 0.5rem; font-weight: 700; }

.demo-section { margin-top: clamp(5rem, 9vw, 8rem); background: linear-gradient(180deg, var(--wash), #fff); }
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: min(430px, 100%);
  height: 570px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 8px solid var(--navy-deep);
  border-radius: 30px;
  background: #e8ded4;
  box-shadow: var(--shadow);
}
.wa-chat-header { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem; background: #176b57; color: #fff; }
.wa-chat-title { display: flex; flex-direction: column; line-height: 1.35; }
.wa-chat-title em { font-style: normal; font-size: 0.68rem; opacity: 0.82; }
.wa-chat-body { flex: 1; overflow-y: auto; padding: 1rem 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; scroll-behavior: smooth; }
.msg { max-width: 84%; padding: 0.55rem 0.75rem; border-radius: 12px; font-size: 0.85rem; line-height: 1.55; box-shadow: 0 1px 2px rgba(0,0,0,.08); white-space: pre-line; }
.msg.bot { align-self: flex-start; background: #fff; border-start-start-radius: 3px; }
.msg.user { align-self: flex-end; background: #d9fdd3; border-start-end-radius: 3px; }
.msg time { display: block; color: var(--muted); font-size: 0.58rem; text-align: end; margin-top: 0.18rem; }
.typing { display: inline-flex; gap: 4px; padding: 0.65rem 0.8rem; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa7b5; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.wa-chips { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.55rem 0.7rem; background: rgba(255,255,255,.62); scrollbar-width: none; }
.wa-chips::-webkit-scrollbar { display: none; }
.wa-chip { flex: 0 0 auto; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid #bfd4ca; background: #fff; color: var(--green); cursor: pointer; font-size: 0.72rem; font-weight: 700; }
.wa-chat-input { display: flex; gap: 0.5rem; padding: 0.6rem 0.7rem; background: #f0f0f0; }
.wa-chat-input input { min-width: 0; flex: 1; border: 0; outline: 0; border-radius: 999px; padding: 0.62rem 0.9rem; background: #fff; }
.wa-chat-input button { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--green); color: #fff; cursor: pointer; font-size: 1.3rem; }
[dir="rtl"] .wa-chat-input button span { transform: scaleX(-1); }
.data-note { max-width: 680px; margin: 1.2rem auto 0; color: var(--muted); text-align: center; font-size: 0.78rem; }

.dashboard-section { padding-top: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.kpi { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 130px; text-align: center; padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(16,46,78,.06); }
.kpi strong { color: var(--navy); font-size: 1.65rem; }
.kpi span { color: var(--muted); font-size: 0.78rem; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chart-card, .insight-card { min-width: 0; padding: 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(16,46,78,.06); }
.chart-card h3, .insight-card h3 { font-size: 0.92rem; margin-bottom: 0.8rem; }
.chart-card canvas { width: 100% !important; }
.insight-card { border-inline-start: 4px solid var(--gold); }
.insight-card ul { list-style: none; display: grid; gap: 0.65rem; }
.insight-card li { padding: 0.65rem 0.8rem; border-radius: 11px; background: var(--warm); color: var(--muted); font-size: 0.84rem; }

.wa-final-cta {
  min-height: 290px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 32px;
  background: linear-gradient(135deg, var(--green), var(--navy));
  color: #fff;
}
.wa-final-cta .wa-eyebrow { color: var(--gold-light); }
.wa-final-cta h2 { max-width: 760px; color: #fff; }
.wa-final-cta p:last-child { max-width: 680px; color: rgba(255,255,255,.76); margin-top: 0.6rem; }
.wa-footer { margin-top: 6rem; padding-block: 1.4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.wa-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wa-footer-inner div { display: flex; gap: 1rem; }
.wa-footer a { text-decoration: none; }
.wa-footer a:hover { color: var(--green); }

[dir="ltr"] .wa-hero h1 { letter-spacing: -0.035em; }

@media (max-width: 980px) {
  .wa-nav { display: none; }
  .wa-hero { grid-template-columns: 1fr 340px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .wa-header-inner { min-height: 68px; }
  .wa-brand small, .wa-back-link { display: none; }
  .wa-hero { min-height: auto; grid-template-columns: 1fr; padding-block: 3.5rem; }
  .wa-hero h1 { font-size: clamp(1.85rem, 9vw, 2.6rem); }
  .conversation-preview { max-width: 430px; margin-inline: auto; transform: none; }
  [dir="rtl"] .conversation-preview { transform: none; }
  .outcome-strip { grid-template-columns: 1fr; }
  .outcome-strip div { min-height: 92px; border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .outcome-strip div:first-child { border-top: 0; }
  .problem-grid, .how-grid, .feature-grid, .scope-section { grid-template-columns: 1fr; }
  .scope-section ul { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .wa-final-cta { flex-direction: column; align-items: flex-start; }
  .wa-footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 460px) {
  .wa-shell { width: min(100% - 1.25rem, 1140px); }
  .wa-header-inner { width: calc(100% - 1.25rem); }
  .wa-brand strong { font-size: 0.78rem; }
  .wa-brand-photo { width: 40px; height: 40px; }
  .wa-lang-button { min-width: 74px; height: 38px; }
  .wa-hero-actions { display: grid; grid-template-columns: 1fr; }
  .wa-button { width: 100%; }
  .wa-hero-points { display: grid; grid-template-columns: 1fr; }
  .preview-body { min-height: 330px; }
  .phone { height: 540px; border-width: 6px; }
  .kpi-grid { grid-template-columns: 1fr; }
}
