/* =========================================================
   迈格赛官网 · 极简扁平样式
   白底 / 1px 发丝线 / 无阴影 / 无渐变
   ========================================================= */

:root {
  --primary: #00B578;
  --primary-dark: #009A66;
  --ink: #1B1F22;
  --ink-2: #3D454A;
  --muted: #7A848A;
  --line: #E5E9E7;
  --line-strong: #CFD6D2;
  --soft: #F6F8F7;
  --bg: #FFFFFF;
  --error: #D64545;
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow, .btn-text:hover span { transform: translateX(4px); }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { color: var(--primary); border-color: var(--primary); }
.btn-text { padding: 14px 0; color: var(--ink); }
.btn-text span { display: inline-block; transition: transform .2s; }
.btn-text:hover { color: var(--primary); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line-strong); }
.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { width: 34px; height: 34px; color: var(--primary); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 19px; letter-spacing: .06em; }
.brand-text small { font-size: 9px; letter-spacing: .18em; color: var(--muted); margin-top: 4px; }
.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-nav a { position: relative; font-size: 13px; color: var(--ink-2); padding: 6px 0; white-space: nowrap; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--primary); transition: right .25s;
}
.site-nav a:hover { color: var(--primary); }
.site-nav a:hover::after { right: 0; }
.header-cta { flex: 0 0 auto; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 11px 9px; }
.nav-toggle span { display: block; height: 1px; background: var(--ink); margin: 5px 0; transition: transform .2s; }

