// ============================================ // 呼籁旅行官网 - 全局样式 // ============================================ // ---------- 重置 ---------- *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: @font-size-base; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; } body { font-family: @font-family-base; font-size: @font-size-base; line-height: @line-height-base; color: @color-text-primary; background-color: #FAFAF8; } // ---------- 排版 ---------- h1, h2, h3, h4, h5, h6 { font-weight: @font-weight-bold; line-height: @line-height-tight; color: @color-text-primary; } h1 { font-size: 28px; .respond-md({ font-size: @font-size-hero; }); .respond-lg({ font-size: @font-size-display; }); } h2 { font-size: @font-size-xl; .respond-md({ font-size: @font-size-2xl; }); } h3 { font-size: @font-size-lg; .respond-md({ font-size: @font-size-xl; }); } p { margin-bottom: @space-md; color: @color-text-secondary; } a { color: @color-primary; text-decoration: none; transition: color @transition-fast; &:hover { color: @color-primary-light; } } ul, ol { list-style: none; } img { max-width: 100%; height: auto; display: block; } // ---------- 容器 ---------- .container { .container(); } // ---------- 段落区块 ---------- .section { .section-padding(); } .section--gray { background-color: @color-bg-gray; } .section--warm { background-color: @color-bg-warm; } .section--green { background-color: @color-primary-bg; } .section--accent { background-color: @color-accent-bg; } .section--dark { background-color: @color-primary-dark; color: rgba(255, 255, 255, 0.9); } .section--accent { background-color: @color-accent-bg; } .section--dark { background-color: @color-primary-dark; color: rgba(255, 255, 255, 0.9); } // ---------- 辅助类 ---------- .text-center { text-align: center; } .text-left { text-align: left; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } // ---------- 页面过渡 ---------- .page-enter-active, .page-leave-active { transition: opacity @transition-base; } .page-enter-from, .page-leave-to { opacity: 0; } // ---------- 滚动入场动画 ---------- .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), transform 0.7s cubic-bezier(0.23, 1, 0.32, 1); &.is-visible { opacity: 1; transform: translateY(0); } } // 子元素交错入场(用于网格) .reveal-stagger { .reveal(); &:nth-child(2) { transition-delay: 0.08s; } &:nth-child(3) { transition-delay: 0.16s; } &:nth-child(4) { transition-delay: 0.24s; } &:nth-child(5) { transition-delay: 0.32s; } &:nth-child(6) { transition-delay: 0.40s; } } // ---------- 页面摘要 TL;DR(GEO/SEO 语义摘要块)---------- // 每个页面开头的精准摘要,帮助 AI 和搜索引擎理解"这个页面回答了什么问题" .page-tldr { background: @color-bg-gray; border-bottom: 1px solid @color-border; .page-tldr-inner { max-width: 800px; margin: 0 auto; padding: @space-md @space-lg; border-left: 3px solid @color-primary; background: @color-bg-white; border-radius: 0 @border-radius-md @border-radius-md 0; .respond-md({ padding: @space-lg @space-xl; }); p { font-size: @font-size-sm; color: @color-text-secondary; line-height: @line-height-loose; margin: 0; } } // 容器内居中 + 内边距 .container { padding-top: @space-sm; padding-bottom: @space-sm; .respond-md({ padding-top: @space-md; padding-bottom: @space-md; }); } } // ---------- 全局卡片升级样式 ---------- .card-elevated { background: @color-bg-white; border: 1px solid @color-border; border-radius: @border-radius-lg; box-shadow: @shadow-card; transition: box-shadow @transition-base, transform @transition-base, border-color @transition-base; &:hover { box-shadow: @shadow-card-hover; transform: translateY(-4px); border-color: @color-primary-lighter; } } // 图片容器通用样式 .img-cover { overflow: hidden; border-radius: @border-radius-lg @border-radius-lg 0 0; img { width: 100%; height: 100%; object-fit: cover; transition: transform @transition-slow; } &:hover img, .card-elevated:hover & img { transform: scale(1.05); } } // ---------- 无障碍:减少动效偏好 ---------- @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }