/* ===== Font Face (unicode-range split) ===== */

/* --- Regular (400) --- */
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Regular.latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-024F;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Regular.symbols.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+2000-2BFF, U+3000-303F, U+FE00-FFEF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Regular.cjk-a.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+4E00-61FF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Regular.cjk-b.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+6200-77FF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Regular.cjk-c.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+7800-8CFF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Regular.cjk-d.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+8D00-9FFF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Regular.ext.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0250-1FFF, U+2C00-2FFF, U+3040-4DFF, U+A000-FDFF;
}

/* --- Medium (500) --- */
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Medium.latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-024F;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Medium.symbols.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+2000-2BFF, U+3000-303F, U+FE00-FFEF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Medium.cjk-a.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+4E00-61FF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Medium.cjk-b.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+6200-77FF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Medium.cjk-c.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+7800-8CFF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Medium.cjk-d.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+8D00-9FFF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Medium.ext.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0250-1FFF, U+2C00-2FFF, U+3040-4DFF, U+A000-FDFF;
}

/* --- Demibold (600) --- */
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Demibold.latin.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-024F;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Demibold.symbols.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+2000-2BFF, U+3000-303F, U+FE00-FFEF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Demibold.cjk-a.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+4E00-61FF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Demibold.cjk-b.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+6200-77FF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Demibold.cjk-c.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+7800-8CFF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Demibold.cjk-d.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+8D00-9FFF;
}
@font-face {
  font-family: 'MiSans';
  src: url('fonts/split/MiSans-Demibold.ext.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0250-1FFF, U+2C00-2FFF, U+3040-4DFF, U+A000-FDFF;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 文字图标色 */
  --on-surface: #000000;
  --on-surface-secondary: rgba(0, 0, 0, 0.8);
  --on-surface-tertiary: rgba(0, 0, 0, 0.6);
  --on-surface-quaternary: rgba(0, 0, 0, 0.4);
  --on-surface-octonary: rgba(0, 0, 0, 0.3);
  --on-surface-button-select: #FFFFFF;

  /* 软件主色 */
  --primary: #3482FF;
  --on-primary: #FFFFFF;

  /* 背景色 */
  --surface: #FFFFFF;
  --surface-low: #EDEFF2;
  --surface-high: #FFFFFF;
  --surface-pop-window: #EDEFF2;

  /* 元素色 */
  --surface-container: rgba(0, 0, 0, 0.06);
  --surface-container-high: rgba(0, 0, 0, 0.1);
  --container-list: #FFFFFF;

  /* 分割线色 */
  --outline: rgba(0, 0, 0, 0.1);

  /* 功能色 */
  --warning: #FA382E;
  --success: #1DCD3A;
  --highlight-purple: #7767F9;
  --highlight-yellow: #FF9F05;

  /* 插图色 */
  --illustration-primary: #BAC5D6;
  --illustration-secondary: #CED5E0;
  --illustration-tertiary: #DFE2EB;
  --illustration-quaternary: #E9EBEE;

  /* 卡片背景色 */
  --card-bg: #e2e5ec;

  /* 渐变辅助色 */
  --blue-light: #5d80ff;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* 文字图标色 */
    --on-surface: #FFFFFF;
    --on-surface-secondary: rgba(255, 255, 255, 0.8);
    --on-surface-tertiary: rgba(255, 255, 255, 0.6);
    --on-surface-quaternary: rgba(255, 255, 255, 0.4);
    --on-surface-octonary: rgba(255, 255, 255, 0.3);
    --on-surface-button-select: rgba(255, 255, 255, 0.3);

    /* 软件主色 */
    --primary: #4788FF;
    --on-primary: rgba(255, 255, 255, 0.9);

    /* 背景色 */
    --surface: #000000;
    --surface-low: #000000;
    --surface-high: #1C1C1E;
    --surface-pop-window: #2C2C2E;

    /* 元素色 */
    --surface-container: rgba(255, 255, 255, 0.1);
    --surface-container-high: rgba(255, 255, 255, 0.14);
    --container-list: rgba(255, 255, 255, 0.14);

    /* 分割线色 */
    --outline: rgba(255, 255, 255, 0.14);

    /* 功能色 */
    --warning: #FA4238;
    --success: #28D244;
    --highlight-purple: #8370FF;
    --highlight-yellow: #FFA30F;

    /* 插图色 */
    --illustration-primary: #666666;
    --illustration-secondary: #565656;
    --illustration-tertiary: #424242;
    --illustration-quaternary: #333333;

    /* 卡片背景色 */
    --card-bg: rgba(255, 255, 255, 0.1);
  }
}

body {
  font-family: "MiSans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--surface-low);
  color: var(--on-surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0;
}

@media (max-width: 1000px) {
  .container {
    padding: 0 40px;
  }
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150%;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-low) 60%, transparent) 0%, color-mix(in srgb, var(--surface-low) 30%, transparent) 50%, transparent 100%);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  transition: opacity 0.3s;
}

