/* ==========================================================================
   Homepage styles
   Requires assets/reader.css for variables, reset and the sidebar shell
   ========================================================================== */

main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

/* ---------- hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 2rem;
    padding: 3.5rem 0 2.5rem;
    border-bottom: 1px solid var(--line);
}
.eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--accent);
    margin-bottom: 1rem;
}
.hero h1 {
    font-size: 2.1rem;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 0.01em;
    margin-bottom: 1.1rem;
}
.hero h1 em {
    font-style: normal;
    color: var(--accent);
}
.hero-lead {
    color: var(--text-dim);
    font-size: 1rem;
    max-width: 34em;
    margin-bottom: 1rem;
}
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero h1 .hero-creed {
    display: block;
    margin: 0.9rem 0 0;
    padding-left: 0.9rem;
    border-left: 2px solid var(--accent);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.7;
    color: var(--text-dim);
}
.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 0.6rem 1.3rem;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--line);
    transition: all .15s;
}
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
    color: var(--text-dim);
    background: transparent;
}
.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-faint);
}

.spec {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    align-self: start;
    box-shadow: 0 1px 3px rgba(27, 36, 48, 0.06);
}
.spec-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.9rem;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}
.spec-head .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    margin-right: 0.4rem;
}
.spec-row {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.8rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-key {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    padding-top: 0.15rem;
}
.spec-val { color: var(--text); }
.spec-val small {
    display: block;
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-top: 0.1rem;
}
.spec-val .num {
    font-family: var(--mono);
    color: var(--accent);
}

/* ---------- section ---------- */
section { padding-top: 3.2rem; }
.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.7rem;
    margin-bottom: 1.5rem;
}
.sec-head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.sec-code {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--text-faint);
}
.sec-desc {
    flex-basis: 100%;
    margin-top: 0.15rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---------- framework ---------- */
.framework {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
}
/* 三张卡的栏目（先看这里） */
.framework-3 { grid-template-columns: repeat(3, 1fr); }
.fw-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.2rem 1.1rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(27, 36, 48, 0.06);
}
.fw-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.55;
}
.fw-idx {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.14em;
    margin-bottom: 0.6rem;
}
.fw-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.fw-card p {
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.7;
}
.fw-card .tagline {
    margin-top: 0.8rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-faint);
    letter-spacing: 0.06em;
}

/* ---------- creed ---------- */
.creed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 2.4rem;
}
.creed-item {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: 0 0.8rem;
    padding: 1.2rem 0;
    border-top: 1px solid var(--line);
}
/* 标题下方已有一条分隔线，首行不再重复画 */
.creed-item:nth-child(-n+2) { border-top: none; }
.creed-idx {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.14em;
    padding-top: 0.2rem;
}
.creed-item h3 {
    grid-column: 2;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.creed-item p {
    grid-column: 2;
    font-size: 0.86rem;
    color: var(--text-dim);
    line-height: 1.75;
}

/* ---------- page stamp ---------- */
.page-stamp {
    margin-top: 3rem;
    text-align: center;
}
.page-stamp .review-stamp { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
    .hero h1 { font-size: 1.7rem; }
    .framework { grid-template-columns: repeat(2, 1fr); }
    .creed { grid-template-columns: 1fr; gap: 0; }
    /* 单列后只有第一条紧贴标题线 */
    .creed-item:nth-child(-n+2) { border-top: 1px solid var(--line); }
    .creed-item:first-child { border-top: none; }
}
@media (max-width: 640px) {
    .framework { grid-template-columns: 1fr; }
}
