/* =========================================================
   首页专用样式：大气 · 简洁
   —— 仅在首页加载（Views/Home/Index.cshtml 的 Styles 段引用），
      不改动内页既有的 site.css 规则。
   ========================================================= */
:root {
    --ink: #0c1016;
    --ink-soft: #161c25;
    --hair: #e6e6e1;
    --gold: #b89154;
    --muted2: #6e7277;
    --ease: cubic-bezier(.22, .72, .18, 1);
}

/* ---------- 首屏顶栏：透明悬浮，滚动后还原 ---------- */
body.has-hero .site-header {
    position: fixed; top: 0; left: 0; right: 0;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, .13);
    backdrop-filter: none;
    transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
/* 首屏透明顶栏：把深蓝 logo 反相为白色；滚动到白底后恢复原色 */
body.has-hero .site-header:not(.scrolled) .brand-img { filter: brightness(0) invert(1); }
body.has-hero .main-nav a { color: rgba(255, 255, 255, .8); }
body.has-hero .main-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
body.has-hero .main-nav a.active {
    background: transparent; color: #fff; border-radius: 0;
    box-shadow: inset 0 -2px 0 var(--gold);
}
body.has-hero .header-phone span { color: rgba(255, 255, 255, .5); }
body.has-hero .header-phone b { color: #fff; }
body.has-hero .nav-toggle { color: #fff; border-color: rgba(255, 255, 255, .3); }

body.has-hero .site-header.scrolled {
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px) saturate(1.2);
    border-bottom-color: var(--hair);
    box-shadow: 0 1px 20px rgba(12, 16, 22, .06);
}
body.has-hero .site-header.scrolled .brand-img { filter: none; }
body.has-hero .site-header.scrolled .main-nav a { color: var(--text); }
body.has-hero .site-header.scrolled .main-nav a:hover { background: transparent; color: var(--gold); }
body.has-hero .site-header.scrolled .main-nav a.active {
    background: transparent; color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold);
}
body.has-hero .site-header.scrolled .header-phone span { color: var(--muted); }
body.has-hero .site-header.scrolled .header-phone b { color: var(--ink); }
body.has-hero .site-header.scrolled .nav-toggle { color: var(--text); border-color: var(--line); }

/* ---------- 首屏 ---------- */
.hero.carousel {
    position: relative;
    height: clamp(600px, 92vh, 940px);
    background: var(--ink);
    overflow: hidden;
}
.hero .carousel-item {
    position: absolute; inset: 0;
    display: block;
    opacity: 0;
    transition: opacity 1s var(--ease);
    pointer-events: none;
}
.hero .carousel-item.active { opacity: 1; pointer-events: auto; }

.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1.02);
}
.hero .carousel-item.active .hero-bg { animation: heroZoom 18s var(--ease) forwards; }
@keyframes heroZoom {
    from { transform: scale(1.02); }
    to { transform: scale(1.12); }
}

.hero-veil {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 11, 16, .92) 0%, rgba(8, 11, 16, .74) 44%, rgba(8, 11, 16, .3) 76%, rgba(8, 11, 16, .5) 100%),
        linear-gradient(0deg, rgba(8, 11, 16, .55) 0%, rgba(8, 11, 16, 0) 42%),
        radial-gradient(110% 80% at 82% 12%, rgba(184, 145, 84, .12), transparent 62%);
}

.hero-stage {
    position: relative; z-index: 2;
    height: 100%;
    display: flex; align-items: center;
    padding-top: 68px;
}
.hero-caption { max-width: 760px; }
.hero-caption > * { opacity: 0; transform: translateY(22px); }
.hero .carousel-item.active .hero-caption > * {
    animation: heroRise .95s var(--ease) forwards;
}
.hero .carousel-item.active .hero-caption > *:nth-child(1) { animation-delay: .12s; }
.hero .carousel-item.active .hero-caption > *:nth-child(2) { animation-delay: .26s; }
.hero .carousel-item.active .hero-caption > *:nth-child(3) { animation-delay: .40s; }
.hero .carousel-item.active .hero-caption > *:nth-child(4) { animation-delay: .54s; }
@keyframes heroRise {
    to { opacity: 1; transform: none; }
}

