/* ==================== CSS 变量 & 重置 ==================== */
:root {
    --green-900: #1b4332;
    --green-800: #2d6a4f;
    --green-700: #40916c;
    --green-500: #52b788;
    --green-200: #b7e4c7;
    --green-100: #d8f3dc;
    --green-50: #e8f5e9;
    --wood-dark: #5c3a1e;
    --wood-mid: #8b5e3c;
    --wood-light: #c4946c;
    --wood-pale: #deb887;
    --gold: #d4a017;
    --gold-light: #f0c75e;
    --text: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --bg: #fafbfc;
    --bg-alt: #f0f4f1;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
}

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

/* ==================== 导航栏 ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    transition: var(--transition);
    z-index: 1001;
}

.header.scrolled .logo {
    color: var(--green-900);
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green-500);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

.header.scrolled .nav-link {
    color: var(--text);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--green-800);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.header.scrolled .hamburger span {
    background: var(--green-900);
}

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

/* ==================== Hero 区域 ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 40%, #40916c 100%);
    overflow: hidden;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(82, 183, 136, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 160, 23, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(45, 106, 79, 0.2) 0%, transparent 50%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 120px 24px;
    max-width: 800px;
}

.hero-title {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.3;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title-sub {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 6px;
    color: var(--green-200);
    margin-bottom: 8px;
}

.hero-desc {
    color: rgba(255,255,255,0.8);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--green-500);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(82, 183, 136, 0.4);
}

.btn-primary:hover {
    background: var(--green-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(82, 183, 136, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    animation: bounce 2s ease-in-out infinite;
}

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

/* ==================== 通用 Section ==================== */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-alt);
}

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

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    color: var(--green-900);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--green-500);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-top: 16px;
}

/* ==================== 关于我们 ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: block;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.about-text h3 {
    font-size: 1.6rem;
    color: var(--green-900);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.stat {
    text-align: center;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-800);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ==================== 产品中心 ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--green-100);
}

.product-img {
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--green-50);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-body {
    padding: 24px 28px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-body h3 {
    font-size: 1.2rem;
    color: var(--green-900);
    margin-bottom: 10px;
}

.product-body p {
    color: var(--text-light);
    font-size: 0.93rem;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
}

.product-tag {
    display: inline-block;
    padding: 4px 14px;
    background: var(--green-50);
    color: var(--green-800);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    align-self: flex-start;
}

/* ==================== 核心优势 ==================== */
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.advantage-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.advantage-card h3 {
    font-size: 1.15rem;
    color: var(--green-900);
    margin-bottom: 12px;
}

.advantage-card p {
    color: var(--text-light);
    font-size: 0.93rem;
    line-height: 1.7;
}

/* ==================== 联系我们 ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-item:hover {
    box-shadow: var(--shadow-lg);
}

.contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item h4 {
    font-size: 1rem;
    color: var(--green-900);
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form-wrapper h3 {
    font-size: 1.3rem;
    color: var(--green-900);
    margin-bottom: 24px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: #fafbfc;
    outline: none;
}

.form-input:focus {
    border-color: var(--green-500);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--green-900);
    color: rgba(255,255,255,0.8);
    padding-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    padding-bottom: 40px;
}

.footer-brand .footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-col a,
.footer-col p {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--green-500);
    padding-left: 4px;
}

/* Footer 中的受保护元素 — 适配深色背景 */
.footer-col .protected-link,
.footer-col .decoded-text,
.footer-col .phone-protected,
.footer-col .text-protected {
    color: rgba(255,255,255,0.6);
}

.footer-col .protected-link:hover {
    color: var(--green-500);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* ==================== 回到顶部按钮 ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--green-800);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
}

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

.back-to-top:hover {
    background: var(--green-700);
    transform: translateY(-4px);
}

/* ==================== 动画 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 防爬虫保护 ==================== */
.phone-protected,
.text-protected {
    color: var(--text-light);
    font-size: 0.95rem;
}

.phone-protected:not(.decoded),
.text-protected:not(.decoded) {
    cursor: default;
    user-select: none;
}

.protected-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.protected-link:hover {
    color: var(--green-800);
}

.decoded-text {
    color: var(--text);
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--green-900);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(27, 67, 50, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .header.scrolled .nav-link {
        color: rgba(255,255,255,0.85);
    }

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

    .hamburger {
        display: flex;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto;
    }

    .advantage-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantage-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
    }
}
