:root {
  --g: #41b349;
  --gd: #2b7a31;
  --bk: #1d1d1f;
  --gr: #86868b;
  --lt: #f5f5f7;
  --wh: #fff;
  /* 联系区：浅底略带品牌绿，避免大块纯黑 */
  --muted: #eef5f0;
  /* 方圆体 VF：Medium 字重 + 略偏「方」（圆角轴 BEVL 较低） */
  --fy-wght: 500;
  --fy-bevl: 28;
}

/* Alimama FangYuanTi VF — variable font from iconfont / Alibaba */
@font-face {
  font-family: "Alimama FangYuanTi VF";
  src: url("assets/fonts/AlimamaFangYuanTiVF.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Alimama FangYuanTi VF", "阿里妈妈方圆体 VF", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-variation-settings: "wght" var(--fy-wght), "BEVL" var(--fy-bevl);
  color: var(--bk); background: var(--wh);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 48px; display: flex; align-items: center;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background .3s;
  border-bottom: .5px solid transparent;
}
.nav.solid { background: rgba(255,255,255,.88); border-bottom-color: rgba(0,0,0,.08); }

.nav-inner {
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo { flex-shrink: 0; }
.nav-logo img {
  width: 28px; height: 28px; border-radius: 6px; object-fit: contain;
  transition: opacity .2s;
}
.nav-logo:hover img { opacity: .7; }

.nav-desk { display: flex; gap: 32px; }
.nav-desk a {
  font-size: 13px; color: var(--bk); opacity: .65;
  transition: opacity .2s;
}
.nav-desk a:hover { opacity: 1; }

/* Mobile fullscreen menu */
.mob-menu { display: none; }
.mob-menu a {
  font-size: 28px; font-weight: 600;
  color: var(--bk); text-decoration: none;
  transition: color .2s;
}
.mob-menu a:hover { color: var(--g); }

.mob-close {
  position: absolute;
  /* Match .nav-toggle: 44×44 centered in 48px nav bar */
  top: 2px; right: 20px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  cursor: pointer; color: var(--bk);
  border-radius: 50%;
  transition: background .2s;
}
.mob-close:hover { background: rgba(0,0,0,.06); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  position: relative;
  z-index: 210;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  position: absolute; left: 12px;
  width: 20px; height: 2px;
  background: var(--bk);
  border-radius: 1px;
  transition: transform .3s, top .3s;
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 26px; }
.nav-toggle.open span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle.open span:last-child { top: 21px; transform: rotate(-45deg); }

/* ── Sections ── */
.s {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 100px 48px;
  position: relative;
}

.s-light { background: var(--lt); }
.s-green { background: var(--g); }
.s-muted { background: var(--muted); }

/* Scroll-in typography (IntersectionObserver → .vis) */
.reveal.reveal-delay-1 { transition-delay: 0.22s; }
.reveal.reveal-delay-2 { transition-delay: 0.44s; }
.reveal.reveal-delay-3 { transition-delay: 0.66s; }

#contact .desc { margin-bottom: 28px; }

#contact .contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

#contact .contact-mail {
  font-size: 15px;
  color: var(--gr);
  transition: color 0.15s;
}
#contact .contact-mail:hover { color: var(--g); }

#contact .cta { animation: none; }

@media (prefers-reduced-motion: no-preference) {
  #contact.s-muted {
    background: linear-gradient(125deg, #eef5f0, #e4f1e8, #eef5f0);
    background-size: 240% 240%;
    animation: contact-bg 16s ease-in-out infinite;
  }

  #contact .contact-actions.reveal.vis .cta {
    animation: cta-glow 2.8s ease-in-out infinite;
  }
}

@keyframes contact-bg {
  0%, 100% { background-position: 0% 42%; }
  50% { background-position: 100% 58%; }
}

@keyframes cta-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(65, 179, 73, 0.2); }
  50% { box-shadow: 0 6px 28px rgba(65, 179, 73, 0.35); }
}

/* ── Hero ── */
.hero {
  position: relative;
  padding-top: 120px;
}

.hero-logo {
  width: 120px; height: 120px;
  border-radius: 28px; object-fit: contain;
  margin-bottom: 44px;
  animation: up 1.35s ease-out both;
}

.hero-h {
  font-size: clamp(40px, 8vw, 76px);
  font-weight: 700; letter-spacing: .03em;
  line-height: 1.05; margin-bottom: 16px;
  animation: up 1.35s ease-out 0.18s both;
}

