/* ==========================================
   1. 全局变量与基础重置
   ========================================== */
:root {
    --bg-main: #090d16;
    --bg-card: rgba(18, 26, 43, 0.6);
    --bg-card-hover: rgba(28, 40, 65, 0.8);
    --accent-primary: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --text-title: #f8fafc;
    --text-body: #94a3b8;
    --text-muted: #64748b;
    --border-line: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 130, 246, 0.3);
    --font-family: 'Inter', 'Noto Sans SC', sans-serif;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    font-family: var(--font-family);
    line-height: 1.7;
    overflow-x: hidden;
}

body.is-loading {
    overflow: hidden;
}

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0033ff;
    transition: background-color 0.4s ease, transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

#loader-wrapper.phase-black {
    background-color: #090d16;
}

#loader-wrapper.loaded {
    transform: translateY(-100%);
    pointer-events: none;
}

.loader-content {
    width: 320px;
    text-align: left;
    font-family: 'Space Mono', monospace, sans-serif;
}

.loader-text {
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: #ffffff;
    transition: color 0.3s ease;
}

#loader-wrapper.phase-black .loader-text {
    color: #f8fafc;
}

.loader-bar-bg {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

#loader-wrapper.phase-black .loader-bar-bg {
    background: rgba(255, 255, 255, 0.1);
}

.loader-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: #ffffff;
    transition: width 0.05s linear, background-color 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

#loader-wrapper.phase-black .loader-bar-fill {
    background-color: #eab308;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.8);
}

.loader-percentage {
    margin-top: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* 统一容器与版块样式 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
    position: relative;
}

.page-view {
    display: none;
    animation: viewFade 0.32s ease;
}

html[data-initial-view="home"] .page-view[data-view="home"],
html[data-initial-view="about"] .page-view[data-view="about"],
html[data-initial-view="products"] .page-view[data-view="products"],
html[data-initial-view="research"] .page-view[data-view="research"],
html[data-initial-view="news"] .page-view[data-view="news"] {
    display: block;
}

html[data-initial-view="home"] .hero.page-view[data-view="home"] {
    display: flex;
}

.page-view.is-active {
    display: block;
}

.hero.page-view {
    display: none;
}

.hero.page-view.is-active {
    display: flex;
}

@keyframes viewFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.2rem;
    color: var(--text-title);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* 背景微光装饰 */
.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

/* ==========================================
   2. 导航栏 Header
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    background: rgba(9, 13, 22, 0.7);
    border-bottom: 1px solid var(--border-line);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-title);
    letter-spacing: 0.5px;
}

.logo-text span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-body);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-title);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-title);
    cursor: pointer;
}

html[data-initial-view="home"] header,
body.is-home-view header {
    display: none;
}

html[data-initial-view="home"] .hero,
body.is-home-view .hero {
    padding-top: 0;
}

/* ==========================================
   3. 首页 Hero / Banner
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    background: linear-gradient(rgba(9, 13, 22, 0.6), rgba(9, 13, 22, 0.7)), url('../images/hero-bg.jpg') center/cover no-repeat;
    position: relative;
}

.hero-content {
    max-width: 900px;
    z-index: 1;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-title);
    line-height: 1.25;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero-title-gradient {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 50%, var(--accent-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-vision {
    font-size: 1.2rem;
    color: var(--text-body);
    max-width: 760px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.hero-image-caption {
    position: absolute;
    right: 42px;
    bottom: 34px;
    margin: 0;
    font-size: 1.12rem;
    color: rgba(248, 250, 252, 0.82);
    max-width: min(54vw, 760px);
    text-align: right;
    line-height: 1.85;
    letter-spacing: 0.2px;
    z-index: 2;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    color: #fff;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-title);
    border: 1px solid var(--border-line);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   4. 关于质崖 (About Zhiya)
   ========================================== */
.about-dna {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-left: 4px solid var(--accent-cyan);
    padding: 24px 30px;
    border-radius: 0 12px 12px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 40px;
}

.about-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
    list-style: none;
    padding: 0;
}

.about-list-item {
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
    list-style: none;
}

.about-list-item h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: var(--text-title);
    font-weight: 600;
}

.about-list-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-body);
}

