/* ================================
   متغیرها و ریست — تم بنفش
================================ */
:root {
    --bg: #0a0514;
    --primary: #a855f7;      /* بنفش اصلی */
    --primary-deep: #6d28d9; /* بنفش تیره */
    --secondary: #c084fc;    /* بنفش روشن */
    --accent: #e879f9;       /* ارغوانی درخشان */
    --text: #f5f3ff;
    --text-dim: #a89fc4;
    --glass: rgba(168, 85, 247, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ================================
   صحنه سه‌بعدی و بک‌گراند
================================ */
.scene {
    position: fixed;
    inset: 0;
    perspective: 1000px;
    overflow: hidden;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(168, 85, 247, 0.22), transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(109, 40, 217, 0.2), transparent 50%),
        var(--bg);
}

/* ستاره‌ها */
.stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 60% 70%, #e9d5ff, transparent),
        radial-gradient(1.5px 1.5px at 80% 20%, #c084fc, transparent),
        radial-gradient(1px 1px at 40% 80%, #d8b4fe, transparent),
        radial-gradient(1px 1px at 90% 60%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 10% 60%, #e879f9, transparent),
        radial-gradient(1px 1px at 50% 10%, #fff, transparent),
        radial-gradient(1px 1px at 70% 40%, #f3e8ff, transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.4; }
    to   { opacity: 1; }
}

/* گوی‌های نورانی */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 12s ease-in-out infinite;
}

.orb-1 {
    width: 400px; height: 400px;
    background: var(--primary);
    top: -10%; left: -10%;
}

.orb-2 {
    width: 350px; height: 350px;
    background: var(--primary-deep);
    bottom: -15%; right: -10%;
    animation-delay: -4s;
}

.orb-3 {
    width: 250px; height: 250px;
    background: var(--accent);
    top: 50%; left: 60%;
    opacity: 0.25;
    animation-delay: -8s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.1); }
    66%      { transform: translate(-30px, 40px) scale(0.95); }
}

/* کف شبکه‌ای سه‌بعدی */
.grid-floor {
    position: absolute;
    bottom: -20%;
    left: -50%;
    width: 200%;
    height: 60%;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.3) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotateX(65deg);
    transform-origin: bottom;
    mask-image: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    animation: gridMove 8s linear infinite;
}

@keyframes gridMove {
    from { background-position: 0 0; }
    to   { background-position: 0 60px; }
}

/* ================================
   مکعب‌های سه‌بعدی
================================ */
.cube {
    position: absolute;
    width: 90px;
    height: 90px;
    top: 15%;
    right: 12%;
    transform-style: preserve-3d;
    animation: spin 16s linear infinite;
}

.cube-2 {
    width: 55px;
    height: 55px;
    top: auto;
    right: auto;
    bottom: 18%;
    left: 10%;
    animation: spinReverse 12s linear infinite;
}

.cube .face {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(168, 85, 247, 0.6);
    background: rgba(168, 85, 247, 0.08);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.25) inset;
}

.cube-2 .face {
    border-color: rgba(232, 121, 249, 0.55);
    background: rgba(232, 121, 249, 0.08);
}

.cube .front  { transform: translateZ(45px); }
.cube .back   { transform: translateZ(-45px) rotateY(180deg); }
.cube .right  { transform: rotateY(90deg) translateZ(45px); }
.cube .left   { transform: rotateY(-90deg) translateZ(45px); }
.cube .top    { transform: rotateX(90deg) translateZ(45px); }
.cube .bottom { transform: rotateX(-90deg) translateZ(45px); }

.cube-2 .front  { transform: translateZ(27.5px); }
.cube-2 .back   { transform: translateZ(-27.5px) rotateY(180deg); }
.cube-2 .right  { transform: rotateY(90deg) translateZ(27.5px); }
.cube-2 .left   { transform: rotateY(-90deg) translateZ(27.5px); }
.cube-2 .top    { transform: rotateX(90deg) translateZ(27.5px); }
.cube-2 .bottom { transform: rotateX(-90deg) translateZ(27.5px); }

@keyframes spin {
    from { transform: rotateX(20deg) rotateY(0deg); }
    to   { transform: rotateX(20deg) rotateY(360deg); }
}

