/* ==========================================================================
   Abook Frontend Home — 九重居首页
   设计：「九重天穹」深墨夜空 Hero + 八卦星环 · 下阕书斋宣纸色系
   全部本地CSS，不引用外部资源
   ========================================================================== */

.abook-home {
    --night:      #0d1222;
    --night-2:    #161d33;
    --night-3:    #1d2440;
    --gold:       #d4af5f;
    --gold-soft:  #e8cf9a;
    --gold-deep:  #b8860b;
    --moon:       #e9e4d8;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    /* 全出血布局：突破主题内容栏宽限制，PC 端通栏展示 */
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

body.home {
    overflow-x: clip;
}

/* 解除主题 .is-layout-constrained 对首页容器的 645px 限宽，保证通栏 */
.is-layout-constrained > .abook-home,
.entry-content > .abook-home {
    max-width: none;
}

/* 首页即品牌门面，隐藏主题输出的页面标题 */
body.home .wp-block-post-title,
body.home .entry-title {
    display: none;
}

/* 首页已有内置导航栏：隐藏主题页头，并消除内容区顶部留白，Hero 直达顶端 */
body.home .wp-site-blocks > header.wp-block-template-part {
    display: none;
}

/* 主题用内联样式写入间距，需 !important 覆盖 */
body.home main {
    margin-top: 0 !important;
}

body.home main > .wp-block-group:first-child {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.jch-container {
    max-width: 1160px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ══════════ Hero：九重天穹 ══════════ */
.jch-hero {
    position: relative;
    overflow: hidden;
    color: var(--moon);
    background:
        radial-gradient(ellipse 70% 55% at 72% 18%, rgba(62,92,118,.5), transparent 62%),
        radial-gradient(ellipse 55% 45% at 15% 85%, rgba(168,56,46,.16), transparent 55%),
        linear-gradient(180deg, var(--night) 0%, var(--night-2) 55%, var(--night-3) 100%);
}

/* 竖排对联装饰（PC 端） */
.jch-couplet {
    position: absolute;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-family: var(--serif);
    font-size: 15px;
    letter-spacing: 12px;
    color: rgba(212,175,95,.42);
    text-shadow: 0 0 14px rgba(212,175,95,.25);
    user-select: none;
    pointer-events: none;
}

.jch-couplet-r { right: 4.5%; }
.jch-couplet-l { left: 4.5%; }

/* 星空 */
.jch-stars { position: absolute; inset: 0; pointer-events: none; }

.jch-star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 1px rgba(255,255,255,.55);
    opacity: .2;
    animation: jch-twinkle 3.4s ease-in-out infinite;
}

@keyframes jch-twinkle {
    0%, 100% { opacity: .12; transform: scale(.8); }
    50%      { opacity: .9;  transform: scale(1.2); }
}

/* 顶栏 */
.jch-nav {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.jch-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-size: 20px;
    letter-spacing: 4px;
    color: #f3e2b3;
    text-decoration: none;
}

.jch-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(212,175,95,.6);
    border-radius: 9px;
    background: rgba(212,175,95,.08);
    color: var(--gold-soft);
    font-size: 19px;
}

.jch-nav-links {
    margin-left: auto;
    display: flex;
    gap: 26px;
}

.jch-nav-links a,
.jch-nav-user a {
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(233,228,216,.75);
    text-decoration: none;
    transition: color .25s;
}

.jch-nav-links a:hover { color: var(--gold-soft); }

.jch-nav-user a {
    padding: 6px 16px;
    border: 1px solid rgba(212,175,95,.4);
    border-radius: 999px;
    font-size: 13px;
    transition: all .25s;
}

.jch-nav-user a:hover {
    color: var(--gold-soft);
    background: rgba(212,175,95,.1);
}

/* Hero 主体 */
.jch-hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 84px;
}

.jch-hero-text { max-width: 580px; }

.jch-hero-eyebrow {
    margin: 0 0 14px 0;
    font-size: 13px;
    letter-spacing: 6px;
    color: var(--gold);
}

.jch-hero-title {
    margin: 0 0 16px 0;
    font-family: var(--serif);
    font-size: 60px;
    font-weight: 600;
    letter-spacing: 10px;
    line-height: 1.15;
    background: linear-gradient(120deg, #f3e2b3 0%, var(--gold) 48%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.jch-hero-sub {
    margin: 0 0 30px 0;
    font-size: 15px;
    letter-spacing: 2px;
    line-height: 1.9;
    color: rgba(233,228,216,.82);
}

.jch-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.jch-cta-btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: 1px;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s, background .25s;
}

