/* ==========================================================================
   IMEI Scout — Design system
   Dark "scanner" aesthetic · lime + cyan accents · mono digits
   ========================================================================== */
:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8edf7;
  --muted: #94a3b8;
  --dim: #64748b;
  --lime: #c6ff3d;
  --cyan: #22d3ee;
  --red: #ff5c7a;
  --amber: #ffc857;
  --green: #3dffa8;
  --grad: linear-gradient(120deg, var(--lime), var(--cyan));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --font: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Noto Kufi Arabic", "Sora", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); }
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(700px 500px at -10% 10%, rgba(198, 255, 61, 0.08), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.skip { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { width: auto; height: auto; clip: auto; margin: 0; overflow: visible; inset-inline-start: 12px; top: 12px; z-index: 99; background: var(--lime); color: #000; padding: 8px 14px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 22px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.12rem; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: 0.93rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); text-decoration: none; }
.lang { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.lang a { font-size: 0.78rem; font-weight: 600; color: var(--muted); padding: 4px 8px; border-radius: 7px; }
.lang a.on { background: var(--surface-2); color: var(--lime); }
.lang a:hover { text-decoration: none; color: var(--text); }
.menu-btn { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }
@media (max-width: 900px) {
  .menu-btn { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 68px; inset-inline: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 12px 20px 18px; }
  .nav-links.open { display: flex; }
  .lang { order: 3; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.98rem;
  padding: 14px 22px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--grad); color: #04110a;
  box-shadow: 0 10px 30px -10px rgba(198, 255, 61, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: 0 14px 40px -12px rgba(34, 211, 238, 0.7); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--border); }

/* ---------- Hero + Checker ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--lime); background: rgba(198, 255, 61, 0.08); border: 1px solid rgba(198, 255, 61, 0.25);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 40em; }

.checker {
  margin-top: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border-strong);
  border-radius: 22px; padding: 22px; box-shadow: var(--shadow);
  position: relative;
}
.checker label.lbl { font-size: 0.85rem; color: var(--muted); font-weight: 500; display: block; margin-bottom: 8px; }
.input-row { display: flex; gap: 10px; }
@media (max-width: 560px) { .input-row { flex-direction: column; } }
.imei-input {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 1.25rem; letter-spacing: 0.12em;
  background: rgba(0, 0, 0, 0.35); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px 16px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  direction: ltr; text-align: left;
}
.imei-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15); }
.imei-input.ok { border-color: var(--green); }
.imei-input.bad { border-color: var(--red); }
.hint { display: flex; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: var(--dim); margin-top: 8px; flex-wrap: wrap; }
.hint kbd { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--lime); }
.samples { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 0.78rem; color: var(--muted); }
.sample-chip {
  font-family: var(--mono); font-size: 0.75rem; color: var(--text);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.sample-chip:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(34, 211, 238, 0.08); }
.report-card {
  margin-top: 16px; border: 1px solid var(--border-strong); border-radius: 16px;
  background: rgba(5, 9, 18, 0.75); overflow: hidden;
}
.report-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--border);
}
.report-head h4 { margin: 0; font-size: 0.98rem; }
.report-actions { display: flex; gap: 8px; }
.report-actions button {
  font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 10px; cursor: pointer;
}
.report-actions button:hover { border-color: var(--lime); color: var(--lime); }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 16px; }
.svc { position: relative; }
.svc input { position: absolute; opacity: 0; }
.svc span {
  display: block; height: 100%; cursor: pointer;
  border: 1px solid var(--border); border-radius: 14px; padding: 11px 13px;
  background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.svc b { display: block; font-size: 0.92rem; font-weight: 600; }
.svc small { color: var(--dim); font-size: 0.78rem; }
.svc em { font-style: normal; float: inline-end; font-size: 0.72rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(198,255,61,0.12); color: var(--lime); }
.svc em.paid { background: rgba(34,211,238,0.12); color: var(--cyan); }
.svc input:checked + span { border-color: var(--lime); background: rgba(198, 255, 61, 0.06); }
.svc input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* IMEI anatomy */
.anatomy { display: none; margin-top: 18px; border-top: 1px dashed var(--border-strong); padding-top: 16px; }
.anatomy.show { display: block; animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.digits { display: flex; flex-wrap: wrap; gap: 4px; direction: ltr; font-family: var(--mono); }
.digits i { font-style: normal; width: 26px; height: 34px; display: grid; place-items: center; border-radius: 7px; font-size: 1.05rem; background: var(--surface-2); }
.digits i.tac { color: var(--cyan); box-shadow: inset 0 -2px 0 var(--cyan); }
.digits i.snr { color: var(--text); box-shadow: inset 0 -2px 0 var(--dim); }
.digits i.cd { color: var(--lime); box-shadow: inset 0 -2px 0 var(--lime); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 6px; background: currentColor; }
.legend .l-tac { color: var(--cyan); } .legend .l-snr { color: var(--dim); } .legend .l-cd { color: var(--lime); }

.status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 0.92rem; display: none; }
.status.show { display: block; }
.status.ok { background: rgba(61, 255, 168, 0.08); border: 1px solid rgba(61, 255, 168, 0.3); color: var(--green); }
.status.err { background: rgba(255, 92, 122, 0.08); border: 1px solid rgba(255, 92, 122, 0.3); color: var(--red); }
.status.info { background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.3); color: var(--cyan); }

.result { display: none; margin-top: 16px; }
.result.show { display: block; animation: fade 0.35s ease; }
.result table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.result td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.result td:first-child { color: var(--muted); width: 42%; }
.result td:last-child { font-weight: 600; word-break: break-word; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.pill.good { background: rgba(61,255,168,0.12); color: var(--green); }
.pill.bad { background: rgba(255,92,122,0.12); color: var(--red); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.25); border-top-color: #04110a; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Phone visual */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 520px; }
.phone {
  width: 260px; height: 530px; border-radius: 46px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #111a2e, #070b14);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 10px #0d1424, 0 0 0 11px var(--border-strong), 0 60px 120px -40px rgba(34, 211, 238, 0.45);
}
.phone::before { content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #000; }
.phone .scr { position: absolute; inset: 60px 22px 30px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.phone .scr .row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); }
.phone .scr .row b { color: var(--text); font-weight: 600; }
.phone .scr .row b.g { color: var(--green); }
.phone .scr .big { font-size: 1.05rem; color: var(--lime); letter-spacing: 0.08em; margin: 6px 0 16px; }
.scanline {
  position: absolute; left: 0; right: 0; height: 90px; top: -90px;
  background: linear-gradient(to bottom, transparent, rgba(198,255,61,0.18) 85%, var(--lime) 100%);
  animation: scan 3.4s cubic-bezier(.6,0,.4,1) infinite;
}
@keyframes scan { 0% { top: -90px; } 100% { top: 100%; } }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); z-index: -1; }
.orb.a { width: 260px; height: 260px; background: rgba(34,211,238,0.25); top: 40px; right: 10px; }
.orb.b { width: 200px; height: 200px; background: rgba(198,255,61,0.18); bottom: 30px; left: 30px; }
@media (prefers-reduced-motion: reduce) { .scanline, .eyebrow .dot { animation: none; } html { scroll-behavior: auto; } }
.hero-visual, .phone { direction: ltr; }
@media (max-width: 960px) { .hero-visual { display: none; } }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.trust { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; color: var(--muted); font-size: 0.88rem; }
.trust b { color: var(--text); font-size: 1.3rem; display: block; font-family: var(--mono); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color 0.2s, transform 0.2s, background 0.2s; position: relative;
}
a.card { color: var(--text); display: block; }
a.card:hover { text-decoration: none; border-color: rgba(198,255,61,0.4); transform: translateY(-3px); background: var(--surface-2); }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(34,211,238,0.1); color: var(--cyan); }
.card .ico svg { width: 22px; height: 22px; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card .more { display: inline-block; margin-top: 12px; color: var(--lime); font-size: 0.88rem; font-weight: 600; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.step::before { counter-increment: s; content: "0" counter(s); font-family: var(--mono); color: var(--lime); font-weight: 700; display: block; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lime); font-family: var(--mono); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* ---------- Article / prose ---------- */
.page-hero { padding: 56px 0 24px; }
.crumbs { font-size: 0.85rem; color: var(--dim); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--border-strong); }
.crumbs a { color: var(--muted); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-bottom: 72px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: #cbd5e1; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { color: var(--text); }
.prose code { font-family: var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--lime); font-size: 0.92em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.94rem; }
.prose th, .prose td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--muted); font-weight: 600; }
.callout { border: 1px solid rgba(198,255,61,0.3); background: rgba(198,255,61,0.05); border-radius: 14px; padding: 16px 18px; margin: 1.4em 0; }
.callout.warn { border-color: rgba(255,200,87,0.35); background: rgba(255,200,87,0.06); }
.meta { color: var(--dim); font-size: 0.88rem; display: flex; gap: 14px; flex-wrap: wrap; }
.toc { border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; background: var(--surface); margin-bottom: 1.6em; }
.toc b { display: block; margin-bottom: 6px; font-size: 0.9rem; }
.toc ol { margin: 0; padding-inline-start: 1.2em; font-size: 0.93rem; }