.header.scrolled::before {
  opacity: 1;
}

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

.logo {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.logo svg {
  height: 17px;
  display: block;
  color: var(--on-surface);
}

.nav {
  display: flex;
  gap: 40px;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  color: var(--on-surface-tertiary);
  transition: color 0.2s;
}

.nav-link.active {
  color: var(--on-surface);
  font-weight: 600;
}

.nav-link:hover {
  color: var(--on-surface);
}

/* ===== Page Title Component ===== */
.page-title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.33;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 18px;
  color: var(--on-surface-tertiary);
  font-weight: 400;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 110px 20px 60px;
  overflow: hidden;
}

.hero .page-title {
  position: relative;
}

.hero .page-subtitle {
  margin-bottom: 50px;
  position: relative;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  position: relative;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  padding: 0 40px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(to left, var(--blue-light), var(--primary));
  color: var(--on-primary);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(52, 130, 255, 0.3);
}

.btn-outline {
  border: 1px solid var(--outline);
  color: var(--on-surface);
  background: transparent;
}

.btn-outline:hover {
  background: var(--surface-container);
  transform: translateY(-1px);
}

.hero-devices {
  max-width: 760px;
  margin: 0 auto;
}

.hero-devices img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Sections ===== */
.section {
  padding: 100px 0 0;
}

.section-header {
  margin-bottom: 0;
}

.section-header.align-left {
  text-align: left;
}

.section-header h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.33;
  margin-bottom: 10px;
}

.section-header p {
  font-size: 16px;
  color: var(--on-surface-tertiary);
  font-weight: 400;
}

.section-subtitle-medium {
  font-size: 20px !important;
  font-weight: 500 !important;
  color: var(--on-surface-tertiary) !important;
  line-height: 1.33;
}

/* Section header with arrows */
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}

.section-nav-arrows {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.nav-arrow {
  width: 36px;
  height: 36px;
  border-radius: 100px;
  border: none;
  background: var(--surface-container);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s ease;
}

.nav-arrow:hover {
  background: var(--surface-container-high);
}

.nav-arrow:active {
  transform: scale(0.85);
}

.nav-arrow svg {
  width: 20px;
  height: 20px;
}

.nav-arrow {
  color: var(--on-surface-tertiary);
}

.nav-arrow-right svg {
  transform: scaleX(-1);
}

.nav-arrow.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ===== Design Showcase ===== */
.section-design {
  background: var(--card-bg);
  padding: 0;
  overflow: hidden;
}

.section-design-header {
  text-align: center;
  padding: 40px 20px 0;
}

.section-design-header h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.33;
}

.design-showcase-card {
  position: relative;
  overflow: hidden;
  margin: 40px auto 0;
}

.design-showcase-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  --mask-color: var(--card-bg);
  background: linear-gradient(
    to right,
    var(--mask-color) 0%,
    transparent 15%,
    transparent 85%,
    var(--mask-color) 100%
  );
}

@media (prefers-color-scheme: dark) {
  .design-showcase-card::before {
    --mask-color: #1a1a1a;
  }
}

.design-showcase-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Cards Carousel ===== */
.cards-carousel {
  overflow: hidden;
}

.cards-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cards-track::-webkit-scrollbar {
  display: none;
}

.card-item {
  flex-shrink: 0;
  scroll-snap-align: start;
}

.card-item.card-small {
  width: 260px;
}

.card-item.card-wide {
  width: 430px;
}

.card-image {
  border-radius: 30px;
  height: 330px;
  overflow: hidden;
  position: relative;
}

.card-bg-gray {
  background: var(--card-bg);
}

.card-bg-dark {
  background: var(--card-bg);
}

.card-bg-image {
  background-size: cover;
  background-position: center;
}

/* Default card image - centered */
.card-image img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Phone mockup images - 192px wide, top offset, overflow bottom */
.card-image .card-phone-img,
.card-image .card-phone-bubbles,
.card-image .card-phone-menu {
  position: absolute;
  left: 50%;
  top: 44px;
  bottom: auto;
  transform: translateX(-50%);
  width: 192px;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  aspect-ratio: 1240 / 2617;
}

/* "熟悉的聊天交互" card - phone extends above card per design */
.section-chat .card-item:first-child .card-phone-img {
  top: -107px;
}

/* Card image that fills the entire card area */
.card-bg-fill {
  background: var(--primary);
}

.card-bg-fill .card-fill-img,
.card-bg-image .card-fill-img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  height: 92%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

/* Card content image - centered in card */
.card-image .card-content-img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 85%;
  max-width: 95%;
  max-height: none;
  object-fit: contain;
}

/* Bubbles card */
.section-chat .card-item:nth-child(3) .card-content-img {
  height: 77%;
}

/* Menu card */
.section-chat .card-item:nth-child(4) .card-content-img {
  height: 82%;
}

