/* ==========================================================================
   ARCHI-TECHTONICS STUDIO - STYLES
   Minimalist design, strong space grids, and Scroll-driven animations
   ========================================================================== */

:root {
    --bg-color: #F7F7F7;       /* 美术馆质感微米色 */
    --bg-dark: #0A0A0A;        /* 沉浸式暗黑 */
    --text-color: #111111;     /* 高级炭黑 */
    --text-light: #8E8E8E;     /* 辅助灰 */
    --line-color: rgba(0, 0, 0, 0.08); /* 极致细轴线 */
    --line-color-dark: rgba(255, 255, 255, 0.08);
    --accent-color: #000000;
    --transition-slow: cubic-bezier(0.16, 1, 0.3, 1); /* 优雅的缓入缓出 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 声明全局动画滚动范围，用于 scrollytelling */
    timeline-scope: --tl-1, --tl-2, --tl-3, --tl-4;
}

body {
    overflow-x: hidden;
    cursor: none; /* 使用自定义精致光标 */
}

/* ==========================================================================
   自定义光标 Custom Cursor
   ========================================================================== */
.custom-cursor {
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference; /* 颜色反转，在黑色背景上自动变白 */
    transition: width 0.3s var(--transition-slow), height 0.3s var(--transition-slow), background-color 0.3s;
}

/* 当鼠标悬浮在可点击或图片元素上时，光标变大并变成中空圆圈 */
.custom-cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    mix-blend-mode: difference;
}

.custom-cursor .cursor-text {
    font-size: 9px;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
}

.custom-cursor.hovered .cursor-text {
    display: block;
}

/* 触控设备或 prefers-reduced-motion 隐藏自定义光标，显示默认光标 */
@media (hover: none) or (prefers-reduced-motion: reduce) {
    body {
        cursor: auto;
    }
    .custom-cursor {
        display: none !important;
    }
}

/* ==========================================================================
   背景网格线 Grid Overlay
   ========================================================================== */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.grid-line {
    position: absolute;
    background-color: var(--line-color);
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
    top: 0;
    transform-origin: top;
}

.grid-line.horizontal {
    height: 1px;
    width: 100%;
    left: 0;
    transform-origin: left;
}

/* 背景线条随滚动微微拉伸动画 (Scroll-Driven) */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    .grid-line.vertical {
        animation: extend-vertical linear both;
        animation-timeline: scroll(root);
    }
    .grid-line.horizontal {
        animation: extend-horizontal linear both;
        animation-timeline: scroll(root);
    }

    @keyframes extend-vertical {
        from { transform: scaleY(0.7); }
        to { transform: scaleY(1.3); }
    }
    @keyframes extend-horizontal {
        from { transform: scaleX(0.8); }
        to { transform: scaleX(1.2); }
    }
}

/* ==========================================================================
   头部导航 Site Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 5%;
    z-index: 100;
    mix-blend-mode: difference; /* 使文字在白底和黑底大图间滑动时，自动反色 */
    color: #fff; /* 默认反色模式下使用白字 */
}

.logo {
    display: flex;
    flex-direction: column;
    letter-spacing: 2px;
}

.logo-main {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
}

.logo-sub {
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 3.5px;
    margin-top: 4px;
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
}

.nav-num {
    font-size: 0.6rem;
    opacity: 0.6;
    font-family: 'Syne', sans-serif;
}

.nav-txt {
    font-weight: 400;
    position: relative;
    padding-bottom: 2px;
}

.nav-txt::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s var(--transition-slow);
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none; /* 移动端隐藏右侧导航 */
    }
}

/* ==========================================================================
   Hero Section 主视觉
   ========================================================================= */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 8%;
    z-index: 5;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 30px;
}

.title-line {
    display: block;
}

.title-line.outline {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-color);
}

.hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.8;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 40px;
    font-weight: 300;
}

.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
}

.indicator-line {
    width: 40px;
    height: 1px;
    background-color: var(--text-color);
    transform-origin: left;
    animation: pulse-line 2s infinite ease-in-out;
}

