/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Space+Grotesk:wght@300;500;700&family=Inter:wght@300;400;500&display=swap');

:root {
    /* Global Scale: 80% of standard 16px ~ 13px */
    font-size: 13px;

    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #555555;
    --accent-blue: #2962ff;
    --accent-glow: rgba(41, 98, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.05);

    /* Font Stacks */
    --font-heading: 'Space Grotesk', 'Noto Sans SC', sans-serif;
    --font-body: 'Inter', 'Noto Sans SC', sans-serif;
}

/* Optimization for Chinese Typography */
html[lang="cn"] body {
    font-family: 'Noto Sans SC', sans-serif;
}

html[lang="cn"] h1,
html[lang="cn"] h2,
html[lang="cn"] h3 {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 700; /* Bolder headings in CN */
    letter-spacing: 0; /* CN doesn't need wide letter spacing */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    /* overflow: hidden; Removed to allow scrolling in modal if needed, or handle in class */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.logo-icon {
    color: var(--accent-blue);
}

.links {
    display: flex;
    gap: 2.5rem;
    background: rgba(255,255,255,0.8);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.05);
}

.links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.links a:hover {
    color: var(--accent-blue);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switch {
    background: none;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: var(--font-body);
}

.lang-switch:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-nav {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh; /* Allow growth */
    height: auto;      /* Remove fixed height */
    width: 100%;
    display: flex;
    align-items: flex-start; /* Start from top instead of center */
    justify-content: center;
    overflow-x: hidden; /* Only hide horizontal overflow */
    text-align: center;
    padding-top: 140px; /* Space for Nav + some breathing room */
    padding-bottom: 4rem; /* Space at bottom */
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-blue);
    margin-bottom: 2rem;
    background: rgba(41, 98, 255, 0.05);
    padding: 6px 12px;
    border-radius: 4px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(41, 98, 255, 0.7);
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(41, 98, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(41, 98, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(41, 98, 255, 0); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 7vw, 6.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: linear-gradient(135deg, #111 30%, #666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 800px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 3rem;
    background: #111;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    background: var(--accent-blue);
    box-shadow: 0 15px 30px -5px var(--accent-glow);
}

.btn-primary .arrow {
    transition: transform 0.3s;
}

.btn-primary:hover .arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.6);
    color: #111;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin-left: 1rem;
    cursor: pointer; /* Ensure pointer for whitepaper button */
}

.btn-secondary:hover {
    background: #ffffff;
    border-color: #111;
    transform: scale(1.05);
}

/* Hero Video Container */
.hero-video-container {
    width: 100%;
    max-width: 900px;
    margin: 1.5rem 0 2rem 0; /* Reduced margins: top 1.5rem, bottom 2rem */
    position: relative;
    z-index: 10;

    /* Cool styling for the container */
    background: #000;
    border-radius: 16px; /* Rounded corners like a screen */
    padding: 8px; /* Bezel */
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.3), /* Deep shadow */
        0 0 0 1px rgba(255, 255, 255, 0.1); /* Subtle stroke */
}

/* Ensure video inside fits perfectly */
.hero-video-container .video-wrapper {
    width: 100%;
    border-radius: 10px; /* Inner radius slightly smaller */
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: none; /* Reset wrapper shadow as container has it */
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Features Row */
.features-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
    margin-top: 1rem; /* Adjust margin if needed */
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 1.2rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: default;
    min-width: 220px;
    text-align: left;
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 1);
}

.card-icon svg {
    color: var(--accent-blue);
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 4px 6px rgba(41, 98, 255, 0.2));
}

.card-text h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.card-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal.visible {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 3rem;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 900px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 30px;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Whitepaper Content Styles */
.whitepaper-container {
    font-family: var(--font-body);
    line-height: 1.7;
    color: #333;
}

.wp-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wp-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #111;
}

.wp-header h2 {
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.wp-meta {
    font-size: 0.9rem;
    color: #777;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.wp-divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 2rem 0;
}

.wp-section {
    margin-bottom: 2.5rem;
}

.wp-section h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-blue);
    padding-left: 12px;
}

.wp-section h4 {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: #222;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.wp-section p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.wp-section ul, .wp-section ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.wp-section li {
    margin-bottom: 0.5rem;
}

.wp-section strong {
    color: #000;
}

/* Removed old Video Section Styles */

/* Responsive */
@media (max-width: 768px) {
    /* Restore readable font size for mobile */
    :root {
        font-size: 14px;
    }

    nav {
        padding: 1rem 1.5rem;
    }

    .hero {
        padding-top: 100px;
    }

    .features-row {
        flex-direction: column;
        align-items: center;
    }
    .glass-card {
        width: 100%;
        max-width: 320px;
    }
    .links {
        display: none;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 90%;
    }

    /* Video Responsive */
    .hero-video-container {
        margin: 2rem 0;
        padding: 4px; /* Thinner bezel on mobile */
        width: 100%;
    }
}