/* Desktop screenshot images - bottom aligned, fill width */
.card-image .card-desktop-img {
  position: absolute;
  left: 50%;
  bottom: 0;
  top: auto;
  transform: translateX(-50%);
  width: 85%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

/* Notify image - landscape, offset left, overflow */
.card-image .card-notify-img {
  position: absolute;
  left: -40%;
  top: 50%;
  transform: translateY(-50%);
  width: 130%;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
}

/* Tool call - landscape, overflow both sides */
.card-image .card-tool-call-img {
  position: absolute;
  left: 12%;
  top: 13%;
  transform: none;
  width: 161%;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
}

/* Tool screen - positioned with left offset */
.card-image .card-tool-screen-img {
  position: absolute;
  left: 7.7%;
  top: 10.9%;
  transform: none;
  width: 84.7%;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
}

.card-text {
  padding: 20px 12px 0;
}

.card-text h4 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.33;
  margin-bottom: 1px;
}

.card-text p {
  font-size: 14px;
  color: var(--on-surface-tertiary);
  font-weight: 400;
  line-height: 1.33;
}

/* ===== Footer ===== */
.footer {
  margin-top: 34px;
  padding: 30px 0 60px;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 100px;
}

@media (max-width: 960px) {
  .footer .container {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .footer .container {
    padding: 0 24px;
  }
}

@media (max-width: 480px) {
  .footer .container {
    padding: 0 24px;
  }
}

.footer-notes p {
  font-size: 11px;
  color: var(--on-surface-quaternary);
  line-height: 1.5;
}

.footer-notes p + p {
  margin-top: 4px;
}

.footer-divider {
  height: 1px;
  background: var(--outline);
  margin: 24px 0;
}

.footer-copyright p {
  font-size: 11px;
  color: var(--on-surface-octonary);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .header-inner {
    padding: 18px 40px;
  }

  .nav {
    gap: 24px;
  }
}

/* ===== Mobile Menu Button ===== */
.menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  padding: 0;
  flex-shrink: 0;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--on-surface);
  border-radius: 1px;  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.menu-icon {
  top: 50%;
  transform: translate(-50%, -50%);
}

.menu-icon::before {
  content: '';
  top: -6px;
  left: 0;
  transform: none;
}

.menu-icon::after {
  content: '';
  top: 6px;
  left: 0;
  transform: none;
}

/* Animate to X when open */
.menu-btn[aria-expanded="true"] .menu-icon {
  background: transparent;
}

.menu-btn[aria-expanded="true"] .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .header::before {
    opacity: 1;
  }

  /* Solid overlay for menu open - fades in/out */
  .header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: -1;
    background: var(--surface-low);
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .header.menu-active::after {
    opacity: 1;
  }

  .header-inner {
    padding: 14px 24px;
    flex-direction: row;
    gap: 0;
    position: relative;
    z-index: 1;
  }

  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-low);
    padding: 70px 24px 24px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: -1;
  }

  .nav.nav-open {
    opacity: 1;
    visibility: visible;
    max-height: none;
  }

  .nav-link {
    display: block;
    padding: 12px 0;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--on-surface-tertiary);
    border-bottom: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-link.active {
    color: var(--on-surface);
  }

  .nav.nav-open .nav-link {
    opacity: 1;
    transform: translateY(0);
  }

  .nav.nav-open .nav-link:nth-child(1) { transition-delay: 0.05s; }
  .nav.nav-open .nav-link:nth-child(2) { transition-delay: 0.08s; }
  .nav.nav-open .nav-link:nth-child(3) { transition-delay: 0.11s; }
  .nav.nav-open .nav-link:nth-child(4) { transition-delay: 0.14s; }
  .nav.nav-open .nav-link:nth-child(5) { transition-delay: 0.17s; }
  .nav.nav-open .nav-link:nth-child(6) { transition-delay: 0.20s; }
  .nav.nav-open .nav-link:nth-child(7) { transition-delay: 0.23s; }

  .hero {
    padding-top: 80px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-subtitle {
    font-size: 15px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .section-subtitle-medium {
    font-size: 16px !important;
  }

  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .card-item.card-small {
    width: 220px;
  }

  .card-item.card-wide {
    width: 320px;
  }

  .card-image {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 60px 16px 40px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .btn {
    width: 200px;
  }

  .container {
    padding: 0 20px;
  }

  .nav {
    gap: 12px;
  }

  .card-item.card-small {
    width: 200px;
  }

  .card-item.card-wide {
    width: 280px;
  }

  .card-image {
    height: 240px;
    border-radius: 20px;
  }

  .card-image .card-phone-img,
  .card-image .card-phone-bubbles,
  .card-image .card-phone-menu {
    width: 160px;
    top: 36px;
  }

  .section-chat .card-item:first-child .card-phone-img {
    top: -89px;
  }
}

/* ===== Scroll Reveal Animation ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
