/* ============================================
   TOUMAI — HOME PAGE CSS
   Landing page, hero, services, features,
   footer, bottom navigation
   ============================================ */

/* ============================================
   HOME HEADER
   ============================================ */

.home-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(196, 160, 89, 0.1);
    padding: var(--space-sm) var(--space-md);
    transition: var(--transition-normal);
}

.home-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 480px;
    margin: 0 auto;
    height: 48px;
}

.home-header__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    border-radius: var(--radius-sm);
    color: var(--pure-pearl);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(196, 160, 89, 0.3);
}

.home-header__logo {
    font-size: var(--text-xl);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.home-header__lang {
    position: relative;
}

.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-switcher__select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 6px 28px 6px 10px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--charcoal-text);
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 60px;
}

.body--rtl .lang-switcher__select {
    padding: 6px 10px 6px 28px;
}

.lang-switcher__select:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.lang-switcher__icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--muted-text);
    pointer-events: none;
}

.body--rtl .lang-switcher__icon {
    right: auto;
    left: 8px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px var(--space-lg) 120px;
    overflow: hidden;
    background: linear-gradient(180deg,
        var(--pure-pearl) 0%,
        rgba(196, 160, 89, 0.03) 50%,
        var(--surface-white) 100%
    );
}

/* Floating Shapes */
.hero__bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero__shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    background: var(--primary-gold);
}

.hero__shape--1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -60px;
    animation: float 8s ease-in-out infinite;
}

.hero__shape--2 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    left: -50px;
    animation: float 10s ease-in-out infinite 2s;
}

.hero__shape--3 {
    width: 150px;
    height: 150px;
    top: 35%;
    right: 10%;
    animation: float 12s ease-in-out infinite 4s;
    background: linear-gradient(135deg, var(--primary-gold), transparent);
}

.hero__content {
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(196, 160, 89, 0.12), rgba(196, 160, 89, 0.05));
    border: 1px solid rgba(196, 160, 89, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gold-dark);
    margin-bottom: var(--space-lg);
    animation: fadeInDown 0.8s ease forwards;
}

.hero__badge i {
    font-size: 12px;
    color: var(--primary-gold);
}

.hero__title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--charcoal-text);
    margin-bottom: var(--space-md);
    letter-spacing: -0.5px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero__title-highlight {
    display: block;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: goldShimmer 4s ease-in-out infinite;
}

.hero__subtitle {
    font-size: var(--text-base);
    color: var(--muted-text);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero__flag {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease 0.5s both;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-base);
    transition: var(--transition-elastic);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: var(--pure-pearl);
    box-shadow: 0 4px 16px rgba(196, 160, 89, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(196, 160, 89, 0.4);
}

.btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(196, 160, 89, 0.3);
}

.btn--outline {
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

.btn--outline:hover {
    background: rgba(196, 160, 89, 0.08);
    transform: translateY(-2px);
}

.btn--lg {
    padding: 16px var(--space-xl);
    font-size: var(--text-lg);
    border-radius: var(--radius-md);
}

.btn--glow {
    animation: pulse 2s ease-in-out infinite;
}

.btn i {
    font-size: 0.9em;
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services {
    padding: var(--space-2xl) var(--space-lg);
    background: var(--pure-pearl);
}

.services__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.services__title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--charcoal-text);
    margin-bottom: var(--space-sm);
}

.services__subtitle {
    font-size: var(--text-base);
    color: var(--muted-text);
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    max-width: 480px;
    margin: 0 auto;
}

.service-card {
    background: var(--surface-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    transition: var(--transition-elastic);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gold), var(--gold-light));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.body--rtl .service-card::before {
    transform-origin: right;
}

.service-card:hover::before,
.service-card:active::before {
    transform: scaleX(1);
}

.service-card:hover,
.service-card:active {
    border-color: rgba(196, 160, 89, 0.3);
    box-shadow: var(--shadow-royal);
    transform: translateY(-4px);
}

.service-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 22px;
    transition: var(--transition-elastic);
}

.service-card:hover .service-card__icon,
.service-card:active .service-card__icon {
    transform: scale(1.1);
}

.service-card__icon--ai {
    background: linear-gradient(135deg, rgba(196, 160, 89, 0.15), rgba(196, 160, 89, 0.05));
    color: var(--primary-gold);
}

.service-card__icon--posts {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.05));
    color: var(--info-blue);
}

.service-card__icon--chat {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(39, 174, 96, 0.05));
    color: var(--success-emerald);
}

.service-card__icon--shop {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15), rgba(243, 156, 18, 0.05));
    color: var(--warning-amber);
}

.service-card__title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--charcoal-text);
    margin-bottom: var(--space-sm);
}

.service-card__desc {
    font-size: var(--text-xs);
    color: var(--muted-text);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.service-card__tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(196, 160, 89, 0.08);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    padding: var(--space-2xl) var(--space-lg);
    background: linear-gradient(180deg,
        var(--surface-white) 0%,
        rgba(196, 160, 89, 0.03) 100%
    );
}

.features__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    max-width: 480px;
    margin: 0 auto;
}

.feature-item {
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    border-radius: var(--radius-lg);
    transition: var(--transition-elastic);
}

.feature-item:hover,
.feature-item:active {
    background: var(--pure-pearl);
    box-shadow: var(--shadow-md);
}

