/* ============================================
   RivaMaza Welcome / Onboarding Screen
   Premium & Luxurious Mobile-First Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.welcome-page-body {
    font-family: 'Outfit', sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.welcome-page-body::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}
html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ---- Ambient Background Glow ---- */
.welcome-bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.welcome-bg-glow .glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbFloat 8s ease-in-out infinite alternate;
}

.welcome-bg-glow .glow-orb:nth-child(1) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    top: -80px;
    right: -60px;
    animation-delay: 0s;
}

.welcome-bg-glow .glow-orb:nth-child(2) {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    bottom: 20%;
    left: -80px;
    animation-delay: 2s;
}

.welcome-bg-glow .glow-orb:nth-child(3) {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #d97706, transparent 70%);
    bottom: -50px;
    right: 20%;
    animation-delay: 4s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.1); }
    100% { transform: translate(-15px, 15px) scale(0.95); }
}

/* ---- Main Container ---- */
.welcome-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 24px 20px;
    max-width: 480px;
    margin: 0 auto;
}

/* ---- Product Grid (Luxury Mosaic) ---- */
.welcome-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(110px, auto);
    gap: 12px;
    width: 100%;
    margin-bottom: 25px;
    perspective: 1200px;
}

.welcome-product-card {
    --card-accent: rgba(167, 139, 250, 0.5);
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #111118;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s ease;
    animation: cardReveal 0.8s ease-out both;
    cursor: default;
}

/* Gradient border effect */
.welcome-product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1.5px;
    background: linear-gradient(
        135deg,
        var(--card-accent) 0%,
        transparent 40%,
        transparent 60%,
        var(--card-accent) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.welcome-product-card:hover::before {
    opacity: 1;
}

.welcome-product-card:nth-child(1) { animation-delay: 0.05s; }
.welcome-product-card:nth-child(2) { animation-delay: 0.12s; }
.welcome-product-card:nth-child(3) { animation-delay: 0.19s; }
.welcome-product-card:nth-child(4) { animation-delay: 0.26s; }
.welcome-product-card:nth-child(5) { animation-delay: 0.33s; }
.welcome-product-card:nth-child(6) { animation-delay: 0.40s; }
.welcome-product-card:nth-child(7) { animation-delay: 0.47s; }
.welcome-product-card:nth-child(8) { animation-delay: 0.54s; }
.welcome-product-card:nth-child(9) { animation-delay: 0.61s; }

@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8) rotateX(20deg);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0);
    }
}

.welcome-product-card:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 30px var(--card-accent);
}

/* Large card spanning 2 columns */
.welcome-product-card.card-large {
    grid-column: span 2;
    grid-row: span 2;
    border-radius: 22px;
    aspect-ratio: auto;
}

.welcome-product-card.card-large::before {
    border-radius: 22px;
}

/* Card Inner */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

/* Image Wrapper */
.card-img-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.5s ease;
    filter: brightness(0.85) saturate(1.1);
}

.welcome-product-card:hover .card-img-wrapper img {
    transform: scale(1.12);
    filter: brightness(0.7) saturate(1.2);
}

/* Gradient Overlay */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 30%,
        rgba(0, 0, 0, 0.2) 60%,
        rgba(0, 0, 0, 0.85) 100%
    );
    z-index: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.welcome-product-card:hover .card-overlay {
    background: linear-gradient(
        180deg,
        transparent 10%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

/* Card Content (Product Name & Category) */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    z-index: 2;
    transform: translateY(4px);
    transition: transform 0.4s ease;
}

.welcome-product-card:hover .card-content {
    transform: translateY(0);
}

.card-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.55rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.card-title {
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Large card has bigger text */
.welcome-product-card.card-large .card-content {
    padding: 18px;
}

.welcome-product-card.card-large .card-category {
    font-size: 0.65rem;
    padding: 4px 12px;
    margin-bottom: 8px;
}

.welcome-product-card.card-large .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    -webkit-line-clamp: 3;
}

/* Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        var(--card-accent) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: soft-light;
}

.welcome-product-card:hover .card-glow {
    opacity: 0.4;
}

/* Shimmer sweep */
.card-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.06),
        transparent
    );
    z-index: 2;
    animation: cardShimmer 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cardShimmer {
    0%, 100% { left: -100%; }
    50% { left: 200%; }
}

/* ---- Content Section ---- */
.welcome-content {
    text-align: center;
    margin-bottom: 25px;
    animation: contentFadeUp 1s ease-out 0.6s both;
}

@keyframes contentFadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.welcome-content h1 .highlight {
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #f59e0b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.welcome-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
    font-weight: 400;
}

/* ---- CTA Button ---- */
.welcome-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 32px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 40%, #ec4899 100%);
    background-size: 200% auto;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35),
                0 4px 15px rgba(236, 72, 153, 0.2);
    text-decoration: none;
    margin-bottom: 15px;
    animation: contentFadeUp 1s ease-out 0.9s both;
    letter-spacing: 0.3px;
}

.welcome-cta-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.45),
                0 6px 20px rgba(236, 72, 153, 0.3);
}

.welcome-cta-btn:active {
    transform: translateY(1px) scale(0.98);
}

.welcome-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: btnShimmer 3s infinite;
}

@keyframes btnShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.welcome-cta-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.welcome-cta-btn:hover i {
    transform: translateX(4px);
}

/* ---- Login Link ---- */
.welcome-login-link {
    text-align: center;
    animation: contentFadeUp 1s ease-out 1.1s both;
}

