/* ============================================================
   HAMAC Homepage — Visual Refinement Layer
   设计语言：工业深蓝 (#041e42 / #1a2a57) + 琥珀金 (#F8C300)
   本文件为增量增强层，覆盖 base 样式而不改动原文件结构。
   ============================================================ */

:root {
    --hamac-navy: #041e42;
    --hamac-blue: #1a2a57;
    --hamac-gold: #F8C300;
    --hamac-gold-soft: #F8C300;
    --hamac-ink: #10233f;
    --hamac-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 全局字体渲染与可访问性 ---------- */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 键盘焦点可见（SEO/可访问性加分） */
a:focus-visible,
.nav-btn:focus-visible,
.menu-item:focus-visible,
.pro-tab:focus-visible,
.thumbnail:focus-visible,
button:focus-visible {
    outline: 3px solid var(--hamac-gold);
    outline-offset: 3px;
}

/* 尊重"减少动态效果"的系统偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 第一屏：首屏标题质感 ---------- */
.slide-1 .title {
    letter-spacing: 0.5px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.slide-1 .title br {
    display: block;
    margin-top: 0.35em;
}

/* 首屏渐变遮罩 + 底部渐隐，提升文字可读性并过渡到下一屏 */
.slide-1 .video-overlay {
    background:
        linear-gradient(180deg, rgba(4, 30, 66, 0.35) 0%, rgba(4, 30, 66, 0.12) 45%, rgba(4, 30, 66, 0.55) 100%);
}

/* 优雅的向下滚动提示 */
.slide-1::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.slide-1::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 58px;
    width: 4px;
    height: 9px;
    margin-left: -2px;
    background: var(--hamac-gold);
    border-radius: 3px;
    z-index: 5;
    pointer-events: none;
    animation: hamac-scroll-dot 1.8s var(--hamac-ease) infinite;
}

@keyframes hamac-scroll-dot {
    0%   { transform: translateY(0); opacity: 0; }
    30%  { opacity: 1; }
    70%  { transform: translateY(14px); opacity: 1; }
    100% { transform: translateY(18px); opacity: 0; }
}

/* ---------- 第二屏：菜单项精致交互 ---------- */
.menu-item {
    font-size: 15px;
    letter-spacing: 0.3px;
}

.menu-item::before {
    background: linear-gradient(to right, rgba(248, 195, 0, 0) 0%, var(--hamac-gold) 100%);
}

/* ---------- 区块标题统一装饰 ---------- */
.title-ty h2 {
    letter-spacing: 1px;
}

/* ---------- 第三屏：数字成就区质感 ---------- */
.achievement-item h3 {
    text-shadow: 0 2px 12px rgba(248, 195, 0, 0.25);
}

/* ---------- 第五屏：产品卡片精致化 ---------- */
.pro-tab {
    border-radius: 3px;
    letter-spacing: 0.2px;
    line-height: 1.5;
}

.pro-tab.active {
    color: var(--hamac-navy);
    font-weight: 700;
    box-shadow: inset 0 -3px 0 var(--hamac-gold);
}

.slide-image-wrapper {
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(4, 30, 66, 0.12);
    transition: box-shadow 0.35s var(--hamac-ease), transform 0.35s var(--hamac-ease);
}

.pro-slide:hover .slide-image-wrapper {
    box-shadow: 0 16px 40px rgba(4, 30, 66, 0.22);
    transform: translateY(-3px);
}

.pro-slide p {
    letter-spacing: 0.3px;
}

/* ---------- 案例区标题条 ---------- */
.project-bom {
    border-left: 3px solid var(--hamac-gold);
    padding-left: 14px;
}

/* ---------- 页脚链接悬停 ---------- */
.footer a {
    transition: color 0.25s var(--hamac-ease);
}

/* ---------- 平滑滚动辅助 ---------- */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ---------- 移动端微调：隐藏首屏滚动提示避免拥挤 ---------- */
@media (max-width: 768px) {
    .slide-1::after,
    .slide-1::before { display: none; }
}

/* ---------- SEO/GEO 渐进增强：无 JS 环境也能显示正文 ----------
   原 .animate-text 默认 opacity:0，依赖 JS 添加 .animate 类才显示。
   若爬虫/低性能设备不执行 JS，会导致标题与正文全部不可见。
   这里用 CSS 动画作为兜底：即使 JS 未运行，内容也会在短延迟后自动淡入。
   JS 正常时 .animate 类仍按原逻辑工作，视觉不受影响。 */
@media (prefers-reduced-motion: no-preference) {
    .animate-text {
        animation: hamac-reveal 0.8s var(--hamac-ease) 0.15s both;
    }
}

@keyframes hamac-reveal {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 减少动态偏好下：直接显示，不做隐藏 */
@media (prefers-reduced-motion: reduce) {
    .animate-text {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================
   留言表单（sitemsg 接入）样式增强
   ============================================================ */
.hm-inq-product {
    width: 100%; height: 44px; padding: 0 12px;
    border: 1px solid #d8dee7; border-radius: 4px; background: #fff;
    font-size: 14px; color: #33475b; appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; cursor: pointer;
}
.hm-inq-product:focus { outline: none; border-color: var(--hamac-gold); box-shadow: 0 0 0 3px rgba(248,195,0,.18); }
.hm-inq-tip { min-height: 18px; margin: 6px 0 4px; font-size: 13px; line-height: 1.5; }
.hm-inq-tip.is-ok { color: #1a7f37; font-weight: 600; }
.hm-inq-tip.is-err { color: #c0392b; font-weight: 600; }
.hm-inq-tip.is-sending { color: #7a869a; }
#msgForm input[type="submit"].Btn:disabled { opacity: .6; cursor: not-allowed; }
/* 隐私同意勾选框在手机端更易点 */
#smAgree { width: auto !important; height: auto !important; margin-right: 6px; vertical-align: middle; }
#msgForm label.radio { display: flex; align-items: center; gap: 0; }

/* ============================================================
   手机端页脚底部体验增强（恢复导航/社交入口 + 悬浮联系条）
   仅作用于手机/平板，不影响电脑端原样式
   ============================================================ */
@media screen and (max-width: 1024px) {
    /* 版权栏重新显示导航链接，利于内链 SEO 与用户导航 */
    .copyright .container { flex-direction: column; gap: 10px; }
    .copyright .content-list {
        display: flex !important; flex-wrap: wrap; justify-content: center;
        gap: 8px 20px; margin: 14px 0 6px;
    }
    .copyright .content-list .nav { margin-right: 0; }
    .copyright .content-list .nav a { font-size: .13rem; color: #d7d7d8; padding: 4px 2px; }
    .copyright .copyright-content { width: auto !important; padding: 4px 0 16px !important; }

    /* 页脚社交入口在手机端重新显示，横向排列、加大点击区 */
    .footer .foot-contact .f-describe .foot-style .foot-gam {
        display: flex !important; justify-content: center; align-items: center;
        gap: 22px; margin-top: 14px; width: 100%;
    }
    .footer .foot-contact .f-describe .foot-style { width: 100% !important; text-align: center; }
    .footer .foot-contact .f-describe .foot-style .tel { margin: 0 auto !important; }

    /* 悬浮联系条固定在底部，随时可联系/回顶 */
    .foot-mfloat {
        position: fixed !important; display: block !important;
        bottom: 0; left: 0; right: 0; width: 100%; z-index: 999;
        background: rgba(4,30,66,.96) !important;
        box-shadow: 0 -2px 14px rgba(0,0,0,.25);
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    }
    .foot-mfloat ul { display: flex; justify-content: space-around; align-items: center; padding: 0 4px; }
    .foot-mfloat ul li { width: auto; padding: 4px 10px; }
    .foot-mfloat ul img { width: 24px; height: 24px; object-fit: contain; }
    /* 给固定悬浮条留出空间，避免遮挡页脚版权内容 */
    .copyright { padding-bottom: 56px; }
}
