/* Najam landing page. Colours come from NajamApp lib/res/color_schema.dart and the logo. */
:root {
  --purple: #776DF2;
  --purple-2: #B4AFF8;
  --purple-deep: #5B50E0;
  --green: #41D68B;
  --coral: #E8745D;
  --blue: #7DCDF9;
  --orange: #F6A623;
  --ink: #221B1B;
  --ink-2: #615B5C;
  --muted: #7A777D;
  --bg: #FFFFFF;
  --bg-soft: #F5F5F9;
  --line: #ECEBF5;
  --radius: 22px;
  --shadow: 0 18px 50px -20px rgba(91, 80, 224, .35);
  --font: "Alexandria", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 16px; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.45; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--purple-deep); background: #EEECFE; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.eyebrow-light { color: #fff; background: rgba(255,255,255,.18); }
.lead { font-size: 1.08rem; color: var(--ink-2); }
.hl { background: linear-gradient(90deg, var(--purple), #9b8ff7 60%, var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; border-radius: 14px; padding: 13px 22px; border: 0; cursor: pointer; font: inherit; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 10px 24px -10px var(--purple); }
.btn-primary:hover { background: var(--purple-deep); }
.btn-light { background: #fff; color: var(--purple-deep); }
.btn-sm { padding: 9px 16px; font-size: .92rem; border-radius: 12px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 18px 10px 16px; min-width: 176px; transition: transform .15s ease, background .15s ease; }
.store:hover { transform: translateY(-2px); background: #000; }
.store svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.store small { display: block; font-size: .72rem; opacity: .8; line-height: 1.2; }
.store strong { display: block; font-size: 1.08rem; line-height: 1.25; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.note { margin-top: 16px; font-size: .9rem; color: var(--muted); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand img { width: auto; height: 40px; }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav a { padding: 8px 14px; border-radius: 10px; font-weight: 500; color: var(--ink-2); }
.nav a:hover { color: var(--purple-deep); background: var(--bg-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; border: 1px solid var(--line); }
.lang:hover { border-color: var(--purple-2); }
.lang svg { width: 18px; height: 18px; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 0; }
.menu-btn span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; }
.blob-1 { width: 520px; height: 520px; background: var(--purple-2); top: -180px; inset-inline-end: -120px; }
.blob-2 { width: 380px; height: 380px; background: #C8F3DD; bottom: -160px; inset-inline-start: -120px; }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { max-width: 34em; margin-bottom: 28px; }
.hero-visual { position: relative; min-height: 460px; display: grid; place-items: center; }
.hero-illus { width: 92%; opacity: .95; }
.phone { position: absolute; inset-inline-end: 0; bottom: -10px; width: 240px; background: #1C1830; border-radius: 34px; padding: 10px; box-shadow: var(--shadow), 0 30px 60px -30px rgba(0,0,0,.4); animation: float 6s ease-in-out infinite; }
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 70px; height: 18px; background: #1C1830; border-radius: 10px; z-index: 2; }
.phone-screen { background: #fff; border-radius: 26px; padding: 36px 14px 16px; font-size: .78rem; }
.kid { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kid-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem; }
.kid-name { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.kid-points { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .72rem; }
.kid-points img { width: 14px; height: 14px; }
.kid-points b { color: var(--ink); }
.mini-title { font-weight: 700; color: var(--muted); font-size: .7rem; margin: 10px 0 6px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; margin-bottom: 6px; }
.row span { line-height: 1.35; }
.row b { font-size: .8rem; }
.row-good { background: #E7F9EF; } .row-good b { color: #1E9E5C; }
.row-bad { background: #FDEDE9; } .row-bad b { color: #C9502F; }
.reward { margin-top: 12px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, var(--purple), #9C93F6); color: #fff; }
.reward-label { font-size: .66rem; opacity: .85; }
.reward-name { font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.bar { height: 6px; background: rgba(255,255,255,.3); border-radius: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: #fff; border-radius: 6px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Sections */
.section { padding: 88px 0; scroll-margin-top: 64px; }
.section-tint { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.grid { display: grid; gap: 20px; }
.features { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--ink-2); margin: 0; }
.icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 26px; height: 26px; }
.c-green .icon { background: #E3F8EE; color: #1E9E5C; }
.c-coral .icon { background: #FCEAE5; color: #C9502F; }
.c-orange .icon { background: #FEF2DD; color: #C97F06; }
.c-purple .icon { background: #EEECFE; color: var(--purple-deep); }
.c-blue .icon { background: #E3F4FE; color: #1F86BF; }

.how { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 22px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; }
.steps p { color: var(--ink-2); margin: 0; }
.step-n { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--purple); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 10px 20px -10px var(--purple); }

.code { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li, .plus-list li { position: relative; padding-inline-start: 34px; }
.checks li::before, .plus-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: #E3F8EE url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E9E5C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.code-card { background: linear-gradient(160deg, #fff, #F3F2FF); border: 1px solid var(--line); border-radius: 28px; padding: 36px 28px; text-align: center; box-shadow: var(--shadow); }
.code-label { font-weight: 700; color: var(--muted); margin-bottom: 18px; }
.code-chars { display: flex; justify-content: center; gap: 8px; }
.code-chars span { width: 48px; height: 60px; border-radius: 14px; background: #fff; border: 2px solid var(--purple-2); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--purple-deep); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-chars span:nth-child(3) { margin-inline-end: 10px; }
.code-valid { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 600; color: #1E9E5C; background: #E3F8EE; padding: 8px 14px; border-radius: 999px; font-size: .9rem; }
.code-valid svg { width: 18px; height: 18px; }

.plus { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 56px; border-radius: 32px; color: #fff; background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.22), transparent 40%), linear-gradient(135deg, var(--purple-deep), var(--purple) 55%, #A39BF7); position: relative; overflow: hidden; }
.plus .lead { color: rgba(255,255,255,.88); margin-bottom: 26px; }
.plus-list { list-style: none; margin: 0; padding: 28px; display: grid; gap: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 22px; font-weight: 500; }
.plus-list li::before { background-color: #fff; }

.faq-wrap { max-width: 820px; }
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--purple-2); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--bg-soft); display: grid; place-items: center; font-size: 1.2rem; color: var(--purple-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 20px; margin: 0; }

.cta { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; background: var(--bg-soft); border-radius: 32px; padding: 40px 56px; }
.cta .lead { margin-bottom: 24px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: 24px; }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer-in img { height: 40px; width: auto; margin-bottom: 12px; }
.footer-in p { color: var(--muted); margin: 0; max-width: 28em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.footer-links a { color: var(--ink-2); font-weight: 500; }
.footer-links a:hover { color: var(--purple-deep); }
.footer-links svg { width: 20px; height: 20px; }
.copyright { color: var(--muted); font-size: .85rem; margin-top: 28px; }

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

/* Responsive */
@media (max-width: 980px) {
  .hero-in, .how, .code, .plus, .cta { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .stores { justify-content: center; }
  .hero-visual { min-height: 400px; max-width: 520px; margin-inline: auto; width: 100%; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .how-visual { max-width: 460px; margin-inline: auto; }
  .plus { padding: 40px 28px; }
  .cta { padding: 32px 24px; text-align: center; }
  .cta .stores { justify-content: center; }
  .cta-illus { max-width: 320px; margin-inline: auto; }
}
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; top: 72px; inset-inline: 0; flex-direction: column; gap: 2px; padding: 12px 20px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(0,0,0,.15); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .header-actions { margin-inline-start: auto; }
  .hide-sm { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .section { padding: 64px 0; }
  .features { grid-template-columns: 1fr; }
  .hero { padding-bottom: 40px; }
  .hero-visual { display: block; min-height: 0; }
  .hero-illus { width: 88%; }
  .phone { position: relative; inset: auto; width: 210px; margin: -150px 0 0 auto; }
  [dir="rtl"] .phone { margin: -150px auto 0 0; }
  .store { flex: 1 1 160px; }
  .code-chars span { width: 40px; height: 52px; font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
