body {
    background-color: #050505;
    color: #f3f4f6;
    /* Lighter default text (Gray-100) */
    overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
    background: #4B5563;
    /* Lighter thumb */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* Utility for reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Glitch effect on hover for logo */
.glitch-hover:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #60A5FA;
}

@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

/* Button Glow */
.btn-glow {
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: color 0.3s;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #3B82F6, #06B6D4);
    z-index: -1;
    transition: transform 0.4s ease;
    transform: scaleX(0);
    transform-origin: right;
}

.btn-glow:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Canvas container */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    /* Above background image, below content */
    opacity: 0.4;
    /* Slightly reduced opacity so text pops more */
    pointer-events: none;
}

/* Common Background Settings for Sections */
.section-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    z-index: 0;
}

/* Darker overlay for better text contrast */
.section-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    /* Increased opacity from 0.75 */
    z-index: 1;
}

/* Specific Section Backgrounds */
/* Specific Section Backgrounds */
/* Hero Slideshow */
.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: 200% 200%;
    /* Larger size for gradient movement */
    background-position: center;
    background-attachment: scroll;
    opacity: 0;
    animation: slideshow 24s linear infinite;
}

/* Deep Cyber Blue & Black Gradients */
.gradient-bg-1 {
    background: radial-gradient(circle at 10% 20%, rgb(0, 0, 0) 0%, rgb(5, 10, 30) 90.2%);
}

.gradient-bg-2 {
    background: linear-gradient(109.6deg, rgb(10, 10, 10) 11.2%, rgb(4, 20, 40) 91.1%);
}

.gradient-bg-3 {
    background: radial-gradient(circle at 50% 50%, rgb(15, 23, 42) 0%, rgb(0, 0, 0) 100%);
}

/* Feature Image Replacements (CSS Patterns) */
.feature-img-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.feature-gradient-design {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.feature-gradient-mobile {
    background: linear-gradient(135deg, #022c22 0%, #111827 100%);
}

.feature-gradient-price {
    background: linear-gradient(135deg, #312e81 0%, #111827 100%);
}

.feature-icon-bg {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    transform: rotate(-15deg) scale(1.5);
    transition: transform 0.5s ease;
}

.feature-img-box:hover .feature-icon-bg {
    transform: rotate(0deg) scale(1.8);
    color: rgba(255, 255, 255, 0.1);
}

/* Stagger animations for 3 slides, total 24s cycle */
/* Slide 1: 0-8s show, 8-24s hide */
.slide-bg:nth-child(1) {
    animation-delay: 0s;
}

/* Slide 2: 8-16s show, 0-8s & 16-24s hide */
.slide-bg:nth-child(2) {
    animation-delay: 8s;
}

/* Slide 3: 16-24s show, 0-16s hide */
.slide-bg:nth-child(3) {
    animation-delay: 16s;
}

@keyframes slideshow {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    4% {
        opacity: 1;
    }

    33% {
        opacity: 1;
    }

    37% {
        opacity: 0;
    }

    100% {
        opacity: 0;
        transform: scale(1.15);
    }
}

.bg-problem {
    background-image: url('../img/bg_problem.png');
}

.bg-usp {
    background-image: url('../img/bg_usp.png');
}

.bg-pricing {
    background-image: url('../img/bg_pricing.png');
}

.bg-works {
    background-image: url('../img/bg_hero.png');
    /* Temporary or reuse hero if suitable, or leave external? No, user said ALL. I will reuse bg_hero or maybe Problem bg for Works as it's dark/abstract */
    /* Reusing hero background for works for consistency if no specific one exists */
}

.bg-flow {
    background-image: url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
}

.bg-contact {
    background-image: url('https://images.unsplash.com/photo-1557200199-354b85495ccc?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
}

.bg-about {
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
}

.section-content {
    position: relative;
    z-index: 10;
}

/* Nav Item Styles */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    cursor: pointer;
}

.nav-en {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-jp {
    font-size: 0.6rem;
    font-weight: 400;
    color: #9CA3AF;
    transition: color 0.3s;
}

.group:hover .nav-jp {
    color: #60A5FA;
}

/* SPA View Management */
.view-section {
    display: none;
    min-height: 100vh;
    padding-top: 100px;
    /* Offset for fixed header */
    animation: fadeIn 0.5s ease-out;
}

.view-section.active {
    display: block;
}

#home-view {
    padding-top: 0;
    /* Hero section handles its own spacing */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(90deg, rgba(18, 18, 18, 0.9) 0%, rgba(5, 5, 5, 0.9) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 0;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
}

/* Contact Form Iframe Placeholder */
.google-form-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%;
    /* Default Aspect Ratio */
}

@media (min-width: 768px) {
    .google-form-container {
        padding-top: 60%;
        /* Taller on desktop */
    }
}

.google-form-iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    /* Google Forms are white */
}

/* Typing Cursor Logic */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #3B82F6;
    margin-left: 2px;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Marquee Animation */
.animate-marquee {
    animation: marquee 25s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Ensure spans have height even when empty to maintain layout */
.splash-text-line {
    min-height: 1em;
}

/* Text Highlighting */
.highlight {
    background: linear-gradient(120deg, transparent 0%, transparent 10%, rgba(59, 130, 246, 0.4) 10%, rgba(59, 130, 246, 0.4) 90%, transparent 90%);
}