/* وكالة أثر الرقمية: one stylesheet for the whole site. RTL first, no JavaScript. */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --soft: #eeeae1;
  --ink: #17201c;
  --muted: #4f5753;
  --line: #ddd8cd;
  --accent: #9a3f1f;
  --accent-soft: #f3e6dd;
  --dark: #17201c;
  --dark-muted: #b9c0bc;
  --radius: 10px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.85;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--ink);
}

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

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-inline-start: 1.3em;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* ── header ─────────────────────────────────────────────────────────────── */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  min-height: 76px;
  flex-wrap: wrap;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand svg {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
}

.site-nav a:hover {
  background: var(--soft);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.site-nav a.nav-cta {
  background: var(--ink);
  color: #fff;
  margin-inline-start: 8px;
}

.site-nav a.nav-cta:hover {
  background: var(--accent);
}

.site-nav a.nav-cta[aria-current="page"] {
  box-shadow: none;
  border-radius: 6px;
  background: var(--accent);
}

/* ── shared blocks ──────────────────────────────────────────────────────── */

main {
  display: block;
}

.section {
  padding-block: clamp(48px, 7vw, 88px);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-alt {
  background: var(--surface);
}

.eyebrow {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 62ch;
}

.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-head p {
  color: var(--muted);
}

.more {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
}

.more::after {
  content: " ←";
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  line-height: 1.4;
}

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button-quiet {
  color: var(--ink);
  background: transparent;
}

.button-quiet:hover {
  background: var(--soft);
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-head {
  padding-block: clamp(44px, 6vw, 76px) clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 22ch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.section-alt .card {
  background: var(--bg);
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card .tag {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.figure {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.ticks {
  list-style: none;
  padding: 0;
}

.ticks li {
  position: relative;
  padding-inline-start: 26px;
  margin-bottom: 8px;
}

.ticks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.62em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ── home: hero and the weekly report sample ───────────────────────────── */

.hero {
  padding-block: clamp(48px, 7vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  max-width: 17ch;
}

.report {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(23, 32, 28, 0.35);
}

.report-title {
  font-weight: 700;
  margin: 0;
}

.report-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 14px;
}

.report table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.report th,
.report td {
  text-align: start;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.report th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
}

.report td.num,
.report th.num {
  text-align: center;
  width: 4.2em;
}

.bar {
  display: block;
  height: 5px;
  margin-top: 6px;
  background: var(--soft);
  border-radius: 3px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--accent);
}

.report-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: 6px;
}

.report-note strong {
  font-variant-numeric: tabular-nums;
}

/* ── numbers strip ─────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}

.stats div {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.stats dt {
  font-size: clamp(2rem, 3.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.stats dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ── steps ─────────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.steps > li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 64px 24px 24px;
}

.section-alt .steps > li {
  background: var(--bg);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 22px;
  inset-inline-start: 24px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  line-height: 1;
}

.steps h3 {
  margin-bottom: 6px;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* ── packages ──────────────────────────────────────────────────────────── */

.packages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.package {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.package.featured {
  border: 2px solid var(--ink);
}

.package .flag {
  position: absolute;
  top: -13px;
  inset-inline-start: 22px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  padding: 2px 10px;
}

.package h3 {
  font-size: 1.45rem;
  margin-bottom: 4px;
}

.package .fit {
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 3.4em;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 4px;
}

.price strong {
  font-size: 2.3rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.price span {
  color: var(--muted);
}

.package .term {
  font-size: 0.92rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.package .ticks {
  margin: 0;
}

.note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.callout {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.callout h2 {
  font-size: 1.4rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ── case studies ──────────────────────────────────────────────────────── */

.case {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px 48px;
  padding-block: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.case:last-of-type {
  border-bottom: 0;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.case-meta li {
  font-size: 0.86rem;
  background: var(--soft);
  border-radius: 4px;
  padding: 2px 10px;
}

.case h3 {
  font-size: 1.05rem;
  margin: 18px 0 4px;
}

.results {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 22px;
  align-self: start;
}

.results div {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.results div:last-child {
  border-bottom: 0;
}

.results dt {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.results dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

blockquote {
  margin: 20px 0 0;
  padding: 4px 18px;
  border-inline-start: 3px solid var(--accent);
  color: var(--ink);
}

blockquote p {
  margin-bottom: 4px;
}

blockquote footer {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── clients ───────────────────────────────────────────────────────────── */

.badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.badges li {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 18px 16px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badges strong {
  font-size: 1.05rem;
  line-height: 1.45;
}

.badges span {
  font-size: 0.85rem;
  color: var(--muted);
}

.cities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

/* ── about ─────────────────────────────────────────────────────────────── */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-inline-start: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 24px 22px;
}

.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: -7px;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline strong {
  display: block;
  font-variant-numeric: tabular-nums;
}

.people {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.people li {
  border-top: 2px solid var(--ink);
  padding-top: 10px;
}

.people strong {
  display: block;
}

.people span {
  color: var(--muted);
  font-size: 0.92rem;
}

.split {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.split li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}

.split b {
  font-variant-numeric: tabular-nums;
}

/* ── article ───────────────────────────────────────────────────────────── */

.article {
  max-width: 70ch;
}

.article p,
.article li {
  font-size: 1.1rem;
}

.article h2 {
  font-size: 1.4rem;
  margin-top: 1.8em;
}

.byline {
  color: var(--muted);
  font-size: 0.95rem;
}

.article .signals li {
  margin-bottom: 10px;
}

/* ── contact ───────────────────────────────────────────────────────────── */

.contact-list {
  margin: 0;
}

.contact-list div {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.contact-list dt {
  font-size: 0.88rem;
  color: var(--muted);
}

.contact-list dd {
  margin: 0;
  font-weight: 600;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* ── call to action and footer ─────────────────────────────────────────── */

.cta {
  padding-block: clamp(40px, 6vw, 72px);
}

.cta-box {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px 40px;
}

.cta-box h2 {
  margin-bottom: 6px;
}

.cta-box p {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.site-footer {
  background: var(--dark);
  color: var(--dark-muted);
  padding-block: 48px 28px;
  font-size: 0.95rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 28px 48px;
}

.footer-grid .brand-name {
  color: #fff;
  display: block;
  margin-bottom: 6px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 24px;
}

.footer-grid li {
  margin-bottom: 6px;
}

.footer-grid p {
  margin-bottom: 6px;
}

.legal {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.85rem;
}

/* ── responsive ────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .packages {
    row-gap: 28px;
  }

  .hero-grid,
  .case {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .packages,
  .steps {
    grid-template-columns: 1fr;
  }

  .package .fit {
    min-height: 0;
  }

  .badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 640px) and (max-width: 960px) {
  .grid-3,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2,
  .cities {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .header-row {
    min-height: 0;
    gap: 10px;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    padding: 4px 9px;
    font-size: 0.94rem;
  }

  .site-nav a.nav-cta {
    margin-inline-start: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .report th,
  .report td {
    padding-inline: 4px;
  }
}
