/* ==========================================================================
   /meta-cost — "how Meta charges for WhatsApp messages"
   Editorial explainer + calculator. Same brand system as the ExBolt landing:
   off-white paper, ink type, electric blue, WhatsApp green for money facts.
   ========================================================================== */

:root {
  --ink: #0a0f1a;
  --ink-soft: #1c2433;
  --muted: #5b6474;
  --muted-2: #66707f;
  --blue: #0a4dff;
  --blue-deep: #0033cc;
  --sky: #eef3ff;
  --paper: #f6f7fa;
  --paper-2: #eef1f6;
  --line: #e4e8f0;
  --line-strong: #d3d9e5;
  --white: #fff;
  --green: #12b76a;
  --green-deep: #0a8f52;
  --amber: #ffb020;
  --violet: #6b4dff;
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 30px 70px -40px rgba(10, 15, 26, .35), 0 2px 10px -6px rgba(10, 15, 26, .08);
  --w: 1140px;
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

::selection { background: var(--blue); color: #fff; }

.wrap { width: min(var(--w), calc(100% - 48px)); margin-inline: auto; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 12px 12px;
}
.skip:focus { inset-inline-start: 16px; }

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

/* ---------------------------------------------------------------- header */
.bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  display: flex; align-items: center; gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 19px; letter-spacing: -.01em;
  color: var(--blue);
}
.brand span { color: var(--ink); }
.brand svg { flex: none; }
.bar-nav { display: flex; gap: 22px; font-size: 14.5px; color: var(--muted); }
.bar-nav a { padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.bar-nav a:hover { color: var(--ink); border-color: var(--blue); }
.stamp {
  margin-inline-start: auto;
  font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 5px 14px; white-space: nowrap;
}

/* ---------------------------------------------------------------- hero */
.hero {
  padding: 70px 0 84px;
  background:
    radial-gradient(1000px 460px at 82% -8%, #eef3ff 0%, rgba(238, 243, 255, 0) 62%),
    var(--white);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.08fr .92fr;
  gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--blue-deep);
  background: var(--sky); border-radius: 999px; padding: 6px 14px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 700; line-height: 1.2; letter-spacing: -.02em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.lede {
  margin-top: 20px;
  font-size: 17.5px; line-height: 1.9; color: var(--ink-soft);
  max-width: 56ch;
}
.lede strong { font-weight: 600; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-green { background: var(--green); }
.dot-blue { background: var(--blue); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff;
  font-weight: 600; font-size: 15.5px;
  padding: 14px 26px; border-radius: 999px;
  box-shadow: 0 14px 34px -18px rgba(10, 77, 255, .9);
  transition: transform .16s ease, background .16s ease;
}
.btn:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center;
  font-weight: 600; font-size: 15.5px; color: var(--ink);
  padding: 14px 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  transition: border-color .16s, background .16s;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); }

.hero-art svg { width: 100%; height: auto; }

/* ---------------------------------------------------------------- sections */
.sec { padding: 82px 0; border-bottom: 1px solid var(--line); }
.sec-tint { background: var(--paper); }

.sec-head { max-width: 720px; margin-bottom: 44px; }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--left { margin-bottom: 28px; }
.num {
  display: block;
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--blue); margin-bottom: 10px;
}
.sec-head h2 {
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 700; line-height: 1.35; letter-spacing: -.015em;
  text-wrap: balance;
}
.sec-head p { margin-top: 14px; font-size: 16.5px; color: var(--muted); line-height: 1.85; }
.sec-head p strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
}
.step-art {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
}
.step-art svg { width: 100%; height: auto; }
.step h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--muted); line-height: 1.85; }