/* ---------- 首屏 ---------- */
.hero { padding: 96px 0 84px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 76px; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .14em; color: var(--primary); margin-bottom: 26px; }
.eyebrow-line { width: 28px; height: 1px; background: var(--primary); }
.hero h1 { font-size: clamp(42px, 5vw, 68px); line-height: 1.16; font-weight: 700; letter-spacing: -.02em; }
.hero-lead { margin-top: 28px; max-width: 540px; color: var(--ink-2); font-size: 16px; line-height: 2; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 40px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-stats div { border-left: 1px solid var(--line); padding-left: 20px; }
.hero-stats div:first-child { border-left: 0; padding-left: 0; }
.hero-stats dt { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.hero-stats dd { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hero-media-frame { border: 1px solid var(--line); overflow: hidden; aspect-ratio: 1 / 1; background: var(--soft); }
.hero-media-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 56%; }
.media-caption { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- 通用区块 ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-index { font-size: 12px; letter-spacing: .14em; color: var(--primary); margin-bottom: 20px; }
.section-head h2, .about-grid h2, .contact-copy h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.32; font-weight: 600; letter-spacing: -.01em; }
.section-lead { margin-top: 22px; color: var(--ink-2); font-size: 16px; line-height: 1.95; }

/* ---------- 关于 ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.about-grid .section-head { margin-bottom: 0; }
.about-body p { color: var(--ink-2); font-size: 15px; line-height: 2; margin-bottom: 18px; }
.about-body p strong { color: var(--ink); font-weight: 600; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.about-tags li { border: 1px solid var(--line); padding: 7px 14px; font-size: 12px; color: var(--ink-2); }

/* ---------- 三合一 ---------- */
.trinity { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trinity-item { padding: 38px 34px; }
.trinity-item + .trinity-item { border-left: 1px solid var(--line); }
.trinity-num { font-size: 12px; letter-spacing: .1em; color: var(--primary); }
.trinity-item h3 { font-size: 20px; font-weight: 600; margin: 20px 0 12px; }
.trinity-item p { font-size: 14px; color: var(--muted); line-height: 1.9; }

/* ---------- 核心功能 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 68px; }
.feature-item { display: flex; gap: 24px; padding: 38px 0; border-top: 1px solid var(--line); }
.feature-icon { flex: 0 0 54px; width: 54px; height: 54px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--primary); }
.feature-icon svg { width: 30px; height: 30px; }
.feature-tag { display: block; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.feature-item h3 { font-size: 19px; font-weight: 600; margin: 8px 0 10px; }
.feature-item p { font-size: 14px; color: var(--muted); line-height: 1.9; }

/* ---------- 产品优势 ---------- */
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 42px; }
.adv-item { padding: 28px 0 30px; border-top: 1px solid var(--line); }
.adv-num { font-size: 12px; color: var(--primary); letter-spacing: .08em; }
.adv-item h3 { font-size: 17px; font-weight: 600; margin: 12px 0 8px; }
.adv-item p { font-size: 13px; color: var(--muted); line-height: 1.85; }

/* ---------- 款式选择 ---------- */
.model-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.model-card { position: relative; text-align: left; background: #fff; border: 1px solid var(--line); padding: 24px 20px; cursor: pointer; transition: border-color .2s; }
.model-card::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px; background: transparent; transition: background-color .2s; }
.model-card:hover { border-color: var(--line-strong); }
.model-card.is-active { border-color: var(--primary); }
.model-card.is-active::before { background: var(--primary); }
.model-num { font-size: 11px; letter-spacing: .1em; color: var(--primary); }
.model-card strong { display: block; font-size: 15px; font-weight: 600; margin: 12px 0 6px; line-height: 1.5; }
.model-card small { font-size: 12px; color: var(--muted); }
.model-panels { border: 1px solid var(--line); padding: 42px 44px; }
.model-detail { display: none; grid-template-columns: 1fr .9fr; gap: 70px; }
.model-detail.is-active { display: grid; }
.model-label { font-size: 11px; letter-spacing: .12em; color: var(--primary); }
.model-detail h3 { font-size: 26px; font-weight: 600; margin: 14px 0 16px; }
.model-detail p { font-size: 15px; color: var(--ink-2); line-height: 1.95; }
.model-spec div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.model-spec div:last-child { border-bottom: 0; }
.model-spec dt { color: var(--muted); flex: 0 0 auto; }
.model-spec dd { font-weight: 600; text-align: right; }

/* ---------- 产品细节 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item { position: relative; margin: 0; border: 1px solid var(--line); overflow: hidden; cursor: zoom-in; aspect-ratio: 1 / 1; background: var(--soft); }
.gallery-item-wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.94); border-top: 1px solid var(--line); padding: 11px 16px; font-size: 13px; color: var(--ink-2); }

/* ---------- 规格参数 ---------- */
.size-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.size-card { border: 1px solid var(--line); padding: 32px; }
.size-tag { font-size: 11px; letter-spacing: .12em; color: var(--primary); }
.size-card strong { display: block; font-size: 36px; font-weight: 600; letter-spacing: -.02em; margin: 20px 0 4px; line-height: 1.2; }
.size-card strong small { font-size: 18px; color: var(--muted); padding: 0 5px; font-weight: 400; }
.size-unit { font-size: 12px; color: var(--muted); }
.size-card p { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.spec-note { font-size: 12px; color: var(--muted); margin: 20px 0 44px; }
.param-table { border-top: 1px solid var(--line); }
.param-row { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 18px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.param-row span:first-child { color: var(--muted); }

/* ---------- 场景 ---------- */
.scene-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 42px; }
.scene-item { padding: 30px 0; border-top: 1px solid var(--line); }
.scene-item > span { font-size: 12px; color: var(--primary); letter-spacing: .1em; }
.scene-item h3 { font-size: 20px; font-weight: 600; margin: 16px 0 10px; }
.scene-item p { font-size: 14px; color: var(--muted); line-height: 1.9; }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 96px; }
.contact-copy > p:not(.section-index) { margin-top: 24px; color: var(--ink-2); font-size: 15px; line-height: 2; max-width: 440px; }
.contact-meta { margin-top: 44px; }
.contact-meta div { padding: 15px 0; border-top: 1px solid var(--line); }
.contact-meta span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.contact-meta strong { font-size: 15px; font-weight: 600; }
.contact-form { border: 1px solid var(--line); padding: 40px; }
.field { margin-bottom: 24px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.field label em { color: var(--primary); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: transparent; padding: 10px 0; font-size: 14px; color: var(--ink);
  outline: none; transition: border-color .2s; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--primary); }
.field input::placeholder, .field textarea::placeholder { color: #AEB6B1; }
.field-error { display: block; min-height: 17px; margin-top: 4px; font-size: 12px; color: var(--error); }
.field.has-error input, .field.has-error textarea { border-bottom-color: var(--error); }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer-brand strong { font-size: 20px; letter-spacing: .06em; }
.footer-brand span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-nav a { font-size: 13px; color: var(--muted); }
.footer-nav a:hover { color: var(--primary); }
.copyright { width: 100%; border-top: 1px solid var(--line); padding-top: 24px; font-size: 12px; color: var(--muted); }

/* ---------- 灯箱 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(255,255,255,.975); display: none; align-items: center; justify-content: center; padding: 64px; }
.lightbox.is-open { display: flex; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: min(920px, 88vw); }
.lightbox-figure img { max-width: 100%; max-height: 74vh; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.lightbox-figure figcaption { font-size: 14px; color: var(--ink-2); text-align: center; }
.lightbox-close, .lightbox-nav { background: #fff; border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.lightbox-close { position: absolute; top: 26px; right: 34px; width: 42px; height: 42px; font-size: 26px; line-height: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 28px; line-height: 1; }
.lightbox-prev { left: 34px; }
.lightbox-next { right: 34px; }
.lightbox-close:hover, .lightbox-nav:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 返回顶部 / 提示 ---------- */
.back-top { position: fixed; right: 26px; bottom: 26px; z-index: 90; width: 44px; height: 44px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s, border-color .2s, color .2s; }
.back-top.is-visible { opacity: 1; pointer-events: auto; }
.back-top:hover { border-color: var(--primary); color: var(--primary); }
.toast { position: fixed; left: 50%; bottom: 38px; z-index: 300; transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: 13px 26px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 滚动显现 ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .site-nav { gap: 18px; }
  .header-inner { gap: 24px; }
  .hero-grid { gap: 48px; }
  .contact-grid { gap: 54px; }
}

@media (max-width: 900px) {
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 32px 20px; margin: 0; flex-direction: column; align-items: stretch; gap: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-cta { display: none; }
  .hero { padding: 72px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-media { max-width: 560px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .feature-grid { grid-template-columns: 1fr; }
  .adv-grid { grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
  .model-tabs { grid-template-columns: repeat(2, 1fr); }
  .model-detail { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 40px; }
  .hero-lead { font-size: 15px; margin-top: 22px; }
  .hero-actions { gap: 20px; margin-top: 30px; }
  .hero-stats { margin-top: 44px; gap: 10px; }
  .hero-stats div { padding-left: 12px; }
  .hero-stats dt { font-size: 21px; }
  .site-nav { padding-left: 20px; padding-right: 20px; }
  .trinity { grid-template-columns: 1fr; }
  .trinity-item { padding: 26px 0; }
  .trinity-item + .trinity-item { border-left: 0; border-top: 1px solid var(--line); }
  .adv-grid, .scene-grid, .size-grid { grid-template-columns: 1fr; gap: 0; }
  .model-tabs { grid-template-columns: 1fr; gap: 8px; }
  .model-panels { padding: 28px 22px; }
  .model-detail h3 { font-size: 22px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-item-wide { grid-row: auto; aspect-ratio: 16 / 10; }
  .gallery-item figcaption { padding: 8px 10px; font-size: 11px; }
  .param-row { grid-template-columns: 1fr; gap: 4px; }
  .contact-form { padding: 26px 20px; }
  .footer-inner { justify-content: flex-start; }
  .lightbox { padding: 20px; }
  .lightbox-close { top: 14px; right: 14px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 22px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .back-top { right: 14px; bottom: 14px; }
}
