﻿/* =============================================================================
   MUSEUM DESIGN SYSTEM - ESTUARY TOKENS (入海口浅透物理解构系统)
   ============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200;300;400;500;700&display=swap');

:root {
    --bg-gradient: linear-gradient(180deg, #E2ECF2 0%, #F1F6F9 45%, #CBD9E1 100%);
    --text-active: #213242;                      
    --text-muted: rgba(33, 50, 66, 0.6);      
    --text-faint: rgba(33, 50, 66, 0.28);      
    --font-serif: "Noto Serif SC", "Georgia", "Source Han Serif SC", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-luxurious: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-quick: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================================
   GLOBAL RESET & ENVIRONMENT
   ============================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}

body {
    background: var(--bg-gradient);
    color: var(--text-active);
    font-family: var(--font-sans);
    overflow: hidden; 
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased; 
    position: relative;
}

/* 统一底部的缓慢脉动小水坑：保持 100% 静态温润，杜绝闪烁 */
.bottom-puddle-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 32vh;
    background: radial-gradient(ellipse at bottom, rgba(59, 158, 255, 0.08) 0%, rgba(241, 246, 249, 0) 70%);
    pointer-events: none;
    z-index: 10;
}

/* 全局超链接重置 */
a {
    text-decoration: none !important;
    color: inherit !important;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* =============================================================================
   ENVIRONMENTAL THEMES
   ============================================================================= */
body.theme-cold {
    background: radial-gradient(circle at center, rgba(100, 180, 255, 0.05) 0%, rgba(230, 238, 242, 0) 70%);
    background-color: #E2ECF2; 
}

/* =============================================================================
   HOMEPAGE WATER DRIP STAGE (首页物理重力落水与 3D 涟漪 - 仅执行一次)
   ============================================================================= */
.water-stage {
    position: fixed;
    inset: 0;
    z-index: 50; 
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rain-cinematic {
    position: relative;
    width: 400px;
    height: 400px;
    --duration: 2.8s;
    --delay: 0.2s;
}

.rain-cinematic .drop {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -100px; 
    width: 45px;
    height: 64px;
    
    animation-name: fall;
    animation-duration: var(--duration);
    animation-delay: var(--delay);
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-timing-function: ease-in; 
    will-change: top, transform, opacity;
}

@keyframes fall {
    0% {
        top: -100px;
        transform: translateX(-50%) scaleY(1.15) scaleX(0.85); 
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    39% {
        transform: translateX(-50%) scaleY(1.15) scaleX(0.85);
        opacity: 1;
    }
    40% {
        top: 52%; 
        transform: translateX(-50%) scaleY(0.85) scaleX(1.15); 
        opacity: 1;
    }
    41% {
        top: 52%;
        transform: translateX(-50%) scale(0); 
        opacity: 0;
    }
    100% {
        top: 52%;
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
}

.rain-cinematic .waves > div {
    position: absolute;
    top: 52%; 
    left: 50%;
    width: 2px;
    height: 1px;
    border-radius: 300px / 150px; 
    border: solid rgba(33, 50, 66, 0.25) 3.5px;
    transform: translate(-50%, -50%) scale(0);
    
    animation-name: spread;
    animation-duration: var(--duration);
    animation-delay: var(--delay);
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.1, 0.8, 0.3, 1);
}

.rain-cinematic .waves > div:nth-child(2) {
    animation-delay: calc(var(--delay) + 0.25s);
    border: solid rgba(33, 50, 66, 0.15) 2px;
}

@keyframes spread {
    0%, 38% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    40% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        width: 650px;
        height: 325px;
        border-width: 1px;
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0;
    }
}

/* =============================================================================
   ENTRANCE UI (首页文字排版)
   ============================================================================= */
.entrance-ui {
    position: absolute;
    inset: 0 8%; 
    z-index: 100;
    pointer-events: none;
}

.entrance-brand {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: left;
}

.main-title {
    font-family: var(--font-serif);
    font-size: 64px; 
    letter-spacing: 12px;
    font-weight: 200; 
    color: var(--text-active);
    margin-bottom: 24px;
}

.main-title span {
    display: inline-block;
    white-space: pre;
    opacity: 0;
    transform: translate(-3px, 4px) scale(0.92); 
    filter: blur(8px); 
    animation: mFocus 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: opacity, filter, transform;
}

@keyframes mFocus {
    to {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        filter: blur(0); 
    }
}

.main-subtitle {
    font-family: var(--font-sans);
    font-size: 18px; 
    letter-spacing: 8px;
    font-weight: 300;
    color: var(--text-muted);
    opacity: 0;
    filter: blur(6px);
    transform: translateY(4px);
    animation: mFocus 1.5s cubic-bezier(0.16, 1, 0.3, 1) 2.2s forwards; 
}

.entrance-nav {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column; 
    align-items: flex-end;   
    gap: 20px;              
    opacity: 0;
    transform: translateY(-50%) translateY(15px);
    animation: entranceNavFadeUp 1.6s cubic-bezier(0.16, 1, 0.3, 1) 2.4s forwards; 
}

@keyframes entranceNavFadeUp {
    to {
        opacity: 1;
        transform: translateY(-50%) translateY(0);
        pointer-events: auto; 
    }
}

.index-nav-btn {
    --w: 120px;
    --h: 40px;
    border-color: rgba(33, 50, 66, 0.1);
}

.index-nav-btn span {
    font-size: 0.9rem;
    letter-spacing: 4px;
    font-weight: 400;
}

/* =============================================================================
   REBALANCED HIGH SCHOOL LAYOUT (高中及大学页面重心非对称平衡重塑)
   ============================================================================= */
.section-page {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-container {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    padding: 80px 8% 80px 8%; 
}

.carousel-container {
    width: 100%;
    max-width: 1100px; 
    height: auto;
    position: relative;
}

.carousel-stage {
    position: relative;
    width: 100%;
    height: auto;
}

.poem-wrapper {
    position: absolute;
    inset: 0;
    display: none; 
    flex-direction: row; 
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    will-change: transform, opacity;
}

.poem-wrapper.active {
    position: relative; 
    display: flex !important;
    opacity: 1;
}

.poem-left {
    width: 28%; 
    height: 380px; 
    display: flex;
    justify-content: flex-end; 
    align-items: flex-end; 
    padding-right: 60px; 
    padding-bottom: 110px; 
    border-right: 1px solid rgba(44, 58, 71, 0.08); 
    text-align: right;
    cursor: pointer;
}

.poem-eye {
    font-family: var(--font-serif);
    font-size: 2.2rem; 
    letter-spacing: 12px;
    font-weight: 300;
    color: var(--text-active);
    display: inline-block;
    white-space: nowrap;
    transition: var(--transition-luxurious);
    will-change: filter, opacity, transform;
}

/* 右分栏 */
.poem-right {
    width: 65%; 
    height: 380px;            
    column-width: 260px;      
    column-gap: 50px;         
    column-fill: auto;        
    display: block;           
    text-align: left;
}

.poem-right ul {
    list-style-type: none;
    margin-bottom: 2.2rem;
    break-inside: avoid;
}

.poem-right li {
    position: relative;
    display: block;
    width: fit-content;
    white-space: nowrap; 
    overflow: hidden;    
    font-family: var(--font-sans);
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--text-muted); 
    line-height: 2.2;
    padding-bottom: 2px;
    opacity: 0;
    will-change: opacity, filter;
    transition: filter 0.8s ease-out, opacity 0.8s ease-out;
}

.poem-right ul li:not(:first-child) {
    margin-left: 24px; 
}

.poem-right ul li:first-child::first-letter {
    font-family: var(--font-serif);
    font-size: 1.25em;
    font-weight: 500;
    padding-right: 2px;
    color: var(--text-active);
}

/* =============================================================================
   ADDED: THE FLUID OCEAN (自述页专属：无界流体诗歌网格与自动阶梯冷聚)
   ============================================================================= */
.self-page-fluid {
    overflow-y: auto !important; /* 自述长页面允许滚动 */
    height: 100vh;
}

.self-fluid-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh; /* 撑满屏幕 */
}

/* 🟢 四列横向画卷网格 */
.fluid-poems-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    margin-top: 10vh;
    margin-bottom: 60px;
}