.hero-eyebrow {
    display: flex; align-items: center; gap: 14px;
    margin: 0;
    font-size: 12px; letter-spacing: .34em;
    color: rgba(255, 255, 255, .62);
}
.hero-eyebrow span {
    display: block; width: 34px; height: 1px;
    background: var(--gold);
}
.hero-caption h1 {
    margin: 22px 0 24px;
    font-size: clamp(42px, 6vw, 86px);
    font-weight: 600; line-height: 1.04;
    letter-spacing: .05em;
    color: #fff;
}
.hero-sub {
    margin: 0;
    font-size: clamp(14px, 1.25vw, 16.5px);
    letter-spacing: .26em;
    color: rgba(255, 255, 255, .72);
}
.hero-actions { display: flex; gap: 16px; margin-top: 46px; flex-wrap: wrap; }

.btn-solid, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 15px 36px;
    font-size: 14.5px; letter-spacing: .1em;
    border-radius: 2px;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-solid { background: #fff; color: var(--ink); border: 1px solid #fff; }
.btn-solid:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .34); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }

/* 首屏底部信息条 */
.hero-hud {
    position: absolute; left: 0; right: 0; bottom: 40px; z-index: 3;
    display: flex; align-items: center; gap: 28px;
}
.hero-count {
    font-size: 12.5px; letter-spacing: .22em;
    color: rgba(255, 255, 255, .5);
    font-variant-numeric: tabular-nums;
}
.hero-count b { color: #fff; font-weight: 600; }
.hero-count i { font-style: normal; margin: 0 7px; opacity: .45; }

.hero .carousel-dots {
    position: static;
    display: flex; align-items: center; gap: 8px;
    flex: 1; text-align: left;
}
.hero .carousel-dots i {
    width: 26px; height: 2px; border-radius: 0; margin: 0;
    background: rgba(255, 255, 255, .22);
    transition: width .35s var(--ease), background .35s var(--ease);
}
.hero .carousel-dots i.on { width: 46px; background: var(--gold); }

.hero .carousel-arrow {
    position: static; transform: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .26);
    color: #fff; font-size: 15px; line-height: 1;
    transition: background .25s, border-color .25s;
}
.hero .carousel-arrow:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .6); }

/* 箭头独立成组，避免窄屏下被指示条挤占 */
.hero-nav { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* ---------- 通用区块 ---------- */
.hp-section { padding: 104px 0; }
.hp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }

.hp-eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 11.5px; letter-spacing: .32em; color: var(--gold);
}
.hp-eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .75; }
.hp-eyebrow.light { color: rgba(184, 145, 84, .95); }

.hp-h2 {
    margin: 18px 0 0;
    font-size: clamp(23px, 2.5vw, 33px);
    font-weight: 600; line-height: 1.42;
    letter-spacing: .04em; color: var(--ink);
}
.hp-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink); font-size: 13.5px; letter-spacing: .06em;
    padding-bottom: 5px; border-bottom: 1px solid var(--gold);
    transition: color .25s, border-color .25s;
}
.hp-link:hover { color: var(--gold); }

/* ---------- 品牌介绍 ---------- */
.hp-about { border-bottom: 1px solid var(--hair); }
.hp-about-inner { display: grid; grid-template-columns: 1.02fr 1fr; gap: 90px; }
.hp-about-body p {
    margin: 0; color: var(--muted2);
    font-size: 15.5px; line-height: 2.05;
}
.hp-about-body .hp-link { margin-top: 30px; }

/* ---------- 通用图标 ---------- */
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; flex: 0 0 auto; }

/* ---------- 数据带 ---------- */
.hp-stats { background: #faf9f6; border-bottom: 1px solid var(--hair); }
.hp-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    padding: 44px 20px;
}
.hp-stat { text-align: center; position: relative; }
.hp-stat + .hp-stat::before {
    content: ""; position: absolute; left: 0; top: 50%;
    width: 1px; height: 44px; background: var(--hair);
    transform: translateY(-50%);
}
.hp-stat b {
    display: block;
    font-size: clamp(30px, 3vw, 42px); font-weight: 600; line-height: 1;
    color: var(--ink); letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}
.hp-stat b i {
    font-style: normal; font-size: .55em; margin-left: 2px;
    color: var(--gold); font-weight: 600;
}
.hp-stat span {
    display: block; margin-top: 12px;
    font-size: 12.5px; letter-spacing: .18em; color: var(--muted2);
}

/* ---------- 服务体系 ---------- */
.hp-svc-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    margin-top: 60px;
    border-top: 1px solid var(--ink);
}
.hp-svc {
    padding: 32px 34px 0;
    border-right: 1px solid var(--hair);
}
.hp-svc:first-child { padding-left: 0; }
/* 4 列 × 2 行：每行首卡贴左、行尾卡去右边框，第 2 行加分隔线 */
.hp-svc:nth-child(4n + 1) { padding-left: 0; }
.hp-svc:last-child, .hp-svc:nth-child(4n) { border-right: 0; padding-right: 0; }
.hp-svc:nth-child(n+5) { border-top: 1px solid var(--hair); }
.hp-svc-no {
    font-size: 12px; letter-spacing: .18em;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}
.hp-svc-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; margin-bottom: 18px;
    border: 1px solid var(--hair); border-radius: 50%;
    color: var(--gold);
    background: #faf9f6;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.hp-svc-icon .icon { width: 22px; height: 22px; }
.hp-svc:hover .hp-svc-icon {
    background: var(--ink); border-color: var(--ink); color: var(--gold);
}
.hp-svc h3 {
    margin: 20px 0 10px;
    font-size: 18px; font-weight: 600; letter-spacing: .03em; color: var(--ink);
}
.hp-svc p { margin: 0; color: var(--muted2); font-size: 13.5px; line-height: 1.95; }

/* ---------- 选择华安 ---------- */
.hp-why { background: #faf9f6; }
.hp-why-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    margin-top: 54px;
    background: var(--hair);
    border: 1px solid var(--hair);
}
.hp-why-item {
    background: #fff; padding: 36px 32px;
    transition: background .3s var(--ease);
}
.hp-why-item:hover { background: #fdfcf9; }
.hp-why-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(184, 145, 84, .1);
    color: var(--gold);
    margin-bottom: 18px;
}
.hp-why-icon .icon { width: 21px; height: 21px; }
.hp-why-item h3 {
    margin: 0 0 10px;
    font-size: 16.5px; font-weight: 600; letter-spacing: .03em; color: var(--ink);
}
.hp-why-item p { margin: 0; color: var(--muted2); font-size: 13.5px; line-height: 1.95; }

/* ---------- 新闻 ---------- */
.hp-news-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 66px; margin-top: 50px; }
.hp-feature { display: block; color: var(--ink); }
.hp-feature-img { overflow: hidden; background: #e9e9e4; aspect-ratio: 16 / 10; }
.hp-feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.hp-feature:hover .hp-feature-img img { transform: scale(1.05); }
.hp-feature-tag {
    display: inline-block; margin-top: 22px;
    font-size: 11.5px; letter-spacing: .22em; color: var(--gold);
}
.hp-feature h3 {
    margin: 12px 0 12px;
    font-size: 21px; font-weight: 600; line-height: 1.55; letter-spacing: .02em;
}
.hp-feature:hover h3 { color: var(--primary); }
.hp-feature p { margin: 0; color: var(--muted2); font-size: 13.5px; line-height: 1.95; }
.hp-feature time { display: block; margin-top: 16px; color: #9b9b96; font-size: 12.5px; letter-spacing: .1em; }

.hp-news-list { display: flex; flex-direction: column; }
.hp-news-item {
    display: flex; align-items: baseline; justify-content: space-between; gap: 22px;
    padding: 21px 0;
    border-top: 1px solid var(--hair);
    color: var(--ink);
}
.hp-news-item:first-child { border-top: 0; padding-top: 4px; }
.hp-news-item h4 {
    margin: 0; font-size: 15px; font-weight: 500; letter-spacing: .01em;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color .25s;
}
.hp-news-item:hover h4 { color: var(--primary); }
.hp-news-item time { color: #9b9b96; font-size: 12.5px; letter-spacing: .08em; white-space: nowrap; }
.hp-news-more { margin-top: 28px; }

/* ---------- 行动区 ---------- */
.hp-cta { background: var(--ink); padding: 92px 0; }
.hp-cta-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 48px; flex-wrap: wrap;
}
.hp-cta h2 {
    margin: 18px 0 0;
    font-size: clamp(24px, 2.9vw, 38px);
    font-weight: 600; letter-spacing: .05em; line-height: 1.42;
    color: #fff;
}
.hp-cta-act { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.hp-tel-label {
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 8px;
    font-size: 11.5px; letter-spacing: .26em; color: rgba(255, 255, 255, .48);
}
.hp-tel-label .icon { width: 14px; height: 14px; color: var(--gold); }
.hp-tel {
    font-size: clamp(22px, 2.3vw, 30px);
    color: #fff; letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    padding-bottom: 4px;
}
.hp-tel:hover { color: var(--gold); border-color: var(--gold); }
.btn-line {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 15px 34px; border: 1px solid rgba(255, 255, 255, .3);
    color: #fff; font-size: 14px; letter-spacing: .1em; border-radius: 2px;
    transition: background .3s var(--ease), border-color .3s var(--ease);
}
.btn-line:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* ---------- 滚动渐显 ----------
   默认可见；只有当 JS 判定元素在首屏之外时，才由 .anim 先隐藏再渐入。
   无脚本 / 不支持 IntersectionObserver / 打印时，内容始终可见。 */
.reveal.anim {
    opacity: 0; transform: translateY(26px);
    transition: opacity .85s var(--ease), transform .85s var(--ease);
}
.reveal.anim.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .hp-section { padding: 82px 0; }
    .hp-about-inner { gap: 52px; }
    .hp-news-grid { grid-template-columns: 1fr; gap: 40px; }
    .hp-cta { padding: 76px 0; }
    .hp-why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero.carousel { height: clamp(520px, 86vh, 700px); }
    .hero-caption { max-width: none; }
    .hero-actions { margin-top: 34px; }
    .hero-hud { bottom: 26px; gap: 18px; }
    .hp-svc-grid { grid-template-columns: repeat(2, 1fr); border-top-color: var(--ink); }
    .hp-svc { padding: 26px 26px 26px 0; }
    .hp-svc:nth-child(2n) { border-right: 0; padding-right: 0; }
    .hp-svc:nth-child(n+3) { border-top: 1px solid var(--hair); }
    .hp-svc:nth-child(2n + 1) { padding-left: 0; }
    .hp-about-inner { grid-template-columns: 1fr; gap: 28px; }
    .hp-head { flex-direction: column; align-items: flex-start; gap: 18px; }
    .hp-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px 20px; padding: 32px 20px; }
    .hp-stat + .hp-stat::before { display: none; }
    .hp-stat { padding: 10px 0; }
    .hp-stat:nth-child(3) { border-top: 1px solid var(--hair); }
    .hp-stat:nth-child(4) { border-top: 1px solid var(--hair); }
    .hp-why-grid { grid-template-columns: 1fr; }

    body.has-hero .site-header { background: rgba(12, 16, 22, .45); backdrop-filter: blur(6px); }
    body.has-hero .main-nav { background: #fff; border-bottom: 0; box-shadow: 0 22px 40px -30px rgba(12, 16, 22, .6); }
    body.has-hero .main-nav a { color: var(--ink); }
    body.has-hero .main-nav a.active { color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); border-radius: 0; }
}

@media (max-width: 560px) {
    .hp-section { padding: 64px 0; }
    .hp-why-grid { grid-template-columns: 1fr; }
    .hp-why-item { padding: 28px 24px; }
    .hp-svc-grid { grid-template-columns: 1fr; }
    .hp-svc { padding: 24px 0; border-right: 0; }
    .hp-svc + .hp-svc { border-top: 1px solid var(--hair); }
    .hero-caption h1 { letter-spacing: .03em; }
    .btn-solid, .btn-ghost { width: 100%; }
    .hero-actions { gap: 12px; }
    .hp-news-item h4 { white-space: normal; }

    /* 窄屏：竖向遮罩保证文字可读，底部信息条收窄避免溢出 */
    .hero-veil {
        background: linear-gradient(180deg, rgba(8, 11, 16, .58) 0%, rgba(8, 11, 16, .84) 52%, rgba(8, 11, 16, .94) 100%);
    }
    .hero-hud { gap: 10px; bottom: 22px; padding: 0 18px; }
    .hero-count { font-size: 11.5px; letter-spacing: .16em; flex: 0 0 auto; }
    .hero .carousel-dots {
        gap: 5px; overflow: hidden;
        flex: 1 1 0%; min-width: 0;
    }
    .hero .carousel-dots i { width: 15px; }
    .hero .carousel-dots i.on { width: 24px; }
    /* 窄屏改为手势滑动，隐藏箭头，底部信息条只保留计数与指示条 */
    .hero-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero .carousel-item.active .hero-bg,
    .hero .carousel-item.active .hero-caption > *,
    .js .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}
