/* NanoTekno Web Services - Premium Dark Theme CSS */

/* System Font Stack */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark Grid Pattern */
.dark-grid-pattern {
    background-image: 
        linear-gradient(rgba(47, 128, 237, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 128, 237, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Premium Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(to right, #2F80ED, #1d68d4);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(47, 128, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 128, 237, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(47, 128, 237, 0.5);
}

/* Pricing Cards */
.pricing-card {
    position: relative;
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.6), rgba(5, 11, 24, 0.6));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(47, 128, 237, 0.3);
    box-shadow: 0 20px 40px rgba(47, 128, 237, 0.1);
}

.pricing-card-featured {
    position: relative;
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.8), rgba(5, 11, 24, 0.8));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(242, 201, 76, 0.3);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.pricing-card-featured:hover {
    transform: translateY(-8px);
    border-color: rgba(242, 201, 76, 0.5);
    box-shadow: 0 20px 40px rgba(242, 201, 76, 0.2);
}

/* Template Cards */
.template-card {
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.6), rgba(5, 11, 24, 0.6));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-8px);
    border-color: rgba(47, 128, 237, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.template-preview {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--tw-gradient-from), var(--tw-gradient-to));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.template-card:hover .template-preview {
    transform: scale(1.05);
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: rgba(47, 128, 237, 0.1);
    color: #2F80ED;
    border: 1px solid rgba(47, 128, 237, 0.2);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-template-primary {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, #2F80ED, #1d68d4);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.btn-template-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 128, 237, 0.3);
}

.btn-template-secondary {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.btn-template-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Feature Cards */
.feature-card {
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.4), rgba(5, 11, 24, 0.4));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--tw-gradient-from), var(--tw-gradient-to));
    border: 1px solid;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Scroll Reveal Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for reveal */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Floating WhatsApp Widget */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6);
}

.wa-icon {
    width: 36px;
    height: 36px;
}

.wa-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #DC2626;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid #25D366;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Disable animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal-delay-1,
    .reveal-delay-2,
    .reveal-delay-3,
    .reveal-delay-4,
    .reveal-delay-5,
    .reveal-delay-6 {
        transition-delay: 0s;
    }

    .wa-float:hover {
        transform: none;
    }

    .wa-badge {
        animation: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Template Library Specific Styles */

/* Filter Buttons */
.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: #9CA3AF;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(47, 128, 237, 0.3);
}

.filter-btn.active {
    background: linear-gradient(to right, #2F80ED, #1d68d4);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(47, 128, 237, 0.3);
}

/* Template Card Full */
.template-card-full {
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.6), rgba(5, 11, 24, 0.6));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.template-card-full:hover {
    transform: translateY(-8px);
    border-color: rgba(47, 128, 237, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Template Thumbnail */
.template-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--tw-gradient-from), var(--tw-gradient-to));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.template-card-full:hover .template-thumbnail {
    transform: scale(1.05);
}

/* Template Code Badge */
.template-code {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(5, 11, 24, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Feature Tags */
.feature-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: rgba(47, 128, 237, 0.1);
    color: #2F80ED;
    border: 1px solid rgba(47, 128, 237, 0.2);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Compact Pricing Cards */
.pricing-card-compact {
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.4), rgba(5, 11, 24, 0.4));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.pricing-card-compact:hover {
    transform: translateY(-4px);
    border-color: rgba(47, 128, 237, 0.3);
}

.pricing-card-compact-featured {
    position: relative;
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.6), rgba(5, 11, 24, 0.6));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(242, 201, 76, 0.3);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.pricing-card-compact-featured:hover {
    transform: translateY(-4px);
    border-color: rgba(242, 201, 76, 0.5);
    box-shadow: 0 20px 40px rgba(242, 201, 76, 0.1);
}

/* Template Item Transitions */
.template-item {
    transition: all 0.3s ease;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .wa-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    .wa-icon {
        width: 30px;
        height: 30px;
    }

    .filter-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* ========================================
   HERO SECTION - CLEAN LAYERING
   ======================================== */

/* Hero Section Container */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    padding-bottom: 6rem;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero-section {
        min-height: 105vh;
        padding-top: 10rem;
        padding-bottom: 8rem;
    }
}

/* Mobile: Minimal overlay - showcase priority */
@media (max-width: 1023px) {
    .hero-section::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to bottom,
            rgba(5, 11, 24, 0.3) 0%,
            rgba(5, 11, 24, 0.2) 50%,
            rgba(5, 11, 24, 0.3) 100%
        );
        z-index: 2;
        pointer-events: none;
    }
}

/* Background Layer (z-0) */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Visual Layer - 3D Carousel (z-1) */
.hero-visual-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: auto;
}

/* Mobile: Show carousel behind text - VERY VISIBLE */
@media (max-width: 1023px) {
    .hero-visual-layer {
        display: block;
        opacity: 1;
    }
    
    .hero-visual-container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        height: 60vh;
        max-width: 500px;
        max-height: 400px;
    }
}

.hero-visual-container {
    position: absolute;
    right: -6%;
    top: 58%;
    transform: translateY(-50%);
    width: min(62vw, 980px);
    height: min(70vh, 760px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1;
    
    /* LEFT FADE MASK - gradient dari transparent (kiri) ke opaque (kanan) */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,1) 65%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,1) 65%);
}

/* Content Wrapper - Text (z-10) */
.hero-content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    pointer-events: none;
}

/* Allow pointer events only on actual content elements */
.hero-content-wrapper > * {
    pointer-events: auto;
}

