:root {
  --brand: #1f5ad6;
  --brand-500: #2f6fed;
  --brand-300: #8db4ff;
  --violet: #7c3aed;
  --ink: #0b1530;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --night: #0b1530;
  --night-2: #111d3d;
  --ok: #16a34a;
  --radius: 14px;
  --shadow: 0 30px 80px -20px rgba(11, 21, 48, 0.35), 0 8px 24px -8px rgba(11, 21, 48, 0.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
[lang="ar"], [dir="rtl"] { font-family: "IBM Plex Sans Arabic", var(--font); }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; font: 600 15px/1 var(--font); padding: 12px 18px; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:focus-visible, .tabs button:focus-visible, input:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--brand-500), var(--brand)); color: #fff; box-shadow: 0 10px 24px -10px rgba(31, 90, 214, .8); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(31, 90, 214, .9); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-lg { padding: 15px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 21, 48, .72); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; }
.nav-links a { color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 75% -10%, #1c3a8a 0%, transparent 60%), radial-gradient(900px 500px at 0% 30%, #2a1a6b 0%, transparent 55%), var(--night); color: #fff; padding: 72px 0 96px; margin-top: -64px; padding-top: 136px; }
.hero-glow { position: absolute; inset: auto -10% -40% 30%; height: 500px; background: radial-gradient(closest-side, rgba(47,111,237,.45), transparent); filter: blur(30px); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-300); background: rgba(47,111,237,.14); border: 1px solid rgba(141,180,255,.25); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.18); }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); font-weight: 800; }
.grad { background: linear-gradient(90deg, #8db4ff, #c4b5fd 60%, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin-top: 20px; font-size: 18px; color: rgba(255,255,255,.78); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-proof { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 10px; font-size: 14.5px; color: rgba(255,255,255,.82); }
.hero-proof li { display: flex; align-items: center; gap: 10px; }
.hero-proof svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #4ade80; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.hero-visual { position: relative; }
.frame { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.12); }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #eef2f8; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.frame-bar i:nth-child(1) { background: #f87171; } .frame-bar i:nth-child(2) { background: #fbbf24; } .frame-bar i:nth-child(3) { background: #4ade80; }
.frame-bar span { margin-inline-start: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Kept flat: a 3D tilt makes browsers redraw the screenshot at a lower resolution, which blurs it. */
.frame-hero { transition: transform .4s ease, box-shadow .4s ease; }
.hero-visual:hover .frame-hero { transform: translateY(-4px); }
.frame img { image-rendering: auto; }
.float { position: absolute; margin: 0; background: #fff; color: var(--ink); border-radius: 12px; box-shadow: var(--shadow); }
.float-assistant { width: 34%; right: -5%; bottom: -16%; overflow: hidden; border: 1px solid rgba(124,58,237,.35); animation: bob 6s ease-in-out infinite; }
.float-assistant img { aspect-ratio: 508 / 560; object-fit: cover; object-position: top; }
.float-assistant figcaption { padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); background: #faf7ff; }
.float-assistant figcaption b { color: var(--violet); display: block; font-size: 13px; }
.float-chip { left: -5%; bottom: 10%; padding: 10px 14px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; animation: bob 7s ease-in-out infinite reverse; }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; }
.chip-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* Stack band */
.band { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 56px 0; text-align: center; }
.band-title { font-size: 15px; font-weight: 600; color: var(--muted); }
.stack { list-style: none; padding: 0; margin: 22px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; }
.stack li { padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px dashed #cbd5e1; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: line-through; text-decoration-color: rgba(100,116,139,.55); }
.stack-arrow svg { width: 28px; height: 28px; margin: 18px auto 10px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stack-into { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; padding: 10px 20px; border-radius: 14px; background: #fff; border: 1px solid #c7d7fb; box-shadow: 0 10px 30px -12px rgba(31,90,214,.45); }
.stack-into img { border-radius: 7px; }

/* Section heads */
section { scroll-margin-top: 72px; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.section-head h2, .security h2, .final h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; }
.sub { margin-top: 14px; font-size: 17px; color: var(--muted); }

/* Tour */
.tour { padding: 96px 0; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tabs button { font: 600 14px var(--font); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: all .2s ease; }
.tabs button:hover { border-color: var(--brand-300); color: var(--brand); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tour-panel { display: grid; grid-template-columns: .8fr 1.6fr; gap: 40px; align-items: center; }
.tour-copy h3 { font-size: 26px; font-weight: 800; }
.tour-copy p { margin-top: 12px; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; color: var(--ink-2); font-size: 15px; }
.ticks li { position: relative; padding-inline-start: 26px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: #e8f0ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%231f5ad6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
.frame-tour { border-color: var(--line); }
.frame-tour img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; transition: opacity .25s ease; }
.frame-tour img.swap { opacity: 0; }
.tour-progress { height: 3px; background: var(--line); border-radius: 3px; margin: 26px auto 0; max-width: 240px; overflow: hidden; }
.tour-progress span { display: block; height: 100%; width: 0; background: var(--brand); }
.tour-progress.run span { animation: fill 7s linear forwards; }
@keyframes fill { to { width: 100%; } }

/* Numbers */
.numbers { background: var(--bg-soft); border-block: 1px solid var(--line); padding: 48px 0; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.num b { display: block; font-size: 46px; font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--brand-500), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num span { display: block; color: var(--muted); font-size: 14.5px; max-width: 22ch; }

/* Why */
.why { padding: 96px 0; }
.feature-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; margin-bottom: 64px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--violet); background: #f3edff; padding: 5px 10px; border-radius: 999px; margin-bottom: 14px; }
.feature-copy h3 { font-size: 30px; font-weight: 800; }
.feature-copy p { margin-top: 12px; color: var(--ink-2); font-size: 16.5px; }
.frame-side { border-color: var(--line); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(11,21,48,.35); border-color: #c7d7fb; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #e8f0ff, #f3edff); margin-bottom: 16px; }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 18px; font-weight: 700; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* Security */
.security { background: radial-gradient(800px 400px at 90% 0%, #1c3a8a, transparent 60%), var(--night); color: #fff; padding: 96px 0; }
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.kicker-light { color: var(--brand-300); }
.sub-light { color: rgba(255,255,255,.72); }
.frameworks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.frameworks li { padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(141,180,255,.35); background: rgba(47,111,237,.12); font-weight: 700; font-size: 14px; }
.sec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.sec-list li { padding: 18px 20px; border-radius: 12px; background: var(--night-2); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.72); font-size: 15px; }
.sec-list b { display: block; color: #fff; font-size: 16px; margin-bottom: 4px; }

/* Migrate */
.migrate { padding: 96px 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.steps span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 800; margin-bottom: 14px; }
.steps h3 { font-size: 19px; }
.steps p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* Final */
.final { padding: 0 0 96px; }
.final-inner { text-align: center; padding: 64px 24px; border-radius: 24px; color: #fff; background: radial-gradient(600px 300px at 20% 0%, rgba(196,181,253,.35), transparent 60%), linear-gradient(135deg, var(--brand-500), #3b2bb8); box-shadow: 0 30px 60px -30px rgba(31,90,214,.8); }
.final-inner p { margin: 14px auto 28px; max-width: 36em; color: rgba(255,255,255,.85); font-size: 17px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; }
.brand-small { color: var(--ink); font-size: 16px; }

/* Dialog */
.demo { width: min(460px, 100% - 32px); border: 0; padding: 0; border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); }
.demo::backdrop { background: rgba(11,21,48,.55); backdrop-filter: blur(4px); }
.demo[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.demo-form, .demo-done { position: relative; padding: 30px 28px 24px; display: grid; gap: 14px; }
.demo-head h2 { font-size: 24px; font-weight: 800; }
.demo-head p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.demo-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.demo-close:hover { background: var(--bg-soft); color: var(--ink); }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input { font: 400 16px var(--font); padding: 12px 14px; border-radius: 10px; border: 1px solid #cbd5e1; color: var(--ink); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(47,111,237,.18); }
.field input[aria-invalid="true"] { border-color: #e11d48; box-shadow: 0 0 0 4px rgba(225,29,72,.12); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #be123c; background: #fff1f2; border: 1px solid #fecdd3; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; }
.demo-done { text-align: center; justify-items: center; padding-block: 40px 30px; }
.demo-done p { color: var(--muted); max-width: 30ch; }
.done-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; }
.done-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 1020px) {
  .hero-grid, .tour-panel, .feature-row, .security-grid { grid-template-columns: 1fr; }
  .hero { padding-bottom: 120px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .tour-copy { order: 2; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .hero { padding-top: 112px; }
  .float-chip { display: none; }
  .float-assistant { width: 46%; right: -2%; bottom: -24%; }
  .cards, .steps { grid-template-columns: 1fr; }
  .tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .tabs button { flex: none; }
  .num b { font-size: 38px; }
  .final-inner { border-radius: 18px; padding: 48px 20px; }
}