.hero-p {
  font-size: clamp(17px, 2.5vw, 22px);
  color: var(--gr); margin-bottom: 0;
  animation: up 1.35s ease-out 0.36s both;
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gr);
  opacity: 0.9;
  transition: color 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.scroll-hint:hover { color: var(--bk); opacity: 1; }
.scroll-hint:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: 4px;
  border-radius: 4px;
}

.scroll-hint-wheel {
  transform-origin: 14px 13px;
  animation: scroll-hint-wheel 2s ease-in-out infinite;
}

@keyframes scroll-hint-wheel {
  0%, 15% { transform: translateY(0); opacity: 1; }
  65% { opacity: 0.35; }
  85%, 100% { transform: translateY(14px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint-wheel { animation: none; opacity: 0.85; }
}

/* ── CTA ── */
.cta {
  display: inline-block;
  padding: 13px 32px;
  font-size: 16px; font-weight: 400;
  border-radius: 980px;
  background: var(--g); color: var(--wh);
  transition: background .2s, transform .15s;
  animation: up 1.35s ease-out 0.5s both;
}
.cta:hover { background: var(--gd); transform: scale(1.03); }

.cta-w { background: var(--wh); color: var(--bk); animation: none; }
.cta-w:hover { background: var(--lt); }

/* ── Type ── */
.hero-h,
.title,
.val h3 {
  font-variation-settings: "wght" 700, "BEVL" var(--fy-bevl);
}

.title {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 700; line-height: 1.1;
  margin-bottom: 20px;
}

.desc {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--gr); line-height: 1.75;
  max-width: 640px; width: 100%;
}

.white { color: var(--wh); }
.white-o { color: rgba(255,255,255,.65); }

/* ── Values ── */
.vals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px; width: 100%;
  margin-top: 56px; text-align: left;
}

.val {
  padding: 36px 30px;
  border-radius: 18px;
  background: var(--wh);
  border: 1px solid rgba(0,0,0,.04);
  transition: transform .3s, box-shadow .3s;
}
.val:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.06);
}

.val-n {
  display: block;
  font-size: 12px; font-weight: 700;
  font-variation-settings: "wght" 650, "BEVL" var(--fy-bevl);
  color: var(--g); letter-spacing: .1em;
  margin-bottom: 14px;
}

.val h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.val p { font-size: 15px; color: var(--gr); line-height: 1.7; }

/* ── Back to top ── */
.btt {
  position: fixed; bottom: 28px; right: 28px; z-index: 90;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: var(--wh); color: var(--g);
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px);
  pointer-events: none;
  transition: opacity .3s, transform .3s, background .2s, color .2s;
}
.btt.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.btt:hover { background: var(--g); color: var(--wh); }

/* ── Footer ── */
.footer {
  border-top: 1px solid rgba(0,0,0,.05);
  background: var(--wh);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 12px; color: var(--gr);
}

.footer-left {
  display: flex; align-items: center; gap: 8px;
}
.footer-left img {
  width: 18px; height: 18px;
  border-radius: 4px; object-fit: contain;
}

.footer-beian { color: var(--gr); text-decoration: none; transition: color .15s; }
.footer-beian:hover { color: var(--bk); }

.footer-slogan { color: var(--gr); }

.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: var(--gr); transition: color .15s; }
.footer-nav a:hover { color: var(--bk); }

/* ── Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem) scale(0.98);
  will-change: opacity, transform;
  transition:
    opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.vis {
  opacity: 1;
  transform: translateY(0) scale(1);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transform: translateY(12px);
    transition-duration: 0.55s;
  }
  .reveal.vis { transform: translateY(0); }
}

@keyframes up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-desk { display: none; }
  .nav-toggle { display: block; z-index: 210; }

  .mob-menu {
    display: flex;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 32px;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
  }
  .mob-menu.open { opacity: 1; pointer-events: auto; }

  .nav-inner { padding: 0 20px; }
  .s { padding: 80px 20px; }
  .hero { padding-top: 100px; }
  .hero-logo { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 32px; }
  .hero-p { margin-bottom: 0; }
  .scroll-hint { bottom: 28px; }

  .vals { grid-template-columns: 1fr; max-width: 420px; gap: 14px; }
  .val { padding: 28px 22px; }

  .cta { width: 100%; max-width: 280px; text-align: center; padding: 14px 24px; }

  .footer-inner {
    flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 16px 20px;
  }
  .footer-slogan { display: none; }
  .footer-nav { width: 100%; }

  .btt { bottom: 20px; right: 16px; width: 40px; height: 40px; }
}
