/* Custom CSS for NSM Asset Management Website */

/* Color Variables */
:root {
    --gold: #B8860B;           /* 低饱和度土金色 - 暗金棕色 */
    --warm-gold: #A0804B;      /* 暖土金色 - 古铜色 */
    --soft-peach: #FFCCCB;
    --soft-coral: #FFA07A;
    --soft-lavender: #E6E6FA;
    --soft-mint: #F0FFF0;
    --soft-cream: #FFF8DC;
    --charcoal: #36454F;
    --black: #000000;
    --white: #FFFFFF;
    --warm-beige: #F5F5DC;
    --soft-yellow: #FFFACD;
    --light-gold: #F4E4BC;     /* 浅土金色 - 米色调 */
    --muted-bronze: #CD7F32;   /* 哑光青铜色 */
    --earth-gold: #D4AF37;     /* 大地金色 - 中等饱和度 */
}

/* Base Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--charcoal);
}

/* Language-specific font families */
body[data-lang="ja"] {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
}

body[data-lang="zh"] {
    font-family: 'Noto Sans TC', 'Inter', sans-serif;
}

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

::-webkit-scrollbar-track {
    background: var(--soft-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--warm-gold);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Language Selector Styles */
.lang-btn {
    background: transparent;
    color: var(--charcoal);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    min-width: 32px;
    text-align: center;
}

.lang-btn:hover {
    color: var(--gold);
    background: rgba(184, 134, 11, 0.12);
    transform: scale(1.05);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--warm-gold));
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(184, 134, 11, 0.35);
    transform: scale(1.02);
}

/* Language selector container improvements */
.lang-selector {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 134, 11, 0.15);
}

/* Navigation Styles */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background: linear-gradient(90deg, var(--gold), var(--warm-gold));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

/* Button Styles */
.cta-button {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.35);
}

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

.cta-button:hover::before {
    left: 100%;
}

.cta-button-outline {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cta-button-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--warm-gold));
    transition: left 0.5s;
    z-index: -1;
}

.cta-button-outline:hover::before {
    left: 0;
}

/* Card Hover Effects */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(184, 134, 11, 0.12);
    border-color: rgba(184, 134, 11, 0.25);
}

/* Icon Animations */
.icon-bounce {
    animation: bounce 2s infinite;
}

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

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(45deg, var(--gold), var(--warm-gold), var(--earth-gold));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Smooth Section Transitions */
section {
    transition: all 0.6s ease;
}

/* Form Styles */
input:focus,
textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--gold);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

/* Form Validation Styles */
.border-red-500 {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.border-green-500 {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.text-red-600 {
    color: #dc2626;
}

.text-green-600 {
    color: #059669;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.text-red-800 {
    color: #991b1b;
}

.text-green-800 {
    color: #166534;
}

.border-red-200 {
    border-color: #fecaca;
}

.border-green-200 {
    border-color: #bbf7d0;
}

/* Validation Animation */
.validation-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Form Input Placeholder Styling */
input::placeholder,
textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: #d1d5db;
}

/* Required Field Indicator */
.text-red-500 {
    color: #ef4444;
    font-weight: 500;
}

/* Success Message Animation */
.success-message {
    animation: slideInFromTop 0.5s ease-out;
}

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

/* Error Message Animation */
.error-message {
    animation: slideInFromBottom 0.5s ease-out;
}

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

/* Custom Shadows */
.soft-shadow {
    box-shadow: 0 4px 20px rgba(54, 69, 79, 0.1);
}

.gold-shadow {
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.15);
}

.warm-shadow {
    box-shadow: 0 8px 30px rgba(160, 128, 75, 0.12);
}

