/* Concept: a signal travelling from your system to a phone in Jordan.
   Ink-to-blue headings, a live SMS composer as the hero, a bento of capabilities. */
@view-transition { navigation: auto; }

@property --g {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 15%;
}

:root {
  --bg: #ffffff;
  --soft: #f2f6fe;
  --surface: #ffffff;
  --ink: #070b18;
  --text: #1a2336;
  --muted: #55617a;
  --line: #dfe6f3;
  --blue: #1447e6;
  --blue-deep: #0b2a9e;
  --sky: #38b6ff;
  --ok: #0f9d58;
  --tint-1: #e8f0ff;
  --tint-2: #e3f6ff;
  --tint-3: #eef0ff;
  --glass: rgb(255 255 255 / .78);
  --shadow: 0 18px 40px -22px rgb(20 71 230 / .35);
  --on-deep: #ffffff;
  --on-deep-muted: #cfdcff;
  --display: "Almarai", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --mono: Consolas, Menlo, monospace;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b18; --soft: #0d1426; --surface: #111a30; --ink: #ffffff; --text: #e4eaf7;
    --muted: #a3afc8; --line: #243050; --blue: #6d9bff; --blue-deep: #0d2c9f; --sky: #38b6ff; --ok: #34c77b;
    --tint-1: #13204a; --tint-2: #0f2a40; --tint-3: #1a1f4d; --glass: rgb(7 11 24 / .78);
    --shadow: 0 18px 40px -22px rgb(0 0 0 / .8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070b18; --soft: #0d1426; --surface: #111a30; --ink: #ffffff; --text: #e4eaf7;
  --muted: #a3afc8; --line: #243050; --blue: #6d9bff; --blue-deep: #0d2c9f; --sky: #38b6ff; --ok: #34c77b;
  --tint-1: #13204a; --tint-2: #0f2a40; --tint-3: #1a1f4d; --glass: rgb(7 11 24 / .78);
  --shadow: 0 18px 40px -22px rgb(0 0 0 / .8); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--bg); line-height: 1.85; font-size: 17px; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.wrap {
  max-width: 1160px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Type: ink-to-blue headings, starting at the reading edge (right) */
h1, h2, h3, .logo, .price { font-family: var(--display); }
h1, h2 {
  color: var(--ink); font-weight: 800; text-wrap: balance;
  width: fit-content; max-width: 100%; padding-block-end: .12em;
  margin-block: 0 14px; line-height: 1.35;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  h1, h2 {
    background-image: linear-gradient(to left, var(--ink) var(--g), var(--blue) 92%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
  }
}
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
h3 { font-size: 1.14rem; font-weight: 700; color: var(--ink); margin: 0 0 6px; line-height: 1.5; }
.lead { font-size: 1.13rem; color: var(--muted); max-width: 62ch; margin-block: 0; }
.eyebrow { font-weight: 600; color: var(--blue); font-size: .95rem; margin-block: 0 8px; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; view-transition-name: site-header;
  background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 68px; flex-wrap: wrap; padding-block: 8px; }
.logo { font-weight: 800; font-size: 1.4rem; text-decoration: none; color: var(--ink); direction: ltr; }
.logo span { color: var(--blue); }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.nav a:not(.btn) { position: relative; text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; padding-block: 4px; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--blue); }

.logo img { display: block; height: 32px; width: auto; }
.footer-logo { display: block; height: 32px; width: auto; margin-bottom: 10px; }

/* Buttons */
.btn {
  display: inline-block; background: linear-gradient(to left, var(--blue-deep), #1447e6); color: #fff !important;
  padding: 10px 22px; border-radius: 12px; text-decoration: none; font-weight: 600; border: 0;
  box-shadow: 0 10px 22px -12px rgb(20 71 230 / .9);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 16px 28px -14px rgb(20 71 230 / 1); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--blue) !important; box-shadow: inset 0 0 0 2px var(--blue); filter: none; }
.btn.ghost:hover { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Sections */
section { padding-block: 72px; }
section.soft { background: var(--soft); }
.section-head { display: grid; gap: 4px; margin-bottom: 32px; }
.answer { background: var(--tint-1); padding: 18px 22px; border-radius: var(--radius); margin: 22px 0 0; max-width: 820px; color: var(--text); }

/* Hero */
.hero {
  position: relative; overflow: clip; padding-block: 56px 72px; isolation: isolate;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--tint-1), transparent 65%),
    radial-gradient(40rem 26rem at 5% 30%, var(--tint-2), transparent 70%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image: radial-gradient(color-mix(in srgb, var(--blue) 26%, transparent) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%); mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; }
.hero-copy > * { min-width: 0; }
.hero h1 { animation: inkSweep 1.5s var(--ease) both; }
@keyframes inkSweep { from { --g: 100%; } to { --g: 15%; } }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.badges li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; font-size: .88rem; font-weight: 500; }

/* Phone: live composer */
.phone-stage { position: relative; display: grid; place-items: center; padding-block: 12px; min-width: 0; }
.ring {
  position: absolute; width: 300px; aspect-ratio: 1; max-width: 100%; border-radius: 50%; z-index: -1;
  border: 2px solid color-mix(in srgb, var(--blue) 35%, transparent);
  animation: ping 4.5s ease-out infinite;
}
.ring:nth-child(2) { animation-delay: 1.5s; }
.ring:nth-child(3) { animation-delay: 3s; }
@keyframes ping { from { transform: scale(.75); opacity: .75; } to { transform: scale(1.7); opacity: 0; } }
.phone {
  width: min(330px, 100%); background: #0b1020; border-radius: 34px; padding: 12px;
  box-shadow: 0 40px 70px -30px rgb(11 42 158 / .7), inset 0 0 0 1px rgb(255 255 255 / .12);
  animation: rise .9s var(--ease) both;
}
@keyframes rise { from { transform: translateY(26px) rotate(-1.5deg); } to { transform: none; } }
.screen { background: #f4f7ff; color: #1a2336; border-radius: 24px; padding: 14px; display: grid; gap: 10px; }
.screen-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #dfe6f3; padding-bottom: 8px; }
.sender { font-family: var(--display); font-weight: 700; color: #070b18; direction: ltr; }
.screen-top small { color: #55617a; }
.bubble {
  background: linear-gradient(to left, #e3ebff, #eef3ff); border-radius: 16px 16px 4px 16px; padding: 10px 14px;
  font-size: .95rem; line-height: 1.7; min-height: 74px; overflow-wrap: anywhere; white-space: pre-wrap;
  animation: pop .6s .5s var(--ease) backwards;
}
@keyframes pop { from { transform: scale(.92) translateY(8px); } to { transform: none; } }
.status { font-size: .8rem; color: #0a7f46; font-weight: 600; }
.composer { display: grid; gap: 6px; }
.composer label { font-size: .85rem; font-weight: 600; color: #1a2336; }
.composer textarea {
  width: 100%; resize: vertical; min-height: 66px; border: 1px solid #c9d5ee; border-radius: 12px; padding: 8px 10px;
  font: inherit; font-size: .92rem; line-height: 1.6; background: #fff; color: #1a2336;
}
.composer textarea:focus { outline: 2px solid #1447e6; outline-offset: 1px; }
.meter { height: 6px; border-radius: 99px; background: #dfe6f3; overflow: hidden; }
.meter i { display: block; height: 100%; width: 66%; background: linear-gradient(to left, #1447e6, #38b6ff); border-radius: inherit; transition: width .3s var(--ease); }
.readout { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .82rem; font-weight: 600; color: #1a2336; font-variant-numeric: tabular-nums; }
.phone-note { font-size: .82rem; color: var(--muted); margin: 12px 0 0; text-align: center; max-width: 330px; }

/* Flow */
.flow { display: grid; grid-template-columns: 1fr minmax(40px, 90px) 1fr minmax(40px, 90px) 1fr; align-items: center; text-align: center; margin-top: 8px; }
.flow .node { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 14px; font-family: var(--display); font-weight: 700; color: var(--ink); }
.flow .node small { display: block; font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .88rem; margin-top: 4px; }
.flow .node.core { background: linear-gradient(135deg, var(--blue-deep), #1447e6 70%, #2a7bff); color: var(--on-deep); border-color: transparent; box-shadow: var(--shadow); }
.flow .node.core small { color: var(--on-deep-muted); }
.wire { position: relative; height: 2px; background: repeating-linear-gradient(to left, var(--blue) 0 6px, transparent 6px 12px); }
.wire::after {
  content: ""; position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: var(--sky); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sky) 25%, transparent);
  animation: travel 2.4s linear infinite;
}
.wire.second::after { animation-delay: 1.2s; }
@keyframes travel { from { inset-inline-start: 0; } to { inset-inline-start: calc(100% - 12px); } }

/* Generic grid + cards (used by every page) */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  min-width: 0; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card p { margin: 0; color: var(--muted); }
.card > * { position: relative; }
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s; pointer-events: none;
  background: radial-gradient(240px circle at var(--x, 50%) var(--y, 50%), color-mix(in srgb, var(--sky) 22%, transparent), transparent 70%);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.card:hover::before { opacity: 1; }
.tint-1 { background: linear-gradient(160deg, var(--tint-1), var(--surface) 75%); }
.tint-2 { background: linear-gradient(160deg, var(--tint-2), var(--surface) 75%); }
.tint-3 { background: linear-gradient(160deg, var(--tint-3), var(--surface) 75%); }
.card.deep { background: linear-gradient(140deg, #0b2a9e, #1447e6 65%, #2a7bff); border-color: transparent; }
.card.deep h3 { color: var(--on-deep); }
.card.deep p { color: var(--on-deep-muted); }
.icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 12px; background: color-mix(in srgb, var(--blue) 13%, transparent); color: var(--blue); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card.deep .icon { background: rgb(255 255 255 / .16); color: #fff; }

.bento { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.chip { display: inline-block; direction: ltr; margin-top: 12px; padding: 2px 14px; border-radius: 10px; font-family: var(--display); font-weight: 700; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.snippet { direction: ltr; text-align: left; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgb(3 8 30 / .55); color: #dbe6ff; font-family: var(--mono); font-size: .8rem; line-height: 1.6; overflow-x: auto; white-space: pre; }

/* Pricing */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan { display: grid; gap: 6px; align-content: start; }
.plan .name { font-family: var(--display); font-weight: 700; color: var(--ink); direction: ltr; text-align: right; }
.price { font-size: 2.1rem; font-weight: 800; color: var(--ink); line-height: 1.3; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--body); font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan .qty { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.rate { display: grid; gap: 4px; font-size: .86rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.rate .bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--blue) 14%, transparent); overflow: hidden; }
.rate .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(to left, var(--blue), var(--sky)); }
.tag { position: absolute; top: 16px; inset-inline-end: 16px; padding: 0 12px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: rgb(255 255 255 / .18); color: #fff; }
.plan.deep .name, .plan.deep .price, .plan.deep .qty { color: var(--on-deep); }
.plan.deep .price small, .plan.deep .rate { color: var(--on-deep-muted); }
.plan.deep .rate .bar { background: rgb(255 255 255 / .22); }
.plan.deep .rate .bar i { background: #fff; }

/* Steps: a real sequence, so numbers belong here */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
ol.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; padding-inline-start: 66px; position: relative; }
ol.steps li::before {
  content: counter(s); position: absolute; inset-inline-start: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-deep), #2a7bff); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700;
}
ol.steps.row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
ol.steps.row li { padding: 62px 20px 18px; }
ol.steps.row strong { display: block; font-family: var(--display); color: var(--ink); }

/* Tables and code */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { background: var(--soft); font-family: var(--display); color: var(--ink); }
pre { direction: ltr; text-align: left; background: #0b1020; color: #e2e8f0; padding: 16px; border-radius: 14px; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
code { direction: ltr; unicode-bidi: embed; font-family: var(--mono); }
p code, li code, td code { background: var(--tint-1); padding: 1px 6px; border-radius: 5px; font-size: .9em; }

/* FAQ (PAA) */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; transition: border-color .3s, box-shadow .3s; interpolate-size: allow-keywords; }
.faq details[open] { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 15px 20px; padding-inline-end: 50px; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 18px; top: 10px; font-size: 1.5rem; color: var(--blue); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details::details-content { height: 0; overflow: clip; transition: height .35s var(--ease), content-visibility .35s allow-discrete; }
.faq details[open]::details-content { height: auto; }
.faq .a { padding: 0 20px 16px; color: var(--muted); }
.faq h2 { font-size: 1.3rem; margin-top: 30px; }

.breadcrumb { font-size: .9rem; color: var(--muted); padding-top: 20px; }
.breadcrumb a { color: var(--muted); }
.note { background: var(--tint-2); border-radius: 14px; padding: 14px 18px; }

/* CTA band */
.cta { text-align: center; }
.cta h2 { margin-inline: auto; }
.cta .lead { margin-inline: auto; }
.cta .actions { justify-content: center; margin-top: 16px; }
.band { position: relative; overflow: clip; border-radius: 26px; padding: 48px 24px; background: linear-gradient(135deg, #070b18, #0b2a9e 55%, #1447e6); color: var(--on-deep); }
.band h2 { background: none; color: #fff; }
.band .lead { color: var(--on-deep-muted); }
.band .btn { background: #fff; color: #0b2a9e !important; box-shadow: none; }
.band .btn.ghost { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .7); }
.band .btn.ghost:hover { background: rgb(255 255 255 / .14); }

/* Footer */
.site-footer { background: #070b18; color: #b9c5dd; padding-block: 44px 24px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer .copy { border-top: 1px solid #243050; margin-top: 24px; padding-top: 16px; font-size: .85rem; }

/* App download page */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-top: 22px; }
.panel.gate { background: var(--tint-1); border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.panel h2 { font-size: 1.3rem; }
.panel p { margin-block: 8px; }
.fineprint { font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }
.steps-list { margin-top: 18px; }
.faq details ol { margin: 0; padding-inline-start: 22px; }
[hidden] { display: none !important; }

/* Scroll-driven entrance: stays readable before it plays, no script needed */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
    @keyframes enter { from { opacity: .35; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ring { display: none; }
  @view-transition { navigation: none; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  ol.steps.row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .site-header { position: static; }
  html { scroll-padding-top: 16px; }
  .flow { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .wire { height: 44px; width: 2px; justify-self: center; background: repeating-linear-gradient(to bottom, var(--blue) 0 6px, transparent 6px 12px); }
  .wire::after { top: 0; inset-inline-start: 50%; margin: 0 -6px 0 0; animation-name: travelDown; }
  @keyframes travelDown { from { top: 0; } to { top: calc(100% - 12px); } }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding-block: 48px; }
  .hero { padding-block: 32px 48px; }
  .bento, .plans, ol.steps.row { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .band { padding: 36px 16px; }
}
