:root {
    --brand-primary: #7c3aed;
    --brand-secondary: #06b6d4;
    --brand-accent: #f97316;
    --brand-success: #22c55e;
    --text-ink: #0f172a;
    --text-subtle: #4b5563;
    --surface: #ffffff;
    --surface-muted: #f5f7fb;
    --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

:root.theme-dark {
    --text-ink: #e2e8f0;
    --text-subtle: #cbd5e1;
    --surface: #0f172a;
    --surface-muted: #0b1220;
    --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.35);
    --title-color: #e2e8f0;
    --secondary-light: #cbd5e1;
}

.theme-dark {
    color-scheme: dark;
}

.theme-dark body {
    background: var(--surface-muted);
    color: var(--text-ink);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'IRANSans', system-ui, -apple-system, sans-serif;
    background: var(--surface-muted);
    color: var(--text-ink);
}

.lw-body {
    background: radial-gradient(circle at 18% 20%, rgba(6, 182, 212, 0.15), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.14), transparent 28%),
        linear-gradient(180deg, #fafdff, #f3f6ff);
    min-height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.4) rgba(15, 23, 42, 0.06);
}

.lw-body::-webkit-scrollbar {
    width: 12px;
}

.lw-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.03);
    border-radius: 999px;
}

.lw-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.85), rgba(6, 182, 212, 0.85));
    border-radius: 999px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.lw-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.9), rgba(6, 182, 212, 0.9));
}

.theme-dark .lw-body {
    background: radial-gradient(circle at 18% 20%, rgba(124, 58, 237, 0.22), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.24), transparent 28%),
        linear-gradient(180deg, #0b1220, #0f172a);
    scrollbar-color: rgba(94, 234, 212, 0.35) rgba(255, 255, 255, 0.04);
}

.theme-dark .lw-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.theme-dark .lw-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(94, 234, 212, 0.9), rgba(124, 58, 237, 0.9));
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.4);
}

.lw-page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lw-main {
    flex: 1 1 auto;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--brand-primary);
}

main {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(245, 247, 251, 0.95));
}

.theme-dark main {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(11, 18, 32, 0.95));
}

.text-ink {
    color: var(--text-ink) !important;
}

.text-muted-soft {
    color: var(--text-subtle) !important;
}

/* Header */
.lw-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.lw-utility-bar {
    background: #eef2ff;
    border-bottom: 1px solid #e4e9ff;
    padding: 10px 0;
    color: var(--text-subtle);
}

.lw-navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
}

