/* ==========================================================================
   零一宇宙 · 极简交互实验室（vercel-a / b / c）
   --------------------------------------------------------------------------
   共用方案 2 的视觉令牌：纯白 / 极浅灰 / 1px #eaeaea 细线 / 克莱因蓝 / 等宽数据
   1. 令牌与基础
   2. 顶栏（含 A / B / C 模式切换）
   3. 共用组件：数据条、规格表、作品行、联系行、按钮
   4. 方案 A：100vh 终端分页
   5. 方案 B：落地页 + 弹窗
   6. 方案 C：手风琴
   7. 响应式
   ========================================================================== */

:root {
    --paper: #ffffff;
    --panel: #fafafa;
    --ink: #0a0a0a;
    --ink-soft: #2b2b2b;
    --muted: #737373;
    --faint: #a3a3a3;
    --line: #eaeaea;
    --line-hard: #d4d4d4;
    --accent: #002fa7;
    --ok: #00a35c;

    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    --mono: "JetBrains Mono", "Fira Code", "Space Mono", ui-monospace,
        "Cascadia Mono", Consolas, "Liberation Mono", monospace;

    --pad: clamp(20px, 4vw, 40px);
    --max: 1180px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

::selection {
    background: var(--accent);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ================== 顶栏 ================== */
.topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 58px;
    padding: 0 var(--pad);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pixel-mark {
    width: 28px;
    height: 14px;
    color: var(--ink);
    display: block;
}

.pixel-accent {
    fill: var(--accent);
}

.brand-name {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
}

.modes {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
}

.modes a {
    padding: 4px 9px;
    color: var(--muted);
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.modes a:hover {
    color: var(--ink);
}

.modes a.is-current {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.modes .modes-label {
    color: var(--faint);
    padding-right: 6px;
    letter-spacing: 0.14em;
}

.top-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--ink-soft);
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(0, 163, 92, 0.12);
}

/* ================== 共用排版 ================== */
.eyebrow {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    color: var(--faint);
}

.headline {
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.84;
    color: var(--ink);
}

.lede {
    max-width: 50ch;
    font-size: 15px;
    line-height: 1.78;
    color: var(--ink-soft);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-solid {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-solid:hover {
    background: #00227a;
    border-color: #00227a;
}

.btn-line {
    background: var(--paper);
    border-color: var(--line-hard);
    color: var(--ink);
}

.btn-line:hover {
    border-color: var(--ink);
}

/* 数据条 */
.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.metric {
    display: flex;
    flex-direction: column-reverse;
    gap: 3px;
    padding: 14px 18px;
    border-left: 1px solid var(--line);
}

.metric:first-child {
    border-left: none;
    padding-left: 0;
}

.metric dt {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.metric dd {
    font-family: var(--mono);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
}

.metric dd span {
    font-size: 0.55em;
    color: var(--faint);
    margin-left: 2px;
}

/* 规格表（技术栈） */
.spec {
    border-top: 1px solid var(--line);
}

.spec-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.spec-key {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding-top: 3px;
}

.spec-val {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.spec-val span {
    padding: 2px 7px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soft);
}

/* 作品行 */
.work-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 28px;
    gap: 14px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: none;
    border-left: none;
    border-right: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s;
}

.work-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.work-idx {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--faint);
    padding-top: 4px;
}

.work-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.work-title h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.work-state {
    padding: 1px 6px;
    border: 1px solid var(--line-hard);
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 9.5px;
    color: var(--muted);
}

.work-desc {
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
}

.work-arrow {
    justify-self: end;
    color: var(--faint);
    font-size: 16px;
    line-height: 1.2;
    transition: color 0.15s, transform 0.15s;
}

.work-row:hover .work-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

/* 联系行 */
.contact-rows {
    border-top: 1px solid var(--line);
}

.contact-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.contact-key {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--faint);
}

.contact-val {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--ink-soft);
    border-bottom: 1px solid transparent;
}

a.contact-val:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* 关于要点 */
.points {
    list-style: none;
    border-top: 1px solid var(--line);
}

.points li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.points .point-idx {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--faint);
    padding-top: 2px;
}

.points h3 {
    font-size: 13.5px;
    font-weight: 700;
}

.points p {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

/* 页脚 */
.foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.03em;
    color: var(--faint);
}

.foot a:hover {
    color: var(--ink);
}