aside.side { position: sticky; top: 92px; align-self: start; display: grid; gap: 16px; }
@media (max-width: 960px) { aside.side { position: static; } }
.side-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.side-box h4 { font-size: 0.95rem; margin-bottom: 10px; }
.side-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.side-cta { background: linear-gradient(160deg, rgba(198,255,61,0.12), rgba(34,211,238,0.08)); border-color: rgba(198,255,61,0.3); }
.side-cta p { color: var(--muted); font-size: 0.92rem; }

.post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.post-list .card h3 { font-size: 1.1rem; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cyan); margin-bottom: 8px; }

.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.model-grid a { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; color: var(--text); background: var(--surface); font-size: 0.92rem; }
.model-grid a:hover { border-color: var(--cyan); text-decoration: none; }
.model-grid small { display: block; color: var(--dim); font-size: 0.76rem; }

.cta-band {
  border: 1px solid var(--border-strong); border-radius: 26px; padding: 44px;
  background: radial-gradient(600px 200px at 20% 0%, rgba(198,255,61,0.14), transparent), radial-gradient(600px 240px at 90% 100%, rgba(34,211,238,0.16), transparent), var(--bg-2);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 40px; background: rgba(0,0,0,0.25); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.site-footer ul a { color: #cbd5e1; }
.site-footer .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--dim); font-size: 0.8rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Print: only the IMEI report ---------- */
@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .site-header, .site-footer, .hero-visual, .cta-band, aside.side,
  .services, .hint, .samples, .input-row, .lbl, .trust, .eyebrow, .lead, h1, .crumbs, .report-actions,
  main > section:not(.hero), .layout { display: none !important; }
  .checker { box-shadow: none; border: 0; background: none; padding: 0; }
  .report-card { border: 1px solid #999; background: #fff; }
  .result td, .report-head h4, .status { color: #000 !important; }
}
