/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0; /* Remove offset for full sections */
    /* Temporarily disable scroll-snap to see pure 100vh effect */
    /* scroll-snap-type: y proximity; */
}

/* Ensure smooth scrolling experience on all browsers */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #111111;
    background-color: #ffffff;
    overflow-x: hidden;
    font-weight: 400;
    font-feature-settings: "palt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* CSS Variables */
:root {
    --primary-blue: #007BFF;
    --secondary-green: #28C76F;
    --text-dark: #111111;
    --text-light: #666666;
    --bg-light: #f8fafc;
    --bg-dark: #1a1a1a;
    --white: #ffffff;
    --border-light: #e2e8f0;
    
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-noto: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* LIG-style viewport height management */
    --initVh: 1vh; /* Will be dynamically updated by JavaScript */
    --vh: 1vh; /* Fallback for backward compatibility */
    
    /* Safe area handling for notched devices */
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
    --safe-area-inset-right: env(safe-area-inset-right);
    
    /* Responsive breakpoints */
    --mobile-breakpoint: 767px;
    --tablet-breakpoint: 1024px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure no horizontal overflow but preserve vertical scrolling */
body {
    overflow-x: hidden;
    overflow-y: auto; /* Explicitly ensure vertical scrolling works */
}

* {
    box-sizing: border-box;
}

/* Section Styles - LIG-inspired design */
.section {
    padding: 0; /* Remove padding for exact height control */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease-out;
    background-color: #ffffff;
    position: relative;
    z-index: 1;
    min-height: 100vh; /* Ensure minimum full height */
    /* Allow content to expand if needed */
    height: auto;
}

/* Content wrapper for perfect centered positioning */
.section .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%; /* Use full section height */
    width: 100%;
    padding: 120px 20px 40px; /* Top padding accounts for header */
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Dynamic height-based responsive design */
:root {
    --content-scale: 1; /* Default scale factor */
}

/* Very narrow viewport height - aggressive scaling */
@media (max-height: 500px) {
    :root {
        --content-scale: 0.7;
    }
    
    .section-snap {
        min-height: auto;
        height: auto;
    }
    
    .hero {
        min-height: auto;
        height: auto;
    }
    
    .section .container,
    .hero__inner {
        padding: calc(60px * var(--content-scale)) 20px calc(20px * var(--content-scale));
        justify-content: flex-start;
    }
    
    .section__title,
    .hero__title {
        font-size: calc(clamp(1.5rem, 3vw, 2.5rem) * var(--content-scale));
        margin-bottom: calc(16px * var(--content-scale));
    }
    
    .section__subtitle,
    .hero__subtitle {
        font-size: calc(1rem * var(--content-scale));
        margin-bottom: calc(20px * var(--content-scale));
    }
    
    .hero__cta,
    .hero__metrics {
        margin-bottom: calc(15px * var(--content-scale));
    }
    
    .service-card,
    .kpi-item,
    .case-card {
        padding: calc(16px * var(--content-scale));
    }
    
    .kpi-item {
        min-height: calc(120px * var(--content-scale));
    }
}

/* Narrow viewport height - moderate scaling */
@media (max-height: 650px) and (min-height: 501px) {
    :root {
        --content-scale: 0.85;
    }
    
    .section .container,
    .hero__inner {
        padding: calc(80px * var(--content-scale)) 20px calc(20px * var(--content-scale));
        justify-content: flex-start;
    }
    
    .section__title,
    .hero__title {
        font-size: calc(clamp(1.8rem, 4vw, 3rem) * var(--content-scale));
        margin-bottom: calc(18px * var(--content-scale));
    }
    
    .section__subtitle,
    .hero__subtitle {
        font-size: calc(1.1rem * var(--content-scale));
        margin-bottom: calc(22px * var(--content-scale));
    }
}

/* Medium narrow viewport height - light scaling */
@media (max-height: 750px) and (min-height: 651px) {
    :root {
        --content-scale: 0.9;
    }
    
    .section .container,
    .hero__inner {
        padding: calc(90px * var(--content-scale)) 20px calc(25px * var(--content-scale));
        justify-content: flex-start;
    }
}

/* Mobile/tablet narrow viewport fixes */
@media (max-width: 768px) {
    @media (max-height: 600px) {
        :root {
            --content-scale: 0.8;
        }
        
        .section-snap {
            min-height: auto;
            height: auto;
        }
        
        .hero {
            min-height: auto;
            height: auto;
        }
        
        .section .container,
        .hero__inner {
            padding: calc(70px * var(--content-scale)) 20px calc(20px * var(--content-scale));
            justify-content: flex-start;
        }
    }
    
    @media (max-height: 700px) and (min-height: 601px) {
        :root {
            --content-scale: 0.9;
        }
        
        .section .container,
        .hero__inner {
            padding: calc(80px * var(--content-scale)) 20px calc(20px * var(--content-scale));
            justify-content: flex-start;
        }
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .section .container {
        padding: 100px 20px 40px; /* More balanced mobile padding */
    }
    
    @media (max-height: 700px) {
        .section .container {
            padding: 90px 20px 30px;
        }
    }
    
    @media (max-height: 600px) {
        .section .container {
            padding: 80px 20px 25px;
        }
    }
}

/* Large desktop screens */
@media (min-width: 1200px) {
    .section .container {
        padding: 120px 20px 50px;
    }
}

/* LIG-style full-height sections - using CSS variables for consistent height */
.section-snap {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: calc(var(--initVh, 1vh) * 100); /* Use dynamic viewport height as minimum */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Enhanced section boundaries for fixed feeling */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Ensure each section completely fills the viewport */
    box-sizing: border-box;
    /* Enhance the section snap feeling */
    scroll-padding: 0;
    /* Allow content to expand beyond viewport if needed */
    overflow: visible;
}

/* Enhanced scroll snap for stronger section boundaries */
.section-snap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
    /* Add subtle gradient overlay for depth */
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.02) 0%,
        transparent 20%,
        transparent 80%,
        rgba(0, 0, 0, 0.02) 100%
    );
}

