/**
 * Cinco's Go — Joy UI layer
 * Lively motion, warm gradients, and delightful micro-interactions.
 */

:root {
    --joy-gold: #f5b731;
    --joy-gold-light: #fff4d6;
    --joy-coral: #ff6b4a;
    --joy-mint: #2dd4a8;
    --joy-violet: #7c5cff;
    --joy-sunrise: linear-gradient(135deg, var(--cg-primary, #1877f2) 0%, #5b8def 40%, var(--joy-violet) 100%);
    --joy-warm: linear-gradient(135deg, #ff8a3d 0%, #ff5e62 50%, #ff3d77 100%);
    --joy-hero: linear-gradient(135deg, var(--cg-primary, #1877f2) 0%, #0d5bbd 35%, #7c5cff 70%, #ff6b4a 100%);
}

/* ——— Landing hero ——— */
.hero-section {
    background: var(--joy-hero) !important;
    background-size: 200% 200% !important;
    animation: joyHeroShift 12s ease infinite;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 183, 49, 0.2) 0%, transparent 45%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section .btn-light {
    font-weight: 700;
    border-radius: 999px;
    padding: 0.75rem 2rem !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-section .btn-light:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-outline-light {
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-section .btn-outline-light:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-card {
    border-radius: 18px !important;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease !important;
}

.feature-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 16px 40px rgba(24, 119, 242, 0.15) !important;
}

.feature-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ——— Auth pages ——— */
.auth-bg {
    background: linear-gradient(160deg, #eef4ff 0%, #fff8f0 45%, #f0f9ff 100%) !important;
    min-height: 100vh;
}

.joy-auth-card {
    border-radius: 22px !important;
    overflow: hidden;
    border: none !important;
    box-shadow: 0 20px 60px rgba(24, 119, 242, 0.12) !important;
    animation: joyFadeUp 0.5s ease both;
}

.joy-auth-card .joy-auth-strip {
    height: 6px;
    background: var(--joy-sunrise);
    background-size: 200% 100%;
    animation: joyStripFlow 4s linear infinite;
}

.joy-auth-card .btn-primary {
    border-radius: 12px;
    font-weight: 700;
    padding: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.joy-auth-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.35);
}

.joy-auth-card .btn-primary:active {
    transform: scale(0.98);
}

.joy-auth-title {
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--joy-sunrise);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ——— Customer home welcome ——— */
.joy-welcome-banner {
    background: var(--joy-sunrise);
    background-size: 200% 200%;
    animation: joyHeroShift 8s ease infinite;
    border-radius: 20px;
    padding: 1.1rem 1.25rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.25);
    position: relative;
    overflow: hidden;
}

.joy-welcome-banner::after {
    content: '✨';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.75rem;
    opacity: 0.7;
    animation: joySparkle 2s ease-in-out infinite;
}

.joy-welcome-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.joy-wave {
    font-size: 1.75rem;
    display: inline-block;
    animation: joyWave 1.5s ease-in-out infinite;
    transform-origin: 70% 70%;
}

.joy-greeting-time {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.joy-greeting-sub {
    font-size: 0.82rem;
    opacity: 0.92;
}

.ig-greeting-label {
    color: var(--cg-primary, #1877f2) !important;
    font-weight: 600;
}

.ig-greeting-name {
    background: var(--joy-sunrise);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ——— Quick action pills ——— */
.ig-action-pill {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease !important;
    border-radius: 16px !important;
}

.ig-action-pill:active {
    transform: scale(0.94) !important;
}

.ig-action-pill:hover {
    transform: translateY(-4px) scale(1.04) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.ig-action-icon {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ig-action-pill:hover .ig-action-icon {
    transform: scale(1.12) rotate(5deg);
}

/* ——— Feed cards ——— */
.ig-feed-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 16px !important;
}

.ig-feed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.ig-feed-title {
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

/* ——— Bottom nav joy ——— */
.nav-link-mobile.active {
    color: var(--cg-primary, var(--primary)) !important;
    font-weight: 700;
}

.nav-link-mobile.active i {
    animation: joyBounce 0.5s ease;
}

.nav-link-mobile {
    transition: transform 0.15s ease, color 0.15s ease;
}

.nav-link-mobile:active {
    transform: scale(0.9);
}

/* ——— Buttons global polish ——— */
.btn-primary {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ——— Story rings extra glow ——— */
.story-circle-link:hover .story-ring {
    filter: brightness(1.08);
}

/* ——— Animations ——— */
@keyframes joyHeroShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes joyStripFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes joyFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes joyWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(18deg); }
    75% { transform: rotate(-8deg); }
}

@keyframes joySparkle {
    0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

@keyframes joyBounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

.content-area:has(.ig-home) {
    background: linear-gradient(180deg, #f8f9fc 0%, #fff9f0 100%) !important;
}

@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .joy-welcome-banner,
    .joy-auth-card .joy-auth-strip,
    .joy-wave,
    .joy-welcome-banner::after {
        animation: none !important;
    }

    .feature-card:hover,
    .ig-action-pill:hover {
        transform: none !important;
    }
}
