:root {
    --primary-900: rgb(54, 30, 147);
    --primary-700: rgb(74, 74, 161);
    --primary-400: rgb(136, 142, 197);
    --accent-900: rgb(101, 0, 135);
    --accent-700: rgb(127, 53, 151);
    --accent-400: rgb(176, 140, 196);
    --magenta-900: rgb(156, 0, 132);
    --magenta-700: rgb(188, 77, 171);
    --magenta-400: rgb(207, 137, 200);
    --gradient-primary: linear-gradient(135deg, var(--primary-900), var(--accent-700));
    --gradient-secondary: linear-gradient(135deg, var(--accent-900), var(--magenta-700));
    --gradient-soft: linear-gradient(135deg, rgba(136, 142, 197, 0.2), rgba(207, 137, 200, 0.14));
    --surface-glass: rgba(255, 255, 255, 0.74);
    --surface-card: rgba(255, 255, 255, 0.92);
    --surface-dark: rgba(15, 23, 42, 0.78);
    --border-soft: rgba(148, 163, 184, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f8fafc;
    color: #0f172a;
}

body.lang-fa,
html.lang-fa {
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
}

body.lang-en,
html.lang-en {
    direction: ltr;
    font-family: 'Inter', sans-serif;
}

.lang-fa [data-lang='en'],
.lang-en [data-lang='fa'] {
    display: none !important;
}

img,
video {
    max-width: 100%;
}

main {
    overflow: clip;
}

.section-padding {
    padding: 3rem 1rem;
}

.section-heading {
    max-width: 46rem;
}

.hero-grid {
    background-image:
        radial-gradient(circle at 18% 12%, rgba(188, 77, 171, 0.16), transparent 24%),
        radial-gradient(circle at 82% 4%, rgba(74, 74, 161, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 54%);
}

.gradient-bg {
    background: var(--gradient-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    bottom: -0.42rem;
    width: 100%;
    height: 2px;
    border-radius: 9999px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.link-underline:hover::after,
.link-underline:focus-visible::after,
.link-underline.is-active::after {
    transform: scaleX(1);
}

.premium-card {
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.86));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.premium-card-dark {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.26);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.filter-pill {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.86);
    color: #475569;
    transition: all 0.25s ease;
}

.filter-pill.active,
.filter-pill:hover {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 15px 40px rgba(54, 30, 147, 0.18);
}

.device-shell {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.28);
}

.device-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.device-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
}

.orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(10px);
    opacity: 0.52;
    pointer-events: none;
}

.orb-primary {
    background: radial-gradient(circle, rgba(54, 30, 147, 0.36), rgba(54, 30, 147, 0));
}

.orb-magenta {
    background: radial-gradient(circle, rgba(188, 77, 171, 0.3), rgba(188, 77, 171, 0));
}

.hero-video {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.stat-card {
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.badge-soft {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.78);
    color: #475569;
}

.product-card,
.service-card,
.project-card,
.feature-card,
.plan-card,
.pricing-plan-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover,
.service-card:hover,
.project-card:hover,
.feature-card:hover,
.plan-card:hover,
.pricing-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.12);
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 1.75rem;
}

.product-media {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.84);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.92));
}

.product-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.thumb-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.thumb-card {
    min-height: 4.8rem;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.82);
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-dot {
    position: relative;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    inset-inline-start: 0.88rem;
    top: 2.4rem;
    width: 1px;
    height: calc(100% - 1.3rem);
    background: linear-gradient(180deg, rgba(127, 53, 151, 0.36), rgba(127, 53, 151, 0));
}

.timeline-dot:last-child::before {
    display: none;
}

.faq-item {
    border: 1px solid rgba(226, 232, 240, 0.94);
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.faq-item [data-faq-answer] {
    display: none;
}

.faq-item.open [data-faq-answer] {
    display: block;
}

.faq-icon {
    transition: transform 0.25s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 46px rgba(15, 23, 42, 0.06);
}

.pricing-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.pricing-table th,
.pricing-table td {
    padding: 1.05rem 1.2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    text-align: start;
    font-size: 0.95rem;
}

.pricing-table thead th {
    background: rgba(248, 250, 252, 0.96);
    color: #0f172a;
    font-weight: 800;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid rgba(203, 213, 225, 0.98);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.95rem 1rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(127, 53, 151, 0.46);
    box-shadow: 0 0 0 4px rgba(127, 53, 151, 0.12);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 1rem;
    padding: 0.95rem 1.5rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 18px 45px rgba(74, 74, 161, 0.24);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 50px rgba(74, 74, 161, 0.3);
}

.btn-secondary {
    color: #334155;
    border: 1px solid rgba(226, 232, 240, 0.98);
    background: rgba(255, 255, 255, 0.92);
}

.btn-secondary:hover {
    color: #7f3597;
    border-color: rgba(217, 70, 239, 0.22);
}

.toast {
    position: fixed;
    inset-inline-end: 1rem;
    bottom: 1rem;
    z-index: 60;
    max-width: 24rem;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    color: white;
    background: linear-gradient(135deg, rgba(54, 30, 147, 0.96), rgba(127, 53, 151, 0.96));
    box-shadow: 0 20px 52px rgba(15, 23, 42, 0.28);
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@media (max-width: 1024px) {
    .section-padding {
        padding: 5.25rem 1rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4.25rem 1rem;
    }

    .product-card {
        padding: 1.15rem;
    }

    .thumb-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-table th,
    .pricing-table td {
        padding: 0.92rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
