/* =========================================================
   中山市美雷贸易有限公司官网样式
   设计方向：参考 apple.com 的克制排版、大留白、毛玻璃导航、
   大尺寸产品视觉和低饱和黑白灰体系。
   ========================================================= */

/* ---------- 全局变量：集中管理颜色、圆角、阴影和宽度 ---------- */
:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-soft: #fbfbfd;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --line: rgba(0, 0, 0, 0.12);
    --dark: #000000;
    --link: #0066cc;
    --header-bg: rgba(245, 245, 247, 0.76);
    --header-bg-scrolled: rgba(255, 255, 255, 0.86);
    --nav-text: rgba(29, 29, 31, 0.78);
    --nav-hover: #000000;
    --control-bg: rgba(255, 255, 255, 0.64);
    --button-secondary-bg: rgba(255, 255, 255, 0.92);
    --radius: 28px;
    --radius-small: 16px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
    --max-width: 1180px;
    --header-height: 52px;
}

:root[data-theme="dark"] {
    --bg: #0f1115;
    --surface: #181b21;
    --surface-soft: #20242c;
    --text: #f5f5f7;
    --muted: #a8adb7;
    --line: rgba(255, 255, 255, 0.14);
    --dark: #ffffff;
    --link: #5aa7ff;
    --header-bg: rgba(15, 17, 21, 0.78);
    --header-bg-scrolled: rgba(24, 27, 33, 0.88);
    --nav-text: rgba(245, 245, 247, 0.76);
    --nav-hover: #ffffff;
    --control-bg: rgba(255, 255, 255, 0.1);
    --button-secondary-bg: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

/* ---------- 基础重置：确保不同浏览器显示更一致 ---------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: color 180ms ease, background 180ms ease;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- 固定顶部导航：半透明背景 + 模糊，模拟 Apple 顶栏 ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(22px, calc((100vw - var(--max-width)) / 2));
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
}

.brand-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #111;
    font-size: 11px;
    font-weight: 700;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    color: var(--nav-text);
    font-size: 13px;
}

.desktop-nav a {
    transition: color 160ms ease;
}

.desktop-nav a:hover {
    color: var(--nav-hover);
}

/* ---------- 头部右侧控件：语言切换器 + 手机菜单按钮 ---------- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    position: relative;
    width: 50px;
    height: 30px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--control-bg);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.theme-toggle::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 1;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    transition: transform 180ms ease, background 180ms ease;
}

.theme-toggle.is-dark::before {
    transform: translateX(20px);
}

.theme-toggle-icon {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    opacity: 0.72;
}

.theme-toggle-sun {
    left: 8px;
    border: 2px solid #f4b400;
    border-radius: 50%;
}

.theme-toggle-moon {
    right: 8px;
    border-radius: 50%;
    box-shadow: inset -4px 0 0 #8ab4ff;
}

/* 语言切换器保持小尺寸，避免抢占 Apple 风格导航的视觉重心。 */
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--control-bg);
}

.language-switcher button {
    min-width: 34px;
    height: 26px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    color: var(--nav-text);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease;
}

.language-switcher button:hover {
    color: var(--nav-hover);
}

.language-switcher button.is-active {
    color: var(--surface);
    background: var(--text);
}

/* ---------- 移动端菜单按钮：两条线变形为关闭按钮 ---------- */
.menu-button {
    display: none;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 1.5px;
    margin: 6px auto;
    background: var(--text);
    transition: transform 180ms ease;
}

.menu-open .menu-button span:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.menu-open .menu-button span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 19;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    background: var(--header-bg-scrolled);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.mobile-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-nav a {
    padding: 18px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 24px;
    font-weight: 600;
}

/* ---------- 首屏：大图片、大标题、少量行动按钮 ---------- */
.hero {
    position: relative;
    min-height: 96vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 120px 22px 76px;
    text-align: center;
    color: #fff;
    background: #000;
}

.hero-media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.62)),
        url("https://images.unsplash.com/photo-1524484485831-a92ffc0de03f?auto=format&fit=crop&w=2200&q=82") center/cover;
    transform: scale(1.02);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 940px;
}

.eyebrow {
    margin: 0 0 14px;
    color: inherit;
    opacity: 0.72;
    font-size: 17px;
    font-weight: 600;
}

.hero h1 {
    margin: 0;
    font-size: clamp(48px, 8vw, 94px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: 0;
}

.hero-subtitle {
    max-width: 760px;
    margin: 24px auto 0;
    font-size: clamp(21px, 3vw, 32px);
    line-height: 1.28;
    font-weight: 500;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
}

/* ---------- 按钮：蓝色主按钮与浅色次按钮，贴近 Apple 交互样式 ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 500;
    transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: var(--link);
}

.button-secondary {
    color: var(--link);
    background: var(--button-secondary-bg);
}

/* ---------- 公司概览指标：首屏下方的简洁信任信息 ---------- */
.overview {
    max-width: var(--max-width);
    margin: 18px auto 0;
    padding: 0 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric {
    min-height: 130px;
    padding: 28px;
    border-radius: var(--radius-small);
    background: var(--surface);
    text-align: center;
}

.metric strong {
    display: block;
    margin-bottom: 8px;
    font-size: 26px;
}

.metric span {
    color: var(--muted);
    font-size: 15px;
}

/* ---------- 通用内容区：统一宽度和垂直间距 ---------- */
.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 96px 22px 0;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading .eyebrow {
    color: var(--muted);
}

.section-heading h2,
.contact-band h2 {
    margin: 0;
    font-size: clamp(36px, 5.4vw, 64px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.contact-band p {
    color: var(--muted);
    font-size: 21px;
    line-height: 1.42;
}

/* ---------- 产品展示：大图背景 + 文字浮层，避免普通商务站的拥挤感 ---------- */
.product-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.product-panel {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 34px;
    border-radius: var(--radius);
    color: #fff;
    background: #111;
    box-shadow: var(--shadow);
}

.product-panel:first-child {
    grid-column: span 2;
}

.product-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
    transition: transform 500ms ease;
}

.product-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.68));
}