/* Responsive Font Sizes */
@media (max-width: 768px) {
    .text-4xl {
        font-size: 2.5rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Removed parallax effect to prevent background exposure */

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease both;
}

/* Staggered Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Background Patterns */
.pattern-dots {
    background-image: radial-gradient(var(--gold) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.08;
}

.pattern-grid {
    background-image: 
        linear-gradient(var(--gold) 1px, transparent 1px),
        linear-gradient(90deg, var(--gold) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.04;
}

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    #mobile-menu {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-link {
        padding: 12px 16px;
        border-radius: 8px;
        margin: 4px 0;
    }
    
    .nav-link:hover {
        background: rgba(184, 134, 11, 0.08);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: var(--charcoal);
    }
    
    .border-gray-300 {
        border-color: var(--charcoal);
    }
}

/* Print styles */
@media print {
    .fixed,
    footer,
    .cta-button,
    .cta-button-outline {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* Language-specific styling adjustments */
[data-lang="ja"] .text-lg {
    line-height: 1.8;
}

[data-lang="zh"] .text-lg {
    line-height: 1.8;
}

/* Logo styling */
.logo-container {
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: translateY(-1px);
}

.logo-image {
    /* 3D logo optimization for earth-tone gold */
    background: transparent;
    filter: drop-shadow(0 2px 4px rgba(184, 134, 11, 0.3)) brightness(1.05);
    transition: all 0.3s ease;
    /* Smooth rendering for 3D logo */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Subtle glow effect for 3D logo */
    border-radius: 4px;
}

.logo-container:hover .logo-image {
    filter: drop-shadow(0 4px 8px rgba(184, 134, 11, 0.4)) brightness(1.1);
    transform: scale(1.05);
}

/* Special styling for 3D logo */
.logo-3d-effect {
    filter: drop-shadow(0 3px 6px rgba(184, 134, 11, 0.35)) brightness(1.15);
}

/* Enhanced logo visibility */
.logo-image {
    /* Add subtle background for better contrast if needed */
    padding: 2px;
    border-radius: 2px;
}

/* Goldman Sachs Inspired Professional Styles */

/* Base Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--charcoal);
    font-weight: 400;
}

/* Professional Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    letter-spacing: -0.02em;
}

.font-light {
    font-weight: 300;
}

.font-medium {
    font-weight: 500;
}

/* Navigation Styles */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.lang-btn-simple {
    padding: 4px 8px;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.lang-btn-simple:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.lang-btn-simple.active {
    background-color: var(--charcoal);
    color: white;
}

/* Professional Button Styles */
.btn-primary {
    background-color: var(--charcoal);
    color: white;
    border: none;
    padding: 12px 32px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #000;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--charcoal);
    border: 1px solid #d1d5db;
    padding: 12px 32px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--charcoal);
    background-color: rgba(0, 0, 0, 0.02);
}

/* Professional Section Spacing */
section {
    padding: 80px 0;
}

/* Clean Card Styles */
.professional-card {
    background: white;
    border: 1px solid #f3f4f6;
    padding: 40px;
    transition: all 0.3s ease;
}

.professional-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Icon Styles */
.icon-square {
    width: 48px;
    height: 48px;
    background-color: var(--charcoal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-size: 16px;
}

/* Text Styles */
.text-muted {
    color: #6b7280;
}

.text-subtle {
    color: #9ca3af;
}

/* Layout Utilities */
.max-w-content {
    max-width: 65ch;
}

/* Minimal Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Professional Separators */
.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 60px 0;
}

/* Clean hover states */
a:hover, button:hover {
    transition: all 0.2s ease;
}

/* Remove previous hero effects */
.hero-text-gradient {
    display: none;
}

@keyframes heroGradientFlow {
    display: none;
}

@keyframes heroShimmer {
    display: none;
}

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

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

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

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

/* Form Styles */
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--charcoal);
    box-shadow: 0 0 0 3px rgba(54, 69, 79, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .professional-card {
        padding: 30px;
    }
    
    h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Gold accent elements */
.gold-accent {
    position: relative;
}

.gold-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold), var(--warm-gold));
    border-radius: 2px;
}

/* Warm color theme variations */
.warm-bg {
    background: linear-gradient(135deg, var(--soft-cream) 0%, var(--warm-beige) 50%, var(--light-gold) 100%);
}

.peach-bg {
    background: linear-gradient(135deg, var(--soft-peach) 0%, rgba(255, 204, 203, 0.6) 100%);
}

.coral-bg {
    background: linear-gradient(135deg, var(--soft-coral) 0%, rgba(255, 160, 122, 0.6) 100%);
}

.lavender-bg {
    background: linear-gradient(135deg, var(--soft-lavender) 0%, rgba(230, 230, 250, 0.6) 100%);
}

.mint-bg {
    background: linear-gradient(135deg, var(--soft-mint) 0%, rgba(240, 255, 240, 0.6) 100%);
}

/* Earth-tone complementary colors */
.earth-gradient-bg {
    background: linear-gradient(135deg, var(--light-gold) 0%, var(--soft-cream) 50%, #F5F0E8 100%);
}

.muted-gold-bg {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(184, 134, 11, 0.05) 100%);
}

/* Hero Background Slideshow */
.hero-bg-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    animation: slideshow 15s infinite;
}

.hero-bg-slide.active {
    opacity: 1;
}

/* Ensure hero section doesn't expose background during scroll */
#home {
    position: relative;
    overflow: hidden;
}

.hero-bg-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-bg-slide:nth-child(2) {
    animation-delay: 5s;
}

.hero-bg-slide:nth-child(3) {
    animation-delay: 10s;
}

@keyframes slideshow {
    0% { opacity: 0; }
    6.67% { opacity: 1; }
    33.33% { opacity: 1; }
    40% { opacity: 0; }
    100% { opacity: 0; }
}

/* Location indicators removed - cleaner interface */

/* Enhanced text visibility on slideshow background */
.hero-bg-slide + .relative h1,
.hero-bg-slide + .relative p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments for background slideshow */
@media (max-width: 768px) {
    .hero-bg-slide {
        background-attachment: scroll; /* Better mobile performance */
    }
}