/* Performance optimizations for smooth section transitions */
.section-snap {
    /* GPU acceleration for smooth scrolling */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    /* Optimize rendering */
    contain: layout style paint;
}

/* Enhanced visual feedback during scroll transitions */
.section-snap.transitioning {
    transform: translateZ(0) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-snap:not(.transitioning) {
    transform: translateZ(0) scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* LIG-style scroll animations */
.section,
.animate-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section.animate-in,
.animate-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Specific animation delays for different elements */
.section__title {
    transition-delay: 0.1s;
}

.section__subtitle {
    transition-delay: 0.2s;
}

.service-card {
    transition-delay: 0.3s;
}

.kpi-item {
    transition-delay: 0.2s;
}

.case-card {
    transition-delay: 0.25s;
}

/* Enhanced hero animations */
.hero__title {
    opacity: 0;
    transform: translateY(40px);
    animation: heroFadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.hero__subtitle {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

.hero__cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s forwards;
}

.hero__metrics {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.2s forwards;
}

/* Hero responsive adjustments are now handled in the main responsive section above */

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

/* Staggered animation for grid items */
.kpi-grid .kpi-item:nth-child(1) { transition-delay: 0.1s; }
.kpi-grid .kpi-item:nth-child(2) { transition-delay: 0.2s; }
.kpi-grid .kpi-item:nth-child(3) { transition-delay: 0.3s; }
.kpi-grid .kpi-item:nth-child(4) { transition-delay: 0.4s; }
.kpi-grid .kpi-item:nth-child(5) { transition-delay: 0.5s; }
.kpi-grid .kpi-item:nth-child(6) { transition-delay: 0.6s; }

/* Smooth parallax-like effect for better visual flow */
.section {
    will-change: transform, opacity;
}

/* LIG-style Section Indicators */
.section-indicators {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.section-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    opacity: 0;
}

.section-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.section-indicator.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.section-indicator.active::before {
    opacity: 1;
}

/* Mobile scroll snap enhancements */
@media (max-width: 767px) {
    .section-indicators {
        display: none;
    }
    
    /* Enhanced touch scrolling for mobile */
    body {
        scroll-snap-type: y mandatory;
        -webkit-scroll-snap-type: y mandatory;
        /* Improve touch scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        /* Prevent bounce effect on iOS for better section feeling */
        overscroll-behavior: none;
    }
    
    .section-snap {
        /* Stronger snap alignment on mobile */
        scroll-snap-align: start;
        scroll-snap-stop: always;
        /* Ensure full screen coverage */
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    
    /* Better bottom spacing for mobile */
    .section:last-child .container {
        padding-bottom: 60px;
    }
}

.section--dark {
    background-color: #111111;
    color: var(--white);
    /* Override border color for dark sections */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section--light {
    background-color: #ffffff;
}

/* Services section specific styles */
.services {
    background-color: #ffffff;
    min-height: 50vh;
}

.section__header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.section__title {
    font-family: var(--font-inter);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    hyphens: auto;
    letter-spacing: -0.02em;
    font-feature-settings: "palt" 1;
}

.section--dark .section__title {
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section__subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.section--dark .section__subtitle {
    color: #cbd5e1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.02); /* Nearly transparent */
    backdrop-filter: none; /* Remove blur effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease; /* Smooth transition for all changes */
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0; /* Remove all padding for maximum logo height */
    position: relative;
}

/* New layout: hamburger left, logo center, contact right */
.header__toggle {
    order: 1;
    flex: 0 0 auto;
    display: flex !important; /* Always show hamburger menu */
}

.header__logo {
    order: 2;
    flex: 1;
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 80px; /* Full header height */
    padding: 0 !important;
    margin: 0 !important;
}

.header__contact-btn {
    order: 3;
    flex: 0 0 auto;
    display: inline-flex;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

.header__contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.header__nav {
    display: none; /* Hidden by default, shown in mobile menu */
}

.logo-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 80px !important; /* Full header height */
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

/* パーティクル バースト効果 */
.logo-link {
    position: relative;
    overflow: visible;
}

.logo-link:hover {
    animation: logoGlow 0.6s ease-out;
}

@keyframes logoGlow {
    0% { 
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }
    50% { 
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
    }
    100% { 
        filter: brightness(1.1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    }
}

/* パーティクル要素の基本設定 */
.logo-link::before,
.logo-link::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0.8) 30%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.logo-link:hover::before {
    animation: particle1 1.2s ease-out;
}

.logo-link:hover::after {
    animation: particle2 1.2s ease-out 0.1s;
}

@keyframes particle1 {
    0% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    20% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        top: 20%;
        left: 80%;
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
}

@keyframes particle2 {
    0% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    20% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        top: 80%;
        left: 20%;
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
}

.logo-img {
    height: 75px !important; /* Almost full header height */
    width: auto !important;
    max-width: 400px !important;
    min-height: 75px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    filter: brightness(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.1)) !important;
    transform: none !important;
    position: relative !important;
    z-index: 2 !important;
    /* Override any dynamic transforms */
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-img {
        height: 65px !important;
        max-width: 300px !important;
        min-height: 65px !important;
    }
    
    .header__inner {
        padding: 0; /* Remove padding on mobile too */
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 60px !important;
        max-width: 250px !important;
        min-height: 60px !important;
    }
}

/* Desktop navigation - Same as mobile: hamburger menu always */
@media (min-width: 768px) {
    .header__toggle {
        display: flex; /* Always show hamburger menu on all screen sizes */
    }
    
    .header__nav {
        display: none; /* Navigation always hidden, accessed via hamburger menu */
    }
    
    /* Desktop-specific adjustments */
    .header__contact-btn {
        font-size: 1rem; /* Slightly larger on desktop */
        padding: 12px 24px;
    }
    
    .logo-img {
        height: 75px !important;
        max-width: 400px !important;
        min-height: 75px !important;
    }
}

/* Mobile navigation and menu styles - applies to all screen sizes */
.header__nav {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(15, 15, 15, 0.98));
    backdrop-filter: blur(30px);
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.6);
    z-index: 9999; /* Increased z-index */
    transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex !important; /* Force display */
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 0;
}

.nav-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
}

.nav-close span {
    position: absolute;
    width: 24px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.nav-close span:nth-child(1) {
    transform: rotate(90deg);
}

.nav-close:hover span {
    background: rgba(255, 255, 255, 1);
    width: 28px;
}

/* Menu open state */
.header__nav.mobile-open {
    right: 0 !important; /* Slide in from right */
    transform: translateX(0) !important;
    visibility: visible !important;
}

.header__nav.mobile-open .nav-list li {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Staggered animation for menu items */
.header__nav.mobile-open .nav-list li:nth-child(1) {
    transition-delay: 0.1s;
}

.header__nav.mobile-open .nav-list li:nth-child(2) {
    transition-delay: 0.2s;
}

.header__nav.mobile-open .nav-list li:nth-child(3) {
    transition-delay: 0.3s;
}

.header__nav.mobile-open .nav-list li:nth-child(4) {
    transition-delay: 0.4s;
}
    
/* Overlay for mobile menu */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998; /* Just below the menu */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Desktop menu adjustments */
    @media (min-width: 768px) {
        .header__nav {
            width: 500px; /* Slightly wider on desktop */
        }
        
        .nav-list a {
            font-size: 2.8rem; /* Larger on desktop */
            padding: 36px 60px;
        }
        
        .nav-list a:hover {
            padding-left: 90px;
        }
        
        .nav-list a:hover::before {
            height: 45px;
        }
    }
    
    /* Responsive typography for smaller screens */
    @media (max-width: 767px) {
        .header__nav {
            width: 100vw;
        }
        
        .nav-list a {
            font-size: 2rem;
            padding: 28px 40px;
        }
        
        .nav-list a:hover {
            padding-left: 60px;
        }
    }
    
    @media (max-height: 600px) {
        .nav-list a {
            font-size: 2rem;
            padding: 20px 60px;
        }
        
        .nav-list a:hover::before {
            height: 30px;
        }
    }
    
    .nav-list {
        flex-direction: column;
        padding: 0;
        gap: 0;
        width: 100%;
        list-style: none;
        margin: 0;
    }
    
    .nav-list li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .nav-list a {
        display: block;
        padding: 32px 60px;
        color: #ffffff !important;
        font-size: 2.5rem;
        font-weight: 700;
        font-family: var(--font-inter);
        text-transform: none;
        letter-spacing: -0.03em;
        line-height: 1.1;
        border-radius: 0;
        margin: 0;
        position: relative;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        text-align: left;
    }
    
    .nav-list a::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 20px;
        width: 6px;
        height: 0;
        background: #ffffff;
        transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        transform: translateY(-50%);
        border-radius: 3px;
    }
    
    .nav-list a:hover {
        background: rgba(255, 255, 255, 0.03);
        padding-left: 80px;
        color: #ffffff !important;
        transform: translateX(10px);
    }
    
    .nav-list a:hover::before {
        height: 40px;
    }
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 32px;
}

.nav-list a {
    text-decoration: none;
    color: #ffffff; /* Initial white color for hero section */
    font-weight: 500;
    transition: all 0.3s ease; /* Smooth color transitions */
}

.nav-list a:hover {
    opacity: 0.7; /* Use opacity for hover effect to work with any color */
}

.header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1002;
}

.header__toggle span {
    width: 25px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
    position: absolute;
    transform-origin: center;
}

.header__toggle span:nth-child(1) {
    top: 8px;
}

.header__toggle span:nth-child(2) {
    top: 14px;
}

.header__toggle span:nth-child(3) {
    top: 20px;
}

/* Hamburger to X animation */
.header__toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 14px;
}

.header__toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.header__toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 14px;
}