/* ================== 方案 A：100vh 终端分页 ================== */
.page-a {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.page-a .split {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    min-height: 0;
}

.split-left {
    display: flex;
    flex-direction: column;
    padding: clamp(28px, 4.6vw, 56px) var(--pad) 26px;
    min-width: 0;
}

.split-left .headline {
    margin-top: 16px;
    font-size: clamp(54px, 7.4vw, 112px);
}

.split-left .lede {
    margin-top: clamp(16px, 2.4vw, 26px);
    max-width: 34ch;
}

.left-foot {
    margin-top: auto;
    padding-top: 22px;
}

.left-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    margin-bottom: 14px;
}

.left-stats .stat {
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
    padding: 14px 14px 12px;
    border-left: 1px solid var(--line);
}

.left-stats .stat:first-child {
    border-left: none;
    padding-left: 0;
}

.left-stats .stat b {
    font-family: var(--mono);
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
}

.left-stats .stat b em {
    font-style: normal;
    font-size: 0.55em;
    color: var(--faint);
}

.left-stats .stat span {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.12em;
    color: var(--faint);
}

.left-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--muted);
}

/* 右侧终端面板 */
.split-right {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: clamp(22px, 3vw, 34px) clamp(20px, 3.4vw, 44px) 20px;
    background: var(--panel);
    border-left: 1px solid var(--line);
}

.tabs {
    display: flex;
    gap: clamp(16px, 2.2vw, 28px);
    border-bottom: 1px solid var(--line);
}

.tab {
    position: relative;
    padding: 2px 0 11px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.18s;
}

.tab::before {
    content: attr(data-idx);
    margin-right: 6px;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    color: var(--faint);
    vertical-align: 1px;
}

.tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -1px;
    height: 1px;
    background: var(--ink);
    transition: right 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
    color: var(--ink-soft);
}

.tab:hover::after {
    right: 0;
}

.tab.is-active {
    color: var(--ink);
}

.tab.is-active::after {
    right: 0;
}

.panels {
    position: relative;
    flex: 1;
    min-height: 0;
    margin-top: clamp(18px, 2.6vw, 26px);
}

.panel {
    position: absolute;
    inset: 0;
    overflow: auto;
    padding-right: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    scrollbar-width: thin;
    scrollbar-color: var(--line-hard) transparent;
}

.panel.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.panel::-webkit-scrollbar {
    width: 4px;
}

.panel::-webkit-scrollbar-thumb {
    background: var(--line-hard);
}

.panel-note {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--faint);
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.page-a .foot {
    padding: 12px var(--pad);
    border-top: 1px solid var(--line);
    background: var(--paper);
}

/* ================== 方案 B：落地页 + 弹窗 ================== */
.wrap {
    width: min(var(--max), 100%);
    margin: 0 auto;
    padding: 0 var(--pad);
}

.page-b .hero {
    padding: clamp(44px, 7vw, 88px) 0 clamp(32px, 4vw, 52px);
}

.page-b .headline {
    margin-top: 14px;
    font-size: clamp(60px, 12.4vw, 156px);
}

.hero-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) auto;
    align-items: end;
    gap: 28px;
    margin-top: clamp(24px, 3.4vw, 38px);
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.actions {
    display: flex;
    gap: 10px;
}

.page-b .metrics {
    margin-top: clamp(28px, 4vw, 44px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-b .metric {
    padding: 16px 18px 14px;
}

.section {
    padding: clamp(36px, 5vw, 64px) 0;
    border-top: 1px solid var(--line);
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: clamp(18px, 2.6vw, 28px);
}

.section-head .idx {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--faint);
}

.section-head h2 {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-head .head-note {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--faint);
}

/* 可点击的极简索引行 */
.index-list {
    border-top: 1px solid var(--line);
}

.index-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid var(--line);
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, padding 0.2s;
}

.index-item:hover {
    background: #fafafa;
    padding-left: 6px;
    padding-right: 6px;
}

.index-item .num {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--faint);
}

.index-item .name {
    font-size: clamp(17px, 2vw, 21px);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.index-item .hint {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--faint);
    transition: color 0.15s;
}

.index-item:hover .hint {
    color: var(--accent);
}

/* 弹窗：白色无边框面板 + 背后模糊变暗 */
.veil {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.veil.is-open {
    opacity: 1;
    pointer-events: auto;
}

.sheet {
    position: fixed;
    z-index: 60;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    width: min(920px, calc(100% - 40px));
    max-height: min(760px, 88vh);
    padding: clamp(24px, 3.4vw, 44px);
    border: none;
    background: var(--paper);
    transform: translate(-50%, calc(-50% + 14px));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: auto;
}

.sheet.is-open {
    opacity: 1;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.sheet-eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--faint);
}