/* ---------------------------------------------------------------- categories */
.cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.cat {
  display: grid; grid-template-columns: 132px 1fr; gap: 22px;
  align-items: start;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.cat:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat--agent { grid-column: 1 / -1; grid-template-columns: 132px 1fr; }
.cat-art { border-radius: 20px; background: var(--paper); padding: 8px; }
.cat-art svg { width: 100%; height: auto; }
.cat-body h3 { font-size: 19px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.en { font-size: 12px; font-weight: 500; color: var(--muted-2); letter-spacing: .02em; }
.cat-body p { font-size: 15px; color: var(--muted); line-height: 1.8; margin-top: 6px; }
.price {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong);
}
.price-v { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.price-u { font-size: 13px; color: var(--muted); }
.cat-note { font-size: 13.5px !important; color: var(--muted-2) !important; margin-top: 8px !important; }

/* ---------------------------------------------------------------- free */
.free-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.free-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.free-art { background: var(--paper); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; }
.free-art svg { width: 100%; height: auto; }
.free-card h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 8px; }
.free-card p { font-size: 15px; color: var(--muted); line-height: 1.85; }
.free-card strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- tiers */
.tiers-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.rules { display: grid; gap: 14px; }
.rules li {
  position: relative; padding-inline-start: 26px;
  font-size: 15px; color: var(--muted); line-height: 1.8;
}
.rules li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: .72em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 4px rgba(10, 77, 255, .12);
}
.rules strong { color: var(--ink); font-weight: 600; }
.tiers-art {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.tiers-art svg { width: 100%; height: auto; }

/* ---------------------------------------------------------------- calculator */
.calc-sec {
  background:
    radial-gradient(800px 380px at 12% 0%, #f0f5ff 0%, rgba(240, 245, 255, 0) 60%),
    var(--white);
}
.calc {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 24px; align-items: start;
}
.calc-form, .calc-out {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.calc-form { display: grid; gap: 26px; }
.field-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.field-group legend {
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  color: var(--blue); text-transform: uppercase;
  margin-bottom: 14px;
}
.row { display: grid; gap: 16px; }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field { display: grid; gap: 6px; }
.lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
.opt { font-size: 11.5px; font-weight: 500; color: var(--muted-2); }
.hint { font-size: 12.5px; color: var(--muted-2); line-height: 1.6; }

input[type="number"], select {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input[type="number"]:hover, select:hover { border-color: var(--muted-2); }
input[type="number"]:focus, select:focus {
  outline: none; background: #fff; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 77, 255, .12);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 49%, var(--muted) 50%), linear-gradient(-45deg, transparent 49%, var(--muted) 50%);
  background-size: 6px 6px, 6px 6px;
  background-position: left 16px center, left 22px center;
  background-repeat: no-repeat;
  padding-inline-end: 14px;
  padding-inline-start: 38px;
}

.presets { display: grid; gap: 8px; align-content: start; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  background: var(--white); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 8px 14px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  transition: border-color .15s, background .15s, color .15s;
}
.chip-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--sky); }

.calc-foot {
  font-size: 12.5px; color: var(--muted-2); line-height: 1.75;
  border-top: 1px dashed var(--line-strong); padding-top: 16px;
}

.calc-out { position: sticky; top: 88px; display: grid; gap: 20px; }
.total {
  background: var(--ink); color: #fff;
  border-radius: 20px; padding: 22px 24px;
}
.total-lbl { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-bottom: 6px; }
.total-usd {
  display: block;
  font-size: clamp(32px, 4vw, 42px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.total-egp { display: block; font-size: 15px; color: #9fc0ff; margin-top: 4px; }
.total-meta { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .5); margin-top: 10px; }

.bars { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--paper-2); }
.bars span { display: block; height: 100%; transition: width .35s ease; }

.breakdown { display: grid; gap: 10px; }
.breakdown li {
  display: grid; grid-template-columns: 1fr auto;
  gap: 2px 12px; align-items: baseline;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.breakdown li:last-child { border-bottom: 0; padding-bottom: 0; }
.bd-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bd-name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.bd-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.bd-sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted-2); }

.savings { display: grid; gap: 8px; }
.savings div {
  display: flex; justify-content: space-between; gap: 12px;
  background: #e7f8ef; color: var(--green-deep);
  border-radius: 12px; padding: 10px 14px;
  font-size: 13px; font-weight: 600;
}
.savings div b { font-variant-numeric: tabular-nums; }

.note-box {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px;
  font-size: 13px; color: var(--muted); line-height: 1.75;
}
.note-box strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- example */
.ex {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 32px;
  align-items: start;
}
.ex-scroll { overflow-x: auto; border-radius: var(--radius); }
.ex-table {
  width: 100%; border-collapse: collapse;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  font-size: 14.5px;
}
.ex-table th, .ex-table td { padding: 14px 16px; text-align: start; }
.ex-table thead th {
  background: var(--paper); font-size: 12.5px; font-weight: 700;
  color: var(--muted); letter-spacing: .03em;
  border-bottom: 1px solid var(--line);
}
.ex-table tbody th { font-weight: 500; color: var(--ink-soft); }
.ex-table tbody td { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-table tbody tr + tr th, .ex-table tbody tr + tr td { border-top: 1px solid var(--line); }
.ex-table th:nth-child(n+2), .ex-table td:nth-child(n+2) { text-align: center; }
.row-note { display: block; font-size: 12px; color: var(--muted-2); font-weight: 400; line-height: 1.5; }
.ex-total th, .ex-total td { background: var(--paper); font-weight: 700; color: var(--ink) !important; }

.ex-side { display: grid; gap: 14px; }
.ex-big {
  background: var(--sky); border-radius: 20px; padding: 22px;
  display: grid; gap: 2px;
}
.ex-big span { font-size: 12.5px; color: var(--blue-deep); }
.ex-big strong { font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.ex-side p { font-size: 14.5px; color: var(--muted); line-height: 1.85; }
.ex-fx { font-size: 13px !important; color: var(--muted-2) !important; }

/* ---------------------------------------------------------------- sources */
.sec-src { background: var(--paper); border-bottom: 0; }
.src-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: start; }
.src-grid h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.src-list { display: grid; gap: 12px; }
.src-list li {
  position: relative; padding-inline-start: 20px;
  font-size: 14px; color: var(--muted); line-height: 1.8;
}
.src-list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .7em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong);
}
.src-list a { color: var(--blue); border-bottom: 1px solid rgba(10, 77, 255, .3); }
.src-list a:hover { border-color: var(--blue); }
.src-cta {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.src-cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.src-cta p { font-size: 14.5px; color: var(--muted); line-height: 1.85; margin-bottom: 18px; }

/* ---------------------------------------------------------------- footer */
.foot { padding: 26px 0; background: var(--white); }
.foot-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-size: 13px; color: var(--muted-2);
}
.foot-in a { color: var(--blue); }
.foot-note { margin-inline-start: auto; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 380px; margin-inline: auto; }
  .cats { grid-template-columns: 1fr; }
  .cat--agent { grid-column: auto; }
  .free-grid, .steps { grid-template-columns: 1fr; }
  .tiers-grid, .calc, .ex, .src-grid { grid-template-columns: 1fr; gap: 28px; }
  .calc-out { position: static; }
  .bar-nav { display: none; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 44px 0 56px; }
  .sec { padding: 56px 0; }
  .row-2 { grid-template-columns: 1fr; }
  .cat { grid-template-columns: 88px 1fr; gap: 16px; padding: 20px; }
  .calc-form, .calc-out { padding: 20px; }
  .stamp { display: none; }
  .foot-note { margin-inline-start: 0; }
  .ex-table th, .ex-table td { padding: 11px 12px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
