/* TagHowWell 官网样式 —— 依据 5 张设计样图还原，桌面 + 移动自适应 */
:root {
  --ink: #16324f;
  --ink-2: #2c4f74;
  --body: #4d647d;
  --muted: #6b7c93;
  --line: #e4edf6;
  --line-2: #d7e3f0;
  --accent: #2f6be0;
  --accent-soft: #eaf2fd;
  --paper: #f1f6fc;
  --dark: #3a404c;
  --dark-2: #2f3541;
  --white: #fff;
  --radius: 18px;
  --shadow-sm: 0 2px 10px rgba(22, 50, 79, .05);
  --shadow-md: 0 14px 34px -14px rgba(22, 50, 79, .28);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
          "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1220px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
button { font: inherit; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 200;
}
.skip:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid #eef3f9;
}
.nav__inner { display: flex; align-items: center; height: 74px; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.brand__mark { width: 27px; height: 27px; color: var(--accent); flex: none; }
.brand__name { font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.brand__name b { font-weight: 800; color: var(--accent); }

.nav__links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.nav__link {
  position: relative;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: #294667;
  transition: background .18s, color .18s;
}
.nav__link:hover { background: #f3f7fc; color: var(--ink); }
.nav__link.is-active { color: #0f2a47; font-weight: 700; }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: 1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}

.nav__actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: #6a7c92;
  transition: background .18s, color .18s;
}
.icon-btn:hover { background: #f2f6fb; color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 11px 10px;
  cursor: pointer;
}
.nav__toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.nav__toggle span + span { margin-top: 5px; }

/* ------------------------------------------------------------------ Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f8fc 0%, #eaf2fb 58%, #e3edf8 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 68px 0 62px; text-align: center; }
.hero__copy { max-width: 660px; margin: 0 auto; }

.hero__title {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  white-space: pre-line;
}
.hero__sub {
  margin-top: 16px;
  font-size: clamp(16px, 1.6vw, 21px);
  font-weight: 400;
  color: #3b5878;
}
.hero__art {
  position: absolute;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}
.hero__art--left { left: 0; width: min(34vw, 455px); }
.hero__art--right { right: 0; width: min(35vw, 470px); }
.hero__art--tags { right: 0; bottom: 34px; width: min(37vw, 500px); }
.hero__art--worker { right: 0; height: min(100%, 460px); width: auto; }
.hero__art--machine { width: min(32vw, 430px); }

.hero--home .hero__inner { min-height: 400px; display: flex; align-items: center; justify-content: center; }
.hero--compact .hero__inner { padding: 66px 0 58px; }
.hero--compact .hero__title { font-size: clamp(32px, 4vw, 46px); }
.hero--compact .hero__art--left { width: min(24vw, 330px); }

.hero--software { padding: 0 0 56px; }
.hero--software .container { position: relative; z-index: 2; }
.sw-head { text-align: center; padding: 40px 0 26px; }
.sw-head .hero__title { font-size: clamp(30px, 3.6vw, 44px); }

/* ------------------------------------------------------------------ 区块 */
.section { padding: 62px 0 24px; }
.section--tight { padding: 40px 0 10px; }
.section__head { margin-bottom: 26px; }
.section__head h2 { font-size: clamp(23px, 2.3vw, 30px); font-weight: 700; }
.section__head p { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 640px; }

/* ------------------------------------------------------------------ 首页 Applications */
.apps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.app-card {
  position: relative;
  display: block;
  aspect-ratio: 1.03 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(205, 223, 240, .65);
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.app-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.app-card:hover img { transform: scale(1.04); }
.app-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 58%;
  background: linear-gradient(180deg, rgba(14, 42, 74, .38), rgba(14, 42, 74, 0));
  pointer-events: none;
}
.app-card__title {
  position: absolute;
  z-index: 2;
  top: 13px; left: 14px; right: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-shadow: 0 1px 10px rgba(11, 35, 62, .5);
}

/* ------------------------------------------------------------------ 产品页 */
.filters-wrap { text-align: center; margin: 0 0 30px; }
.filters {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: #f3f7fc;
  border: 1px solid rgba(214, 230, 245, .9);
}
.filter {
  border: 0;
  background: transparent;
  color: #43607f;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.filter:hover { background: #eef4fc; color: var(--ink); }
.filter.is-active { background: var(--ink); color: #fff; font-weight: 600; }

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 18px;
}
.product {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
a.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfe0f2; }
.product__thumb {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  margin-bottom: 12px;
}
.product__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product__title { font-size: 15.5px; font-weight: 700; }
.product__desc {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty { margin-top: 28px; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ 软件下载页 */
.sw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr) minmax(0, .7fr);
  gap: 30px;
  align-items: start;
}
.sw-art { position: relative; padding-bottom: 26px; }
.sw-art__park { width: 100%; height: auto; }
.sw-art__band {
  position: absolute;
  left: -6px;
  bottom: 0;
  width: 40%;
  filter: drop-shadow(0 18px 24px rgba(31, 62, 100, .18));
}

.sw-device {
  position: relative;
  display: flex;
  align-items: center;
}
.sw-device__phone {
  width: 46%;
  flex: none;
  position: relative;
  z-index: 1;
  border-radius: 20px;
  box-shadow: 0 22px 38px -20px rgba(22, 50, 79, .45);
}
.chart-card {
  position: relative;
  z-index: 2;
  flex: 1;
  margin-left: -8%;
  margin-top: -3%;
  background: #fff;
  border-radius: 16px;
  padding: 16px 16px 12px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -22px rgba(22, 50, 79, .45);
}
.chart-card__title { font-size: 14px; font-weight: 700; color: var(--ink); }
.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 92px;
  margin: 12px 0 6px;
  padding-top: 4px;
  border-bottom: 1px solid #eef4fa;
}
.chart__col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.chart__bar {
  width: 100%;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #6fc4f0 0%, #3b7ee8 55%, #7b5cf0 100%);
  transform-origin: bottom;
  animation: grow .9s cubic-bezier(.2, .8, .3, 1) both;
}
.chart__col:nth-child(2n) .chart__bar { background: linear-gradient(180deg, #7fd6c2 0%, #3aa7e8 60%, #4f79ea 100%); }
.chart__col:nth-child(3n) .chart__bar { background: linear-gradient(180deg, #ffcf7a 0%, #f79256 60%, #e86a8a 100%); }
.chart__axis { display: flex; justify-content: space-between; font-size: 9px; color: #9aabc0; }
.chart-card__caption { margin-top: 8px; font-size: 10px; color: #9aabc0; }
@keyframes grow { from { transform: scaleY(.15); opacity: .4; } to { transform: scaleY(1); opacity: 1; } }

.dl { margin-top: 22px; display: grid; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border: 0;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.btn--wide { width: 100%; }
.btn--dark { background: #242b38; color: #fff; box-shadow: 0 10px 22px -12px rgba(20, 29, 45, .8); }
.btn--dark:hover { background: #1a202b; transform: translateY(-2px); }
.btn__ico {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: grid; place-items: center;
  flex: none;
}
.btn__ico svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--light { background: #fff; color: #20293a; }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .5); }
.dl__link {
  justify-self: center;
  font-size: 13.5px;
  color: #4a5b70;
  text-decoration: underline;
  text-decoration-color: #c6d5e6;
  text-underline-offset: 3px;
  padding: 4px 8px;
}
.dl__link:hover { color: var(--ink); }
.dl__note { margin-top: 14px; font-size: 11.5px; line-height: 1.6; color: #7d8ea3; text-align: center; }

.sw-features { display: grid; gap: 12px; }
.feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.feature__body h3 { font-size: 14.5px; font-weight: 700; }
.feature__body p { margin-top: 6px; font-size: 11.5px; line-height: 1.62; color: var(--muted); }
.feature__icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.ico { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ 视频教程 */
.hero--tutorial { background: linear-gradient(180deg, #fbfbfd 0%, #f4f7fb 100%); }
.hero--tutorial .hero__inner { padding-bottom: 0; }
.ui-shot {
  margin: 34px auto -46px;
  max-width: 1020px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d9e5f2;
  box-shadow: 0 40px 70px -34px rgba(19, 44, 72, .55);
  background: #fff;
}
.ui-shot img { width: 100%; }
.page-tutorial .section { padding-top: 90px; }

.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.video { cursor: pointer; }
.video__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.video__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.video:hover .video__cover img { transform: scale(1.04); }
.video__play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(18, 28, 43, .55);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.video:hover .video__play { background: rgba(47, 107, 224, .9); transform: translate(-50%, -50%) scale(1.06); }
.video__play svg { width: 22px; height: 22px; fill: #fff; }
.video__time {
  position: absolute;
  right: 10px; bottom: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 26, 40, .72);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
.video__title { margin-top: 11px; font-size: 15px; font-weight: 700; }

/* ------------------------------------------------------------------ 关于我们 */
.hero--about { min-height: 420px; display: flex; align-items: center; }
.hero--about .hero__inner { width: 100%; padding: 46px 0 54px; }
.about-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 10px;
}
.about-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 30px;
  box-shadow: 0 18px 40px -30px rgba(22, 50, 79, .5);
}
.about-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.about-card__body { font-size: 14.5px; line-height: 1.75; color: var(--body); white-space: pre-line; }
.about-card__link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ------------------------------------------------------------------ 页脚 */
.footer { margin-top: 70px; background: var(--dark); color: #c9d2de; }
.footer__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 28px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer__cta-title { font-size: 19px; font-weight: 700; color: #fff; }
.footer__cta-text { margin-top: 4px; font-size: 13.5px; color: #aab6c5; }

.footer__cols {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.2fr;
  gap: 32px;
  padding: 34px 28px 30px;
}
.brand--footer { color: #fff; }
.brand--footer .brand__mark { color: #7fb0ff; }
.brand--footer .brand__name b { color: #7fb0ff; }
.footer__tagline { margin-top: 12px; font-size: 13.5px; line-height: 1.7; color: #a6b2c1; max-width: 340px; }
.footer__col h4 { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.footer__col a, .footer__col span {
  display: block;
  font-size: 13.5px;
  line-height: 2;
  color: #aeb9c7;
  transition: color .18s;
}
.footer__col a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12.5px;
  color: #8e9bad;
}

/* ------------------------------------------------------------------ 弹层 */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10, 18, 30, .72); backdrop-filter: blur(4px); }
.modal__box {
  position: relative;
  width: min(920px, 100%);
  background: #0d1420;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px #000;
}
.modal__frame { aspect-ratio: 16 / 9; background: #000; }
.modal__frame iframe, .modal__frame video { width: 100%; height: 100%; border: 0; display: block; }
.modal__fallback { display: grid; place-items: center; height: 100%; color: #dbe4ef; font-size: 15px; padding: 30px; text-align: center; }
.modal__fallback a { color: #8fb8ff; text-decoration: underline; }
.modal__close {
  position: absolute;
  top: 8px; right: 10px;
  z-index: 3;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { background: rgba(255, 255, 255, .28); }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1120px) {
  .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sw-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sw-features { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); display: grid; }
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 74px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(22, 50, 79, .4);
    display: none;
  }
  body.nav-open .nav__links { display: flex; }
  .nav__link { padding: 12px 14px; font-size: 15px; }
  .nav__link.is-active::after { left: 14px; right: auto; width: 26px; bottom: 6px; }

  .hero__art { display: none; }
  .hero--home .hero__inner { min-height: 250px; padding: 44px 0 40px; }
  .hero__copy { max-width: 100%; }

  .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-cards { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .nav__inner { height: 64px; }
  .nav__links { top: 64px; }
  .brand__name { font-size: 16.5px; }
  .brand__mark { width: 24px; height: 24px; }

  .section { padding: 44px 0 16px; }
  .section--tight { padding: 30px 0 8px; }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product { padding: 9px 10px 13px; }
  .product__title { font-size: 14px; }
  .product__desc { font-size: 11.5px; -webkit-line-clamp: 2; }

  .sw-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .sw-features { grid-template-columns: minmax(0, 1fr); }
  .sw-art { max-width: 460px; margin: 0 auto; width: 100%; }
  .sw-device { max-width: 380px; margin: 0 auto; }
  .chart-card { margin-left: -7%; }

  .ui-shot { margin: 24px auto -28px; border-radius: 12px; }
  .page-tutorial .section { padding-top: 70px; }
  .videos { grid-template-columns: minmax(0, 1fr); }

  .filters { border-radius: 18px; padding: 5px; }
  .filter { padding: 8px 13px; font-size: 13px; }

  .footer { margin-top: 48px; }
  .footer__cta { flex-direction: column; align-items: flex-start; padding: 26px 18px 22px; }
  .footer__cta-title { font-size: 17px; }
  .footer__cols { grid-template-columns: 1fr; padding: 26px 18px 22px; gap: 20px; }
  .footer__bottom { flex-direction: column; padding: 14px 18px 22px; }

  .about-card { padding: 22px 20px; }
  .modal { padding: 12px; }
}

@media (max-width: 420px) {
  .apps { grid-template-columns: minmax(0, 1fr); }
  .app-card { aspect-ratio: 1.25 / 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
