/* ============================================================
   HAMAC Homepage v2 — home.css
   设计语言：工业深蓝 + 琥珀金。直线、细描边、大图，避免圆角卡片堆叠。
   导航/页脚沿用 header.css 与 foot 片段；本文件只负责首页主体。
   ============================================================ */

:root {
    --navy: #0b2545;
    --navy-deep: #071a32;
    --navy-soft: #123359;
    --gold: #f5b301;
    --gold-deep: #d99a00;
    --ink: #1a2736;
    --muted: #5d6b7a;
    --line: #e2e7ed;
    --paper: #ffffff;
    --mist: #f4f6f8;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
/* 覆盖 header.css 为旧全屏 Swiper 设置的 height:100% + overflow:hidden，
   否则新长页面会被锁死在一屏内、内容堆叠错乱。 */
html { height: auto; overflow-x: hidden; overflow-y: auto; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body.home-page {
    height: auto; overflow: visible;
    margin: 0; font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink); background: var(--paper);
}
body.home-page a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.hm-container { width: min(1440px, calc(100% - 40px)); margin: 0 auto; }

/* header.css 有全局 `header{position:fixed;top:0;z-index:1000}`，
   站点顶栏靠它定位。首页内部区块标题必须用 div；这里再兜底防御，
   避免任何误用 header 标签的区块被固定到页面顶部造成错乱。 */
.home-page main header:not(.site-header) {
    position: static; width: auto; z-index: auto;
    border: 0; background: transparent; box-shadow: none;
}

/* header.css sets header height ~142px; offset the hero so it is not covered */
.home-page main { padding-top: 142px; }
@media (max-width: 1024px) { .home-page main { padding-top: 68px; } }

/* ---------- shared type ---------- */
.hm-kicker {
    font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--gold-deep); margin: 0 0 18px; display: flex; align-items: center; gap: 12px;
}
.hm-kicker::before { content: ''; width: 26px; height: 2px; background: var(--gold); }

.hm-section { padding: 104px 0; }
@media (max-width: 768px) { .hm-section { padding: 68px 0; } }

.hm-sec-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
    margin-bottom: 48px;
}
.hm-sec-head h2 { font-size: clamp(28px, 3.4vw, 46px); line-height: 1.16; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--navy); }
.hm-text-link { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; border-bottom: 2px solid var(--gold); padding-bottom: 6px; transition: gap .25s var(--ease), color .25s; }
.hm-text-link span { display: inline-block; margin-left: 8px; transition: transform .25s var(--ease); }
.hm-text-link:hover { color: var(--gold-deep); }
.hm-text-link:hover span { transform: translateX(5px); }
@media (max-width: 640px) { .hm-sec-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 34px; } }