/* Desktop hamburger adjustments */
@media (min-width: 768px) {
    .header__toggle {
        width: 32px;
        height: 32px;
    }
    
    .header__toggle span {
        width: 26px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, #007BFF 0%, #0056CC 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.btn--primary:hover::before {
    left: 100%;
}

.btn--outline {
    border-color: #007BFF;
    color: #007BFF;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.btn--outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #007BFF;
    transition: width 0.3s ease;
    z-index: -1;
}

.btn--outline:hover {
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.btn--outline:hover::before {
    width: 100%;
}

.btn--sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn--full {
    width: 100%;
}

/* Scroll Snap - Enabled for LIG-like experience with tolerance */
html {
    scroll-snap-type: y proximity; /* Proximity mode for natural behavior */
    scroll-behavior: smooth;
    scroll-padding-top: 0px; /* No offset - header top aligns with section top */
    overflow-y: scroll;
}

/* Enable scroll snap on body as well for better browser support */
body {
    scroll-snap-type: y proximity;
}

.section-snap {
    scroll-snap-align: start;
    scroll-snap-stop: normal; /* Changed from always to normal for less aggressive snapping */
    scroll-snap-margin-top: 0px; /* No margin - header top aligns with section top */
    scroll-snap-margin-bottom: 0px; /* Remove bottom margin */
    min-height: auto;
    display: block;
}

/* Hero Section */
.hero {
    padding: 0; /* Remove padding for exact viewport height */
    background: #000;
    position: relative;
    overflow: hidden;
    min-height: calc(var(--initVh, 1vh) * 100); /* Use dynamic viewport height as minimum */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero__video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #111111 0%, 
        #333333 50%, 
        #111111 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    display: none;
}

.hero__video-fallback.active {
    display: block;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero__video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.45) 50%,
        rgba(0, 0, 0, 0.65) 100%
    );
    z-index: 2;
}

.hero__inner {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
    height: 100%; /* Use full hero height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px; /* Top padding for header clearance */
}

.hero__content {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero__title {
    font-family: var(--font-inter);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__title-line {
    display: block;
}

.hero__title-line--highlight {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero__cta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    align-items: center;
}

.hero__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.metric {
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.metric__value {
    font-family: var(--font-inter);
    font-size: 2.5rem;
    font-weight: 700;
    color: #FFD700;
    line-height: 1;
}

.metric__label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
}

.hero__scroll-indicator {
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.scroll-arrow span {
    display: block;
    width: 2px;
    height: 20px;
    background: rgba(255, 255, 255, 0.8);
    margin: 2px 0;
    border-radius: 1px;
    animation: scroll-indicator 1.5s infinite;
}

.scroll-arrow span:nth-child(2) {
    animation-delay: 0.3s;
}

.scroll-arrow span:nth-child(3) {
    animation-delay: 0.6s;
}

.hero__scroll-indicator p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes scroll-indicator {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Services Section */
.services__carousel-container {
    position: relative;
    width: 100%;
    /* Allow horizontal overflow for scrolling */
    overflow: visible;
    /* Prevent parent scroll interference */
    touch-action: pan-x;
}

.services__carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
    scroll-behavior: smooth;
    /* Force horizontal scrolling to work */
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    /* Ensure container can scroll horizontally */
    width: 100%;
    /* Add right padding to show partial next card */
    padding-right: 80px;
}

.services__carousel::-webkit-scrollbar {
    display: none;
}

.services__carousel .service-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    /* Fixed width for proper scrolling */
    width: 300px;
    min-width: 300px;
    max-width: 300px;
}

.service-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: auto;
    min-height: 300px;
    justify-content: center;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #007BFF 0%, #0056CC 100%);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-card--featured {
    background: linear-gradient(135deg, #007BFF 0%, #0056CC 100%);
    color: var(--white);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.service-card--featured::before {
    display: none;
}

.service-card__icon {
    font-size: 3rem;
    margin-bottom: 24px;
}

.service-card__title {
    font-family: var(--font-inter);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.service-card__description {
    color: var(--text-light);
    margin-bottom: 20px;
}

.service-card--featured .service-card__description {
    color: rgba(255, 255, 255, 0.9);
}

.service-card__kpi {
    display: inline-block;
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-blue);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.service-card--featured .service-card__kpi {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Carousel Controls */
.carousel__controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 767px) {
    .carousel__controls {
        display: none; /* Hide controls on mobile, use touch instead */
    }
    
    /* Mobile Hero Section Complete Optimization with CSS variables */
    .hero {
        height: calc(var(--initVh, 1vh) * 100) !important; /* Use dynamic viewport height */
        min-height: 600px; /* Minimum height for small screens */
        padding: 0 !important; /* Remove any padding */
    }
    
    .hero__inner {
        padding: 0 20px !important; /* Optimal side padding for mobile */
        height: calc(var(--initVh, 1vh) * 100) !important; /* Use dynamic viewport height */
        min-height: 100vh !important; /* Fallback for older browsers */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hero__content {
        max-width: 100% !important; /* Use full width on mobile */
        width: 100% !important;
        padding: 20px 0 !important; /* Vertical padding only */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        /* Override desktop margin for mobile */
        margin-top: 60px !important;
    }
    
    .hero__title {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important; /* Optimized mobile title size */
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
        text-align: center !important;
    }
    
    .hero__subtitle {
        font-size: 1rem !important; /* Readable subtitle size */
        line-height: 1.5 !important;
        margin-bottom: 24px !important;
        padding: 0 10px !important; /* Subtle side padding */
        text-align: center !important;
    }
    
    .hero__cta {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 12px !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hero__cta .btn {
        width: 100% !important;
        max-width: 280px !important; /* Limit button width for better UX */
        padding: 14px 20px !important; /* Comfortable touch target */
        text-align: center !important;
    }
    
    .hero__metrics {
        margin-top: 32px !important;
        flex-direction: column !important; /* Stack metrics vertically */
        gap: 20px !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .metric {
        text-align: center !important;
        min-width: auto !important; /* Remove fixed width */
        width: 100% !important;
    }
    
    .metric__value {
        font-size: 2rem !important; /* Appropriate mobile metric size */
    }
    
    .hero__scroll-indicator {
        margin-top: 24px !important; /* Reduce top margin */
    }
}

.carousel__btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
    pointer-events: all;
    box-shadow: var(--shadow-md);
    transform: translateY(-50%);
}

.carousel__btn:hover {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-50%) scale(1.1);
}

.carousel__btn--prev {
    margin-left: 16px;
}

.carousel__btn--next {
    margin-right: 16px;
}

.carousel__indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 123, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary-blue);
    transform: scale(1.2);
}

.indicator:hover {
    background: var(--primary-blue);
}

/* KPI Highlights with Numeric Counters */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.kpi-item {
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.kpi-item__category {
    color: var(--secondary-green);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.kpi-item__value {
    font-family: var(--font-inter);
    font-size: 3rem;
    font-weight: 700;
    color: #FFD700;
    line-height: 1;
    margin-bottom: 12px;
}

.kpi-item__label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.progress-bar {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-green), var(--primary-blue));
    border-radius: 6px;
    width: 0%;
    transition: width 2s ease-out;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.progress-fill.animated {
    animation: progressFill 2s ease-out forwards;
}

.progress-text {
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.kpi-item__detail {
    font-size: 0.875rem;
    color: #cbd5e1;
    text-align: center;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: var(--progress-width); }
}

/* Case Studies Carousel */
.cases-carousel-container {
    position: relative;
    width: 100%;
    /* Allow horizontal overflow for scrolling */
    overflow: visible;
    /* Prevent parent scroll interference */
    touch-action: pan-x;
    padding: 0 20px;
}

.cases-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
    scroll-behavior: smooth;
    /* Force horizontal scrolling to work */
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    /* Ensure container can scroll horizontally */
    width: 100%;
    /* Add right padding to show partial next card */
    padding-right: 80px;
}

.cases-carousel::-webkit-scrollbar {
    display: none;
}

.cases-carousel .case-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 350px;
    min-width: 350px;
    max-width: 350px;
}

.cases-carousel__controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.case-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.case-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.case-card__image {
    height: 240px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.case-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: brightness(0.95) saturate(1.1);
}

.case-card__placeholder {
    width: 100%;
    height: 100%;
    transition: var(--transition);
}

.case-card:hover .case-card__image img {
    transform: scale(1.08);
    filter: brightness(1) saturate(1.2);
}

.case-card:hover .case-card__placeholder {
    transform: scale(1.08);
}

.case-card__content {
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    text-align: left;
    height: auto;
    min-height: 200px;
}

.case-card__title {
    font-family: var(--font-inter);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.3;
}

.case-card__description {
    color: var(--text-light);
    margin-bottom: 18px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.case-card__metrics {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.metric-tag {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    color: var(--primary-blue);
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
}

.metric-tag:hover {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(0, 123, 255, 0.08) 100%);
    transform: translateY(-1px);
}

.case-card__link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    margin-top: auto;
}

.case-card__link:hover {
    color: var(--secondary-green);
}

/* About Section */
.about__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.about__text {
    font-size: 1.125rem;
    margin-bottom: 24px;
    line-height: 1.8;
}

.about__profile h3 {
    font-family: var(--font-inter);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-blue);
}

.about__visual {
    display: none;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-green));
    color: var(--white);
}

