/* ==========================================================================
   小树之家科技 —— 基础样式（清新浅色风）
   全站共用：设计令牌、重置、页头、页脚、通用组件、响应式
   ========================================================================== */

/* --------------------------------------------------------------------------
   设计令牌
   -------------------------------------------------------------------------- */
:root {
  /* 背景层级 */
  --bg-base: #ffffff;
  --bg-soft: #f6fafb;
  --bg-tint: #eef7f7;
  --bg-hover: #f2f8f9;

  /* 文字 */
  --text-strong: #0f2129;
  --text-base: #24373f;
  --text-muted: #5f7780;
  --text-dim: #8ba0a8;

  /* 主色：青绿。--accent 在白底上对比度 5.5:1，可安全承载文字；
     --accent-bright 更亮，只用于图标、装饰等不需要文字对比度的地方。 */
  --accent: #0f766e;
  --accent-bright: #14b8a6;
  --accent-soft: #e8f7f5;
  --accent-line: #c9e9e5;

  /* 边框 */
  --border: #e3ecef;
  --border-strong: #cfdde2;

  /* 语义色 */
  --success: #15803d;

  /* 尺寸与动效 */
  --header-height: 72px;
  --content-width: 1200px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-xs: 0 1px 2px rgba(15, 33, 41, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 33, 41, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 33, 41, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 33, 41, 0.12);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", "微软雅黑", Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-base);
  background: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.section {
  padding: 104px 0;
  position: relative;
}

.section--raised {
  background: var(--bg-soft);
}

.section-head {
  margin-bottom: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent-bright);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.25;
  margin-bottom: 18px;
}

.section-lead {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.8;
}

.section-head--center {
  text-align: center;
}

.section-head--center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

.section-head--center .eyebrow::before {
  display: none;
}

/* --------------------------------------------------------------------------
   图标
   -------------------------------------------------------------------------- */
.icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  flex: none;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

/* 主按钮：青绿实心 + 白字（对比度 5.5:1） */
.btn--primary,
.btn--buy {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover,
.btn--buy:hover {
  background: var(--accent-bright);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.35);
  transform: translateY(-2px);
}

/* 次按钮：描边 */
.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text-base);
  background: #fff;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn--sm {
  padding: 9px 20px;
  font-size: 14px;
}

.btn--lg {
  padding: 16px 36px;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   页头
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 200;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-strong);
  white-space: nowrap;
}

/* logo 标记：青绿渐变圆角方块 + 公司图形
   图形是竖长的（112×152），所以按高度定尺寸、宽度自适应，
   不能用 100%/100% 撑满，否则会被拉变形。
   渐变上叠了一层顶部白色微光，方块不是死平的渐变。 */
.logo__mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 58%),
    linear-gradient(145deg, var(--accent-bright), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.26);
}

.logo__mark svg {
  height: 70%;
  width: auto;
  display: block;
}

.logo__text small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  line-height: 1;
  margin-top: 3px;
}

/* 导航 */
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* :not(.btn) —— 页头的「立即购买」是按钮，不能被导航链接样式覆盖 */
.nav a:not(.btn) {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

.nav a:not(.btn):hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav a:not(.btn).is-active {
  color: var(--accent);
  font-weight: 600;
}

.nav a:not(.btn).is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--accent-bright);
  border-radius: 1px;
}

.nav-buy {
  margin-left: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-strong);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 68px 0 32px;
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 44px;
}

.footer__brand .logo {
  margin-bottom: 18px;
}

.footer__desc {
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 400px;
}

.footer__title {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

.footer__list li {
  margin-bottom: 12px;
}

.footer__list a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer__list a:hover {
  color: var(--accent);
}

.footer__contact li {
  display: flex;
  gap: 11px;
  margin-bottom: 14px;
  color: var(--text-muted);
  line-height: 1.75;
}

.footer__contact .icon {
  font-size: 17px;
  color: var(--accent-bright);
  margin-top: 3px;
}

.footer__contact a {
  color: var(--text-muted);
}

.buy-mark {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  padding: 1px 6px;
  flex: none;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
}

.footer__bottom p {
  margin: 0;
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all var(--transition);
  z-index: 150;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);
}

/* --------------------------------------------------------------------------
   滚动显现
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .section {
    padding: 64px 0;
  }

  .container {
    padding: 0 20px;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .logo {
    font-size: 17.5px;
  }

  .logo__mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .logo__text small {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .nav.is-open {
    max-height: 400px;
  }

  .nav a:not(.btn) {
    padding: 16px 22px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav a:not(.btn)::after {
    display: none;
  }

  .nav-buy {
    margin: 14px 22px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    justify-content: center;
    text-align: center;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}
