/* ==========================================================================
   SUÉ Atelier —— 全站公共样式
   由 header.htm 统一引入，所有页面共享。改这里全站生效。
   页面自己的专属样式仍写在各模板的 <style> 里。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   --bg-color 有两个色系：多数页面 #fcfcfc，单页/留言/产品页是暖色 #f8f7f2。
   需要暖色的页面在自己的 <style> 里覆盖一行即可。
   -------------------------------------------------------------------------- */
:root {
    --bg-color:    #fcfcfc;
    --bg-alt:      #f1f0ea;
    --card-bg:     #f6f5f1;
    --border-color:#e2e1dc;
    --text-main:   #1a1a1a;
    --text-muted:  #888782;
    --serif: 'Cormorant Garamond', serif;
    --sans:  'Inter', sans-serif;
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   3. 滚动入场动效
   配合 assets/sue.js。三层保险，任何一层失效内容都还看得见：
     1) 没有 html.sue-anim（JS 未执行）      -> 内容默认可见
     2) 有 sue-anim 但不支持 IO / 用户要求减少动效 -> sue.js 立即全部显示
     3) IO 因页面隐藏等原因始终不回调          -> sue.js 的兜底定时器显示
   -------------------------------------------------------------------------- */
/* 只有 JS 成功打上 html.sue-anim 才隐藏。
   脚本被拦截 / 报错 / 根本没加载时，内容默认就是可见的 —— 绝不能因为动效没跑而看不见东西。 */
.sue-anim .sue-reveal {
    opacity: 0;
    transform: translateY(28px);
}
.sue-anim .sue-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 1s cubic-bezier(.16, 1, .3, 1),
                transform 1s cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-reduced-motion: reduce) {
    .sue-anim .sue-reveal,
    .sue-anim .sue-reveal.is-in { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   4. 通用页头（配合 pagehero.htm）
   -------------------------------------------------------------------------- */
.sue-page-banner {
    width: 100%;
    max-height: 50vh;
    overflow: hidden;
}
.sue-page-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    filter: brightness(0.96) contrast(1.02);
}
.sue-page-hero {
    padding: 170px 5vw 40px;
    text-align: center;
}
/* 有封面图时标题不必再避让固定导航 */
.sue-page-banner + .sue-page-hero { padding-top: 60px; }
.sue-page-hero h1 {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #111;
    margin: 0;
}
.sue-page-hero p {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-muted);
    margin: 16px 0 0;
}

/* --------------------------------------------------------------------------
   4b. 子栏目导航（配合 subnav.htm）
   -------------------------------------------------------------------------- */
.sue-subnav { list-style: none; margin: 0 auto 10px; padding: 0 5vw 30px;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 34px; }
.sue-subnav:not(:has(li)) { display: none; }
.sue-subnav > li { margin: 0; padding: 0; }
.sue-subnav > li > a {
    display: block; padding: 6px 0;
    font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
    color: #bbb; text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .28s, border-color .28s;
}
.sue-subnav > li > a:hover { color: #111; border-bottom-color: #111; }
.sue-subnav > li > a.is-current { color: #111; border-bottom-color: #111; }

/* --------------------------------------------------------------------------
   5. 分页
   -------------------------------------------------------------------------- */
.sue-pagination {
    margin: 0 auto;
    padding: 60px 5vw 120px;
    text-align: center;
    font-family: var(--sans);
}
.sue-pagination a,
.sue-pagination span,
.sue-pagination b {
    display: inline-block;
    margin: 0 15px;
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}
.sue-pagination a:hover { color: var(--text-main); }
.sue-pagination b,
.sue-pagination .active {
    color: var(--text-main);
    border-bottom: 1px solid var(--text-main);
    padding-bottom: 3px;
}
/* 隐藏 eyoucms 默认的中文「共X页X条」 */
.sue-pagination .pageinfo { display: none !important; }

/* --------------------------------------------------------------------------
   6. 后台编辑器正文
   两个类名做同一件事：.sue-rich-text（单页/图集详情）、.sue-article-body（新闻详情）。
   字号行高由各页自己定，这里只统一编辑器会产出的标签。
   -------------------------------------------------------------------------- */
.sue-rich-text h3,
.sue-article-body h3 {
    font-family: var(--serif);
    color: #111;
    font-weight: 400;
    font-size: 1.55rem;
    line-height: 1.35;
    margin: 45px 0 18px;
}
.sue-rich-text h4,
.sue-article-body h4 {
    font-family: var(--sans);
    color: #111;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 40px 0 14px;
}
.sue-rich-text ul, .sue-rich-text ol,
.sue-article-body ul, .sue-article-body ol {
    margin: 0 0 25px;
    padding-left: 0;
    list-style: none;
}
.sue-rich-text ol,
.sue-article-body ol { counter-reset: sue-ol; }
.sue-rich-text li,
.sue-article-body li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 14px;
}
/* 默认黑圆点太重，换成一小段细横线 */
.sue-rich-text ul > li::before,
.sue-article-body ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.9em;
    width: 12px;
    height: 1px;
    background-color: var(--text-muted);
}
.sue-rich-text ol > li::before,
.sue-article-body ol > li::before {
    counter-increment: sue-ol;
    content: counter(sue-ol, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.15em;
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.sue-rich-text a,
.sue-article-body a {
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid rgba(17, 17, 17, 0.28);
    transition: border-color 0.3s ease;
}
.sue-rich-text a:hover,
.sue-article-body a:hover { border-bottom-color: #111; }
.sue-rich-text strong,
.sue-article-body strong { font-weight: 500; color: #111; }
.sue-rich-text blockquote,
.sue-article-body blockquote {
    margin: 45px 0;
    padding: 4px 0 4px 26px;
    border-left: 1px solid var(--text-muted);
    font-family: var(--serif);
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.6;
    color: #333;
}
.sue-rich-text blockquote p:last-child,
.sue-article-body blockquote p:last-child { margin-bottom: 0; }
.sue-rich-text hr,
.sue-article-body hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 60px 0;
}
/* 后台粘贴的表格常常撑破版心 */
.sue-rich-text table,
.sue-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    font-size: 0.95rem;
}
.sue-rich-text th, .sue-rich-text td,
.sue-article-body th, .sue-article-body td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
}
.sue-rich-text th,
.sue-article-body th { font-weight: 500; color: #111; }

/* 去饱和只在有 hover 的设备上做：触屏没有 hover，否则图片永远是黑白的 */
.sue-rich-text img,
.sue-article-body img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 50px auto;
}
@media (hover: hover) {
    .sue-rich-text img {
        filter: grayscale(100%);
        transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sue-rich-text img:hover { filter: grayscale(0%); }
}

/* --------------------------------------------------------------------------
   7. 空状态
   -------------------------------------------------------------------------- */
.sue-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 5vw 40px;
    font-family: var(--serif);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   8. 移动端
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .sue-page-hero { padding: 130px 5vw 26px; }
    .sue-page-banner + .sue-page-hero { padding-top: 40px; }
    .sue-page-hero h1 { font-size: 2rem; letter-spacing: 3px; }
    .sue-page-hero p { font-size: 0.9rem; }
    .sue-pagination { padding: 40px 5vw 80px; }
    .sue-pagination a,
    .sue-pagination span,
    .sue-pagination b { margin: 0 10px; font-size: 0.75rem; }
}