.contact__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.contact__form {
    width: 100%;
    max-width: 800px;
}

.contact .section__title {
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact .section__subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Form Styles */
.form__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 100%;
}

.form__group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form__textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

.form__label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white);
}

.required {
    color: #ff6b6b;
    font-weight: 700;
    margin-left: 4px;
}

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #1a1a1a;
    font-family: inherit;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 48px;
    box-sizing: border-box;
}

.form__input::placeholder,
.form__textarea::placeholder {
    color: #9ca3af;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form__submit {
    margin-top: 24px;
    grid-column: 1 / -1;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 80px 0 40px;
    /* Remove border for cleaner look */
    border-bottom: none;
    /* Exclude from section snap */
    scroll-snap-align: none;
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer__title {
    font-family: var(--font-inter);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-blue);
}

.footer__text {
    color: #cbd5e1;
    line-height: 1.6;
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.footer__heading {
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--white);
}

.footer__list {
    list-style: none;
}

.footer__list li {
    margin-bottom: 8px;
}

.footer__list a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
}

.footer__list a:hover {
    color: var(--primary-blue);
}

.footer__bottom {
    border-top: 1px solid #374151;
    padding-top: 32px;
    text-align: center;
    color: #9ca3af;
}

/* KPI Grid Mobile Layout */
@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 100%;
    }
    
    .kpi-item {
        padding: 20px;
    }
    
    .kpi-item__value {
        font-size: 2rem;
    }
    
    .kpi-item__label {
        font-size: 0.8rem;
    }
    
    .kpi-item__detail {
        font-size: 0.75rem;
    }
}

