/* Kiplay Modern Styles - Pastel Blue Theme */

:root {
    /* Pastel Blue Accent (Softer, modern, tech-forward) */
    --primary-color: #82b1ff; 
    
    /* Backgrounds: Deep black/purple base */
    --background-black: #0a0a0f; 
    --background-dark: #14141a; /* For cards/sections */
    
    /* Text Colors: High Contrast */
    --text-white: #ffffff;
    --text-grey: #cccccc; /* Lighter grey for better visibility on dark bg */
    --text-muted: #888888; /* For less important details */

    --border-dark: #2a2a35;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-black);
    color: var(--text-white);
    -webkit-font-smoothing: antialiased;
    position: relative;
    width: 100%;
    min-height: 100%;
    /* overflow-x handled in html to prevent sticky scroll */
}

strong {
    color: var(--text-white) !important;
    font-weight: 700;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: var(--background-black); /* Fix white bottom overscroll */
    height: 100%;
    scrollbar-color: #333 var(--background-dark); /* Firefox support */
    scrollbar-width: thin;
}

/* Custom Scrollbar (Webkit) */
::-webkit-scrollbar {
    width: 10px;
    background: var(--background-black);
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
    border-left: 1px solid var(--border-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid var(--background-dark); /* Creates padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 1. Cinematic Noise Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03; /* Very subtle texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Glassmorphism Navbar */
.navbar.navbar-glass {
    background: rgba(10, 10, 15, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.navbar.navbar-glass.is-active,
.navbar-menu.is-active {
    background: rgba(10, 10, 15, 0.95) !important;
}

/* Typography */
.title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-white) !important;
}

.title.is-size-huge {
    font-size: 5rem;
    line-height: 1.1;
    background: linear-gradient(to right, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-grey) !important;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

/* Layout */
.section {
    padding: 6rem 1.5rem;
}

.is-fullheight {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
}

/* Colors Utilities */
.has-text-primary {
    color: var(--primary-color) !important;
}

.has-text-grey-light {
    color: var(--text-grey) !important;
}

/* Override Bulma defaults */
.has-background-black {
    background-color: var(--background-black) !important;
}

.has-background-black-bis {
    background-color: var(--background-dark) !important;
}

.has-text-grey-dark {
    color: #888 !important; /* Softened grey for better visibility */
}

strong {
    color: #dddddd !important; /* Off-white for bold text, less jarring */
    font-weight: 700;
}

.has-text-grey-darker {
    color: #444 !important;
}

.hover-white {
    transition: color 0.2s ease;
}

.hover-white:hover {
    color: var(--text-white) !important;
}

/* Footer heading adjustment */
.heading.has-text-grey-dark {
    color: var(--text-muted) !important; /* Brighter for headers */
    letter-spacing: 0.1em;
}

/* Buttons */
.button {
    transition: all 0.3s ease;
    border: none;
    font-weight: 600;
}

.button.is-primary {
    background: linear-gradient(135deg, #82b1ff 0%, #2979ff 100%);
    color: #0a0a0f; /* Dark text on light button for contrast */
    box-shadow: 0 4px 15px rgba(130, 177, 255, 0.3);
}

.button.is-primary:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #64b5f6 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(130, 177, 255, 0.5);
    color: #0a0a0f;
}

.button.is-success {
    background: linear-gradient(135deg, #96E696 0%, #48c774 100%);
    color: #0a0a0f; /* Dark text for contrast */
    box-shadow: 0 4px 15px rgba(150, 230, 150, 0.3);
}

.button.is-success:hover {
    background: linear-gradient(135deg, #b2f0b2 0%, #5ed185 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(150, 230, 150, 0.5);
    color: #0a0a0f;
}

.button.is-white.is-outlined {
    background-color: transparent;
    border: 1px solid rgba(130, 177, 255, 0.4);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(130, 177, 255, 0.1);
}

.button.is-white.is-outlined:hover {
    border-color: var(--primary-color);
    background-color: rgba(130, 177, 255, 0.12);
    box-shadow: 0 8px 25px rgba(130, 177, 255, 0.25);
    transform: translateY(-2px);
    color: var(--text-white);
}

/* Navbar */
.navbar {
    background-color: rgba(10, 10, 15, 0.9); /* Matching background-black */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
}

.navbar-item img {
    max-height: 2.5rem;
}

/* Features Cards */
.feature-item {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 3rem 2rem;
    background-color: var(--background-dark);
    z-index: 1;
    min-height: 320px; /* Ensure space for image */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content by default */
}

.feature-bg {
    position: absolute;
    top: -2px; /* 2px crop */
    left: -2px;
    right: -2px;
    bottom: -2px;
    background-size: cover;
    background-position: center;
    opacity: 0.15; 
    filter: grayscale(100%);
    transition: all 0.5s ease;
    z-index: -1;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.feature-item:hover .feature-bg {
    opacity: 1; /* Full visibility */
    transform: scale(1.05);
    filter: grayscale(0%);
}

.feature-item .icon, 
.feature-item .subtitle {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.feature-item:hover .icon,
.feature-item:hover .subtitle {
    opacity: 0;
    transform: translateY(-20px);
}

.feature-item .title {
    transition: all 0.4s ease;
    transform: translateY(0);
}

.feature-item:hover .title {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center; /* Center the title */
    padding: 0 1.5rem; /* Add horizontal padding */
    font-size: 1.25rem !important; /* Smaller font (is-size-5 approx) */
    text-shadow: 0 2px 8px rgba(0,0,0,0.9); /* Stronger shadow for legibility */
    transform: translateY(0);
    margin: 0;
}

/* Ensure title stays visible above image */
.feature-item .title {
    position: relative;
    z-index: 2;
}

/* Clickable Features */
.feature-item.clickable {
    cursor: pointer;
}

/* Download Section Cards */
.box, .p-6.has-background-black-bis {
    background-color: var(--background-dark) !important;
    border: 1px solid var(--border-dark) !important;
    transition: transform 0.3s ease;
}

.p-6.has-background-black-bis:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
}

/* Call to Action Buttons */
.cta-btn {
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(130, 177, 255, 0.3) !important;
}

.cta-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
    transition: 0s;
}

/* Abstract Blob for Hero - Updated Gradient */
.blob-container {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.blob {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #82b1ff 0%, #2962ff 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: blob-bounce 12s infinite ease-in-out;
    filter: blur(80px);
    opacity: 0.4;
}

@keyframes blob-bounce {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translate(0, 0) scale(1);
    }
    33% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
        transform: translate(30px, -40px) scale(1.1);
    }
    66% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Hero Foreground Blur (New) */
.hero-foreground-blur {
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(130, 177, 255, 0.05) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 2;
    pointer-events: none;
}

/* Hero Tilt Card (New) */
.tilt-card {
    transition: transform 0.1s ease-out; /* Fast response for mouse movement */
    transform-style: preserve-3d;
    will-change: transform;
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .title.is-size-huge {
        font-size: 3rem;
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .mega-footer {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }
}

/* Carousel Gallery Styles */
.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 2rem 0; /* Space for hover effects */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border-dark);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: zoom-in; /* Indicate clickable */
    
    /* Carousel Specifics */
    flex: 0 0 80%; /* Show 80% width on mobile */
    min-width: 300px;
    scroll-snap-align: center;
}

/* Desktop sizing for carousel items */
@media screen and (min-width: 769px) {
    .gallery-item {
        flex: 0 0 600px; /* Fixed width on desktop */
    }
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.6s ease;
    transform: scale(1.01);
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    z-index: 2;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

@media (hover: none) {
    .gallery-caption {
        opacity: 0.75;
        transform: translateY(0);
    }

    .gallery-item:active .gallery-caption {
        opacity: 1;
    }
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--border-dark);
    color: var(--text-white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(130, 177, 255, 0.4);
    color: #0a0a0f;
}

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

@media screen and (max-width: 768px) {
    .carousel-btn { display: none; } /* Hide buttons on mobile, swipe is natural */
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: var(--border-dark);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Expand touch target without affecting visual size */
    position: relative;
}

.carousel-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
}

.carousel-dot:hover {
    background: var(--text-muted);
}

.carousel-dot.active {
    width: 24px;
    background: var(--primary-color);
}

/* Lightbox Modal */
.modal-content {
    width: auto;
    max-width: 90vw;
}

.modal-content img {
    transform: scale(1.01);
}

.modal-background {
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
}

.modal-close {
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--primary-color);
}

/* 2. Scroll Animation Classes */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Mega Footer */
.mega-footer {
    position: relative;
    overflow: hidden;
    padding-top: 8rem;
    padding-bottom: 4rem;
    background: linear-gradient(to bottom, var(--background-black) 0%, #0f0f13 100%);
    border-top: 1px solid var(--border-dark);
    z-index: 10; /* Ensure above noise */
}

/* Text Gradients & Animation */
.text-gradient-primary {
    background: linear-gradient(135deg, #ffffff 0%, var(--text-grey) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-animated {
    background: linear-gradient(
        to right,
        #ffffff 20%,
        var(--primary-color) 50%,
        #ffffff 80%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 5s linear infinite;
}

@keyframes gradient-shift {
    to {
        background-position: 200% center;
    }
}

/* 5. Floating Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; /* Behind content, above bg */
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    20% {
        opacity: 0.5;
    }
    80% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-10vh) translateX(50px);
        opacity: 0;
    }
}

/* Hero Monitor Frame */
.hero-monitor {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 1497 / 1029;
    background: #050505;
    /* Monitor Bezel */
    border-radius: 16px;
    border: 16px solid #1a1a1a;
    border-bottom-width: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 10px rgba(0,0,0,1);
    box-sizing: content-box;
    z-index: 2;
}

/* Power indicator light on the bottom bezel */
.hero-monitor::after {
    content: '';
    position: absolute;
    bottom: -24px;
    right: 40px;
    width: 8px;
    height: 8px;
    background: #0f0; /* Green light */
    border-radius: 50%;
    box-shadow: 0 0 8px #0f0;
    transition: background 0.3s, box-shadow 0.3s;
}

.hero-monitor.off::after {
    background: #f00; /* Red light */
    box-shadow: 0 0 8px #f00;
}

.monitor-screen {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

/* TV On/Off Animations */
.tv-off-effect {
    animation: tv-off 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.tv-on-effect {
    animation: tv-on 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes tv-off {
    0% {
        transform: scale(1, 1);
        opacity: 1;
        filter: brightness(1);
    }
    40% {
        transform: scale(1, 0.005);
        opacity: 1;
        filter: brightness(2);
    }
    70% {
        transform: scale(0.005, 0.005);
        opacity: 1;
        filter: brightness(3);
    }
    100% {
        transform: scale(0, 0);
        opacity: 0;
        filter: brightness(0);
    }
}

@keyframes tv-on {
    0% {
        transform: scale(0, 0);
        opacity: 0;
        filter: brightness(0);
    }
    30% {
        transform: scale(0.005, 0.005);
        opacity: 1;
        filter: brightness(3);
    }
    60% {
        transform: scale(1, 0.005);
        opacity: 1;
        filter: brightness(2);
    }
    100% {
        transform: scale(1, 1);
        opacity: 1;
        filter: brightness(1);
    }
}
.slide-img {
    position: absolute;
    top: -2px; /* 2px crop */
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide-img.active {
    opacity: 1;
}

/* Glass Reflection Overlay */
.monitor-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 3;
}

/* Coming Soon Overlay Elements */
.is-coming-soon {
    position: relative;
    overflow: hidden;
    pointer-events: none; /* Disable clicks on underlying content */
}
.is-coming-soon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10;
    border-radius: inherit;
}
.coming-soon-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--primary-color);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 11;
    text-align: center;
    width: max-content;
    max-width: 95%;
    pointer-events: auto;
}

/* Form Elements (Contact Modal & General) */
.custom-form-element {
    background-color: var(--background-black) !important;
    border: 1px solid var(--border-dark) !important;
    color: var(--text-white) !important;
    border-radius: 8px !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
}

.custom-form-element:focus,
.custom-form-element:hover {
    border-color: var(--primary-color) !important;
    background-color: #0c0c12 !important;
    box-shadow: 0 0 0 2px rgba(130, 177, 255, 0.15) !important;
}

.custom-form-element::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

/* Modal Close Button Override for dark theme */
.modal-card-head .delete {
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.modal-card-head .delete:hover {
    background-color: var(--primary-color);
}