@keyframes spinReverse {
    from { transform: rotateX(-15deg) rotateY(360deg); }
    to   { transform: rotateX(-15deg) rotateY(0deg); }
}

/* ================================
   محتوای اصلی
================================ */
.content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 800px;
    animation: fadeUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

/* نشان بالای صفحه */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 100px;
    background: var(--glass);
    border: 1px solid rgba(168, 85, 247, 0.25);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    animation: pulse-border 3s ease-in-out infinite;
}

.badge svg { color: var(--accent); }

@keyframes pulse-border {
    0%, 100% { border-color: rgba(168, 85, 247, 0.25); }
    50%      { border-color: rgba(168, 85, 247, 0.7); }
}

/* عنوان فارسی */
.title-fa {
    font-size: clamp(4rem, 14vw, 9rem);
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 15%, var(--secondary) 50%, var(--primary) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.5));
    margin-bottom: 0.3em;
}

/* عنوان انگلیسی */
.title-en {
    font-family: 'Space Grotesk', sans-serif;
    direction: ltr;
    font-size: clamp(1.4rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.35em;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.title-en .space { width: 1.2em; }

.title-en span {
    color: var(--secondary);
    display: inline-block;
    animation: letterFloat 2.5s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.title-en span:nth-child(odd)  { color: #fff; }
.title-en span:nth-child(3n)   { color: var(--accent); }

.title-en span:nth-child(1)  { animation-delay: 0s; }
.title-en span:nth-child(2)  { animation-delay: 0.1s; }
.title-en span:nth-child(3)  { animation-delay: 0.2s; }
.title-en span:nth-child(4)  { animation-delay: 0.3s; }
.title-en span:nth-child(5)  { animation-delay: 0.4s; }
.title-en span:nth-child(6)  { animation-delay: 0.5s; }
.title-en span:nth-child(8)  { animation-delay: 0.6s; }
.title-en span:nth-child(9)  { animation-delay: 0.7s; }
.title-en span:nth-child(10) { animation-delay: 0.8s; }
.title-en span:nth-child(11) { animation-delay: 0.9s; }

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

/* خط جداکننده */
.divider {
    width: 120px;
    height: 3px;
    margin: 0 auto 2rem;
    border-radius: 10px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    animation: glowLine 3s ease-in-out infinite;
}

@keyframes glowLine {
    0%, 100% { opacity: 0.6; width: 120px; }
    50%      { opacity: 1; width: 180px; }
}

/* زیرنویس */
.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-dim);
    line-height: 2;
    margin-bottom: 2.5rem;
}

/* ================================
   شبکه‌های اجتماعی
================================ */
.socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 2.5rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--glass);
    border: 1px solid rgba(168, 85, 247, 0.25);
    backdrop-filter: blur(10px);
    color: var(--text-dim);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.social-btn:hover {
    color: #fff;
    transform: translateY(-6px) scale(1.08);
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.25);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.45);
}

/* پاورقی */
.footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(168, 159, 196, 0.6);
}

/* ================================
   واکنش‌گرایی
================================ */
@media (max-width: 640px) {
    .cube       { width: 55px; height: 55px; top: 10%; right: 6%; }
    .cube .front  { transform: translateZ(27.5px); }
    .cube .back   { transform: translateZ(-27.5px) rotateY(180deg); }
    .cube .right  { transform: rotateY(90deg) translateZ(27.5px); }
    .cube .left   { transform: rotateY(-90deg) translateZ(27.5px); }
    .cube .top    { transform: rotateX(90deg) translateZ(27.5px); }
    .cube .bottom { transform: rotateX(-90deg) translateZ(27.5px); }

    .cube-2     { width: 35px; height: 35px; }
    .cube-2 .front  { transform: translateZ(17.5px); }
    .cube-2 .back   { transform: translateZ(-17.5px) rotateY(180deg); }
    .cube-2 .right  { transform: rotateY(90deg) translateZ(17.5px); }
    .cube-2 .left   { transform: rotateY(-90deg) translateZ(17.5px); }
    .cube-2 .top    { transform: rotateX(90deg) translateZ(17.5px); }
    .cube-2 .bottom { transform: rotateX(-90deg) translateZ(17.5px); }

    .title-en   { letter-spacing: 0.2em; }
    .socials    { gap: 12px; }
    .social-btn { width: 44px; height: 44px; }
}

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