@keyframes pulse-line {
    0% { transform: scaleX(0.5); opacity: 0.3; }
    50% { transform: scaleX(1.5); opacity: 1; }
    100% { transform: scaleX(0.5); opacity: 0.3; }
}

.indicator-text {
    font-size: 0.65rem;
    letter-spacing: 3px;
    font-weight: 600;
}

/* Hero大图：滚动时拉伸并变暗淡出 */
.hero-image-container {
    position: absolute;
    top: 15%;
    right: 8%;
    width: 40%;
    height: 70%;
    overflow: hidden;
    z-index: 2;
    clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
    transition: clip-path 0.8s var(--transition-slow);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1) rotate(2deg);
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.8s;
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(247, 247, 247, 0.05);
    transition: background-color 0.5s;
}

/* 原生 CSS 滚动动画：Hero大图视差扩散与大标题分裂 */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    .hero-image-container {
        animation: hero-img-expand linear both;
        animation-timeline: scroll(root);
        animation-range: exit 0% exit 100%;
    }
    
    .hero-image {
        animation: hero-img-zoom linear both;
        animation-timeline: scroll(root);
        animation-range: exit 0% exit 100%;
    }

    .hero-content {
        animation: hero-content-fade linear both;
        animation-timeline: scroll(root);
        animation-range: exit 0% exit 80%;
    }
    
    .left-glide {
        display: inline-block;
        transform-origin: left center;
        animation: glide-left-anim linear both;
        animation-timeline: scroll(root);
        animation-range: exit 0% exit 80%;
    }
    
    .right-glide {
        display: inline-block;
        transform-origin: right center;
        animation: glide-right-anim linear both;
        animation-timeline: scroll(root);
        animation-range: exit 0% exit 80%;
    }

    @keyframes hero-img-expand {
        to {
            width: 100%;
            height: 100%;
            top: 0;
            right: 0;
            clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
            opacity: 0.15;
        }
    }

    @keyframes hero-img-zoom {
        to {
            transform: scale(1.4) rotate3d(1, -1, 0, 15deg) translateY(60px);
        }
    }

    @keyframes hero-content-fade {
        to {
            transform: translateY(-80px);
            opacity: 0;
        }
    }
    
    @keyframes glide-left-anim {
        to {
            transform: translateX(-180px) translate3d(0, -30px, 0);
            letter-spacing: 20px;
            opacity: 0;
        }
    }
    
    @keyframes glide-right-anim {
        to {
            transform: translateX(180px) translate3d(0, -30px, 0);
            letter-spacing: 20px;
            opacity: 0;
        }
    }
}

@media (max-width: 992px) {
    .hero-image-container {
        width: 80%;
        height: 40%;
        bottom: 5%;
        top: auto;
        right: 10%;
        opacity: 0.4;
    }
    .hero-content {
        max-width: 100%;
        margin-top: -10vh;
    }
}

/* ==========================================================================
   Philosophy Section 哲学
   ========================================================================== */
.philosophy-section {
    position: relative;
    padding: 15vh 10% 20vh;
    z-index: 5;
    background-color: var(--bg-color);
}

.philosophy-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.philosophy-num {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 30px;
    font-family: 'Syne', sans-serif;
}

.philosophy-title {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.4;
    margin-bottom: 50px;
    letter-spacing: 1px;
}

.philosophy-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-light);
    font-weight: 300;
}

.philosophy-body p {
    margin-bottom: 20px;
}

.philosophy-line {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform-origin: left;
}

