/* ==========================================================
   首页：首屏 / 数字墙 / 项目板块 / 加入我们
   ========================================================== */

.section { position: relative; padding: clamp(96px, 14vh, 160px) var(--pad); }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ---------- 00 首屏 ---------- */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 5vh, 48px);
    padding: var(--nav-h) var(--pad) 0;
    text-align: center;
}
/* 首页 Logo：液态玻璃。hl-glass 按字形轮廓遮罩出一块折射背景的玻璃，hl-mark 上叠边缘高光（#glass-logo） */
.hero-logo { position: relative; width: min(1120px, 90vw); aspect-ratio: 2324 / 532; }
.hl-mark, .hl-glass { position: absolute; inset: 0; }
.hl-mark .logo { width: 100%; height: auto; display: block; filter: url(#glass-logo); }
.hl-glass {
    --m: url("/assets/img/ciallo-letters-on-dark.png") 0 0 / 76.592% 100% no-repeat, url("/assets/img/o-mask.svg") 100% 0 / 22.806% 99.62% no-repeat;
    -webkit-mask: var(--m);
    mask: var(--m);
    background: rgba(var(--fg-rgb), 0.06);
    -webkit-backdrop-filter: blur(3px) saturate(220%) brightness(1.4);
    backdrop-filter: blur(3px) saturate(220%) brightness(1.4);
    animation: fade 0.6s 1.3s both;
}
.lg-svg .hl-glass { backdrop-filter: url(#lg-refract) blur(3px) saturate(220%) brightness(1.4); }
.hero-logo::after {
    /* 暗色：蓝色外辉，让深蓝字形从黑底里浮出来 */
    content: "";
    position: absolute;
    inset: 8% 4%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--blue-rgb), 0.35), transparent);
    filter: blur(40px);
    pointer-events: none;
}
[data-theme="light"] .hl-mark .logo { -webkit-filter: url(#glass-logo) drop-shadow(0 14px 22px rgba(0, 40, 120, 0.28)); filter: url(#glass-logo) drop-shadow(0 14px 22px rgba(0, 40, 120, 0.28)); }
[data-theme="light"] .hero-logo::after { background: radial-gradient(closest-side, rgba(var(--blue-rgb), 0.16), transparent); }
[data-theme="light"] .gl-shade { flood-color: #00205c; flood-opacity: 0.4; }
.typer {
    min-height: 1.5em;
    font-size: clamp(18px, 2.4vw, 28px);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.typer.english-text { font-family: var(--f-mono); font-weight: 500; }
.typer::after {
    content: "";
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    margin-left: 4px;
    vertical-align: -0.18em;
    background: var(--blue);
    animation: caret 1s steps(1) infinite;
}
.typer.not-typing::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.hero-sub { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.3em; color: var(--fg-3); }
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    width: 22px;
    height: 36px;
    margin-left: -11px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--fg-3);
}
.scroll-hint::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--fg);
    animation: hint 1.8s var(--ease-out) infinite;
}
@keyframes hint { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }

/* ---------- 01 数字墙 ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); padding-top: 40px; padding-bottom: 40px; }
.stat { padding: 32px clamp(14px, 2vw, 32px); min-width: 0; text-align: center; }
.stat + .stat { box-shadow: inset 1px 0 0 var(--line); }
.stat-val {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 6px;
    font-family: var(--f-mono);
    font-size: clamp(40px, 4.6vw, 80px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}
.stat-unit { font-family: var(--f-sans); font-size: 0.34em; font-weight: 700; letter-spacing: 0; color: var(--blue); }
.stat-label { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; color: var(--fg-2); font-size: 15px; }
.stat-src { font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); padding: 3px 7px; border-radius: 999px; background: rgba(var(--fg-rgb), 0.08); }
.live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--signal);
}
.live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--signal);
    animation: live 1.6s ease-out infinite;
}
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(var(--signal-rgb), 0.7); } 100% { box-shadow: 0 0 0 10px rgba(var(--signal-rgb), 0); } }

/* ---------- 02–04 项目 ---------- */
.project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    min-height: 100vh;
}
.project.flip .proj-text { order: 2; }
/* 文字在左栏时（Wiki / Circle）离页面左边缘远一些 */
.project:not(.flip) .proj-text { padding-left: clamp(0px, 5vw, 96px); }
.proj-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.proj-index { font-family: var(--f-mono); font-size: 13px; color: var(--blue); }
.proj-name { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.2em; color: var(--fg-3); text-transform: uppercase; }
.proj-title {
    font-size: clamp(32px, 4.4vw, 64px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.proj-title em { font-style: normal; color: var(--blue); }
.proj-tease { margin-top: 18px; font-size: 15px; color: var(--fg-3); }
.proj-desc { max-width: 34em; margin-top: 28px; color: var(--fg-2); }
.proj-data { display: flex; gap: clamp(24px, 4vw, 56px); margin-top: 36px; }
.proj-data b { display: block; font-family: var(--f-mono); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
.proj-data span { font-size: 13px; color: var(--fg-3); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chip {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(var(--fg-rgb), 0.07);
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s, transform 0.5s var(--ease-jelly);
}
.chip:hover { background: var(--blue); color: #fff; transform: translateY(-3px) scale(1.04); }
.proj-cta { display: flex; align-items: center; gap: 18px; margin-top: 40px; }
.proj-host { font-family: var(--f-mono); font-size: 13px; color: var(--fg-3); }

.viz { position: relative; aspect-ratio: 1; width: 100%; max-width: 640px; justify-self: center; }
.viz canvas { width: 100%; height: 100%; }
.viz-tag {
    position: absolute;
    left: 0;
    bottom: 0;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--fg-3);
}

/* ---------- 05 加入我们 ---------- */
.join { text-align: center; }
.join-title { margin-top: 18px; font-size: clamp(36px, 6vw, 88px); font-weight: 800; line-height: 1.1; }
.join-tease { margin-top: 18px; color: var(--fg-3); }
.join-desc { max-width: 36em; margin: 20px auto 0; color: var(--fg-2); }
.jobs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 900px; margin: 56px auto 0; }
.job-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    padding: 20px 34px;
    border-radius: 999px;
    background: rgba(var(--fg-rgb), 0.07);
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 700;
    transition: background-color 0.3s, color 0.3s, transform 0.6s var(--ease-jelly);
}
.job-pill small { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; color: var(--fg-3); transition: color 0.3s; }
.job-pill:hover { background: var(--blue); color: #fff; }
.job-pill:hover small { color: rgba(255, 255, 255, 0.7); }
.join-more { margin-top: 40px; }

@media (max-width: 900px) {
    .project { grid-template-columns: 1fr; min-height: 0; }
    .project.flip .proj-text { order: 0; }
    .project:not(.flip) .proj-text { padding-left: 0; }
    .viz { max-width: 480px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat + .stat { box-shadow: none; }
    .stat { box-shadow: inset 0 -1px 0 var(--line) !important; }
    .stat:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}