.feature-item__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: var(--pure-pearl);
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(196, 160, 89, 0.25);
    transition: var(--transition-elastic);
}

.feature-item:hover .feature-item__icon,
.feature-item:active .feature-item__icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 24px rgba(196, 160, 89, 0.35);
}

.feature-item__title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--charcoal-text);
    margin-bottom: var(--space-xs);
}

.feature-item__desc {
    font-size: var(--text-xs);
    color: var(--muted-text);
    line-height: 1.6;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta {
    padding: var(--space-2xl) var(--space-lg);
    background: var(--pure-pearl);
}

.cta__content {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: linear-gradient(135deg,
        rgba(196, 160, 89, 0.06),
        rgba(196, 160, 89, 0.02)
    );
    border: 1px solid rgba(196, 160, 89, 0.15);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.cta__content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
        rgba(196, 160, 89, 0.05) 0%,
        transparent 60%
    );
    animation: spinSlow 20s linear infinite;
    pointer-events: none;
}

.cta__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: var(--pure-pearl);
    font-size: 24px;
    box-shadow: var(--shadow-gold-glow);
    position: relative;
    z-index: 1;
}

.cta__title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--charcoal-text);
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.cta__desc {
    font-size: var(--text-base);
    color: var(--muted-text);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.cta .btn {
    position: relative;
    z-index: 1;
}

/* ============================================
   FOOTER
   ============================================ */

.home-footer {
    padding: var(--space-xl) var(--space-lg) 100px;
    background: var(--charcoal-text);
    color: rgba(255, 255, 255, 0.7);
}

.home-footer__inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.home-footer__brand {
    margin-bottom: var(--space-lg);
}

.home-footer__logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--pure-pearl);
    margin-bottom: var(--space-xs);
}

.home-footer__logo i {
    color: var(--primary-gold);
    font-size: 16px;
}

.home-footer__tagline {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
}

.home-footer__social {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.home-footer__social-link {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    transition: var(--transition-elastic);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.home-footer__social-link:hover,
.home-footer__social-link:active {
    background: var(--primary-gold);
    color: var(--pure-pearl);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(196, 160, 89, 0.3);
    border-color: transparent;
}

.home-footer__links {
    margin-bottom: var(--space-lg);
}

.home-footer__link {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition-fast);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
}

.home-footer__link:hover,
.home-footer__link:active {
    color: var(--primary-gold);
    background: rgba(196, 160, 89, 0.08);
}

.home-footer__copy {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.home-footer__copy p {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   BOTTOM NAVIGATION (App-style)
   ============================================ */

.nav-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom));
    max-width: 100%;
}

.nav-bottom__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    min-width: 56px;
    -webkit-tap-highlight-color: transparent;
}

.nav-bottom__item:active {
    transform: scale(0.92);
}

.nav-bottom__icon {
    font-size: 20px;
    color: var(--muted-text);
    transition: var(--transition-fast);
}

.nav-bottom__label {
    font-size: 10px;
    font-weight: 600;
    color: var(--muted-text);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-bottom__item--active .nav-bottom__icon {
    color: var(--primary-gold);
}

.nav-bottom__item--active .nav-bottom__label {
    color: var(--primary-gold);
}

.nav-bottom__item--active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary-gold);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.nav-bottom__item--disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE — TABLET & DESKTOP
   ============================================ */

@media (min-width: 768px) {
    .hero__title {
        font-size: 2.8rem;
    }

    .hero__subtitle {
        font-size: var(--text-lg);
    }

    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }

    .services__grid {
        max-width: 700px;
        gap: var(--space-lg);
    }

    .features__grid {
        max-width: 700px;
        gap: var(--space-lg);
    }

    .cta__content {
        max-width: 600px;
        padding: var(--space-2xl);
    }

    .service-card {
        padding: var(--space-xl) var(--space-lg);
    }

    .service-card__icon {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }

    .service-card__title {
        font-size: var(--text-base);
    }

    .service-card__desc {
        font-size: var(--text-sm);
    }

    .feature-item__icon {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .nav-bottom {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        bottom: var(--space-md);
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
    }
}

@media (min-width: 1024px) {
    .hero__title {
        font-size: 3.2rem;
    }

    .services__grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 900px;
    }

    .features__grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 900px;
    }
}

/* ============================================
   RTL ADJUSTMENTS
   ============================================ */

.body--rtl .hero__title {
    letter-spacing: 0;
}

.body--rtl .service-card__tag {
    letter-spacing: 0;
}

.body--rtl .hero__badge {
    direction: rtl;
}

/* ============================================
   SAFE AREA — iOS NOTCH
   ============================================ */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .nav-bottom {
        padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom));
    }

    .home-footer {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
}

/* ============================================
   DARK HERO VARIANT (optional future use)
   ============================================ */

.hero--dark {
    background: linear-gradient(180deg,
        var(--charcoal-text) 0%,
        #2a2a2a 100%
    );
}

.hero--dark .hero__title {
    color: var(--pure-pearl);
}

.hero--dark .hero__subtitle {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   REDUCED MOTION
   ============================================ */

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

    .hero__shape {
        animation: none;
    }

    .cta__content::before {
        animation: none;
    }
}