/* ========== Active Theory 风格主站 v2 ========== */

:root {
    --at-black: #000000;
    --at-cyan: #81ecfe;
    --at-cyan-dim: #86cfd1;
    --at-text: #e8fffb;
    --at-mono: 'SF Mono', 'Space Mono', 'Courier New', monospace;
}

.main-site {
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--at-black);
    color: var(--at-text);
    font-family: var(--at-mono);
    -webkit-font-smoothing: antialiased;
}

#at-app {
    position: relative;
    min-height: 100vh;
}

#home-canvas-wrap {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#home-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Loader */
.at-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.at-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.at-loader-ascii {
    font-family: var(--at-mono);
    font-size: 10px;
    line-height: 1.15;
    letter-spacing: 0.08em;
    color: var(--at-cyan);
    opacity: 0.3;
    margin: 0;
    mask-image: radial-gradient(black 40%, transparent 75%);
    -webkit-mask-image: radial-gradient(black 40%, transparent 75%);
}

.at-loader-count {
    font-size: 14px;
    letter-spacing: 0.12em;
    color: var(--at-cyan-dim);
    margin-top: 12px;
}

/* Header — AT 右上角 pill */
.at-header {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 100;
    pointer-events: none;
}

.at-nav-pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.at-nav-link {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.25s;
}

.at-nav-link:hover,
.at-nav-link.active {
    color: #fff;
}

.at-nav-divider {
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

/* 滚动轨道 */
.at-scroll-track {
    position: relative;
    z-index: 1;
    height: calc(var(--panel-count, 4) * 100vh);
}

.at-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

/* Hero — 透明，露出 WebGL */
.at-panel-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: transparent;
}

/* 项目面板 — 全屏不透明底 */
.at-panel-project {
    cursor: pointer;
    pointer-events: auto;
    background: #000;
}

.at-project-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.at-scroll-down {
    position: absolute;
    top: calc(50% - 180px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    z-index: 10;
    animation: atFadePulse 2.5s ease-in-out infinite;
}

.at-hero-logo-spacer {
    width: 200px;
    height: 200px;
}

@keyframes atFadePulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.85; }
}

.at-project-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    transition: opacity 0.8s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.at-panel-project:hover .at-project-bg img {
    opacity: 0.5;
    transform: scale(1.04);
}

.at-project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 60%, hsla(var(--hue), 50%, 35%, 0.25), #000 70%);
}

.at-project-placeholder span {
    font-size: clamp(100px, 25vw, 240px);
    font-weight: 700;
    color: rgba(129, 236, 254, 0.06);
    line-height: 1;
}

.at-project-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.85) 100%);
}

.at-project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 48px 72px;
    z-index: 2;
    pointer-events: none;
}

.at-project-info * {
    pointer-events: auto;
}

.at-project-num {
    display: block;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--at-cyan);
    opacity: 0.8;
    margin-bottom: 12px;
}

.at-project-title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 8px;
}

.at-project-domain {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--at-cyan-dim);
    opacity: 0.65;
    margin-bottom: 12px;
}

.at-project-desc {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.4);
    max-width: 420px;
    margin-bottom: 16px;
}

.at-project-cta {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--at-cyan);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s, transform 0.35s;
}

.at-panel-project:hover .at-project-cta {
    opacity: 1;
    transform: translateY(0);
}

.at-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 48px;
}

/* Contact / About — 全屏黑色遮罩盖住上一页 */
.at-panel-end {
    display: flex;
    align-items: flex-end;
    padding: 0 48px 72px;
    background: #000;
}

.at-panel-cover {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 0;
}

.at-end-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.at-end-label {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--at-cyan);
    opacity: 0.7;
    margin-bottom: 12px;
}

.at-end-label + .at-end-label {
    margin-top: 40px;
}

.at-end-text {
    font-size: clamp(16px, 2.5vw, 22px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

.at-end-email {
    display: block;
    font-size: clamp(22px, 4vw, 36px);
    color: #fff;
    text-decoration: none;
    margin-bottom: 28px;
    transition: color 0.3s;
}

.at-end-email:hover {
    color: var(--at-cyan);
}

.at-end-replay {
    background: none;
    border: none;
    font-family: var(--at-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.at-end-replay:hover {
    color: var(--at-cyan);
}

.at-end-footer {
    margin-top: 48px;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .at-header { top: 16px; right: 16px; }
    .at-nav-pill { padding: 8px 14px; gap: 10px; }
    .at-project-info, .at-panel-end { padding-left: 24px; padding-right: 24px; padding-bottom: 48px; }
    .at-scroll-down { top: calc(50% - 100px); font-size: 10px; }
}
