/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 80px 0;

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

button {
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-base);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    color: var(--primary-color);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.lang-btn {
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
}

.lang-divider {
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: 4px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
            radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s backwards;
}

.hero-title span {
    display: block;
    font-size: 0.7em;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 8px;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 32px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-features {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-actions .btn {
    min-width: 160px;
}

/* ===== Section Styles ===== */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Overview Section ===== */
.overview-section {
    background: var(--bg-secondary);
}

.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.overview-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.overview-image {
    display: flex;
    justify-content: center;
}

.fence-diagram {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.fence-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* ===== Features Section ===== */
.features-section {
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    text-align: left;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Scenarios Section ===== */
.scenarios-section {
    background: var(--bg-secondary);
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.scenario-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.scenario-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.scenario-image {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--secondary-color), #34d399);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.scenario-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.scenario-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.scenario-features {
    list-style: none;
    padding: 0;
}

.scenario-features li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
}

.scenario-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

/* ===== Technology Section ===== */
.technology-section {
    background: var(--bg-primary);
}

.technology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.technology-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: var(--transition-base);
}

.technology-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(8px);
}

.technology-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-color), #fbbf24);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.technology-content {
    flex: 1;
}

.technology-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.technology-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== About Section ===== */
.about-section {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    padding-right: 20px;
}

.about-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.highlight-item {
    text-align: center;
}

.highlight-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.highlight-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-visual {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.about-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* ===== Contact Section ===== */
.contact-section {
    background: var(--bg-primary);
}

.contact-content {
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.contact-item {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}

.contact-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.contact-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.cta-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-actions .btn-outline {
    border-color: white;
    color: white;
}

.cta-actions .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-logo svg {
    color: var(--primary-light);
}

.footer-logo span {
    font-size: 20px;
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 12px;
}

.footer-link-group h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-link-group ul {
    list-style: none;
}

.footer-link-group li {
    margin-bottom: 10px;
}

.footer-link-group a {
    color: var(--text-light);
    font-size: 14px;
    transition: var(--transition-fast);
}

.footer-link-group a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.footer-bottom a {
    color: var(--primary-light);
    transition: var(--transition-fast);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 60px 0;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .overview-content,
    .about-content {
        gap: 40px;
    }
}

@media (max-width: 968px) {
    :root {
        --section-padding: 50px 0;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .nav-actions {
        gap: 12px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .lang-switcher {
        font-size: 13px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .overview-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .overview-text,
    .about-text {
        padding-right: 0;
    }

    .overview-stats {
        order: -1;
    }

    .about-highlights {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    :root {
        --section-padding: 40px 0;
    }

    .container {
        padding: 0 16px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .scenarios-grid {
        grid-template-columns: 1fr;
    }

    .technology-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .nav-actions .btn {
        display: none;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .overview-stats,
    .about-highlights {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .technology-item {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== Smooth Scroll ===== */
html {
    scroll-padding-top: 80px;
}

/* ===== Selection Color ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

/* ===== Focus Styles ===== */
button:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
