/* ==========================================================================
   珊瑚海能碳管理平台 · 宣传网页样式
   海洋珊瑚风 · 纯原生 CSS
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
    /* 主题色 */
    --coral: #FF6B6B;          /* 珊瑚橙 - 主强调 */
    --coral-dark: #E85555;
    --sea: #1BA39C;            /* 海蓝 - 主品牌 */
    --sea-dark: #0A3D62;       /* 深海蓝 - 深色区 */
    --sand: #FFF8F0;           /* 沙白 - 浅背景 */
    --sand-2: #FFF1E6;         /* 沙白深 */

    /* 中性色 */
    --text: #1a2b3c;
    --text-soft: #5a6b7c;
    --text-mute: #8a9bab;
    --white: #ffffff;
    --border: #e8eef3;

    /* 渐变 */
    --grad-hero: linear-gradient(135deg, #0A3D62 0%, #1BA39C 55%, #FF6B6B 130%);
    --grad-coral: linear-gradient(135deg, #FF6B6B 0%, #FF8E72 100%);
    --grad-sea: linear-gradient(135deg, #1BA39C 0%, #0A3D62 100%);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(10, 61, 98, 0.06);
    --shadow-md: 0 8px 24px rgba(10, 61, 98, 0.10);
    --shadow-lg: 0 16px 40px rgba(10, 61, 98, 0.14);
    --shadow-coral: 0 8px 24px rgba(255, 107, 107, 0.30);

    /* 圆角 */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-full: 999px;

    /* 容器宽度 */
    --container: 1180px;

    /* 过渡 */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

/* ---------- 通用按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--r-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}
.btn-lg { padding: 15px 36px; font-size: 17px; }

.btn-primary {
    background: var(--grad-coral);
    color: var(--white);
    box-shadow: var(--shadow-coral);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,107,107,0.40); }

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn-light {
    background: var(--white);
    color: var(--coral);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.15); }

/* ==========================================================================
   导航栏
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.35s var(--ease);
    background: transparent;
}
.navbar.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    box-shadow: var(--shadow-sm);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo { transition: transform 0.4s var(--ease); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.05); }

.brand-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.5px;
    transition: color 0.35s;
}
.brand-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    letter-spacing: 2px;
    margin-top: -2px;
}
.navbar.scrolled .brand-name,
.navbar.scrolled .brand-sub { color: var(--sea-dark); }
.navbar.scrolled .brand-sub { color: var(--text-mute); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.92);
    border-radius: var(--r-full);
    transition: all 0.25s;
}
.navbar.scrolled .nav-link { color: var(--text-soft); }
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.15); }
.navbar.scrolled .nav-link:hover { color: var(--sea); background: rgba(27,163,156,0.08); }
.nav-cta { color: var(--white) !important; }

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
    margin: 0 auto;
}
.navbar.scrolled .nav-toggle span { background: var(--sea-dark); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero 首屏
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: var(--grad-hero);
    padding: 120px 0 80px;
    overflow: hidden;
}
/* 装饰光晕 */
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    z-index: 0;
}
.hero::before {
    width: 380px; height: 380px;
    background: var(--coral);
    top: 10%; left: -8%;
}
.hero::after {
    width: 420px; height: 420px;
    background: var(--sea);
    bottom: 5%; right: -10%;
}

.hero-wave {
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    width: 100%; height: 120px;
    z-index: 2;
}

.hero-inner { position: relative; z-index: 3; }

.hero-badge {
    display: inline-block;
    padding: 7px 18px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--r-full);
    color: var(--white);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}
.hero-title {
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 900;
    color: var(--white);
    letter-spacing: 2px;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.hero-subtitle {
    font-size: clamp(20px, 2.6vw, 30px);
    color: rgba(255,255,255,0.95);
    font-weight: 600;
    margin-bottom: 18px;
}
.hero-subtitle .highlight { color: #FFD9D2; }
.hero-desc {
    font-size: clamp(15px, 1.5vw, 18px);
    color: rgba(255,255,255,0.85);
    max-width: 640px;
    margin: 0 auto 36px;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

/* Hero 数据条 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(28px, 6vw, 72px);
    flex-wrap: wrap;
    padding: 28px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.stat-item { text-align: center; }
.stat-num {
    display: block;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    color: var(--white);
    line-height: 1;
}
.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.78);
    letter-spacing: 0.5px;
}

/* ==========================================================================
   通用区块
   ========================================================================== */
.section { padding: clamp(64px, 9vw, 110px) 0; background: var(--sand); }
.section-dark { background: var(--sea-dark); color: var(--white); }

.section-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px;
}
.section-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--sea);
    margin-bottom: 14px;
}
.section-tag-light { color: var(--coral); }
.section-title {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.section-title-light { color: var(--white); }
.section-desc {
    font-size: 17px;
    color: var(--text-soft);
}
.section-desc-light { color: rgba(255,255,255,0.75); }

/* ---------- 功能卡片网格 ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 36px 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.35s var(--ease);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-coral);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 60px; height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(27,163,156,0.12), rgba(255,107,107,0.12));
    color: var(--sea);
    margin-bottom: 22px;
    transition: all 0.35s var(--ease);
}
.feature-icon svg { width: 30px; height: 30px; }
.feature-card:hover .feature-icon {
    background: var(--grad-coral);
    color: var(--white);
    transform: scale(1.08) rotate(-6deg);
}
.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}
.feature-text {
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.75;
}

/* ==========================================================================
   波浪分隔
   ========================================================================== */
.wave-divider {
    color: var(--sea-dark);
    line-height: 0;
}
.wave-divider svg { width: 100%; height: 80px; }
.wave-divider-up { background: var(--sand); }      /* 浅 → 深 */
.wave-divider-down { background: var(--sea-dark); } /* 深 → 浅 */

/* ==========================================================================
   核心优势（深色区）
   ========================================================================== */
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.advantage-item {
    text-align: center;
    padding: 38px 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-lg);
    backdrop-filter: blur(6px);
    transition: all 0.35s var(--ease);
}
.advantage-item:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,107,107,0.4);
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.advantage-icon {
    width: 56px; height: 56px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--grad-coral);
    color: var(--white);
    box-shadow: var(--shadow-coral);
}
.advantage-icon svg { width: 26px; height: 26px; }
.advantage-num {
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 900;
    color: var(--white);
    line-height: 1;
    margin-bottom: 6px;
}
.advantage-num .stat-num { display: inline; }
.advantage-unit {
    font-size: 0.5em;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-left: 4px;
}
.advantage-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}
.advantage-text {
    font-size: 14.5px;
    color: rgba(255,255,255,0.72);
    line-height: 1.75;
}