/* ==========================================
   5. 项目发行池 (Product Launchpad)
   ========================================== */
.product-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 16px;
    padding: 36px;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.product-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-primary);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.8rem;
    color: var(--text-title);
    margin-bottom: 12px;
}

.product-title-with-logo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.product-title-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    flex: 0 0 auto;
    margin-top: 2px;
}

.product-title-logo-rubricflow {
    width: 68px;
    height: 68px;
}

.product-title-logo-ghoster {
    width: 56px;
    height: 56px;
    margin-top: 8px;
}

.product-position {
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-weight: 500;
}

.product-detail-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.product-detail-box strong {
    color: var(--text-title);
    display: block;
    margin-bottom: 4px;
}

.product-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-line);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-title);
}

.link-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.product-visual-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.05));
    border-radius: 12px;
    height: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    text-align: center;
    padding: 20px;
}

.product-visual-box i {
    font-size: 3.5rem;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    opacity: 0.8;
}

/* ==========================================
   6. 项目研究池 (R&D Incubator Pool)
   ========================================== */
.rnd-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.rnd-card {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 16px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.rnd-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
}

.rnd-badge {
    align-self: flex-start;
    display: inline-block;
    width: fit-content;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.rnd-highlights {
    margin: 20px 0;
}

.rnd-title-with-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    color: var(--text-title);
    margin-bottom: 8px;
}

.rnd-title-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 auto;
}

.rnd-highlight-item {
    margin-bottom: 14px;
}

.rnd-highlight-item strong {
    color: var(--text-title);
    display: inline-block;
    margin-bottom: 2px;
}

.rnd-highlight-item p {
    font-size: 0.9rem;
    color: var(--text-body);
}

/* ==========================================
   7. 新闻与动态 (News & Updates)
   ========================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.news-card:hover {
    border-color: var(--border-glow);
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.05rem;
    color: var(--text-title);
    margin-bottom: 10px;
    font-weight: 600;
}

.news-excerpt {
    font-size: 0.88rem;
    color: var(--text-body);
}

/* ==========================================
   8. 页脚 Footer & 联系我们
   ========================================== */
footer {
    background: #05080f;
    border-top: 1px solid var(--border-line);
    padding-top: 80px;
    padding-bottom: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 360px;
}

.footer-title {
    color: var(--text-title);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: var(--text-body);
}

.footer-contact-list i {
    color: var(--accent-cyan);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 16px;
}

.icp-link {
    color: var(--text-muted);
}

.icp-link:hover {
    color: var(--text-body);
}

/* ==========================================
   9. 联系我们正文页 Contact Page
   ========================================== */
.contact-main {
    min-height: 100vh;
}

.contact-hero {
    padding-top: 145px;
    padding-bottom: 18px;
}

.contact-hero .section-header {
    margin: 0 auto 28px;
}

.contact-content {
    padding-top: 16px;
    padding-bottom: 56px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 18px;
    padding: 34px;
}

.contact-card-title {
    color: var(--text-title);
    font-size: 1.25rem;
    margin-bottom: 18px;
}

.contact-logo-row {
    margin-bottom: 18px;
}

.contact-card-desc {
    color: var(--text-body);
    font-size: 1rem;
    max-width: 520px;
}

.contact-card-highlight {
    background: linear-gradient(135deg, rgba(18, 26, 43, 0.9), rgba(12, 20, 34, 0.95));
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-body);
}

.contact-list i {
    margin-top: 5px;
    color: var(--accent-cyan);
}

.contact-meta {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================
   10. 响应式布局 Responsive
   ========================================== */
@media (max-width: 992px) {
    .about-list, .news-grid, .rnd-grid {
        grid-template-columns: 1fr;
    }
    .product-stack {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* 可通过JS切换响应式菜单 */
    }
    .menu-toggle {
        display: block;
    }
    .hero-btns {
        flex-direction: column;
    }
    .hero-image-caption {
        right: 18px;
        bottom: 18px;
        font-size: 1rem;
        max-width: 78vw;
        line-height: 1.75;
    }
    .contact-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .product-title-logo {
        width: 56px;
        height: 56px;
    }
    .rnd-title-logo {
        width: 40px;
        height: 40px;
    }
}