/* 原生 CSS 滚动动画：哲学板块线条延伸与标题淡入 */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
    .philosophy-line {
        animation: stretch-horizontal linear both;
        animation-timeline: view();
        animation-range: entry 10% cover 50%;
    }
    
    .philosophy-title {
        animation: fade-in-up linear both;
        animation-timeline: view();
        animation-range: entry 5% cover 30%;
    }

    @keyframes stretch-horizontal {
        from { transform: scaleX(0); }
        to { transform: scaleX(1); }
    }

    @keyframes fade-in-up {
        from { opacity: 0; transform: translateY(40px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (max-width: 768px) {
    .philosophy-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==========================================================================
   代表作品 Section (Scrollytelling - 左固定右长滚)
   ========================================================================== */
.projects-section {
    position: relative;
    width: 100%;
    background-color: var(--bg-dark); /* 暗黑展厅背景 */
    color: #ffffff;
    z-index: 6;
}

/* 触发器层，生成四个高度为100vh的滚动感应块 */
#tracked {
    position: relative;
    width: 100%;
}

.track-trigger {
    height: 100vh;
    width: 100%;
    pointer-events: none;
}

/* 声明每个 track-trigger 的 view-timeline，将作用域 hoisting 到根 */
#tr-1 { view-timeline: --tl-1 block; }
#tr-2 { view-timeline: --tl-2 block; }
#tr-3 { view-timeline: --tl-3 block; }
#tr-4 { view-timeline: --tl-4 block; }

/* 粘性定位的大容器 */
.sticky-container {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    overflow: hidden;
    pointer-events: auto;
    z-index: 10;
}

/* 只有当 projects section 正被激活时，内部元素才恢复指针响应（JS控制或CSS区域） */
.projects-section {
    /* 配合容器高度 */
    margin-bottom: 0;
}

/* 左边固定信息面板 */
.project-meta-panel {
    width: 45%;
    height: 100%;
    padding: 10vh 8%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--line-color-dark);
    pointer-events: auto; /* 允许点击 */
    position: relative;
    background-color: var(--bg-dark);
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-section-title {
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--text-light);
    font-weight: 600;
}

.meta-counter {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
}

.current-num {
    color: #fff;
}

.total-num {
    color: var(--text-light);
    margin-left: 4px;
}

.meta-slides {
    position: relative;
    height: 60%;
    display: flex;
    align-items: center;
}

.meta-slide {
    position: absolute;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.meta-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.project-year {
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.project-name {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.project-architects {
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    color: var(--text-light);
    font-weight: 300;
}

.project-desc {
    font-size: 0.85rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-weight: 300;
    max-width: 400px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    font-size: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    letter-spacing: 1.5px;
    border-radius: 20px;
    color: var(--text-light);
}

.meta-footer {
    display: flex;
    align-items: center;
}

.mobile-nav-buttons {
    display: none;
}

.scroll-guide {
    font-size: 0.6rem;
    letter-spacing: 3px;
    color: var(--text-light);
    animation: blink-guide 2.5s infinite ease-in-out;
}

@keyframes blink-guide {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* 右边图片滚动区 */
.project-image-panel {
    width: 55%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: #000;
    pointer-events: auto;
}

.project-images-scroll-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-wrapper-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 第一张图默认可见 */
.image-wrapper-outer[data-index="1"] {
    transform: translateY(0);
}

.image-wrapper-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transform: scale(1.15) translateY(-5%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s;
}

.project-img:hover {
    filter: grayscale(20%) contrast(1.05);
}

/* ==========================================================================
   原生 CSS 滚动驱动逻辑 (Scroll-Driven animations for Projects)
   ========================================================================== */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    /* 容器激活与显示：由于是一页式，我们需要在进入整个大 projects 块时把 sticky 面板淡入显示 */
    .sticky-container {
        position: sticky; /* CSS 原生在滚动区内进行 Sticky */
        pointer-events: auto;
    }

    /* --- 利用 timeline 控制图片的滑入 --- */
    /* 图2：绑定触发器 2 */
    .image-wrapper-outer[data-index="2"] {
        animation: slide-up-in linear both;
        animation-timeline: --tl-2;
        animation-range: entry 0% cover 100%;
    }
    .image-wrapper-outer[data-index="2"] .project-img {
        animation: img-parallax-scroll linear both;
        animation-timeline: --tl-2;
        animation-range: entry 0% cover 100%;
    }

    /* 图3：绑定触发器 3 */
    .image-wrapper-outer[data-index="3"] {
        animation: slide-up-in linear both;
        animation-timeline: --tl-3;
        animation-range: entry 0% cover 100%;
    }
    .image-wrapper-outer[data-index="3"] .project-img {
        animation: img-parallax-scroll linear both;
        animation-timeline: --tl-3;
        animation-range: entry 0% cover 100%;
    }

    /* 图4：绑定触发器 4 */
    .image-wrapper-outer[data-index="4"] {
        animation: slide-up-in linear both;
        animation-timeline: --tl-4;
        animation-range: entry 0% cover 100%;
    }
    .image-wrapper-outer[data-index="4"] .project-img {
        animation: img-parallax-scroll linear both;
        animation-timeline: --tl-4;
        animation-range: entry 0% cover 100%;
    }

    /* 联动数字的淡入动画 */
    .meta-counter {
        animation: counter-change linear both;
        animation-timeline: scroll(root);
        /* 简单地基于滚动比例让其改变，如果更精确可以使用 JS fallback */
    }

    /* 动画定义 */
    @keyframes slide-up-in {
        from { transform: translateY(100%); }
        to { transform: translateY(0%); }
    }

    @keyframes img-parallax-scroll {
        from { transform: scale(1.15) translateY(12%); }
        to { transform: scale(1.1) translateY(-12%); }
    }

    @keyframes text-scrolly {
        0% { opacity: 0; transform: translateY(30px); }
        15%, 85% { opacity: 1; transform: translateY(0px); }
        100% { opacity: 0; transform: translateY(-30px); }
    }
}

@media (max-width: 992px) {
    /* 移動端排版優化，高度設為一屏，禁止超長滾動感應 */
    #tracked {
        display: none !important;
    }
    
    .projects-section {
        height: 100vh !important;
        overflow: hidden !important;
    }

    .sticky-container {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
        width: 100% !important;
        pointer-events: auto !important;
        z-index: 10;
    }
    
    .project-meta-panel {
        width: 100% !important;
        height: 55% !important; /* 上半截展示文字 */
        border-right: none !important;
        border-bottom: 1px solid var(--line-color-dark) !important;
        padding: 40px 6% 20px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .meta-slides {
        height: 70% !important;
        display: flex !important;
        align-items: center !important;
        position: relative !important;
    }
    
    .meta-slide {
        position: absolute !important;
        opacity: 0 !important;
        transform: none !important;
        margin-bottom: 0 !important;
        display: block !important; /* 取消原來的 display: none，改用 opacity 控制 */
        transition: opacity 0.4s ease !important;
        width: 100% !important;
    }
    
    .meta-slide.active {
        opacity: 1 !important;
        z-index: 2 !important;
    }
    
    /* 移動端導航控制按鈕 */
    .scroll-guide {
        display: none !important;
    }
    
    .mobile-nav-buttons {
        display: flex !important;
        gap: 20px !important;
        margin-top: 10px !important;
    }
    
    .mob-nav-btn {
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
        padding: 8px 20px !important;
        font-family: inherit !important;
        font-size: 0.65rem !important;
        letter-spacing: 2px !important;
        border-radius: 20px !important;
        cursor: pointer !important;
        transition: border-color 0.3s, background-color 0.3s !important;
        outline: none !important;
    }
    
    .mob-nav-btn:active {
        background-color: rgba(255, 255, 255, 0.15) !important;
        border-color: #ffffff !important;
    }
    
    .project-image-panel {
        width: 100% !important;
        height: 45% !important; /* 下半截展示大圖 */
    }
    
    .project-images-scroll-wrapper {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .image-wrapper-outer {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: translateY(100%) !important;
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 1 !important;
    }
    
    .image-wrapper-outer.active {
        transform: translateY(0) !important;
        z-index: 3 !important;
    }
    
    .image-wrapper-outer.prev {
        transform: translateY(-100%) !important;
        z-index: 2 !important;
    }
    
    .image-wrapper-outer .project-img {
        transform: scale(1.1) !important; /* 移動端不用太劇烈的滾動視差 */
    }
}

/* ==========================================================================
   专业分类 Section
   ========================================================================== */
.expertise-section {
    position: relative;
    padding: 18vh 10% 15vh;
    background-color: var(--bg-color);
    z-index: 5;
}

.expertise-container {
    max-width: 1000px;
    margin: 0 auto;
}

.expertise-num {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 30px;
    font-family: 'Syne', sans-serif;
}

.section-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 80px;
    letter-spacing: 2px;
}

.expertise-list {
    display: flex;
    flex-direction: column;
}

.expertise-item {
    padding: 40px 0;
    position: relative;
    display: grid;
    grid-template-columns: 0.4fr 0.6fr;
    gap: 40px;
    transition: transform 0.4s var(--transition-slow);
}

.item-title {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.item-num {
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
}

.item-title h3 {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 600;
    letter-spacing: 1px;
}

.item-body {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-light);
    font-weight: 300;
}

.item-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--transition-slow);
}

/* 划过分类项目时，细线自左至右拉长，文字变黑 */
.expertise-item:hover .item-line {
    transform: scaleX(1);
}

.expertise-item:hover {
    transform: translateX(10px);
}

.expertise-item:hover h3, 
.expertise-item:hover .item-body {
    color: var(--accent-color);
}

@supports ((animation-timeline: view()) and (animation-range: entry)) {
    .expertise-item {
        transform-style: preserve-3d;
        backface-visibility: hidden;
        animation: fade-in-3d-slide linear both;
        animation-timeline: view();
    }
    
    .expertise-item:nth-child(1) {
        animation-range: entry 5% cover 25%;
    }
    .expertise-item:nth-child(2) {
        animation-range: entry 15% cover 35%;
    }
    .expertise-item:nth-child(3) {
        animation-range: entry 25% cover 45%;
    }

    @keyframes fade-in-3d-slide {
        from {
            opacity: 0;
            transform: perspective(1200px) rotateX(-35deg) rotateY(10deg) translate3d(0, 160px, -150px);
            filter: blur(4px);
        }
        to {
            opacity: 1;
            transform: perspective(1200px) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0);
            filter: blur(0);
        }
    }
}

@media (max-width: 768px) {
    .expertise-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 30px 0;
    }
}

/* ==========================================================================
   联系我们 Section & Footer
   ========================================================================== */
.contact-section {
    position: relative;
    padding: 15vh 10% 5vh;
    background-color: var(--bg-color);
    z-index: 5;
    border-top: 1px solid var(--line-color);
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    margin-bottom: 12vh;
}

.contact-num {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 30px;
    font-family: 'Syne', sans-serif;
}

.contact-heading {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.contact-intro {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 50px;
    font-weight: 300;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.info-block h4 {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.info-block p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-light);
    font-weight: 300;
}

/* 表单样式 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: var(--text-color);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--line-color);
    padding: 12px 0;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: border-bottom-color 0.3s;
    outline: none;
    font-weight: 300;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #bbb;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--accent-color);
}

.submit-btn {
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: #fff;
    padding: 18px 30px;
    font-family: inherit;
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.4s var(--transition-slow), border-color 0.4s var(--transition-slow);
    margin-top: 20px;
}

.submit-btn:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.submit-btn:hover .btn-arrow {
    transform: translateX(6px);
}

/* Footer 页脚 */
.site-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 40px;
}

.footer-line {
    width: 0;
    height: 1px;
    background-color: var(--line-color);
    margin-bottom: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-light);
    letter-spacing: 1.5px;
}

.footer-design {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
}

/* 页脚细线随滚动延伸动画 */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
    .footer-line {
        animation: stretch-horizontal linear both;
        animation-timeline: view();
        animation-range: entry 10% cover 50%;
    }
}

@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}