/* ==========================================================================
   CTA 行动号召
   ========================================================================== */
.cta {
    padding: clamp(72px, 10vw, 120px) 0;
    background: var(--grad-coral);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18), transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.12), transparent 50%);
}
.cta-inner { position: relative; z-index: 1; }
.cta-title {
    font-size: clamp(28px, 3.8vw, 44px);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: 1px;
}
.cta-desc {
    font-size: 17px;
    color: rgba(255,255,255,0.92);
    max-width: 580px;
    margin: 0 auto 36px;
}
.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.cta-contact {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.footer {
    background: var(--sea-dark);
    color: rgba(255,255,255,0.7);
    padding-top: 56px;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-name { font-size: 18px; font-weight: 700; color: var(--white); }
.footer-slogan { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    transition: color 0.25s;
}
.footer-links a:hover { color: var(--coral); }
.footer-bottom { padding: 20px 0; font-size: 13px; }
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==========================================================================
   滚动渐显动画
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/* 顺序延迟（同一区块内多个元素阶梯出现） */
.hero-inner .reveal { transition-delay: calc(var(--i, 0) * 0.12s); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 900px) {
    .footer-inner { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 768px) {
    /* 移动端导航 */
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 78%; max-width: 320px;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        padding: 90px 24px 40px;
        background: var(--white);
        box-shadow: -8px 0 40px rgba(0,0,0,0.12);
        transition: right 0.4s var(--ease);
        z-index: 999;
    }
    .nav-menu.open { right: 0; }
    .nav-link {
        color: var(--text) !important;
        padding: 14px 16px;
        border-radius: var(--r-md);
        font-size: 16px;
    }
    .nav-link:hover { background: var(--sand-2); }
    .nav-cta { margin-top: 12px; text-align: center; }
    .navbar.scrolled .nav-link { color: var(--text); }

    .hero { min-height: auto; padding: 110px 0 70px; }
    .hero-stats { gap: 28px 36px; }

    .footer-bottom .container { flex-direction: column; text-align: center; }
}

/* 遮罩层（移动端菜单打开时） */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,61,98,0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}
.nav-overlay.show { display: block; opacity: 1; }

/* 尊重无障碍：减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
