@import url('https://fonts.googleapis.com/css2?family=DotGothic16&family=Montserrat:wght@400;700;900&family=Noto+Sans+JP:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
}

.font-pixel {
    font-family: 'DotGothic16', sans-serif;
}

.font-modern {
    font-family: 'Montserrat', sans-serif;
}

/* Grid Background Pattern */
.bg-grid {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.bg-grid-dark {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

/* Scanline Animation */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.animate-scanline {
    animation: scanline 1.5s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Floating Animations */
@keyframes float1 {

    0%,
    100% {
        transform: translateY(0) rotate(10deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translateY(0) rotate(-15deg);
    }

    50% {
        transform: translateY(30px) rotate(-15deg);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translateX(0) rotate(5deg);
    }

    50% {
        transform: translateX(20px) rotate(5deg);
    }
}

@keyframes float4 {

    0%,
    100% {
        transform: translateX(0) rotate(-5deg);
    }

    50% {
        transform: translateX(-20px) rotate(-5deg);
    }
}

.animate-float1 {
    animation: float1 4s ease-in-out infinite;
}

.animate-float2 {
    animation: float2 5s ease-in-out infinite;
}

.animate-float3 {
    animation: float3 6s ease-in-out infinite;
}

.animate-float4 {
    animation: float4 7s ease-in-out infinite;
}

/* Scroll Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* --- NEW VISUAL EFFECTS --- */

/* 1. Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    /* Matches hero bg */
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #00ffff;
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #ff00ff;
    clip-path: inset(12% 0 58% 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
    }

    80% {
        clip-path: inset(10% 0 70% 0);
    }

    100% {
        clip-path: inset(30% 0 20% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
    }

    20% {
        clip-path: inset(80% 0 5% 0);
    }

    40% {
        clip-path: inset(30% 0 20% 0);
    }

    60% {
        clip-path: inset(10% 0 80% 0);
    }

    80% {
        clip-path: inset(50% 0 30% 0);
    }

    100% {
        clip-path: inset(70% 0 10% 0);
    }
}

/* 2. Typing Cursor */
.typing-text::after {
    content: '|';
    animation: cursor-blink 1s step-start infinite;
    color: #4ade80;
    /* green-400 */
}

@keyframes cursor-blink {
    50% {
        opacity: 0;
    }
}

/* 3. 3D Tilt */
.perspective-1000 {
    perspective: 1000px;
}

.tilt-card {
    transform-style: preserve-3d;
    /* transition will be handled by JS for smoothness */
}

.tilt-content {
    transform: translateZ(50px);
}