/* Responsive Styles */
@media (min-width: 768px) {
    /* Header navigation stays hidden - accessed via hamburger menu */
    .header__nav {
        display: none;
    }
    
    /* Hamburger menu now always visible */
    
    .hero__cta {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero__metrics {
        max-width: 600px;
        margin: 0 auto 40px;
    }
    
    .services__carousel .service-card {
        width: 350px;
        min-width: 350px;
        max-width: 350px;
    }
    
    .services__carousel {
        padding-right: 80px;
        gap: 24px;
    }
    
    .form__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .about__inner {
        grid-template-columns: 1fr 400px;
    }
    
    .about__visual {
        display: block;
    }
    
    .about__image {
        width: 100%;
        height: 400px;
        background: var(--border-light);
        border-radius: 16px;
        overflow: hidden;
    }
    
    .about__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .contact__inner {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer__inner {
        grid-template-columns: 1fr 2fr;
    }
}

@media (min-width: 1024px) {
    .services__carousel .service-card {
        width: 380px;
        min-width: 380px;
        max-width: 380px;
    }
    
    .services__carousel {
        padding-right: 100px;
        gap: 28px;
    }
    
    .cases-carousel .case-card {
        width: 400px;
    }
    
    /* Keep carousel functionality on all screen sizes */
    .services__carousel-container {
        overflow: hidden;
    }
    
    .cases-carousel-container {
        overflow: visible;
    }
    
    .cases-carousel {
        padding-right: 100px;
        gap: 28px;
    }
}

/* Mobile optimizations */
@media (max-width: 767px) {
    /* Disable scroll snap on mobile for better touch experience */
    html {
        scroll-snap-type: none;
    }
    
    .section-snap {
        scroll-snap-align: none;
        min-height: auto;
        display: block;
    }
    
    .hero {
        min-height: 60vh;
        padding: 100px 0 40px 0; /* Adequate padding for mobile header */
    }
    
    .container {
        padding: 0 16px; /* Smaller padding on mobile */
    }
    
    .section {
        padding: 40px 0; /* Smaller section padding */
    }
    
    .section__title {
        font-size: clamp(1.5rem, 6vw, 2.5rem); /* Smaller titles on mobile */
        line-height: 1.2;
    }
    
    .carousel__btn {
        display: flex; width: 40px; height: 40px; font-size: 1.2rem;
    }
    
    .services__carousel-container {
        padding: 0 10px;
        /* Stronger touch action for mobile */
        touch-action: pan-x;
    }
    
    .services__carousel {
        gap: 16px;
        padding-right: 40px;
        /* Ensure horizontal scrolling on mobile */
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }
    
    .services__carousel .service-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: start;
    }
    
    .cases-carousel-container {
        padding: 0 10px;
    }
    
    .cases-carousel {
        gap: 16px;
        padding-right: 40px;
    }
    
    .cases-carousel .case-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: start;
    }
    
    .kpi-item__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Counter Animation */
.counter {
    transition: all 0.3s ease;
}

/* Form Enhancement Styles */
.form__submit {
    position: relative;
}

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn__loading {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form Feedback Styles */
.form__feedback {
    margin-top: 24px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

/* 2024年モダンサンクスページデザイン */
.form__success {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 48px !important;
    max-width: 640px !important;
    margin: 0 auto !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.success-container {
    text-align: center;
}

.success-check {
    width: 48px;
    height: 48px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    color: #059669;
}

.success-title {
    font-size: 32px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
}

.success-description {
    font-size: 18px !important;
    color: #6b7280 !important;
    margin: 0 0 48px 0 !important;
    line-height: 1.5 !important;
}

.success-info {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 48px;
    background: #f9fafb;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.info-value {
    font-size: 14px;
    color: #6b7280;
    text-align: right;
}

.success-contact {
    margin-bottom: 48px;
}

.contact-note {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 24px;
}

.contact-details {
    display: grid;
    gap: 16px;
}

.contact-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.contact-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.contact-value {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.contact-time {
    font-size: 13px;
    color: #9ca3af;
    text-align: right;
}


@media (max-width: 768px) {
    .form__success {
        padding: 32px 24px;
    }
    
    .success-title {
        font-size: 28px;
    }
    
    .success-description {
        font-size: 16px;
    }
    
    .contact-item {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .contact-time {
        text-align: center;
    }
}

.form__error {
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.success-icon, .error-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.success-icon {
    background: #10b981;
    color: white;
}

.error-icon {
    background: #ef4444;
    color: white;
}

.form__feedback h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.form__feedback p {
    margin: 0 0 16px 0;
    opacity: 0.8;
}

/* Form Validation Styles - エラー時のみ特別な色 */
.form__input.invalid,
.form__select.invalid,
.form__textarea.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
    color: #1a1a1a;
}

/* 正常時は通常のスタイルを維持 */
.form__input.valid,
.form__select.valid,
.form__textarea.valid {
    border-color: #e2e8f0;
    background-color: #ffffff;
    color: #1a1a1a;
}

.form__error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 4px;
    display: none;
}

.form__error-message.show {
    display: block;
}

/* Real-time validation indicators */
.form__group {
    position: relative;
}

.form__validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form__group--full .form__validation-icon {
    top: 45px;
}

/* エラー時のみアイコンを表示 */
.form__validation-icon.invalid {
    color: #ef4444;
    opacity: 1;
}

/* 正常時はアイコンを非表示 */
.form__validation-icon.valid {
    opacity: 0;
}

/* Button variations */
.btn--secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn--secondary:hover {
    background: var(--primary-blue);
    color: white;
}

.btn--sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Enhanced form animations */
.form__group {
    animation: slideInUp 0.6s ease-out;
}

.form__group:nth-child(1) { animation-delay: 0.1s; }
.form__group:nth-child(2) { animation-delay: 0.2s; }
.form__group:nth-child(3) { animation-delay: 0.3s; }
.form__group:nth-child(4) { animation-delay: 0.4s; }

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    /* Fix mobile scrolling issues */
    body {
        touch-action: pan-y; /* Allow vertical scrolling but restrict horizontal */
        -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
    }
    
    .form__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact__inner {
        max-width: 100%;
        gap: 30px;
    }
    
    .contact__form {
        max-width: 100%;
    }
    
    .form__input,
    .form__select,
    .form__textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form__feedback {
        margin-top: 20px;
        padding: 20px;
    }
    
    .success-icon, .error-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .form__feedback h3 {
        font-size: 1.125rem;
    }
}

/* Mobile touch optimizations */
@media (max-width: 1024px) {
    /* Ensure proper touch behavior */
    html, body {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 必須項目でも通常の枠色を維持 */
.form__input:invalid {
    border-color: #e2e8f0;
    background-color: #ffffff;
    color: #1a1a1a;
}

.form__input:valid {
    border-color: #e2e8f0;
    background-color: #ffffff;
    color: #1a1a1a;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
.btn:focus {
    outline: 2px solid var(--secondary-green);
    outline-offset: 2px;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Print styles */
@media print {
    .header,
    .footer,
    .contact {
        display: none;
    }
    
    .section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
.form__group--full {
    grid-column: 1 / -1;
}

/* 動的パーティクル用アニメーション */
@keyframes dynamicParticle {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    20% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        left: var(--end-x);
        top: var(--end-y);
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }
}

/* パーティクル用の追加スタイル */
.dynamic-particle {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* 爆発パーティクル用アニメーション */
@keyframes explosionParticle {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    10% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) translate(var(--delta-x), var(--delta-y)) scale(0.1);
        opacity: 0;
    }
}

/* フラッシュエフェクト */
@keyframes flashEffect {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* 爆発パーティクル用スタイル */
.explosion-particle {
    box-shadow: 
        0 0 12px rgba(255, 235, 59, 0.8), 
        0 0 24px rgba(255, 152, 0, 0.6),
        0 0 36px rgba(255, 87, 34, 0.4);
}
