/**
 * Masar — الصفحة التعريفية (إعادة تصميم)
 * بادئة msl- لتفادي التعارض مع أنماط أخرى
 */

:root {
    --msl-primary: #f59e0b;
    --msl-primary-dark: #d97706;
    --msl-ink: #0f172a;
    --msl-ink-soft: #334155;
    --msl-muted: #64748b;
    --msl-surface: #ffffff;
    --msl-bg: #f1f5f9;
    --msl-hero: #0c1929;
    --msl-hero-mid: #132a45;
    --msl-ring: rgba(245, 158, 11, 0.35);
    --msl-radius: 16px;
    --msl-radius-lg: 24px;
    --msl-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    --msl-shadow-hover: 0 20px 50px rgba(15, 23, 42, 0.12);
    --msl-max: 1140px;
    --msl-nav-h: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.ms-landing-body {
    margin: 0;
    font-family: 'Tajawal', system-ui, sans-serif;
    background: var(--msl-bg);
    color: var(--msl-ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.ms-landing-body a {
    color: inherit;
}

.ms-landing-body img {
    max-width: 100%;
    height: auto;
}

/* ——— تخطيط عام ——— */
.msl-container {
    width: 100%;
    max-width: var(--msl-max);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 1.75rem);
}

.msl-section {
    padding-block: clamp(3rem, 8vw, 5.5rem);
}

.msl-section--muted {
    background: linear-gradient(180deg, #e8eef5 0%, var(--msl-bg) 100%);
}

.msl-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--msl-primary-dark);
    background: rgba(245, 158, 11, 0.15);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.msl-h1 {
    font-size: clamp(1.85rem, 5vw, 2.85rem);
    font-weight: 900;
    line-height: 1.2;
    color: var(--msl-ink);
    margin: 0 0 1rem;
}

.msl-h1 span {
    color: var(--msl-primary-dark);
}

.msl-h2 {
    font-size: clamp(1.45rem, 3.5vw, 2rem);
    font-weight: 900;
    line-height: 1.25;
    color: var(--msl-ink);
    margin: 0 0 0.75rem;
}

.msl-lead {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: var(--msl-ink-soft);
    max-width: 42rem;
    margin: 0 auto 1.5rem;
}

.msl-lead--narrow {
    margin-inline: 0;
}

/* ——— شريط التنقل ——— */
.msl-nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 1000;
    min-height: var(--msl-nav-h);
    display: flex;
    align-items: center;
    background: rgba(12, 25, 41, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.msl-nav.is-scrolled {
    background: rgba(12, 25, 41, 0.96);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.msl-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: var(--msl-max);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 1.75rem);
    min-height: var(--msl-nav-h);
}

.msl-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.2rem;
    color: #fff;
}

.msl-brand img {
    height: 42px;
    width: auto;
}

.msl-brand > span {
    color: var(--msl-primary);
}

.msl-nav__toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.msl-nav__toggle i {
    font-size: 1.35rem;
}

.msl-nav__panel {
    display: flex;
    align-items: center;
    gap: 0.25rem 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.msl-nav__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.msl-nav__links a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}

.msl-nav__links a:hover,
.msl-nav__links a.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.18);
}

.msl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.35rem;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    min-height: 48px;
}

