/* ==============================================
   MUTBOT — Shared Styles
   All pages import this for consistent look & feel
   ============================================== */

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

/* --- VARIABLES --- */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-card: rgba(0, 0, 0, 0.03);
  --accent: #007aff;
  --accent-dark: #0051d5;
  --text: #1d1d1f;
  --text-2: #666;
  --text-3: #999;
  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.05);

  --font:
    "DM Sans", -apple-system, "Helvetica Neue", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-display:
    "Space Grotesk", "DM Sans", -apple-system, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --font-logo-en:
    "MUTBOT Logo Premium", "Michroma", "Space Grotesk", -apple-system,
    sans-serif;
  --font-logo-cn:
    "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, sans-serif;

  --nav-height: 72px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* --- BASE --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* --- SKIP LINK --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 10000;
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  top: 0;
}

/* --- 全局键盘焦点样式 --- */
.btn:focus-visible,
.nav-menu a:focus-visible,
.hamburger:focus-visible,
.app-item:focus-visible,
.faq-question:focus-visible,
.pn-specs-toggle-btn:focus-visible,
.form-submit:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    padding 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  font-size: 1.25rem;
  color: #1d1d1f;
  text-decoration: none;
  position: relative;
  z-index: 1001;
  transition: color 0.3s;
  letter-spacing: 0;
}

.nav-logo-mark {
  display: block;
  width: clamp(260px, 24vw, 360px);
  max-width: calc(100vw - 120px);
  height: auto;
  flex-shrink: 0;
  transition:
    filter 0.3s ease,
    opacity 0.3s ease;
}

.nav-logo-en {
  display: inline-block;
  font-family: var(--font-logo-en);
  font-size: 1.12em;
  font-weight: 400;
  letter-spacing: 0.3em;
  line-height: 1;
  text-transform: uppercase;
  transform: scaleX(1.06);
  transform-origin: left center;
}

svg.nav-logo-en {
  height: 1em;
  width: auto;
  flex-shrink: 0;
  overflow: visible;
}

.nav-logo-sep {
  font-weight: 300;
  color: rgba(0, 0, 0, 0.22);
  font-size: 0.88em;
  margin-inline: 0.08em 0.02em;
  transform: translateY(-0.02em);
}

svg.nav-logo-sep {
  height: 0.9em;
  width: auto;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-logo-cn {
  font-family: var(--font-logo-cn);
  font-size: 0.96em;
  font-weight: 600;
  letter-spacing: 0;
  color: #2b2d31;
  line-height: 1;
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 1.1rem;
  }
  .nav-logo-mark {
    width: clamp(176px, 54vw, 218px);
  }
  .nav-logo-en {
    letter-spacing: 0.2em;
    transform: scaleX(1.02);
  }
  .nav-logo-sep {
    font-size: 0.84em;
    margin-inline: 0.02em 0;
  }
  .nav-logo-cn {
    font-size: 0.9em;
  }
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-menu a {
  color: rgba(0, 0, 0, 0.55);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-menu a:hover {
  color: #1d1d1f;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-menu a.active {
  color: var(--accent);
}

.nav-menu a.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #1d1d1f;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-menu.active {
    max-height: 320px;
  }

  .nav-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-menu a {
    display: block;
    padding: 1rem 2rem;
  }

  .nav-menu a::after {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font);
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.btn-ghost {
  background: transparent;
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: #1d1d1f;
  transform: translateY(-2px);
}

/* --- SCROLL REVEAL --- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- CARDS --- */
.card {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.card:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 122, 255, 0.3);
  transform: translateY(-4px);
}

/* --- SECTION HEADER --- */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-2);
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- FOOTER --- */
.footer {
  background:
    radial-gradient(
      circle at 22% 10%,
      rgba(255, 255, 255, 0.92),
      transparent 34%
    ),
    radial-gradient(
      circle at 86% 18%,
      rgba(255, 255, 255, 0.88),
      transparent 30%
    ),
    #f5f6f8;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 2.8rem 2rem 2.15rem;
  color: #666;
  margin-top: auto;
  scroll-margin-top: 92px;
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
}