/* On desktop, limit content wrapper to left side only */
@media (min-width: 1024px) {
    .hero-content-wrapper .max-w-7xl > .grid > div:first-child {
        pointer-events: auto;
    }
}

/* Mobile: Ensure text is above overlay with strong contrast */
@media (max-width: 1023px) {
    .hero-content-wrapper {
        z-index: 20;
    }
    
    .hero-content-wrapper h1,
    .hero-content-wrapper p {
        text-shadow: 
            0 2px 12px rgba(0, 0, 0, 0.9),
            0 4px 24px rgba(0, 0, 0, 0.8),
            0 0 40px rgba(5, 11, 24, 0.95);
    }
    
    .hero-content-wrapper h1 {
        background: rgba(5, 11, 24, 0.5);
        padding: 0.5rem;
        border-radius: 0.5rem;
        backdrop-filter: blur(8px);
    }
    
    .hero-content-wrapper p {
        background: rgba(5, 11, 24, 0.6);
        padding: 0.75rem;
        border-radius: 0.5rem;
        backdrop-filter: blur(8px);
    }
}

/* ========================================
   3D SHOWCASE CAROUSEL - HERO SECTION
   ======================================== */

/* Perspective Container */
.perspective-container {
    perspective: 2000px;
    perspective-origin: center center;
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    cursor: pointer;
}

/* 3D Carousel Container - 12 ITEMS, 2 MINUTES/ROTATION */
.showcase-carousel-3d {
    position: relative;
    width: 450px;
    height: 450px;
    transform-style: preserve-3d;
    animation: rotateCarousel 120s linear infinite;
    pointer-events: auto;
    cursor: pointer;
}

/* Carousel Rotation Animation - 10x SLOWER */
@keyframes rotateCarousel {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Pulse Glow Animation */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Individual Showcase Item - 12 ITEMS, ALL 80% OPACITY */
.showcase-item {
    position: absolute;
    width: 420px;
    height: 300px;
    left: 50%;
    top: 50%;
    margin-left: -210px;
    margin-top: -150px;
    transform-style: preserve-3d;
    transform: rotateY(calc(var(--i) * 30deg)) translateZ(900px);
    transform-origin: center center;
    transition: all 0.5s ease;
    opacity: 0.8;
    pointer-events: auto;
    cursor: pointer;
}

/* All items 80% opacity - no fade gradient */

/* Showcase Frame */
.showcase-frame {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.95), rgba(5, 11, 24, 0.95));
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(47, 128, 237, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.showcase-frame:hover {
    transform: scale(1.05);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(47, 128, 237, 0.2);
    border-color: rgba(47, 128, 237, 0.3);
}

/* Hover effect - bring item to focus */
.showcase-item:hover {
    opacity: 0.95 !important;
    transform: rotateY(calc(var(--i) * 30deg)) translateZ(920px) scale(1.05);
}

/* Browser Bar */
.browser-bar {
    background: rgba(11, 31, 58, 0.8);
    padding: 0.625rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.browser-dots {
    display: flex;
    gap: 0.375rem;
}

.browser-dots span {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5f56, #ff5f56);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.browser-dots span:nth-child(2) {
    background: linear-gradient(135deg, #ffbd2e, #ffbd2e);
}

.browser-dots span:nth-child(3) {
    background: linear-gradient(135deg, #27c93f, #27c93f);
}

/* Showcase Image */
.showcase-frame img {
    width: 100%;
    height: calc(100% - 40px);
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.showcase-frame:hover img {
    transform: scale(1.02);
}

/* Pause on Hover - SIMPLE AND RELIABLE */
.hero-visual-container:hover .showcase-carousel-3d {
    animation-play-state: paused;
}

.hero-visual-layer:hover .showcase-carousel-3d {
    animation-play-state: paused;
}

.perspective-container:hover .showcase-carousel-3d {
    animation-play-state: paused;
}

.showcase-carousel-3d:hover {
    animation-play-state: paused;
}

/* Responsive Adjustments - 12 ITEMS, ALL 80% OPACITY */
@media (max-width: 1280px) {
    .showcase-carousel-3d {
        width: 380px;
        height: 380px;
    }
    
    .showcase-item {
        width: 360px;
        height: 260px;
        margin-left: -180px;
        margin-top: -130px;
        transform: rotateY(calc(var(--i) * 30deg)) translateZ(780px);
    }
}

@media (max-width: 1023px) {
    .showcase-carousel-3d {
        width: 320px;
        height: 320px;
    }
    
    .showcase-item {
        width: 300px;
        height: 220px;
        margin-left: -150px;
        margin-top: -110px;
        transform: rotateY(calc(var(--i) * 30deg)) translateZ(650px);
        opacity: 0.8;
    }
}

@media (max-width: 640px) {
    .showcase-carousel-3d {
        width: 250px;
        height: 250px;
    }
    
    .showcase-item {
        width: 240px;
        height: 170px;
        margin-left: -120px;
        margin-top: -85px;
        transform: rotateY(calc(var(--i) * 30deg)) translateZ(500px);
        opacity: 0.8;
    }
}

/* Enhanced Visual Effects */
.showcase-item::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        135deg,
        rgba(47, 128, 237, 0.1),
        rgba(242, 201, 76, 0.1)
    );
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.showcase-item:hover::before {
    opacity: 1;
}

/* Loading State for Images */
.showcase-frame img[src*="placeholder"] {
    filter: blur(2px);
    opacity: 0.7;
}