.theme-dark .lw-header {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.theme-dark .lw-utility-bar {
    background: #0f172a;
    border-bottom-color: #1f2937;
    color: var(--text-subtle);
}

.theme-dark .lw-navbar {
    background: rgba(15, 23, 42, 0.94);
    border-bottom-color: #1f2937;
}

.lw-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.lw-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: conic-gradient(from 120deg, #7c3aed, #06b6d4, #f97316, #7c3aed);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.28);
}

.lw-navbar .nav-link {
    color: var(--text-subtle);
    font-weight: 700;
    padding: 12px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.lw-navbar .nav-link:hover,
.lw-navbar .nav-link:focus {
    color: var(--text-ink);
    background: rgba(6, 182, 212, 0.12);
}

.lw-navbar .nav-link.active {
    color: var(--text-ink);
    background: linear-gradient(120deg, rgba(124, 58, 237, 0.16), rgba(6, 182, 212, 0.16));
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
}

.theme-dark .lw-navbar .nav-link {
    color: var(--text-subtle);
}

.theme-dark .lw-navbar .nav-link:hover,
.theme-dark .lw-navbar .nav-link:focus {
    color: var(--text-ink);
    background: rgba(255, 255, 255, 0.08);
}

.theme-dark .lw-navbar .nav-link.active {
    color: var(--text-ink);
    background: linear-gradient(120deg, rgba(124, 58, 237, 0.22), rgba(6, 182, 212, 0.22));
    border-color: #1f2937;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lw-social a {
    color: var(--brand-primary);
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3e8ff;
    transition: all 0.2s ease;
}

.lw-social a:hover {
    color: #fff;
    background: linear-gradient(120deg, #7c3aed, #06b6d4);
    transform: translateY(-2px);
}

.theme-dark .lw-social a {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.theme-dark .lw-social a:hover {
    background: linear-gradient(120deg, #7c3aed, #06b6d4);
    color: #fff;
}

.navbar-toggler {
    border: 1px solid #cbd5e1;
}

.navbar-toggler-icon {
    filter: invert(0);
}

.theme-dark .navbar-toggler {
    border-color: #334155;
}

.theme-dark .navbar-toggler-icon {
    filter: invert(1);
}

.dropdown-menu {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
}

.theme-dark .dropdown-menu {
    background: #0f172a;
    border-color: #1f2937;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.theme-dark .dropdown-item {
    color: var(--text-ink);
}

.theme-dark .dropdown-item:hover,
.theme-dark .dropdown-item:focus,
.theme-dark .dropdown-item.active {
    color: var(--text-ink);
    background: rgba(124, 58, 237, 0.18);
}

.w-lg-auto {
    width: 100%;
}

@media (min-width: 992px) {
    .w-lg-auto {
        width: auto;
    }
}

.section-padding {
    padding: 15px 0;
}

.section-heading {
    max-width: 900px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-heading .eyebrow {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--brand-primary);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.section-heading h2 {
    color: var(--text-ink);
    margin-top: 16px;
    font-weight: 800;
}

.section-heading p {
    color: var(--text-subtle);
}

.btn-theme-toggle {
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: var(--text-ink);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.12);
    width: 44px;
    height: 44px;
    padding: 0;
    gap: 0;
}

.btn-theme-toggle .theme-icon {
    color: var(--brand-primary);
    font-size: 18px;
}

.btn-theme-toggle:hover {
    color: var(--text-ink);
    background: rgba(124, 58, 237, 0.08);
}

.theme-dark .btn-theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: #1f2937;
    color: var(--text-ink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 64px;
    background: radial-gradient(circle at 18% 24%, rgba(249, 115, 22, 0.12), transparent 30%),
        radial-gradient(circle at 80% 18%, rgba(6, 182, 212, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.95));
    box-shadow: var(--shadow-soft);
}

.theme-dark .hero-wrapper {
    background: radial-gradient(circle at 18% 24%, rgba(124, 58, 237, 0.18), transparent 30%),
        radial-gradient(circle at 80% 18%, rgba(6, 182, 212, 0.22), transparent 30%),
        linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(11, 18, 32, 0.95));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero-wrapper::before,
.hero-wrapper::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    z-index: 0;
}

.hero-wrapper::before {
    background: #c4b5fd;
    top: -120px;
    right: -40px;
}

.hero-wrapper::after {
    background: #a5f3fc;
    bottom: -140px;
    left: -60px;
}

.hero-wrapper > * {
    position: relative;
    z-index: 1;
}

.hero-content {
    color: var(--text-ink);
}

.badge-soft {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3e8ff;
    color: var(--brand-primary);
    border: 1px solid rgba(124, 58, 237, 0.2);
    font-weight: 700;
}

.theme-dark .badge-soft {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.45);
    color: #c4b5fd;
}

.badge-soft.text-primary {
    color: var(--brand-primary) !important;
    border-color: rgba(124, 58, 237, 0.35);
}

.btn-gradient {
    background: linear-gradient(120deg, #7c3aed, #06b6d4);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.25);
}

.btn-gradient:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-light {
    color: var(--brand-primary);
    border-radius: 14px;
    border: 1px solid rgba(124, 58, 237, 0.35);
    padding: 12px 18px;
    background: #fff;
}

.btn-outline-light:hover {
    background: rgba(124, 58, 237, 0.08);
    color: var(--brand-primary);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.feature-list li {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text-subtle);
}

.feature-list i {
    color: var(--brand-success);
}

.icon-list-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.08);
}

.icon-list-item i {
    color: var(--brand-primary);
    background: rgba(124, 58, 237, 0.08);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.18);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #ecfeff;
    color: var(--brand-primary);
    border: 1px solid rgba(6, 182, 212, 0.3);
    font-weight: 600;
}

.icon-circle {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(124, 58, 237, 0.16), rgba(6, 182, 212, 0.18));
    color: var(--brand-primary);
}