/* ---------- buttons ---------- */
.hm-btn { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; letter-spacing: .01em; padding: 15px 26px; transition: background .25s, color .25s, transform .25s var(--ease); }
.hm-btn span { transition: transform .25s var(--ease); font-size: 18px; line-height: 1; }
.hm-btn:hover { transform: translateY(-2px); }
.hm-btn:hover span { transform: translateX(5px); }
.hm-btn-primary { background: var(--gold); color: var(--navy-deep); }
.hm-btn-primary:hover { background: var(--gold-deep); }
/* 次要 CTA：白色实心 + 深蓝字 + 金色底边，深色首屏上对比强烈、清晰可见 */
.hm-btn-ghost { background: #fff; color: var(--navy-deep); border: 2px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.hm-btn-ghost:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); box-shadow: 0 8px 24px rgba(245,179,1,.35); }
.hm-btn-gold { background: var(--gold); color: var(--navy-deep); }
.hm-btn-gold:hover { background: var(--gold-deep); }

/* ============ HERO ============ */
.hm-hero {
    position: relative; min-height: calc(100vh - 142px); min-height: calc(100svh - 142px);
    display: flex; align-items: center; overflow: hidden; background: var(--navy-deep);
}
@media (max-width: 1024px) { .hm-hero { min-height: 78vh; } }
.hm-hero-media, .hm-hero-video, .hm-hero-fallback, .hm-hero-scrim { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-hero-video { object-fit: cover; z-index: 1; }
.hm-hero-fallback { z-index: 0; background: url('../index3.jpg') center/cover no-repeat; }
.hm-hero-scrim { z-index: 2; background: linear-gradient(100deg, rgba(7,26,50,.92) 0%, rgba(7,26,50,.7) 45%, rgba(7,26,50,.35) 100%); }
.hm-hero-inner { position: relative; z-index: 3; width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0; }
.hm-eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 26px; }
.hm-hero h1 { font-size: clamp(40px, 6.2vw, 84px); line-height: 1.06; font-weight: 900; letter-spacing: -.035em; color: #fff; margin: 0 0 26px; max-width: 15ch; }
.hm-hero h1 em { font-style: normal; color: var(--gold); }
.hm-hero-sub { font-size: clamp(15px, 1.5vw, 19px); line-height: 1.7; color: rgba(255,255,255,.82); max-width: 56ch; margin: 0 0 38px; font-weight: 300; }
.hm-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hm-scroll { position: absolute; z-index: 3; bottom: 26px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hm-scroll span { width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); }
@media (max-width: 768px) { .hm-scroll { display: none; } }

/* ============ DATA STRIP ============ */
.hm-stats { background: var(--navy); color: #fff; position: relative; }
.hm-stats::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold) 0 25%, rgba(245,179,1,.25) 25% 100%); }
.hm-stats-grid { width: min(1440px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.hm-stat { padding: 44px 28px 40px; border-right: 1px solid rgba(255,255,255,.12); position: relative; }
.hm-stat:last-child { border-right: 0; }
.hm-stat strong { font-size: clamp(34px, 4vw, 54px); font-weight: 900; letter-spacing: -.03em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.hm-stat-suffix { font-size: clamp(20px, 2.2vw, 30px); font-weight: 700; color: var(--gold); margin-left: 2px; }
.hm-stat p { margin: 12px 0 0; font-size: 13px; color: rgba(255,255,255,.62); letter-spacing: .02em; }
@media (max-width: 768px) { .hm-stats-grid { grid-template-columns: repeat(2, 1fr); } .hm-stat { border-bottom: 1px solid rgba(255,255,255,.12); padding: 28px 20px; } .hm-stat:nth-child(2n) { border-right: 0; } .hm-stat:nth-child(n+3) { border-bottom: 0; } }

/* ============ PRODUCTS ============ */
.hm-products { background: var(--mist); }
.hm-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.hm-product {
    background: #fff; display: flex; flex-direction: column;
    border: 1px solid var(--line);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.hm-product:hover { transform: translateY(-6px); border-color: rgba(245,179,1,.5); box-shadow: 0 18px 40px rgba(11,37,69,.12); }
.hm-product-media { aspect-ratio: 4/3; overflow: hidden; background: var(--mist); }
.hm-product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hm-product:hover .hm-product-media img { transform: scale(1.05); }
.hm-product-body { padding: 30px 28px 34px; position: relative; flex: 1; }
.hm-product-body::before { content: ''; position: absolute; top: 0; left: 28px; width: 34px; height: 3px; background: var(--gold); transition: width .35s var(--ease); }
.hm-product:hover .hm-product-body::before { width: 60px; }
.hm-product-idx { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 12px; }
.hm-product h3 { margin: 0 0 12px; font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.hm-product p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
@media (max-width: 980px) { .hm-product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 600px) { .hm-product-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ============ SOLUTIONS ============ */
.hm-solutions { background: var(--navy-deep); }
.hm-sec-head-light h2 { color: #fff; }
.hm-text-link-light { color: #fff; }
.hm-text-link-light:hover { color: var(--gold); }
.hm-sol-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.hm-sol { position: relative; grid-column: span 2; aspect-ratio: 4/5; overflow: hidden; background: var(--navy-soft); }
.hm-sol:nth-child(1) { grid-column: span 3; aspect-ratio: 16/10; }
.hm-sol:nth-child(2) { grid-column: span 3; aspect-ratio: 16/10; }
.hm-sol:nth-child(3), .hm-sol:nth-child(4), .hm-sol:nth-child(5) { grid-column: span 2; aspect-ratio: 3/4; }
.hm-sol-media, .hm-sol-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-sol-media img { object-fit: cover; transition: transform .7s var(--ease); }
.hm-sol:hover .hm-sol-media img { transform: scale(1.06); }
.hm-sol::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,26,50,.9) 0%, rgba(7,26,50,.15) 60%, rgba(7,26,50,.05) 100%); }
.hm-sol-overlay { position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 22px; }
.hm-sol-idx { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .1em; }
.hm-sol-overlay h3 { color: #fff; font-size: clamp(18px, 2vw, 26px); font-weight: 700; margin: 6px 0 4px; letter-spacing: -.01em; }
.hm-sol-overlay p { color: rgba(255,255,255,.7); font-size: 13px; margin: 0; }
@media (max-width: 900px) { .hm-sol-grid { grid-template-columns: repeat(2, 1fr); } .hm-sol, .hm-sol:nth-child(n) { grid-column: span 1; aspect-ratio: 3/4; } }

/* ============ CASES — 五大洲地图 ============ */
.hm-cases { background: var(--mist); }
.hm-cases-lead { margin: -22px 0 40px; font-size: 15px; color: var(--muted); }
.hm-continent-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.hm-continent {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.hm-continent:hover { transform: translateY(-6px); border-top-color: var(--gold); box-shadow: 0 18px 40px rgba(11,37,69,.13); }
.hm-continent-map {
    display: flex; align-items: center; justify-content: center;
    height: 168px; padding: 18px; background: linear-gradient(180deg, #fbfcfe 0%, #f2f5f9 100%);
    border-bottom: 1px solid var(--line); overflow: hidden;
}
.hm-continent-map img {
    max-width: 88%; max-height: 100%; object-fit: contain;
    opacity: .92; transition: opacity .4s var(--ease), transform .5s var(--ease);
}
/* 地图原图本身即品牌金色轮廓，默认清晰展示，hover 放大并提亮 */
.hm-continent:hover .hm-continent-map img { opacity: 1; transform: scale(1.09); }
.hm-continent-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.hm-continent-count { font-size: 13px; font-weight: 900; color: var(--gold-deep); letter-spacing: .02em; }
.hm-continent-count small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.hm-continent h3 { font-size: 23px; font-weight: 700; color: var(--navy); margin: 8px 0 10px; letter-spacing: -.01em; }
.hm-continent p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0 0 20px; flex: 1; }
.hm-continent-more { font-size: 12px; font-weight: 700; color: var(--navy); border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.hm-continent-more span { color: var(--gold-deep); transition: transform .25s var(--ease); }
.hm-continent:hover .hm-continent-more span { transform: translateX(4px); }
@media (max-width: 1100px) { .hm-continent-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .hm-continent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .hm-continent-grid { grid-template-columns: 1fr; } }

/* ============ ABOUT ============ */
.hm-about { background: #fff; }
.hm-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.hm-about-copy h2 { font-size: clamp(28px, 3.4vw, 46px); line-height: 1.16; font-weight: 700; letter-spacing: -.02em; color: var(--navy); margin: 0 0 24px; }
.hm-about-copy p:not(.hm-kicker) { font-size: 15px; line-height: 1.8; color: var(--muted); margin: 0 0 18px; }
.hm-about-copy .hm-btn { margin-top: 16px; }
.hm-about-media { position: relative; background: var(--mist); padding: 30px; border: 1px solid var(--line); }
.hm-about-media img { width: 100%; height: auto; }
.hm-about-caption { margin: 14px 0 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
@media (max-width: 900px) { .hm-about-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ============ NEWS ============ */
.hm-news { background: var(--mist); }
.hm-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hm-news-card { background: #fff; border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--ease); }
.hm-news-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.hm-news-img { aspect-ratio: 16/10; overflow: hidden; background: var(--navy-soft); }
.hm-news-img img { width: 100%; height: 100%; object-fit: cover; }
.hm-news-card time { display: block; font-size: 12px; color: var(--gold-deep); font-weight: 700; margin: 20px 22px 8px; }
.hm-news-card h3 { font-size: 18px; line-height: 1.35; color: var(--navy); margin: 0 22px 10px; }
.hm-news-desc { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 22px 22px; }
@media (max-width: 820px) { .hm-news-grid { grid-template-columns: 1fr; } }

/* ============ CTA ============ */
.hm-cta { background: var(--gold); }
.hm-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-top: 64px; padding-bottom: 64px; }
.hm-cta .hm-kicker { color: var(--navy-deep); }
.hm-cta .hm-kicker::before { background: var(--navy-deep); }
.hm-cta h2 { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.14; font-weight: 900; letter-spacing: -.03em; color: var(--navy-deep); margin: 0; }
.hm-cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; flex-shrink: 0; }
.hm-cta-phone { font-size: 13px; font-weight: 500; color: var(--navy-deep); }
@media (max-width: 820px) { .hm-cta-inner { flex-direction: column; align-items: flex-start; } }

/* ============ reveal (progressive) ============ */
.hm-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.hm-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hm-reveal { opacity: 1 !important; transform: none !important; }
    .hm-product-media img, .hm-sol-media img, .hm-continent-map img { transition: none; }
}

/* keyboard focus */
.home-page a:focus-visible, .home-page .hm-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---- mobile stats: keep number + suffix on one line (fix 100,000 m2 wrap) ---- */
@media (max-width: 768px) {
    .hm-stat { white-space: nowrap; }
    .hm-stat p { white-space: normal; }
    .hm-stat > strong { font-size: clamp(28px, 8.5vw, 38px); }
    .hm-stat > .hm-stat-suffix { font-size: clamp(17px, 5vw, 24px); }
}
