/* ============================================
   HOME / LANDING PAGE
   ============================================ */
.home-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   BACKGROUND ORBS
   ============================================ */
.home-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    will-change: transform;
}

.orb-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    top: -80px;
    right: -100px;
    animation: floatOrb 12s ease-in-out infinite;
}

.orb-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    bottom: -60px;
    left: -80px;
    animation: floatOrb 14s ease-in-out infinite reverse;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.25;
    animation: floatOrb 18s ease-in-out infinite;
}

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

/* ============================================
   CONTAINER
   ============================================ */
.home-container {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px calc(30px + env(safe-area-inset-bottom));
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ============================================
   HEADER
   ============================================ */
.home-header {
    text-align: center;
    margin-bottom: 36px;
    animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-logo {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.15) 0%,
        rgba(6, 182, 212, 0.08) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow:
        0 0 40px rgba(124, 58, 237, 0.3),
        inset 0 0 24px rgba(124, 58, 237, 0.08);
    position: relative;
    animation: pulseLogo 3s ease-in-out infinite;
    overflow: hidden;
    padding: 0;
}

.home-logo::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 34px;
    background: var(--accent-grad);
    opacity: 0.12;
    filter: blur(20px);
    z-index: -1;
}

@keyframes pulseLogo {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(124, 58, 237, 0.3),
            inset 0 0 24px rgba(124, 58, 237, 0.08);
    }
    50% {
        box-shadow:
            0 0 60px rgba(124, 58, 237, 0.5),
            inset 0 0 30px rgba(124, 58, 237, 0.15);
    }
}

.home-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 24px;
}
/* ============================================
   CARDS
   ============================================ */
.home-cards {
    display: grid;
    gap: 16px;
    width: 100%;
}

.home-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
    animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.home-card:nth-child(1) { animation-delay: 0.15s; }
.home-card:nth-child(2) { animation-delay: 0.25s; }

.home-card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
        rgba(124, 58, 237, 0.15) 0%,
        transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.home-card:active {
    transform: scale(0.98);
}

.home-card:active .home-card-glow {
    opacity: 1;
}

/* کارت اصلی (ثبت سفارش) */
.home-card-primary {
    border-color: rgba(124, 58, 237, 0.3);
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.12) 0%,
        rgba(6, 182, 212, 0.06) 100%),
        var(--bg-card);
}

.home-card-primary .home-card-icon {
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.25) 0%,
        rgba(6, 182, 212, 0.15) 100%);
    border-color: rgba(124, 58, 237, 0.5);
    color: #fff;
    box-shadow:
        0 0 24px rgba(124, 58, 237, 0.4),
        inset 0 0 20px rgba(124, 58, 237, 0.15);
}

.home-card-primary .home-card-arrow {
    background: var(--accent-grad);
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

/* کارت ثانویه (پیگیری) */
.home-card-secondary .home-card-icon {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-mid);
    color: var(--text-1);
}

.home-card-secondary .home-card-arrow {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-2);
}

/* آیکون */
.home-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border: 1px solid;
    transition: all 0.3s ease;
}

.home-card-icon svg {
    width: 26px;
    height: 26px;
}

/* بدنه */
.home-card-body {
    flex: 1;
    min-width: 0;
}

.home-card-body h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}

.home-card-body p {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.55;
}

/* فلش */
.home-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.home-card-arrow svg {
    width: 18px;
    height: 18px;
}

.home-card:active .home-card-arrow {
    transform: translateX(-4px);
}

/* ============================================
   FOOTER
   ============================================ */
.home-footer {
    margin-top: 40px;
    text-align: center;
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.home-support {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-full);
    font-size: 12px;
    color: var(--text-2);
    backdrop-filter: blur(10px);
}

.home-support svg {
    width: 14px;
    height: 14px;
    color: var(--accent-2);
}

.home-support a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 700;
    direction: ltr;
}

.home-support a:active {
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 380px) {
    .home-logo {
        width: 88px;
        height: 88px;
        border-radius: 22px;
    }
    .home-title {
        font-size: 28px;
    }
    .home-card {
        padding: 18px 16px;
        gap: 12px;
    }
    .home-card-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }
    .home-card-icon svg {
        width: 22px;
        height: 22px;
    }
    .home-card-body h2 {
        font-size: 15px;
    }
    .home-card-arrow {
        width: 32px;
        height: 32px;
    }
}


/* ============================================
   LIGHT THEME — HOME
   ============================================ */
[data-theme="light"] .orb {
    opacity: 0.3;
}

[data-theme="light"] .orb-1 { background: radial-gradient(circle, #7c3aed 0%, transparent 70%); }
[data-theme="light"] .orb-2 { background: radial-gradient(circle, #06b6d4 0%, transparent 70%); }
[data-theme="light"] .orb-3 { background: radial-gradient(circle, #ec4899 0%, transparent 70%); }

[data-theme="light"] .home-logo {
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.1) 0%,
        rgba(6, 182, 212, 0.05) 100%);
    border-color: rgba(124, 58, 237, 0.25);
    box-shadow:
        0 0 40px rgba(124, 58, 237, 0.2),
        inset 0 0 24px rgba(124, 58, 237, 0.05);
}

[data-theme="light"] .home-card {
    background: #ffffff;
    border-color: var(--border-soft);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .home-card-primary {
    border-color: rgba(124, 58, 237, 0.25);
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.06) 0%,
        rgba(6, 182, 212, 0.03) 100%),
        #ffffff;
}

[data-theme="light"] .home-card-secondary .home-card-icon {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--border-mid);
}

[data-theme="light"] .home-card-secondary .home-card-arrow {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .home-support {
    background: #ffffff;
    border-color: var(--border-soft);
}

[data-theme="light"] .theme-toggle {
    background: #ffffff;
    border-color: var(--border-mid);
}

/* ============================================
   THEME TOGGLE — HOME POSITION
   ============================================ */
.home-theme-toggle {
    position: fixed;
    top: calc(16px + env(safe-area-inset-top));
    left: 16px;
    z-index: 100;
}