.product-panel:hover::before {
    transform: scale(1.06);
}

.product-panel > div {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.panel-lighting::before {
    background-image: url("https://images.unsplash.com/photo-1513506003901-1e6a229e2d15?auto=format&fit=crop&w=1800&q=82");
}

.panel-furniture::before {
    background-image: url("https://images.unsplash.com/photo-1555041469-a586c61ea9bc?auto=format&fit=crop&w=1400&q=82");
}

.panel-decor::before {
    background-image: url("https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?auto=format&fit=crop&w=1400&q=82");
}

.panel-label {
    margin: 0 0 12px;
    opacity: 0.78;
    font-size: 14px;
    font-weight: 600;
}

.product-panel h3 {
    margin: 0;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.02;
}

.product-panel p:last-child {
    max-width: 620px;
    margin: 16px 0 0;
    font-size: 20px;
    line-height: 1.45;
}

/* ---------- 店铺入口：一张入口就是一个明确跳转 ---------- */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.platform-link {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--surface);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.platform-link:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 102, 204, 0.35);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.11);
}

.platform-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.platform-icon-alibaba,
.platform-icon-taobao {
    background: #ff6a00;
}

.platform-icon-pdd {
    background: #e02b2f;
}

.platform-icon-amazon {
    color: #111;
    background: #ffb300;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    line-height: 1;
}

.platform-name {
    max-width: 150px;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 700;
}

.platform-desc {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
}

.platform-arrow {
    position: absolute;
    top: 22px;
    right: 22px;
    color: var(--link);
    font-size: 20px;
}

/* ---------- 成员卡片：每个人拥有完整四类联系方式 ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.member-card {
    padding: 32px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
}

.member-index {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.member-card h3 {
    margin: 0;
    font-size: 38px;
    line-height: 1.08;
}

.member-role {
    margin: 10px 0 0;
    color: var(--link);
    font-size: 18px;
    font-weight: 600;
}

.member-text {
    min-height: 78px;
    margin: 16px 0 24px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.contact-list {
    display: grid;
    gap: 10px;
}

.contact-list a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    overflow-wrap: anywhere;
    transition: color 160ms ease, background 160ms ease;
}

.contact-list a:hover {
    color: #fff;
    background: var(--link);
}

/* ---------- 联系区：大号收尾 CTA，方便快速转化 ---------- */
.contact-band {
    max-width: var(--max-width);
    margin: 96px auto 18px;
    padding: 58px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 24px;
    align-items: center;
    border-radius: var(--radius);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(35, 35, 38, 0.88)),
        url("https://images.unsplash.com/photo-1586023492125-27b2c045efd7?auto=format&fit=crop&w=1800&q=82") center/cover;
}

.contact-band p {
    color: rgba(255, 255, 255, 0.74);
}

.contact-band .button-secondary {
    background: #fff;
}

.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 22px 46px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 13px;
}

/* ---------- 滚动出现动画：轻量，不影响低性能设备 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 响应式：平板布局 ---------- */
@media (max-width: 980px) {
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-band {
        grid-template-columns: 1fr;
    }
}

/* ---------- 响应式：手机布局 ---------- */
@media (max-width: 760px) {
    :root {
        --header-height: 50px;
        --radius: 22px;
    }

    .desktop-nav {
        display: none;
    }

    .menu-button,
    .mobile-nav {
        display: flex;
    }

    .brand-name {
        font-size: 13px;
    }

    .header-controls {
        gap: 6px;
    }

    .language-switcher {
        padding: 2px;
    }

    .theme-toggle {
        width: 44px;
        height: 28px;
    }

    .theme-toggle::before {
        width: 18px;
        height: 18px;
    }

    .theme-toggle.is-dark::before {
        transform: translateX(16px);
    }

    .language-switcher button {
        min-width: 30px;
        height: 24px;
        padding: 0 6px;
        font-size: 11px;
    }

    .hero {
        min-height: 90vh;
        padding-top: 94px;
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .overview,
    .product-showcase,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .product-panel:first-child {
        grid-column: span 1;
    }

    .metric {
        min-height: 104px;
    }

    .product-panel {
        min-height: 430px;
        padding: 26px;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }

    .member-card {
        padding: 26px;
    }

    .member-text {
        min-height: auto;
    }

    .contact-band {
        margin: 72px 22px 18px;
        padding: 34px 24px;
    }

    .site-footer {
        flex-direction: column;
    }
}

/* ---------- 减少动画偏好：尊重系统辅助功能设置 ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
