/* ══════════════════════════════════════════════
   homepage.css — 首页页面级样式
   层级：页面级（css/*.css），高于 style.css，低于模块内嵌 <style>
   来源：从 Demo v4.1 提取，剔除 navbar/footer/announcement/占位图/version stamp
   ══════════════════════════════════════════════ */

/* ── Hero Sections ── */
/* ── Hero Sections ── */
.mkl-hero {
  /* 高度：固定 720px（与迈从一致） */
  height: var(--mkl-hero-height, 720px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

/* 首屏：图片穿透到 navbar 毛玻璃下方，文字用 padding-top 推出遮挡区 */
.mkl-hero--first { height: calc(var(--mkl-hero-height, 720px) + 84px); padding-top: 84px; }

/* ── 产品线方案：fallback 背景色 + 文字颜色 ── */
/* consumer：浅底深字，无图时显示 #F5F5F7 */
.mkl-hero--consumer { background: #F5F5F7; }
.mkl-hero--consumer h1 { color: #1D1D1F; }
.mkl-hero--consumer p { color: #1D1D1F; }

/* industrial：深底白字，无图时显示 #000 */
.mkl-hero--industrial { background: #000000; }
.mkl-hero--industrial h1 { color: #F5F5F7; }
.mkl-hero--industrial p { color: #F5F5F7; }
/* 深底白字加极淡阴影保证可读性 */
.mkl-hero--industrial h1,
.mkl-hero--industrial p { text-shadow: 0 1px 8px rgba(0,0,0,0.3); }

/* ── Hero 全幅背景图 ── */
.mkl-hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
  /* 滚动缩放动效 */
  transition: transform 0.8s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* Hero hover 缩放：鼠标滑过时图片微微放大 */
.mkl-hero:hover .mkl-hero-bg { transform: scale(1.05); }

/* Hero 间距：卡片之间 12px 缝隙（Apple 风格克制间距） */
.mkl-hero + .mkl-hero { margin-top: var(--mkl-hero-gap, 12px); }

/* 文字层叠在图片上方 */
.mkl-hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  max-width: 1200px; padding: 0 40px;
  /* 文字组垂直位移：0=锚点，负值上移，正值下移 */
  transform: translateY(var(--mkl-hero-content-y, -60px));
}

/* ── 标题/副标题（克制字号） ── */
.mkl-hero h1 {
  font-size: var(--mkl-hero-title-size, 40px); font-weight: var(--mkl-hero-title-weight, 700);
  letter-spacing: normal; line-height: normal; margin: 0;
}
.mkl-hero p {
  font-size: var(--mkl-hero-subtitle-size, 30px); font-weight: var(--mkl-hero-subtitle-weight, 400);
  margin: var(--mkl-hero-title-gap, 8px) 0 var(--mkl-hero-subtitle-btn-gap, 24px); line-height: normal;
}

/* ── Hero 文字位置控制 ── */
/* center（默认）：已由 .mkl-hero 的 flex center 实现 */

/* bottom-center：水平居中（默认），垂直由 content-y 控制 */

/* bottom-left：水平靠左，垂直由 content-y 控制 */
.mkl-hero--pos-bottom-left { align-items: flex-start; }
.mkl-hero--pos-bottom-left .mkl-hero-content { text-align: left; }

/* bottom-right：水平靠右，垂直由 content-y 控制 */
.mkl-hero--pos-bottom-right { align-items: flex-end; }
.mkl-hero--pos-bottom-right .mkl-hero-content { text-align: right; }

/* top-center：水平居中（默认），垂直由 content-y 控制 */

/* ── CTA Button ── */
.mkl-cta {
  display: inline-flex; align-items: center; gap: 8px;
  /* 缩小 padding 配合克制字号 */
  padding: var(--mkl-hero-cta-pad-y, 12.5px) var(--mkl-hero-cta-pad-x, 24px); border-radius: var(--mkl-hero-cta-radius, 40px);
  color: #fff; font-size: var(--mkl-hero-cta-size, 13px); font-weight: 500;
  text-decoration: none; letter-spacing: -0.2px;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
}
.mkl-cta:hover { transform: scale(1.02); filter: brightness(0.92); color: #fff; }
.mkl-cta .mkl-cta-arrow { font-size: 13px; transition: transform 0.3s; }
.mkl-cta:hover .mkl-cta-arrow { transform: translateX(3px); }
.mkl-cta--purple { background: #5856D6; }
.mkl-cta--blue   { background: #0071E3; }


/* ── Bottom Section ── */
.mkl-bottom {
  background: #1D1D1F;
  padding: 120px 40px 100px;
  position: relative;
  overflow: visible;
}
.mkl-bottom-inner {
  max-width: 1000px; margin: 0 auto;
  position: relative; z-index: 2;
}
.mkl-bottom-separator { height: 1px; background: #333333; }

/* ═══ Tagline ═══ */
.mkl-tagline-static {
  text-align: center;
  /* 默认 80px，contact 展开时 JS 改为 60px */
  margin-bottom: 80px;
  transition: margin-bottom 0.5s cubic-bezier(.4,0,.2,1);
}
.mkl-tagline-static h2 {
  font-size: clamp(32px, 3.5vw, 56px);
  font-weight: 700; color: #F5F5F7;
  letter-spacing: -0.04em; line-height: 1.15;
  margin: 0;
}

/* ═══ Contact Toggle ═══ */
.mkl-contact-controls {
  position: absolute; top: 36px; right: 40px;
  display: flex; align-items: center; gap: 16px; z-index: 10;
}
.mkl-contact-label {
  font-size: 11px; color: #48484A;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.mkl-toggle {
  width: 44px; height: 24px; border-radius: 12px;
  border: none; cursor: pointer; position: relative;
  transition: background 0.25s; padding: 0;
}
.mkl-toggle--on  { background: #0071E3; }
.mkl-toggle--off { background: #48484A; }
.mkl-toggle-knob {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; position: absolute; top: 3px;
  transition: left 0.25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.mkl-toggle--on .mkl-toggle-knob  { left: 23px; }
.mkl-toggle--off .mkl-toggle-knob { left: 3px; }

/* ═══ Contact Panel ═══ */
.mkl-contact-panel {
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(.4,0,.2,1), opacity 0.4s, margin-bottom 0.5s;
}
.mkl-contact-panel--visible { max-height: 300px; opacity: 1; margin-bottom: 60px; }
.mkl-contact-panel--hidden  { max-height: 0; opacity: 0; margin-bottom: 0; }
.mkl-contact-panel-inner { border-top: 1px solid #333; padding-top: 48px; }
.mkl-contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.mkl-contact-item {
  position: relative; padding: 0 24px; text-align: center;
  cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.mkl-contact-item + .mkl-contact-item { border-left: 1px solid #2A2A2C; }
.mkl-contact-item-icon { color: #F5F5F7; margin-bottom: 2px; }
.mkl-contact-item-title {
  color: #F5F5F7; font-size: 15px; font-weight: 600; letter-spacing: -0.2px;
}
.mkl-contact-item-detail {
  font-size: 13px; color: #A1A1A6;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.25s; word-break: break-all;
}
.mkl-contact-item-action { font-size: 13px; color: #A1A1A6; transition: color 0.25s; }
.mkl-contact-item:hover .mkl-contact-item-action,
.mkl-contact-item:hover .mkl-contact-item-detail { color: #D1D1D6; }

/* QR popover — fixed 定位，JS 动态计算位置，不受父级 overflow 限制 */
.mkl-qr-popover {
  position: fixed;
  width: 136px; height: 136px;
  background: #2A2A2C; border: 1px solid #3A3A3C; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5); z-index: 9999;
  transform: scale(0.95);
}
.mkl-qr-popover.mkl-qr-popover--visible {
  opacity: 1; pointer-events: auto; transform: scale(1);
}
.mkl-qr-popover::after {
  content: ''; position: absolute; bottom: -6px; left: 50%;
  width: 12px; height: 12px; background: #2A2A2C;
  border-right: 1px solid #3A3A3C; border-bottom: 1px solid #3A3A3C;
  border-radius: 0 0 2px 0;
  transform: translateX(-50%) rotate(45deg); z-index: -1;
}

/* ═══ Product Line Entry Buttons ═══ */
.mkl-entry-btns { display: flex; gap: 20px; margin-bottom: 60px; }
.mkl-entry-btn {
  flex: 1; padding: 20px 40px; border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: transparent; color: #fff;
  font-size: 18px; font-weight: 500;
  text-decoration: none; letter-spacing: -0.2px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
}
.mkl-entry-btn .mkl-entry-arrow { font-size: 18px; transition: transform 0.3s; }
.mkl-entry-btn:hover { border-color: transparent; color: #fff; }
.mkl-entry-btn:hover .mkl-entry-arrow { transform: translateX(4px); }
.mkl-entry-btn--consumer:hover { background: #5856D6; }
.mkl-entry-btn--industrial:hover { background: #0071E3; }

/* ═══ Service Cards ═══ */
.mkl-services { display: flex; gap: 16px; }
.mkl-service-card {
  flex: 1; background: #2A2A2C; border-radius: 12px;
  padding: 36px 32px; text-decoration: none;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; gap: 12px; position: relative;
}
.mkl-service-card:hover { background: #323234; }
.mkl-service-card-icon { margin-bottom: 4px; }
.mkl-service-card-title { color: #F5F5F7; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.mkl-service-card-desc { color: #A1A1A6; font-size: 14px; line-height: 1.6; }
.mkl-service-card-arrow {
  position: absolute; right: 28px; top: 50%;
  transform: translateY(-50%); color: #A1A1A6; font-size: 20px; transition: transform 0.3s;
}
.mkl-service-card:hover .mkl-service-card-arrow { transform: translateY(-50%) translateX(3px); }

/* ══════════════════════════════════════════════
   首页专属 Footer 深色覆盖
   选择器：body.home #mkl-footer（WordPress 首页自动加 home class）
   仅影响首页，不动全站 footer 原始样式
══════════════════════════════════════════════ */

/* 主体：去 gap + 深色底 + 边线适配 */
body.home #mkl-footer {
  background: #111111;
  border-top: 1px solid #222;
  margin-top: 0;
}

/* 品牌 logo */
body.home .mkl-footer-logo { color: #F5F5F7; }
body.home .mkl-footer-logo:hover { color: #FFFFFF; }

/* 品牌描述 + 二维码提示 */
body.home .mkl-footer-desc,
body.home .mkl-footer-qr-hint { color: #A1A1A6; }

/* 二维码背景 */
body.home .mkl-footer-qr img { background: #2A2A2C; }

/* 列标题 */
body.home .mkl-footer-col-title { color: #F5F5F7; }

/* 导航链接 */
body.home .mkl-footer-links a { color: #A1A1A6; }
body.home .mkl-footer-links a:hover { color: #D1D1D6; }

/* 底栏分隔线 */
body.home .mkl-footer-bottom { border-top-color: #222; }

/* 底栏文字 */
body.home .mkl-footer-copy,
body.home .mkl-footer-bottom a { color: #48484A; }
body.home .mkl-footer-bottom a:hover { color: #A1A1A6; }
body.home .mkl-footer-divider { color: #333; }