.footer-brand-row {
  margin-bottom: 1.65rem;
}

.footer-logo-mark {
  display: block;
  width: clamp(300px, 28vw, 430px);
  max-width: 100%;
  height: auto;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.footer-divider--top {
  margin-bottom: 2.45rem;
}

.footer-divider--bottom {
  margin: 2.55rem 0 1.55rem;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr);
  gap: clamp(3rem, 5.2vw, 5.8rem);
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
}

.footer-panel {
  min-width: 0;
}

.footer-contact-panel {
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  padding-left: clamp(3.2rem, 5.6vw, 6.2rem);
}

.footer-section-title {
  display: inline-block;
  position: relative;
  color: #1d1d1f;
  font-family: var(--font);
  font-size: clamp(1.12rem, 1.55vw, 1.42rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2.15rem;
}

.footer-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.62rem;
  width: 44px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.footer-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  column-gap: clamp(2.15rem, 4.3vw, 3.8rem);
  row-gap: 2rem;
}

.footer-link-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 2rem;
  color: #2f3136;
  font-size: clamp(0.98rem, 1.26vw, 1.14rem);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition:
    color 0.24s ease,
    transform 0.24s ease;
}

.footer-link-item:nth-child(odd)::after {
  content: "";
  position: absolute;
  right: calc(-1 * clamp(1.25rem, 2.5vw, 2.25rem));
  top: 50%;
  width: 1px;
  height: 2.15rem;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.09);
}

.footer-link-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  stroke-width: 3;
}

.footer-link-item:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.footer-contact-list {
  display: grid;
  gap: 0;
  max-width: 360px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  color: #3a3d43;
  font-size: clamp(0.96rem, 1.18vw, 1.08rem);
  line-height: 1.58;
  text-decoration: none;
  position: relative;
}

.footer-contact-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.footer-contact-item:hover {
  color: var(--accent);
}

.footer-wechat-item {
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  font-size: clamp(0.84rem, 1.02vw, 0.96rem);
  color: #999;
  line-height: 1.7;
}

.footer-beian {
  margin-top: 0.65rem;
  font-size: clamp(0.8rem, 0.95vw, 0.9rem);
  color: #999;
}

.footer-beian a {
  color: #999;
  transition: color 0.3s;
}

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

.footer-beian-separator {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.footer-social-wechat-qr {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: #fff;
  padding: 0.5rem;
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  z-index: 10;
  width: 128px;
  height: 128px;
}

.footer-wechat-item:hover .footer-social-wechat-qr {
  display: block;
}

@media (min-width: 1800px) {
  .footer-inner {
    max-width: 1560px;
  }

  .footer-main {
    max-width: 1280px;
  }
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr;
    max-width: 680px;
    gap: 2.6rem;
  }

  .footer-contact-panel {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 2.6rem;
  }
}

@media (max-width: 640px) {
  .footer {
    padding: 2.45rem 1.25rem 2rem;
  }

  .footer-logo-mark {
    width: min(100%, 300px);
  }

  .footer-link-grid {
    grid-template-columns: 1fr;
    row-gap: 1.45rem;
  }

  .footer-link-item:nth-child(odd)::after {
    display: none;
  }

  .footer-contact-item {
    min-height: 3.15rem;
    font-size: 0.95rem;
  }

  .footer-beian-separator {
    display: block;
    height: 0.3rem;
    opacity: 0;
  }
}

/* --- UTILITIES --- */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #fff;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Firefox */
html {
  scrollbar-color: rgba(0, 0, 0, 0.15) #fff;
  scrollbar-width: thin;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-reveal,
  .scroll-reveal-left,
  .scroll-reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }

  /* 暂停自动播放视频 */
  .hero-video {
    display: none !important;
  }
}