.welcome-login-link span {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    font-weight: 400;
}

.welcome-login-link a {
    color: #a78bfa;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.welcome-login-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #ec4899);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.welcome-login-link a:hover {
    color: #c4b5fd;
}

.welcome-login-link a:hover::after {
    width: 100%;
}

/* ---- Trust Badges ---- */
.welcome-trust-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    animation: contentFadeUp 1s ease-out 1.3s both;
    width: 100%;
}

.welcome-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.welcome-trust-item i {
    font-size: 1.2rem;
    color: #a78bfa;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.welcome-trust-item span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-align: center;
    max-width: 80px;
    line-height: 1.3;
}

/* ---- Floating Particles ---- */
.welcome-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.welcome-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(167, 139, 250, 0.4);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

.welcome-particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; width: 2px; height: 2px; }
.welcome-particle:nth-child(2) { left: 25%; animation-duration: 15s; animation-delay: 2s; width: 4px; height: 4px; background: rgba(236, 72, 153, 0.3); }
.welcome-particle:nth-child(3) { left: 45%; animation-duration: 10s; animation-delay: 4s; }
.welcome-particle:nth-child(4) { left: 65%; animation-duration: 14s; animation-delay: 1s; width: 2px; height: 2px; background: rgba(245, 158, 11, 0.3); }
.welcome-particle:nth-child(5) { left: 80%; animation-duration: 11s; animation-delay: 3s; }
.welcome-particle:nth-child(6) { left: 90%; animation-duration: 13s; animation-delay: 5s; width: 4px; height: 4px; background: rgba(167, 139, 250, 0.2); }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-20px) rotate(720deg);
        opacity: 0;
    }
}

/* ---- Logo Section ---- */
.welcome-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px; /* Dikecilin dikit biar nggak makan tempat */
    animation: logoReveal 1s ease-out 0.2s both;
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.welcome-logo img {
    height: 140px; /* Diperbesar 2x lipat! */
    filter: drop-shadow(0 4px 15px rgba(167, 139, 250, 0.3));
}

/* ---- Responsive ---- */
@media (min-width: 481px) {
    .welcome-container {
        padding: 60px 32px 40px;
    }

    .welcome-product-grid {
        gap: 16px;
    }

    .welcome-content h1 {
        font-size: 2.4rem;
    }

    .welcome-content p {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .welcome-container {
        padding: 30px 18px 30px;
    }

    .welcome-product-grid {
        gap: 10px;
    }

    .welcome-content h1 {
        font-size: 1.7rem;
    }

    .welcome-cta-btn {
        padding: 16px 24px;
        font-size: 0.95rem;
    }

    .welcome-trust-badges {
        gap: 16px;
    }
}

/* ---- Tablet View (768px - 991px) ---- */
@media (min-width: 768px) and (max-width: 991px) {
    .welcome-container {
        max-width: 650px;
        padding: 50px 30px 40px;
    }
    
    .welcome-content h1 {
        font-size: 2.6rem;
    }
    
    .welcome-product-grid {
        gap: 16px;
    }
    
    .welcome-cta-btn {
        max-width: 360px;
    }
    
    .welcome-trust-badges {
        gap: 30px;
    }
}

/* ---- Ultra Luxury Desktop / PC / Laptop View (>= 992px) ---- */
@media (min-width: 992px) {
    .welcome-page-body {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .welcome-container {
        max-width: 1240px;
        width: 92%;
        padding: 40px 20px;
        min-height: 100vh;
        display: grid;
        grid-template-columns: 1.15fr 1fr;
        grid-template-areas: 
            "logo grid"
            "content grid"
            "cta grid"
            "login grid"
            "trust grid";
        gap: 15px 70px;
        align-content: center;
        align-items: center;
        justify-content: center;
        margin: auto;
    }
    
    .welcome-logo {
        grid-area: logo;
        justify-content: flex-start;
        margin-bottom: 5px;
    }
    
    .welcome-logo img {
        height: 120px;
    }

    .welcome-content {
        grid-area: content;
        text-align: left;
        margin-bottom: 10px;
    }
    
    .welcome-content h1 {
        font-size: 3.2rem;
        line-height: 1.2;
        letter-spacing: -0.5px;
        margin-bottom: 16px;
    }
    
    .welcome-content p {
        font-size: 1.05rem;
        color: rgba(255, 255, 255, 0.75);
        max-width: 520px;
        line-height: 1.6;
    }
    
    .welcome-product-grid {
        grid-area: grid;
        margin-bottom: 0;
        max-width: 520px;
        justify-self: center;
        gap: 16px;
        perspective: 1500px;
    }
    
    .welcome-product-card {
        border-radius: 20px;
    }

    .welcome-product-card:hover {
        transform: translateY(-8px) scale(1.05);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px var(--card-accent);
    }
    
    .welcome-cta-btn {
        grid-area: cta;
        max-width: 320px;
        margin-top: 5px;
        padding: 16px 32px;
        font-size: 1.05rem;
    }
    
    .welcome-login-link {
        grid-area: login;
        text-align: left;
        margin-top: 0;
    }
    
    .welcome-trust-badges {
        grid-area: trust;
        justify-content: flex-start;
        gap: 28px;
        margin-top: 15px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
        max-width: 540px;
    }
    
    .welcome-trust-item {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    
    .welcome-trust-item i {
        font-size: 1.3rem;
    }
    
    .welcome-trust-item span {
        text-align: left;
        max-width: none;
        font-size: 0.78rem;
        white-space: nowrap;
    }
}