.sheet-close {
    padding: 4px 0;
    border: none;
    background: none;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    color: var(--muted);
    cursor: pointer;
}

.sheet-close:hover {
    color: var(--ink);
}

.sheet h2 {
    margin-top: clamp(22px, 3vw, 34px);
    font-size: clamp(34px, 5.2vw, 64px);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1;
}

.sheet-desc {
    max-width: 62ch;
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink-soft);
}

.sheet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.sheet-list li {
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-soft);
}

.sheet-link {
    align-self: flex-start;
    margin-top: 26px;
}

.page-b .foot {
    padding: 20px var(--pad) 40px;
    border-top: 1px solid var(--line);
}

/* ================== 方案 C：手风琴 ================== */
.page-c .headline {
    margin-top: 14px;
    font-size: clamp(60px, 12.4vw, 156px);
}

.page-c .hero {
    padding: clamp(44px, 7vw, 88px) 0 clamp(28px, 4vw, 44px);
}

.acc {
    border-top: 1px solid var(--line);
    margin-top: clamp(26px, 4vw, 44px);
}

.acc-item {
    border-bottom: 1px solid var(--line);
}

.acc-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 20px 0;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}

.acc-idx {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--faint);
}

.acc-title {
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: color 0.16s;
}

.acc-head:hover .acc-title {
    color: var(--accent);
}

.acc-sign {
    position: relative;
    justify-self: end;
    width: 13px;
    height: 13px;
    color: var(--ink-soft);
}

.acc-sign::before,
.acc-sign::after {
    content: "";
    position: absolute;
    background: currentColor;
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s;
}

.acc-sign::before {
    top: 6px;
    left: 0;
    width: 13px;
    height: 1px;
}

.acc-sign::after {
    top: 0;
    left: 6px;
    width: 1px;
    height: 13px;
}

.acc-item.is-open .acc-sign::after {
    transform: scaleY(0);
    opacity: 0;
}

.acc-body {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.26s ease;
}

.acc-item.is-open .acc-body {
    grid-template-rows: 1fr;
    opacity: 1;
}

.acc-inner {
    overflow: hidden;
}

.acc-content {
    padding: 2px 0 28px 56px;
}

.acc-content .lede {
    max-width: 62ch;
    font-size: 14px;
}

.acc-foot-note {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--faint);
}

/* 手风琴里的技术栈：两列 */
.acc .spec-row {
    grid-template-columns: 100px minmax(0, 1fr);
    padding: 10px 0;
}

.acc .work-row {
    padding: 16px 0 16px 0;
}

.page-c .foot {
    padding: 20px var(--pad) 44px;
    border-top: 1px solid var(--line);
    margin-top: 40px;
}

/* ================== 响应式 ================== */
@media (max-width: 960px) {
    .page-a {
        height: auto;
        overflow: visible;
    }

    .page-a .split {
        grid-template-columns: 1fr;
    }

    .split-left {
        padding-bottom: 32px;
    }

    .split-right {
        border-left: none;
        border-top: 1px solid var(--line);
        min-height: 460px;
    }

    .panels {
        min-height: 360px;
    }

    .panel {
        position: relative;
        inset: auto;
        display: none;
    }

    .panel.is-active {
        display: block;
        min-height: 340px;
    }

    .hero-bottom {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 20px;
    }

    .page-b .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-b .metric:nth-child(3) {
        border-left: none;
        padding-left: 0;
    }

    .page-b .metric:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 720px) {
    .topbar {
        gap: 12px;
        height: 54px;
    }
    .top-status {
        display: none;
    }

    .modes .modes-label {
        display: none;
    }

    .acc-head {
        grid-template-columns: 30px minmax(0, 1fr) 22px;
        padding: 16px 0;
    }

    .acc-content {
        padding-left: 0;
    }

    .spec-row,
    .acc .spec-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .spec-key {
        padding-top: 0;
    }

    .sheet {
        width: calc(100% - 24px);
        max-height: 90vh;
    }
}

/* 矮屏：优先保住左侧大标题与右侧面板的可读性 */
@media (max-height: 720px) and (min-width: 961px) {
    .split-left .headline {
        font-size: clamp(42px, 5.4vw, 76px);
    }

    .split-left .lede {
        font-size: 13.5px;
        margin-top: 14px;
    }

    .left-stats .stat b {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
