/* ============================================================
   XinYue 官网首页 - Apple 风格设计
   黑白区块交替 / 大标题排版 / 毛玻璃导航 / 大圆角磁贴
   ============================================================ */

:root {
    --nav-height: 48px;
    --content-width: 1024px;

    --color-dark: #000000;
    --color-gray-bg: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-text-on-dark: #f5f5f7;
    --color-text-on-dark-secondary: #86868b;

    --color-blue: #0066cc;
    --color-blue-on-dark: #2997ff;
    --color-btn: #0071e3;
    --color-btn-hover: #0077ed;
    --color-hairline: #d2d2d7;

    --radius-tile: 18px;
    --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
        "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #fff;
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--color-blue-on-dark);
    color: #fff;
}

a:focus-visible {
    outline: 2px solid var(--color-blue-on-dark);
    outline-offset: 3px;
    border-radius: 2px;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 22px;
}

section {
    scroll-margin-top: var(--nav-height);
}

/* ============================================================
   全局导航 - 深色毛玻璃
   ============================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(22, 22, 23, 0.8);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* 原 logo.png 线条极细且亮度低,在 27px 导航尺寸下几乎不可见;
   logo-nav.png 是同一张图的加强版(线条提亮加粗),原图保留在 images/logo.png */
.logo-img {
    width: 26px;
    height: 26px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    height: 100%;
}

.nav-links a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links .nav-cta {
    margin-left: 10px;
    height: auto;
    padding: 5px 15px;
    border-radius: 980px;
    background: var(--color-btn);
    color: #fff;
    transition: background 0.3s ease;
}

.nav-links .nav-cta:hover {
    background: var(--color-btn-hover);
}

/* 汉堡按钮(仅移动端显示) */
.nav-toggle {
    display: none;
    width: 44px;
    height: var(--nav-height);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 1.5px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.85);
    transition: transform 0.3s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 19px; }
.nav-toggle span:nth-child(2) { top: 26px; }

body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ============================================================
   Hero - 纯黑大标题 + 柔和光晕
   ============================================================ */

.hero {
    position: relative;
    overflow: hidden;
    background: var(--color-dark);
    color: var(--color-text-on-dark);
    text-align: center;
    padding: calc(var(--nav-height) + 110px) 0 130px;
}

/* 彩色光晕:蓝 / 紫 / 暖橙,低调铺在标题后方 */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.hero::before {
    width: 620px;
    height: 620px;
    top: -220px;
    left: calc(50% - 560px);
    background: radial-gradient(circle, rgba(41, 151, 255, 0.32), transparent 65%);
}

.hero::after {
    width: 560px;
    height: 560px;
    top: -160px;
    right: calc(50% - 580px);
    background: radial-gradient(circle, rgba(162, 119, 255, 0.26), transparent 65%);
}