.icon-circle-sm {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.icon-rotate {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.icon-rotate::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 45%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}

.icon-rotate i {
    position: relative;
    z-index: 1;
    transition: transform 0.35s ease;
}

.icon-rotate:hover::after {
    opacity: 1;
}

.icon-rotate:hover i {
    transform: rotate(-6deg) scale(1.05);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.card-neo {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.card-neo.hover-rise,
.hover-rise {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-neo.hover-rise:hover,
.hover-rise:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 58, 237, 0.22);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.theme-dark .card-neo {
    background: #0f172a;
    border-color: #1f2937;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.theme-dark .card-neo.hover-rise:hover,
.theme-dark .hover-rise:hover {
    border-color: #1f2937;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}

.card-neo.split-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.stat-card {
    background: #faf5ff;
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-ink);
    font-weight: 700;
}

.stat-card.with-icon {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

.theme-dark .stat-card {
    background: #111827;
    border-color: #1f2937;
    color: var(--text-ink);
}

.theme-dark .stat-card span {
    color: #9ca3af;
}

.subtle-glow {
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.14);
}

.icon-pulse {
    position: relative;
}

.icon-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(6, 182, 212, 0.35);
    animation: pulseRing 2.4s ease-out infinite;
}

.stat-card span {
    display: block;
    color: var(--text-subtle);
    font-weight: 600;
}

.muted-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.blog-card-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.process-step {
    text-align: center;
    border-top: 4px solid rgba(6, 182, 212, 0.3);
}

.stack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stack-badges span {
    background: #f1f5f9;
    color: var(--text-ink);
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-weight: 700;
}

.theme-dark .stack-badges span {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-ink);
    border-color: #1f2937;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.timeline-item {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(124, 58, 237, 0.3);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.theme-dark .timeline-item {
    background: #0f172a;
    border-color: #1f2937;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.cta-banner {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(6, 182, 212, 0.18)), #ffffff;
    border: 1px solid rgba(124, 58, 237, 0.18);
    box-shadow: var(--shadow-soft);
}

.theme-dark .cta-banner {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(6, 182, 212, 0.22)), #0f172a;
    border-color: #1f2937;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.cta-banner .cta-floating-shape {
    position: absolute;
    inset: -60px auto auto -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.18), transparent 60%);
    filter: blur(16px);
}

.cta-banner h3,
.cta-banner p {
    position: relative;
    z-index: 1;
    color: var(--text-ink);
}

.blog-metadata {
    display: flex;
    gap: 12px;
    color: var(--text-subtle);
    flex-wrap: wrap;
}

.blog-metadata i {
    color: var(--brand-secondary);
}

.lw-footer {
    background: #f8fafc;
    color: var(--text-ink);
    padding-top: 60px;
    border-top: 1px solid #e5e7eb;
}

.theme-dark .lw-footer {
    background: #0b1220;
    border-top-color: #1f2937;
}

.lw-footer-cta {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.theme-dark .lw-footer-cta {
    background: linear-gradient(120deg, rgba(124, 58, 237, 0.18), rgba(6, 182, 212, 0.14));
    border-color: #1f2937;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.lw-footer h4 {
    color: var(--text-ink);
    margin-bottom: 12px;
    font-weight: 800;
}

.lw-footer .footer-links a {
    color: var(--text-subtle);
}

.lw-footer .footer-links a:hover {
    color: var(--brand-primary);
}

.lw-footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    color: var(--text-subtle);
}

.theme-dark .lw-footer-bottom {
    border-top-color: #1f2937;
    color: var(--text-subtle);
}

.badge-soft {
    font-weight: 700;
}

.fade-up {
    animation: fadeUp 0.5s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating {
    animation: floating 8s ease-in-out infinite;
}

.wobble {
    animation: wobble 2.8s ease-in-out infinite;
    display: inline-flex;
}

@keyframes floating {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes wobble {
    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-6deg) scale(1.05);
    }
    50% {
        transform: rotate(4deg) scale(0.98);
    }
    75% {
        transform: rotate(-3deg) scale(1.02);
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.25);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

/* Blog */
.blog-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .hero-wrapper,
    .cta-banner {
        padding: 32px;
    }

    .blog-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-wrapper,
    .cta-banner {
        padding: 24px;
    }

    .section-padding {
        padding: 15px 0;
    }

    .lw-navbar .nav-link {
        padding: 10px 12px;
    }
}
