/* =================================================================
   Nems design v2 — modern look and motion. Loaded after app.css.
   ================================================================= */
:root {
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-soft: #eef0ff;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #d946ef 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.12), rgba(217,70,239,.10));
  --bg: #f6f7fb;
  --line: #e7e8f0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px -16px rgba(30,27,75,.18);
  --shadow-lg: 0 30px 60px -28px rgba(30,27,75,.35);
  --side: #0a0d1c;
  --ease: cubic-bezier(.22,1,.36,1);
}

/* Motion primitives */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.12); } 100% { transform: translate(0,0) scale(1); } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(260%) skewX(-20deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes growUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gradText { to { background-position: 200% center; } }

/* Buttons */
.btn { transition: background .2s, border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad); background-size: 160% 160%; background-position: 0% 50%; box-shadow: 0 8px 20px -10px rgba(99,102,241,.8), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { background: var(--grad); background-size: 160% 160%; background-position: 100% 50%; box-shadow: 0 14px 28px -12px rgba(99,102,241,.9), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shine 3.2s var(--ease) infinite; }
.btn .arrow { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }
.btn-ghost:hover { border-color: #c7c9fd; }

/* Inputs */
.field input, .field select, .field textarea { transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99,102,241,.15); }

/* ------------------------------------------------------------- landing */
.site { background: #fbfbfe; overflow-x: clip; }
.aurora { position: absolute; inset: 0 0 auto; height: 900px; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite; }
.aurora i:nth-child(1) { width: 520px; height: 520px; top: -160px; left: -80px; background: #a5b4fc; }
.aurora i:nth-child(2) { width: 460px; height: 460px; top: -60px; right: -120px; background: #f0abfc; animation-delay: -6s; animation-duration: 22s; }
.aurora i:nth-child(3) { width: 380px; height: 380px; top: 320px; left: 40%; background: #93c5fd; opacity: .35; animation-delay: -11s; }
.site main, .site-footer { position: relative; z-index: 1; }

.site-nav { position: sticky; top: 12px; z-index: 40; max-width: 1160px; margin: 12px auto 0; padding: 10px 14px 10px 18px; border-radius: 18px; border: 1px solid transparent; background: rgba(255,255,255,.55); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); transition: box-shadow .3s, border-color .3s, background .3s; }
.site-nav.scrolled { background: rgba(255,255,255,.85); border-color: var(--line); box-shadow: 0 10px 30px -18px rgba(30,27,75,.3); }
.site-nav .link { position: relative; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.site-nav .link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .25s var(--ease); }
.site-nav .link:hover { text-decoration: none; color: var(--ink); }
.site-nav .link:hover::after { transform: scaleX(1); }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; max-width: 1160px; padding: 72px 20px 56px; text-align: start; }
.hero::before { display: none; }
.hero h1 { font-size: clamp(38px, 5.6vw, 66px); margin: 20px 0; }
.hero h1 em { background: linear-gradient(90deg, #6366f1, #a855f7, #d946ef, #6366f1); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradText 6s linear infinite; }
.hero .lead { margin: 0 0 30px; max-width: 560px; }
.hero .hero-actions, .hero .trust { justify-content: flex-start; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border: 1px solid #dfe1ff; background: rgba(255,255,255,.7); box-shadow: var(--shadow-sm); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 540px; }
.hero-visual::before { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: var(--grad); filter: blur(70px); opacity: .35; }
.phone { position: relative; width: 270px; height: 540px; padding: 12px; border-radius: 44px; background: #0b1020; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2a2f45; animation: floaty 6s ease-in-out infinite; }
.phone-notch { position: absolute; top: 18px; left: 50%; width: 84px; height: 22px; margin-left: -42px; border-radius: 20px; background: #000; z-index: 2; }
.phone-screen { height: 100%; border-radius: 34px; overflow: hidden; background: #fff; padding: 44px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.ph-photo { position: relative; flex: none; height: 170px; border-radius: 16px; background: linear-gradient(135deg, #c7d2fe, #fbcfe8 45%, #fde68a 70%, #c7d2fe); background-size: 300% 300%; animation: gradText 8s linear infinite; }
.ph-tag { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 800; }
.ph-title { height: 12px; width: 70%; border-radius: 6px; background: #e5e7eb; margin-inline-start: auto; }
.ph-price { display: flex; gap: 8px; align-items: baseline; direction: rtl; }
.ph-price b { font-size: 16px; } .ph-price s { color: #9ca3af; font-size: 12px; }
.ph-form { display: flex; flex-direction: column; gap: 7px; padding: 10px; border: 2px solid #0b1020; border-radius: 14px; }
.ph-form strong { font-size: 12px; text-align: center; }
.ph-form i { display: block; height: 26px; border: 1px solid var(--line); border-radius: 8px; background: #fcfcfd; }
.ph-cta { position: relative; overflow: hidden; padding: 9px; border-radius: 9px; background: linear-gradient(90deg, #111, #4b4b4b); color: #fff; text-align: center; font-size: 12px; }
.ph-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation: shine 2.6s infinite; }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; text-align: start; animation: floaty 5s ease-in-out infinite; }
.float-card strong { display: block; font-size: 13px; } .float-card small { color: var(--muted); }
.fc-icon { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #f2f4f7; font-weight: 800; }
.fc-icon.ok { background: #dcfce7; color: #16a34a; } .fc-icon.px { background: #e0e7ff; color: #4f46e5; }
.fc-1 { top: 70px; left: 0; animation-delay: -1s; }
.fc-2 { bottom: 120px; right: -6px; animation-delay: -2.5s; }
.fc-3 { bottom: 30px; left: 20px; animation-delay: -4s; }

.numbers { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; max-width: 1120px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow); }
.numbers > div { padding: 26px 20px; background: #fff; text-align: center; }
.numbers strong { display: block; font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.numbers span { color: var(--muted); font-weight: 600; font-size: 14px; }

.marquee { margin: 48px 0 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); direction: ltr; }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.marquee:hover .marquee-track { animation-play-state: paused; }

.kicker { display: inline-block; margin-bottom: 10px; color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 42px); }
.feature-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-grid article { position: relative; padding: 28px; border-radius: 20px; background: rgba(255,255,255,.85); transition: box-shadow .35s var(--ease), transform .35s var(--ease), border-color .35s, opacity .7s var(--ease); }
.feature-grid article::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; pointer-events: none; }
.feature-grid article:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-grid article:hover::before { opacity: 1; }
.feature-grid .f-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: 0 10px 20px -10px rgba(99,102,241,.8); transition: transform .35s var(--ease); }
.feature-grid article:hover .f-icon { transform: rotate(-8deg) scale(1.08); }
.feature-grid h3 { font-size: 17px; margin-bottom: 8px; }
.feature-big { grid-column: span 2; background: linear-gradient(135deg, #fff, #f5f3ff) !important; }

.plans .plan { border-radius: 22px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .7s var(--ease); }
.plans .plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.plan-highlight { background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.plan-dark { background: radial-gradient(400px 200px at 0% 0%, rgba(99,102,241,.35), transparent 70%), var(--side); }

.steps { background: transparent; }
.steps li { border-radius: 20px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .7s var(--ease); }
.steps li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.steps li span { width: 42px; height: 42px; box-shadow: 0 10px 20px -10px rgba(99,102,241,.8); }

.faq { max-width: 820px; margin: 0 auto; padding: 72px 20px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 0 20px; transition: box-shadow .3s, border-color .3s, opacity .7s var(--ease), transform .7s var(--ease); }
.faq details[open] { border-color: #c7c9fd; box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 18px; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 18px; animation: fadeUp .35s var(--ease); }

.contact-band { max-width: 1120px; margin: 24px auto 40px; border-radius: 28px; background: radial-gradient(600px 260px at 15% 0%, rgba(99,102,241,.55), transparent 70%), radial-gradient(500px 260px at 90% 100%, rgba(217,70,239,.35), transparent 70%), var(--side); padding: 64px 24px; }
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.site-footer p { margin: 0; }

/* ------------------------------------------------------------- auth */
.auth { position: relative; overflow: hidden; background: #fbfbfe; background-image: radial-gradient(520px 320px at 15% 10%, rgba(165,180,252,.55), transparent 70%), radial-gradient(520px 320px at 90% 90%, rgba(240,171,252,.45), transparent 70%); }
.auth-card { border-radius: 24px; padding: 36px 30px; background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); animation: fadeUp .6s var(--ease) both; }
.auth-card > .brand::before { content: "N"; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 17px; box-shadow: 0 6px 16px -6px rgba(99,102,241,.7); }

/* -------------------------------------------------------- dashboard */
.sidebar { background: radial-gradient(300px 220px at 0% 0%, rgba(99,102,241,.28), transparent 70%), var(--side); }
.side-nav a { transition: background .2s, color .2s, transform .2s var(--ease); }
.side-nav a:hover { transform: translateX(3px); }
[dir="rtl"] .side-nav a:hover { transform: translateX(-3px); }
.side-nav a.active { background: linear-gradient(90deg, rgba(99,102,241,.32), rgba(99,102,241,.06)); box-shadow: inset 3px 0 0 #a5b4fc; }
[dir="rtl"] .side-nav a.active { background: linear-gradient(270deg, rgba(99,102,241,.32), rgba(99,102,241,.06)); box-shadow: inset -3px 0 0 #a5b4fc; }
.dash-main > * { animation: fadeUp .5s var(--ease) both; }
.dash-main > *:nth-child(2) { animation-delay: .04s; } .dash-main > *:nth-child(3) { animation-delay: .08s; }
.dash-main > *:nth-child(4) { animation-delay: .12s; } .dash-main > *:nth-child(5) { animation-delay: .16s; }
.dash-main > *:nth-child(n+6) { animation-delay: .2s; }
.dash-main > .form-actions.sticky { animation: none; }
.card { transition: box-shadow .3s var(--ease), border-color .3s, transform .3s var(--ease); }
.stats .card { position: relative; overflow: hidden; }
.stats .card::after { content: ""; position: absolute; top: -40px; inset-inline-end: -40px; width: 110px; height: 110px; border-radius: 50%; background: var(--grad-soft); transition: transform .4s var(--ease); pointer-events: none; }
.stats .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stats .card:hover::after { transform: scale(1.35); }
.stat strong { position: relative; z-index: 1; }
a.stat:hover { border-color: #c7c9fd; }
.share { background: radial-gradient(420px 180px at 0% 0%, rgba(99,102,241,.6), transparent 70%), radial-gradient(320px 160px at 100% 100%, rgba(217,70,239,.35), transparent 70%), var(--side); }
.bar i { transform-origin: bottom; animation: growUp .9s var(--ease) both; }
.bar:nth-child(2) i { animation-delay: .05s; } .bar:nth-child(3) i { animation-delay: .1s; } .bar:nth-child(4) i { animation-delay: .15s; }
.bar:nth-child(5) i { animation-delay: .2s; } .bar:nth-child(6) i { animation-delay: .25s; } .bar:nth-child(7) i { animation-delay: .3s; }
.meter i { transform-origin: left; animation: growX 1s var(--ease) both; }
[dir="rtl"] .meter i { transform-origin: right; }
.setting:hover { transform: translateY(-3px); }
.setting-icon { transition: transform .3s var(--ease); }
.setting:hover .setting-icon { transform: rotate(-8deg) scale(1.08); }
.tabs a { transition: background .2s, border-color .2s, color .2s; }
.tabs a.active { background: var(--grad); border-color: transparent; }
.alert { animation: fadeUp .4s var(--ease) both; }
.bottom-nav a { transition: color .2s, transform .2s var(--ease); }
.bottom-nav a.active { transform: translateY(-2px); }
.bottom-nav a.active::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 48px; }
  .hero .lead { margin-inline: auto; }
  .hero .hero-actions, .hero .trust { justify-content: center; }
  .hero-visual { min-height: 500px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .numbers { grid-template-columns: 1fr 1fr; margin-inline: 16px; }
}
@media (max-width: 820px) {
  .site-nav .site-lang { display: none; }
}
@media (max-width: 640px) {
  .site-nav { margin: 8px 8px 0; top: 8px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-big { grid-column: auto; }
  .hero-visual { min-height: 440px; }
  .phone { width: 220px; height: 440px; border-radius: 38px; }
  .phone-screen { border-radius: 28px; padding-top: 40px; }
  .ph-photo { height: 120px; }
  .float-card { font-size: 12px; padding: 8px 10px; }
  .fc-1 { left: -4px; top: 30px; } .fc-2 { right: -4px; bottom: 80px; } .fc-3 { display: none; }
  .contact-band { margin-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
