/* NS Cloud Linux - Main Design System & Typography */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f8fafc;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Thai', sans-serif;
    overflow-x: hidden;
}

code, kbd, samp, pre {
    font-family: 'JetBrains Mono', monospace;
}

/* Clearbit Signature Soft Mesh Gradient Background */
.clearbit-mesh {
    background:
        radial-gradient(circle at 72% 28%, rgba(124, 58, 237, 0.22) 0%, rgba(79, 70, 229, 0.12) 32%, transparent 65%),
        radial-gradient(circle at 86% 65%, rgba(56, 189, 248, 0.20) 0%, rgba(99, 102, 241, 0.08) 40%, transparent 70%),
        radial-gradient(circle at 18% 85%, rgba(139, 92, 246, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Distro Specific Mesh Variations */
.ubuntu-mesh {
    background:
        radial-gradient(circle at 75% 25%, rgba(249, 115, 22, 0.18) 0%, rgba(234, 88, 12, 0.08) 32%, transparent 65%),
        radial-gradient(circle at 85% 70%, rgba(225, 29, 72, 0.12) 0%, rgba(249, 115, 22, 0.05) 40%, transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.rhel-mesh {
    background:
        radial-gradient(circle at 75% 25%, rgba(239, 68, 68, 0.20) 0%, rgba(190, 18, 60, 0.08) 32%, transparent 65%),
        radial-gradient(circle at 85% 70%, rgba(245, 158, 11, 0.14) 0%, transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.arch-mesh {
    background:
        radial-gradient(circle at 75% 25%, rgba(14, 165, 233, 0.22) 0%, rgba(2, 132, 199, 0.08) 32%, transparent 65%),
        radial-gradient(circle at 85% 70%, rgba(99, 102, 241, 0.14) 0%, transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.alpine-mesh {
    background:
        radial-gradient(circle at 75% 25%, rgba(37, 99, 235, 0.20) 0%, rgba(30, 58, 138, 0.08) 32%, transparent 65%),
        radial-gradient(circle at 85% 70%, rgba(56, 189, 248, 0.14) 0%, transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.usb-mesh {
    background:
        radial-gradient(circle at 75% 25%, rgba(99, 102, 241, 0.20) 0%, rgba(79, 70, 229, 0.08) 32%, transparent 65%),
        radial-gradient(circle at 85% 70%, rgba(139, 92, 246, 0.14) 0%, transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.matrix-mesh {
    background:
        radial-gradient(circle at 75% 25%, rgba(139, 92, 246, 0.20) 0%, rgba(124, 58, 237, 0.08) 32%, transparent 65%),
        radial-gradient(circle at 85% 70%, rgba(217, 70, 239, 0.12) 0%, transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Dot Matrix Pattern */
.dot-matrix {
    background-image: radial-gradient(rgba(79, 70, 229, 0.28) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Card hover animation */
.hover-lift {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Universal Dropdown Hover Bridge & Click-to-lock State */
.group {
    position: relative;
}

/* Ensure dropdown sits directly below button with zero dead zone */
.group > div[class*="absolute"] {
    top: 100%;
}

/* Invisible Hitbox Bridge: prevents mouseout when moving cursor down */
.group > div[class*="absolute"]::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    display: block;
    pointer-events: auto;
    z-index: 40;
}

/* Support click toggle via is-open class */
.group.is-open > div[class*="absolute"] {
    display: block !important;
}

/* Smooth arrow flip on hover or active open */
.group:hover button i[data-lucide="chevron-down"],
.group.is-open button i[data-lucide="chevron-down"] {
    transform: rotate(180deg);
}

button i[data-lucide="chevron-down"] {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   Modern Entrance Animations (Slower, Majestic & Relaxed)
   ======================================================== */

/* Top Energy Beam that sweeps gracefully when entering the website */
.top-glow-beam {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4, #a855f7, #3b82f6);
    background-size: 200% 100%;
    z-index: 9999;
    pointer-events: none;
    animation: beamSweep 5.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes beamSweep {
    0% {
        transform: scaleX(0);
        transform-origin: left;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    70% {
        transform: scaleX(1);
        transform-origin: left;
        opacity: 1;
    }
    100% {
        transform: scaleX(1);
        opacity: 0;
    }
}

/* Page header entrance - Slow & smooth */
.anim-header {
    animation: headerSlideDown 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Ensure navbar items never cramp or wrap onto multiple lines */
.anim-header a,
.anim-header button,
.anim-header nav a,
.anim-header nav button {
    white-space: nowrap !important;
    word-break: keep-all !important;
}

@keyframes headerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered Hero text entrances - Slow, comfortable pacing to read */
.anim-fade-up-1 {
    animation: heroFadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.anim-fade-up-2 {
    animation: heroFadeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

.anim-fade-up-3 {
    animation: heroFadeUp 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

.anim-fade-up-4 {
    animation: heroFadeUp 1.6s cubic-bezier(0.16, 1, 0.3, 1) 1.15s both;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Server Chassis 3D Float & Entrance - Majestic 2.2s entrance + 9s gentle float */
.anim-server-float {
    animation: serverGlideIn 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both, floatPerpetual 9s ease-in-out 2.6s infinite;
}

@keyframes serverGlideIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.92);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes floatPerpetual {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(0.4deg);
    }
}

/* Ambient glow behind server hardware */
.server-ambient-glow {
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(56, 189, 248, 0.14) 45%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    animation: pulseAmbient 7s ease-in-out infinite alternate;
}

@keyframes pulseAmbient {
    0% {
        transform: scale(0.92) translate(-15px, 10px);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.15) translate(15px, -15px);
        opacity: 0.85;
    }
}

/* ========================================================
   Scroll-Driven Reveal (Gives user plenty of time to scroll & observe)
   ======================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1), transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

/* Stagger delays for child items during scroll */
.delay-100 { transition-delay: 0.18s; }
.delay-200 { transition-delay: 0.36s; }
.delay-300 { transition-delay: 0.54s; }
.delay-400 { transition-delay: 0.72s; }

/* Card entrance on render */
.command-card-anim {
    animation: cardPop 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardPop {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================
   GPU VPS Hourly Rental & Range Slider Styles
   ======================================================== */
.gpu-gradient-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.gpu-glow-border {
    position: relative;
}

.gpu-glow-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(56, 189, 248, 0.4), rgba(168, 85, 247, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Custom Interactive Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 9999px;
    outline: none;
    transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.45);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.18);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.6);
}

input[type="range"]::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.45);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Backdrop Blur */
.modal-backdrop-blur {
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

