/* ===================================================
   星空里 - Cosmic Tech Landing Page
   =================================================== */

:root {
    --deep-space: #0A0F2C;
    --deep-space-2: #060a1f;
    --nebula-purple: #4A148C;
    --tech-cyan: #00E5FF;
    --star-white: #F5F5F7;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-muted: rgba(245, 245, 247, 0.65);
    --font-cn: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    --font-en: 'Montserrat', sans-serif;
    --shadow-glow: 0 0 30px rgba(0, 229, 255, 0.35);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-cn);
    background: var(--deep-space);
    color: var(--star-white);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Cosmic background gradient overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(74, 20, 140, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(0, 229, 255, 0.12) 0%, transparent 45%),
        linear-gradient(180deg, var(--deep-space) 0%, var(--deep-space-2) 100%);
    z-index: -2;
}

/* Starfield canvas */
#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================================
   Navigation
   =================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 15, 44, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--star-white);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.logo-icon {
    color: var(--tech-cyan);
    font-size: 1.3rem;
    text-shadow: 0 0 12px var(--tech-cyan);
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--tech-cyan);
    box-shadow: 0 0 8px var(--tech-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--star-white);
}

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

/* Language toggle */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--star-white);
    font-family: var(--font-en);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 7px 16px;
    border-radius: 50px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.lang-toggle i {
    color: var(--tech-cyan);
    font-size: 0.9rem;
}

.lang-toggle:hover {
    border-color: var(--tech-cyan);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1100;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: var(--star-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================
   Hero
   =================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-nebula {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 900px;
    height: 900px;
    max-width: 120vw;
    max-height: 120vw;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(74, 20, 140, 0.4) 0%, rgba(0, 229, 255, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    animation: pulse-nebula 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse-nebula {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-family: var(--font-en);
    letter-spacing: 6px;
    font-size: 0.85rem;
    color: var(--tech-cyan);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3.5rem, 12vw, 8rem);
    font-weight: 700;
    letter-spacing: 8px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, var(--tech-cyan) 50%, #a678ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(0, 229, 255, 0.3);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 44px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 34px;
    border-radius: 50px;
    font-family: var(--font-cn);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--tech-cyan), #00a8cc);
    color: var(--deep-space);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.5);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.8);
}

.btn-ghost {
    background: transparent;
    color: var(--star-white);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    transform: translateY(-3px);
    border-color: var(--tech-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-muted);
    z-index: 2;
    animation: float 2.5s ease-in-out infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--tech-cyan);
    border-radius: 2px;
    animation: wheel-scroll 1.8s ease-in-out infinite;
}

@keyframes wheel-scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(12px); }
}

.scroll-text {
    font-size: 0.75rem;
    letter-spacing: 2px;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ===================================================
   Sections
   =================================================== */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-en);
    letter-spacing: 4px;
    font-size: 0.8rem;
    color: var(--tech-cyan);
    margin-bottom: 14px;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 18px;
}

.section-desc {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    font-weight: 300;
}

/* Glassmorphism base */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 24px;
}

/* ===================================================
   Flagship product
   =================================================== */
.flagship-card {
    position: relative;
    padding: 60px;
    margin-bottom: 40px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.flagship-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 229, 255, 0.2);
}

.flagship-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, transparent 65%);
    pointer-events: none;
}

.flagship-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.flagship-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--nebula-purple), var(--tech-cyan));
    color: var(--star-white);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 28px;
    font-weight: 500;
}

.flagship-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flagship-icon i {
    font-size: 3.5rem;
    color: var(--tech-cyan);
    text-shadow: 0 0 30px var(--tech-cyan);
    animation: twinkle 4s ease-in-out infinite;
}

.orbit {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--tech-cyan);
    animation: spin 6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.flagship-title {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 18px;
}

.flagship-desc {
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 44px;
    font-size: 1.05rem;
    font-weight: 300;
}

.sub-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.sub-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 32px 24px;
    transition: all 0.35s ease;
}

.sub-card:hover {
    transform: translateY(-6px);
    background: rgba(0, 229, 255, 0.06);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15);
}

.sub-card i {
    font-size: 1.8rem;
    color: var(--tech-cyan);
    margin-bottom: 16px;
}

.sub-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.sub-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 300;
}

/* ===================================================
   Business grid
   =================================================== */
.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.business-card {
    padding: 44px 34px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.business-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    border-radius: 50%;
}

.business-card:hover::before {
    width: 400px;
    height: 400px;
}

.business-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 16px 44px rgba(0, 229, 255, 0.18);
}

.card-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(74, 20, 140, 0.5), rgba(0, 229, 255, 0.2));
    font-size: 1.8rem;
    color: var(--tech-cyan);
    position: relative;
    z-index: 1;
}

.business-card h3 {
    font-size: 1.4rem;
    margin-bottom: 14px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.business-card p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* ===================================================
   About
   =================================================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 70px;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.planet {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planet-core {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #6a2db5, var(--nebula-purple) 60%, #1a0640);
    box-shadow: 0 0 60px rgba(74, 20, 140, 0.6), inset -20px -20px 50px rgba(0,0,0,0.5);
    animation: float 6s ease-in-out infinite;
}

.planet-ring {
    position: absolute;
    width: 260px;
    height: 260px;
    border: 2px solid rgba(0, 229, 255, 0.4);
    border-radius: 50%;
    transform: rotateX(75deg);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    animation: spin 12s linear infinite;
}

.about-text .section-tag,
.about-text .section-title {
    text-align: left;
}

.about-text .section-title {
    margin-bottom: 24px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 18px;
    font-weight: 300;
}

.about-text strong {
    color: var(--star-white);
    font-weight: 500;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-en);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--tech-cyan);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===================================================
   Contact
   =================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.contact-card {
    padding: 44px 30px;
    text-align: center;
    transition: all 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 16px 44px rgba(0, 229, 255, 0.18);
}

.contact-card i {
    font-size: 2rem;
    color: var(--tech-cyan);
    margin-bottom: 18px;
}

.contact-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.contact-card p {
    color: var(--text-muted);
    font-weight: 300;
    word-break: break-word;
}

/* ===================================================
   Footer
   =================================================== */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--glass-border);
    background: rgba(6, 10, 31, 0.6);
    backdrop-filter: blur(10px);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: 300;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 6px;
}

.footer-info a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-info a:hover {
    color: var(--tech-cyan);
}

/* ===================================================
   Back to top
   =================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tech-cyan), #00a8cc);
    color: var(--deep-space);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.7);
}

/* ===================================================
   Reveal on scroll
   =================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   Responsive
   =================================================== */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-text .section-tag,
    .about-text .section-title {
        text-align: center;
    }
    .about-stats {
        justify-content: center;
    }
    .sub-features,
    .business-grid,
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 36px;
        background: rgba(10, 15, 44, 0.95);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        transition: right 0.4s ease;
    }
    .nav-menu.active {
        right: 0;
    }
    .hamburger {
        display: flex;
    }
    .nav-link {
        font-size: 1.2rem;
    }
    .section {
        padding: 80px 0;
    }
    .flagship-card {
        padding: 40px 24px;
    }
    .sub-features,
    .business-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-info {
        text-align: center;
    }
    .flagship-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        justify-content: center;
        width: 100%;
    }
    .hero-title {
        letter-spacing: 4px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