.msl-btn--primary {
    background: linear-gradient(135deg, var(--msl-primary), #fbbf24);
    color: #1c1917;
    box-shadow: 0 4px 20px var(--msl-ring);
}

.msl-btn--primary:hover {
    color: #1c1917;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--msl-ring);
}

.msl-btn--ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.msl-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.msl-btn--block {
    width: 100%;
}

@media (max-width: 991px) {
    .msl-nav__toggle {
        display: inline-flex;
    }

    .msl-nav__panel {
        position: absolute;
        inset-block-start: 100%;
        inset-inline: 0;
        background: rgba(12, 25, 41, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem clamp(1rem, 4vw, 1.75rem) 1.25rem;
        gap: 0.75rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s;
    }

    .msl-nav__panel.is-open {
        max-height: 100vh;
        opacity: 1;
        visibility: visible;
    }

    .msl-nav__links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .msl-nav__links a {
        padding: 0.75rem 1rem;
    }

    .msl-nav__cta {
        width: 100%;
    }

    .msl-nav__cta .msl-btn {
        width: 100%;
    }
}

/* ——— الهيرو ——— */
.msl-hero {
    position: relative;
    padding-block: calc(var(--msl-nav-h) + clamp(2.5rem, 8vw, 4rem)) clamp(3rem, 10vw, 5rem);
    background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(245, 158, 11, 0.12), transparent),
        linear-gradient(160deg, var(--msl-hero) 0%, var(--msl-hero-mid) 45%, #0a1628 100%);
    color: #fff;
    overflow: clip;
}

.msl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.msl-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 3rem);
    align-items: center;
}

@media (min-width: 992px) {
    .msl-hero__grid {
        grid-template-columns: 1.05fr 0.95fr;
    }
}

.msl-hero__text .msl-h1 {
    color: #fff;
}

.msl-hero__text .msl-h1 span {
    color: #fbbf24;
}

.msl-hero__sub {
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    color: rgba(255, 255, 255, 0.78);
    max-width: 36rem;
    margin: 0 0 1.75rem;
    line-height: 1.75;
}

.msl-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .msl-hero__actions .msl-btn,
    .msl-cta__actions .msl-btn {
        width: 100%;
    }
}

.msl-hero__note {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.msl-hero__visual {
    display: flex;
    justify-content: center;
}

.msl-hero__card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--msl-radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    backdrop-filter: blur(16px);
    max-width: 400px;
    text-align: center;
}

.msl-hero__card img {
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.msl-hero__card h3 {
    margin: 1.25rem 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.msl-hero__card p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
}

/* ——— بطاقات ——— */
.msl-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .msl-cards--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .msl-cards--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .msl-cards--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.msl-card {
    background: var(--msl-surface);
    border-radius: var(--msl-radius);
    padding: 1.35rem 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--msl-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.msl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--msl-shadow-hover);
}

.msl-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    background: rgba(245, 158, 11, 0.12);
    color: var(--msl-primary-dark);
}

.msl-card__icon--blue {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.msl-card__icon--green {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.msl-card__icon--slate {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.msl-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--msl-ink);
}

.msl-card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--msl-muted);
    line-height: 1.6;
}

/* ——— قائمة ميزات ——— */
.msl-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.msl-checklist li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.95rem;
    color: var(--msl-ink-soft);
}

.msl-checklist i {
    color: var(--msl-primary-dark);
    font-size: 1.15rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* ——— CTA ——— */
.msl-cta {
    background: linear-gradient(135deg, #132a45 0%, #0c1929 100%);
    border-radius: var(--msl-radius-lg);
    padding: clamp(2rem, 5vw, 3rem);
    text-align: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.msl-cta::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 65%);
    top: -120px;
    left: -80px;
    pointer-events: none;
}

.msl-cta__inner {
    position: relative;
    z-index: 1;
}

.msl-cta h2 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.msl-cta p {
    color: rgba(255, 255, 255, 0.75);
    max-width: 36rem;
    margin: 0 auto 1.5rem;
    font-size: 1rem;
}

.msl-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ——— تذييل ——— */
.msl-footer {
    background: #070f18;
    color: rgba(255, 255, 255, 0.82);
    padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}

.msl-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.msl-footer a:hover {
    color: #fbbf24;
}

.msl-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .msl-footer__grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }
}

.msl-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.msl-footer__brand img {
    height: 48px;
}

.msl-footer__brand span {
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--msl-primary);
}

.msl-footer h4 {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.msl-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.msl-footer li {
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
}

.msl-footer__bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

/* ——— محاذاة النص في الأقسام ——— */
.msl-center {
    text-align: center;
}

.msl-center .msl-lead {
    margin-inline: auto;
}

.msl-split {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 992px) {
    .msl-split {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}
