/* Modern Theme Overrides */
:root {
    /* Color System - Modern Medical Blue & Warm Neutrals */
    --color-primary: #0099DB;
    /* Updated to company blue */
    --color-primary-dark: #007AAF;
    /* Darker shade for interactions */
    --color-primary-light: #E6F5FB;
    /* Light blue for backgrounds */
    --color-secondary: #10B981;
    /* Fresh, calming green */
    --color-accent: #F43F5E;
    /* Modern soft red */

    /* Neutral Colors */
    --color-text-main: #1F2937;
    /* Dark gray, softer than black */
    --color-text-light: #6B7280;
    /* Medium gray */
    --color-bg-body: #FFFFFF;
    /* Cool light gray background */
    --color-bg-light: #FFFFFF;
    /* Slightly darker gray for sections */
    --color-white: #FFFFFF;
    --color-border: #E5E7EB;

    /* Typography */
    --font-main: 'Inter', 'Noto Sans JP', "Helvetica Neue", sans-serif;

    /* Spacing & Layout */
    --container-width: 1660px;
    /* Wider container */
    --content-width: 1440px;
    /* Main content width */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Flat Design - No shadows, use borders instead */
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
}

/* --- Custom Interactive Cursor --- */
.custom-cursor {
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, background 0.3s, opacity 0.3s;
    display: none;
    /* Hidden by default, JS shows it */
}

.custom-cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
    display: none;
}

body:hover .custom-cursor,
body:hover .custom-cursor-follower {
    display: block;
}

.cursor-hover .custom-cursor {
    width: 80px;
    height: 80px;
    opacity: 0.15;
    background: #fff;
}

.cursor-hover .custom-cursor-follower {
    width: 90px;
    height: 90px;
    border-color: #fff;
    border-width: 2px;
}


body {
    background-color: #ffffff;
    color: var(--color-text-main);
    position: relative;
    overflow-x: hidden;
}

/* Clean white background - removed decorative blobs for minimal style */
/* body::before and body::after blob decorations removed */

/* Subtle Geometric Texture Overlay - disabled for clean design */
.bg-texture-overlay {
    display: none;
}

/* --- Premium Noise Texture Overlay --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.04;
    z-index: 9998;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Layout Improvements */
.container {
    max-width: var(--content-width);
    padding: 0 24px;
}

/* .section padding handled in layout.css */

/* Typography Improvements */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text-main);
    letter-spacing: -0.025em;
    /* Modern tight tracking for headings */
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    /* Fluid typography */
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
}

.section-title::before,
.section-title::after {
    display: none;
    /* Remove old decorative lines for cleaner look */
}

/* Flat Design Card Styles - No shadows, simple borders */
.card,
.business-card,
.facility-card,
.business-image-card {
    border: 1px solid var(--color-border);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    overflow: hidden;
}

.card:hover,
.business-card:hover,
.facility-card:hover,
.business-image-card:hover:not(.expanded) {
    border-color: var(--color-primary);
    background-color: #FAFCFF;
}

.business-image-card img {
    transition: opacity 0.2s ease;
}

/* 覆盖 reveal 的 transition，让 3D 倾斜效果立即响应 */
.business-image-card.reveal.active {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    /* 只保留 opacity 的过渡，transform 由 JS 实时控制 */
}

.business-image-card:hover:not(.expanded) img {
    opacity: 0.95;
}

/* Scrim Utility for text readability on images */
.text-scrim {
    position: relative;
}

.text-scrim::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

/* Remove old decorative elements from cards for cleaner look */
.card::before,
.card::after {
    display: none;
}

.business-card {
    padding: 40px 32px;
    align-items: flex-start;
    /* Left align content */
    text-align: left;
}

.card-number {
    font-size: 4rem;
    font-weight: 900;
    opacity: 0.1;
    color: var(--color-primary);
    position: absolute;
    top: 10px;
    right: 20px;
    margin: 0;
}

.business-card h3 {
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 16px;
    font-weight: 700;
}

/* Flat Design Button Styles */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 12px 28px;
    box-shadow: none;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--color-primary);
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

/* --- Magnetic & Glow Interactions --- */
.btn-magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-magnetic::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: none;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.btn-magnetic:hover::after {
    opacity: 1;
}

/* Header Refinements */
.header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    /* Enhanced glassmorphism */
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-list a {
    font-weight: 600;
    color: var(--color-text-light);
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--color-primary);
}

.nav-list a::after {
    height: 3px;
    border-radius: 3px;
    bottom: -4px;
}

/* Stats Section Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-primary);
    display: inline-block;
}

.stat-unit {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-left: 2px;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-text-light);
    font-weight: 500;
    margin-top: 12px;
}

/* --- Floating Geometric Accents - hidden for clean design --- */
.floating-accent {
    display: none;
}

/* Response for Stats on small screens */
@media (max-width: 640px) {
    .stat-number {
        font-size: 3.5rem;
    }
}

/* Footer Refinements */
.footer {
    background-color: #111827;
    /* Darker, cooler black */
    padding-top: 80px;
}

.footer-heading {
    border-bottom: none;
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.footer-links a {
    color: #9CA3AF;
}

/* --- Background Titles (Big Watermarks) - hidden for clean design --- */
.bg-section-title {
    display: none;
}

/* --- Parallax & Floating Shapes Enhanced --- */
.parallax-element {
    will-change: transform;
}

/* Utility */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: currentColor;
    background-image: none;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* Ken Burns Effect */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.ken-burns {
    animation: kenBurns 20s ease-out forwards;
}

.header.scrolled {
    padding-block: 8px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-md);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    z-index: 9999;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

/* Page Entry Fade */
body {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* ========================================
   Home Mobile Optimizations
   ======================================== */
@media (max-width: 768px) {
    .philosophy-premium {
        padding-top: 52px;
        padding-bottom: 56px;
    }

    .stats-section {
        padding: 40px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 12px;
    }

    .stat-number {
        font-size: 2.9rem;
    }

    .stat-unit {
        font-size: 1rem;
    }

    .stat-label {
        margin-top: 8px;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    #facility .facility-scroll-wrapper {
        overflow: visible;
        padding: var(--spacing-md) 0 0;
    }

    #facility .facility-scroll-wrapper::before,
    #facility .facility-scroll-wrapper::after {
        display: none;
    }

    #facility .facility-scroll-track {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 var(--spacing-sm);
        animation: none !important;
        transform: none !important;
    }

    #facility .facility-scroll-track .facility-card {
        width: 100%;
        display: block;
    }

    #facility .facility-image {
        width: 100%;
        height: 110px;
        min-height: 110px;
        background: #f5f6f7;
    }

    #facility .facility-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    #facility .facility-info {
        padding: 10px 12px 12px;
        text-align: left;
    }

    #facility .facility-info h3 {
        font-size: 1rem;
        margin-bottom: 4px;
        line-height: 1.35;
    }

    #facility .facility-location {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
}

@media (max-width: 420px) {
    .stat-number {
        font-size: 2.6rem;
    }

    .stat-label {
        font-size: 0.84rem;
    }
}