.hero-glow--warm {
    position: absolute;
    width: 700px;
    height: 340px;
    left: 50%;
    bottom: -180px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(255, 159, 10, 0.14), transparent 65%);
    filter: blur(60px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    max-width: 760px;
    margin: 0 auto 26px;
    /* 9.4vw 保证 9 字首行在各种视口宽度下都恰好一行放下 */
    font-size: clamp(26px, 9.4vw, 68px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.hero-sub {
    max-width: 640px;
    margin: 0 auto 42px;
    font-size: clamp(19px, 2.4vw, 24px);
    font-weight: 400;
    color: var(--color-text-on-dark-secondary);
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* 药丸按钮 */
.btn-pill {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 980px;
    background: var(--color-btn);
    color: #fff;
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s var(--ease);
}

.btn-pill:hover {
    background: var(--color-btn-hover);
}

.btn-pill-lg {
    padding: 16px 38px;
    font-size: 19px;
}

/* "了解更多 ›" 文字链接 */
.link-arrow {
    color: var(--color-blue-on-dark);
    font-size: 19px;
    text-decoration: none;
}

.link-arrow:hover {
    text-decoration: underline;
}

.link-arrow .chevron {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin-left: 2px;
    transition: margin-left 0.3s var(--ease);
}

.link-arrow:hover .chevron {
    margin-left: 6px;
}

/* 浅色区块内的文字链接 */
.link-arrow--light {
    color: var(--color-blue);
}

/* ============================================================
   浅色区块通用(核心优势 / 解决方案)
   ============================================================ */

.section-light {
    background: #fff;
    padding: 116px 0;
}

.section-headline {
    text-align: center;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.section-sub {
    text-align: center;
    font-size: 19px;
    color: var(--color-text-secondary);
    margin-bottom: 60px;
}

/* ---------- 核心优势磁贴 ---------- */

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.feature-tile {
    background: var(--color-gray-bg);
    border-radius: var(--radius-tile);
    padding: 54px 46px;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.feature-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 24px;
    color: var(--color-blue);
}

.feature-tile h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-tile p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text-secondary);
}

/* ============================================================
   黑色大标语区 - 渐变文字
   ============================================================ */

.section-dark {
    position: relative;
    overflow: hidden;
    background: var(--color-dark);
    color: var(--color-text-on-dark);
    text-align: center;
    padding: 140px 0;
}

.section-dark::before {
    content: "";
    position: absolute;
    width: 760px;
    height: 760px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(94, 92, 230, 0.18), transparent 62%);
    filter: blur(60px);
    pointer-events: none;
}

.section-dark .container {
    position: relative;
    z-index: 1;
}

.statement-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin-bottom: 26px;
    background: linear-gradient(96deg, #0090ff 0%, #7d5aff 42%, #ff6482 74%, #ff9f0a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.statement-sub {
    font-size: clamp(18px, 2.2vw, 21px);
    color: var(--color-text-on-dark-secondary);
}

/* ============================================================
   解决方案 - 通栏深色磁贴 + 两张浅色磁贴
   ============================================================ */

.solutions {
    background: #fff;
    padding: 116px 0;
}

.solution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.solution-tile {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-gray-bg);
    border-radius: var(--radius-tile);
    padding: 56px;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.solution-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.solution-tile--wide {
    grid-column: 1 / -1;
    min-height: 300px;
    background: var(--color-dark);
    color: var(--color-text-on-dark);
}

.solution-tile h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

.solution-tile p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text-secondary);
    margin-bottom: 18px;
}

.solution-tile--wide p {
    color: var(--color-text-on-dark-secondary);
}

/* ============================================================
   CTA 区
   ============================================================ */

.cta {
    background: var(--color-gray-bg);
    text-align: center;
    padding: 124px 0;
}

.cta h2 {
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.cta-sub {
    font-size: 19px;
    color: var(--color-text-secondary);
    margin-bottom: 38px;
}

/* ============================================================
   页脚 - Apple 式小字排版
   ============================================================ */

footer {
    background: var(--color-gray-bg);
    border-top: 1px solid var(--color-hairline);
    padding: 20px 0 40px;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--color-hairline);
}

.footer-columns h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

.footer-columns ul {
    list-style: none;
}

.footer-columns li {
    margin-bottom: 8px;
}

.footer-columns a {
    color: #424245;
    text-decoration: none;
}

.footer-columns a:hover {
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
}

.footer-legal {
    display: flex;
    gap: 12px;
}

.footer-legal a {
    color: #424245;
    text-decoration: none;
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* ============================================================
   滚动渐入动画(仅 JS 可用时生效,保证无 JS 也能正常阅读)
   ============================================================ */

html.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

html.js .reveal.visible {
    opacity: 1;
    transform: none;
}

html.js .reveal-d1 { transition-delay: 0.1s; }
html.js .reveal-d2 { transition-delay: 0.2s; }
html.js .reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 834px) {
    .nav-toggle { display: block; }

    /* 移动端:导航链接折叠为下拉面板 */
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        background: rgba(22, 22, 23, 0.95);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s var(--ease);
    }

    body.menu-open .nav-links {
        max-height: 320px;
    }

    .nav-links a {
        height: auto;
        padding: 13px 0;
        font-size: 17px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-links .nav-cta {
        margin: 14px 0;
        align-self: flex-start;
        border-bottom: none;
    }

    .hero {
        padding: calc(var(--nav-height) + 72px) 0 96px;
    }

    .hero-cta { gap: 18px; }

    .section-light,
    .solutions { padding: 76px 0; }

    .section-dark { padding: 96px 0; }

    .section-sub { margin-bottom: 44px; }

    .feature-grid,
    .solution-grid { grid-template-columns: 1fr; }

    .feature-tile { padding: 38px 30px; }

    .solution-tile { min-height: 0; padding: 38px 30px; }

    .cta { padding: 84px 0; }

    .footer-columns { grid-template-columns: 1fr; }
}
