/* ======================================
   styles.base.css
   基础样式 - 包含CSS变量、字体、重置样式、通用组件
   ====================================== */

/* CSS变量定义 */
:root {
    --navbar-bg-color: rgba(255, 255, 255, 0.95);
    --navbar-bg-color-solid: rgba(255, 255, 255, 1);
    --navbar-text-color: #333;
    --navbar-border-color: rgba(255, 255, 255, 0.2);
    --navbar-border-radius: 10px;
    --navbar-mobile-radius: 8px;
}

/* 字体定义 */
@font-face {
    font-family: 'Helvetica Now Display';
    src: url('../assets/fonts/HelveticaNowDisplay-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica Now Display';
    src: url('../assets/fonts/HelveticaNowDisplay-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica Now Display';
    src: url('../assets/fonts/HelveticaNowDisplay-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F5F5F7;
    color: #fff;
    overflow-x: hidden;
    height: 100vh;
    animation: fadeIn 1s ease-in;
}

/* 导航栏组件 */
.navbar {
    position: fixed;
    top: 20px;
    left: 40px;
    right: 40px;
    width: calc(100% - 80px);
    max-width: none;
    z-index: 1000;
    padding: 15px 30px;
    background: var(--navbar-bg-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--navbar-border-color);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    min-width: 600px;
    position: relative;
}

.nav-left, .nav-right {
    display: flex;
    gap: 30px;
}

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

.brand-logo-container {
    position: relative;
    height: clamp(20px, 3vw, 28px);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: block;
    object-fit: contain;
}

.brand-logo[data-logo-type="font"] {
    height: 100%;
}

.brand-logo[data-logo-type="bird"] {
    height: 100%;
}

.brand-logo-container:hover {
    transform: none; /* 移除悬停放大效果 */
}

.brand-logo.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

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

.nav-link {
    color: var(--navbar-text-color);
    text-decoration: none;
    font-family: 'Helvetica Now Display', 'Helvetica', 'Arial', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: rgba(51, 51, 51, 0.7);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--navbar-text-color);
    transition: width 0.3s ease;
}

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

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--navbar-text-color);
}

/* 汉堡菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 30px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--navbar-text-color);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    transform: rotate(0deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    opacity: 0;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: -1px;
    right: -1px;
    background: #ffffff !important;
    backdrop-filter: none;
    border-left: 1px solid var(--navbar-border-color);
    border-right: 1px solid var(--navbar-border-color);
    border-bottom: 1px solid var(--navbar-border-color);
    border-top: none;
    border-radius: 0 0 var(--navbar-mobile-radius, 8px) var(--navbar-mobile-radius, 8px);
    box-shadow: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    height: 58px;
}

.mobile-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.mobile-menu-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    gap: 20px;
    position: relative;
    height: 100%;
    box-sizing: border-box;
}

.mobile-menu-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.3) 80%, transparent 100%);
}

.mobile-nav-link {
    color: var(--navbar-text-color);
    text-decoration: none;
    font-family: 'Helvetica Now Display', 'Helvetica', 'Arial', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 100%;
    letter-spacing: 0.5px;
    padding: 10px 15px;
    text-align: center;
    flex: 1;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: rgba(51, 51, 51, 0.7);
    background-color: rgba(200, 200, 200, 0.1);
    border-radius: 8px;
}

/* Footer 组件 */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 80px;
    background: #000;
    color: #fff;
    flex-wrap: wrap;
}

.footer-logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    height: 24px;
}

.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    opacity: 0.7;
}

.footer-links-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer-separator {
    width: 1px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.3);
}

.footer-link-item {
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    color: #fff;
    text-decoration: none;
}

.footer-link-item:hover {
    text-decoration: underline;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-icons img {
    height: 18px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-icons img:hover {
    opacity: 1;
}

/* 通用动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-arrow {
        animation: none;
    }
    
    .loading-logo {
        animation: none;
    }
}

/* 滚动淡入动画 */
.scroll-fade-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================
   Products 跳转过渡页面样式
   ====================================== */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F5F5F7;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

.transition-content {
    text-align: center;
    color: #333;
    animation: fadeInUp 0.6s ease;
    padding: 40px 20px;
}

.transition-logo {
    width: 100px;
    height: auto;
    margin-bottom: 40px;
    filter: none;
}

.transition-title {
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
    color: #1a1a1a;
}

.transition-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 50px;
    font-weight: 400;
}

.transition-loader {
    width: 250px;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    margin: 0 auto 40px;
    overflow: hidden;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1a1a1a 0%, #333 100%);
    border-radius: 10px;
    animation: loading 2.5s ease-out forwards;
}

.transition-skip-btn {
    background: #1a1a1a;
    border: none;
    color: #fff;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Helvetica Now Display', sans-serif;
    margin-bottom: 25px;
    font-weight: 500;
}

.transition-skip-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.transition-hint {
    font-size: 0.95rem;
    color: #999;
    font-family: 'Inter', sans-serif;
}

#countdown {
    color: #1a1a1a;
    font-weight: 700;
}

/* 动画定义 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes loading {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}