.fluid-poem-col {
    width: 22%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 诗眼标题 */
.fluid-col-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    letter-spacing: 6px;
    color: var(--text-active);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(33, 50, 66, 0.08);
    padding-bottom: 15px;
    
    /* 初始模糊隐藏 */
    opacity: 0;
    filter: blur(8px);
    transform: translateY(10px);
    will-change: opacity, filter, transform;
    transition: filter 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 1.4s ease-out,
                transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.fluid-poem-col ul {
    list-style-type: none;
}

/* 诗句样式 */
.fluid-poem-col li {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 2.2;
    color: var(--text-muted);
    padding-bottom: 4px;
    
    /* 初始离焦、虚胖字距状态 */
    opacity: 0;
    filter: blur(8px);
    letter-spacing: var(--start-spacing, 12px); 
    transform: translateY(10px);
    will-change: opacity, filter, letter-spacing, transform;
    
    transition: filter 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 1.4s ease-out,
                letter-spacing 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🟢 当页面载入并加载 `loaded` 类名时，水流自发向下流动，触发全篇顺流冷凝 */
body.self-page-fluid.loaded .fluid-col-title,
body.self-page-fluid.loaded .fluid-poem-col li {
    opacity: 1;
    filter: blur(0px) !important;
    letter-spacing: 3px; /* 完美冷聚 */
    transform: translateY(0);
}

/* 按钮渐现关键帧 */
@keyframes footerFadeIn {
    to { opacity: 1; }
}

/* 🟢 大学与高中页面底部的相对自适应大按钮，防止绝对定位重叠 */
.self-page-fluid .section-footer-nav {
    position: relative;
    bottom: 0;
    border-top: 1px solid rgba(44, 58, 71, 0.08); 
    padding-top: 50px; 
    margin-top: 40px;
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    width: 100%;
}

/* 10细线流体按钮系统 */
.btn-fluid {
    --w: 320px;
    --h: 50px;
    --c: cubic-bezier(1, .49, .16, .96); 
    position: relative;
    display: flex;
    flex-direction: column; 
    width: var(--w);
    height: var(--h);
    border: 1px solid rgba(33, 50, 66, 0.15); 
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.4s var(--c);
    z-index: 200;
}

.back-btn-fluid {
    --w: 160px;
    --h: 38px;
    position: fixed;
    top: 50px;
    left: 8%;
    border: 1px solid rgba(33, 50, 66, 0.08);
}

.btn-fluid i {
    display: block;
    width: 100%;
    height: 10.5%; 
    background: var(--text-active); 
    transform: scaleX(0);
    transition: transform 0.6s var(--c);
    will-change: transform;
}

.btn-fluid i:nth-child(1) { transition-delay: 0.01s; }
.btn-fluid i:nth-child(2) { transition-delay: 0.03s; }
.btn-fluid i:nth-child(3) { transition-delay: 0.05s; }
.btn-fluid i:nth-child(4) { transition-delay: 0.07s; }
.btn-fluid i:nth-child(5) { transition-delay: 0.09s; }
.btn-fluid i:nth-child(6) { transition-delay: 0.11s; }
.btn-fluid i:nth-child(7) { transition-delay: 0.13s; }
.btn-fluid i:nth-child(8) { transition-delay: 0.15s; }
.btn-fluid i:nth-child(9) { transition-delay: 0.17s; }
.btn-fluid i:nth-child(10) { transition-delay: 0.19s; }

.style-fluid-1 i { transform-origin: center left; }
.style-fluid-2 i { transform-origin: center right; }

.btn-fluid:hover i { transform: scaleX(1); }
.btn-fluid:hover { border-color: var(--text-active); }

.btn-fluid span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--text-active);
    transition: color 0.5s var(--c);
    z-index: 10;
    pointer-events: none; 
}

.btn-fluid:hover span {
    color: #ffffff; 
    transition-delay: 0.22s; 
}

.section-footer-nav {
    position: absolute;
    bottom: 8vh; 
    left: 8%;
    right: 8%;
    border-top: 1px solid rgba(44, 58, 71, 0.08); 
    padding-top: 30px; 
    display: flex;
    justify-content: flex-end; 
    align-items: center;
}

/* WIDGETS */
.section-tag-fixed {
    position: fixed;
    top: 50px;
    right: 8%;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 4px;
    color: var(--text-active);
    opacity: 0.35;
    z-index: 500;
}

@media screen and (max-width: 900px) {
    .fluid-poems-grid {
        flex-direction: column !important;
        gap: 60px;
    }
    .fluid-poem-col {
        width: 100% !important;
    }
    .self-fluid-container {
        height: auto !important;
        padding-top: 140px;
    }
}