.jch-cta-btn.primary {
    background: linear-gradient(135deg, #e3c57c 0%, #c99a3d 100%);
    color: #221c10;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(212,175,95,.3);
}

.jch-cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212,175,95,.42);
}

.jch-cta-btn.ghost {
    border: 1px solid rgba(212,175,95,.5);
    color: var(--gold-soft);
}

.jch-cta-btn.ghost:hover {
    background: rgba(212,175,95,.12);
    transform: translateY(-2px);
}

/* 八卦星环 */
.jch-bagua {
    position: relative;
    flex: 0 0 auto;
    width: 330px;
    height: 330px;
    animation: jch-spin 90s linear infinite;
}

.jch-bagua::before,
.jch-bagua::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.jch-bagua::before {
    inset: 24px;
    border: 1px solid rgba(212,175,95,.28);
}

.jch-bagua::after {
    inset: 74px;
    border: 1px dashed rgba(212,175,95,.35);
}

.jch-taiji {
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 66px;
    color: var(--gold);
    text-shadow: 0 0 24px rgba(212,175,95,.5);
    transform: translate(-50%, -50%);
    animation: jch-spin-r 90s linear infinite;
}

.jch-trigram {
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 26px;
    color: var(--gold);
    text-shadow: 0 0 12px rgba(212,175,95,.5);
    transform: translate(-50%, -50%) rotate(var(--a)) translateY(-142px) rotate(calc(var(--a) * -1));
}

@keyframes jch-spin   { to { transform: rotate(360deg); } }
@keyframes jch-spin-r { to { transform: translate(-50%, -50%) rotate(-360deg); } }

/* ══════════ 商务合作 ══════════ */
.jch-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    max-width: 820px;
    margin: 0 auto;
}

.jch-contact-card {
    padding: 28px 24px;
    background: var(--paper-light);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform .3s, box-shadow .3s;
}

.jch-contact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.jch-contact-label {
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--ink-light);
}

.jch-contact-value {
    font-family: var(--serif);
    font-size: 21px;
    letter-spacing: 1px;
    color: var(--ink);
    word-break: break-all;
}

.jch-copy-btn {
    margin-top: 16px;
    padding: 7px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-warm);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--ink-soft);
    cursor: pointer;
    font-family: var(--sans);
    transition: all .25s;
}

.jch-copy-btn:hover {
    border-color: var(--cinnabar-soft);
    color: var(--cinnabar);
    background: var(--paper-light);
}

/* ══════════ 页脚 ══════════ */
.jch-footer {
    margin-top: 58px;
    padding: 36px 0 30px;
    background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%);
    color: rgba(233,228,216,.72);
}

/* 站点矩阵 */
.jch-sites {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 26px;
    margin-bottom: 18px;
    font-size: 13px;
    letter-spacing: 1px;
}

.jch-sites span {
    color: rgba(233,228,216,.5);
    letter-spacing: 3px;
}

.jch-sites a {
    padding-bottom: 2px;
    border-bottom: 1px dotted rgba(212,175,95,.45);
    color: rgba(233,228,216,.82);
    text-decoration: none;
    transition: color .25s, border-color .25s;
}

.jch-sites a:hover {
    color: var(--gold-soft);
    border-bottom-color: var(--gold-soft);
}

.jch-friend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 24px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(212,175,95,.15);
    font-size: 13px;
    letter-spacing: 1px;
}

.jch-friend a {
    color: var(--gold-soft);
    text-decoration: none;
    transition: color .25s;
}

.jch-friend a:hover { color: #fff; text-decoration: underline; }

.jch-copyright {
    margin: 0;
    text-align: center;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(233,228,216,.45);
}

/* ══════════ Toast & 滚动渐显 ══════════ */
.jch-toast {
    position: fixed;
    left: 50%;
    bottom: 36px;
    z-index: 999;
    padding: 10px 24px;
    border-radius: 999px;
    background: var(--ink);
    color: #f7f3ec;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(16px);
    transition: opacity .3s, transform .3s;
}

.jch-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.jch-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s ease, transform .7s ease;
}

.jch-reveal.jch-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .jch-reveal { opacity: 1; transform: none; transition: none; }
    .jch-bagua, .jch-taiji, .jch-star { animation: none; }
}

