/**
 * 落地页 - 与 auth 页一致：直角、背景 orbs + 35px 网格
 */
:root {
  --auth-bg: #f5f7fb;
  --auth-card: #ffffff;
  --auth-border: #d8deec;
  --auth-text: #171f35;
  --auth-muted: #4d5a78;
  --auth-muted-2: #627091;
  --auth-primary: #ff0080;
  --auth-primary-hover: #e00072;
  --auth-cyan: #48a8ff;
  --auth-accent: #ffd84d;

  /* Typeset: distinct pairing — display serif + humanist sans（避免 Inter 类默认 UI 字体） */
  --font-body: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* Glass-like surfaces：/quieter — 低 blur + 略实底色，减少发雾与眩光 */
  --nav-glass-bg: rgba(245, 247, 251, 0.65);
  --nav-glass-blur: 6px;
  --cta-glass-bg: rgba(255, 255, 255, 0.75);
  --cta-glass-blur: 10px;
  --cta-glass-border: rgba(26, 33, 56, 0.12);
  /* 背景网格：浅色页用深色线，否则白线在 #f5f7fb 上几乎看不见 */
  --landing-grid-line: rgba(26, 33, 56, 0.02);
}

[data-theme="dark"] {
  --auth-bg: #050014;
  --auth-card: #1a1a2e;
  --auth-border: #2a2a3e;
  --auth-text: #f0f0f0;
  --auth-muted: #9090a0;
  --auth-muted-2: #808090;
  --auth-primary: #ff0080;
  --auth-primary-hover: #ff2090;
  --auth-cyan: #00f0ff;
  --auth-accent: #ffed00;
  --nav-glass-bg: rgba(5, 0, 20, 0.55);
  --nav-glass-blur: 6px;
  --cta-glass-bg: rgba(26, 26, 46, 0.52);
  --cta-glass-blur: 10px;
  --cta-glass-border: rgba(255, 255, 255, 0.06);
  --landing-grid-line: rgba(255, 255, 255, 0.028);
}

/* Light theme readability pass: strengthen hierarchy for long-form reading. */
[data-theme="light"] .landing-page .landing-nav-link {
  color: #4b5876 !important;
}

[data-theme="light"] .landing-page .hero-lede,
[data-theme="light"] .landing-page .proof-list li,
[data-theme="light"] .landing-page #guides .text-auth-muted,
[data-theme="light"] .landing-page #faq dd {
  color: #495776 !important;
}

[data-theme="light"] .landing-page #how .text-auth-muted,
[data-theme="light"] .landing-page #guides-heading + p {
  color: #52607f !important;
}

/* Features 区截图与左侧列表共用同一高度上限，便于时间线与竖线对齐 */
.landing-page {
  --features-pin-shot-max: min(62vh, 520px);
}

@media (min-width: 768px) {
  .landing-page {
    --features-pin-shot-max: min(48vh, 440px);
  }
}

.landing-page *,
.landing-page *::before,
.landing-page *::after,
.guide-page *,
.guide-page *::before,
.guide-page *::after {
  border-radius: 0 !important;
}

/**
 * /typeset — 营销页流体标题层级 + 正文最小 1rem；Tailwind CDN 在 landing.css 之后注入，故关键字号用 !important 收口。
 */
.landing-page,
.guide-page {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  /* Stabilize glyph metrics during Source Sans 3 swap to reduce CLS. */
  font-size-adjust: 0.52;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* Mobile friendliness: prevent accidental horizontal scroll */
body.landing-page,
body.guide-page {
  overflow-x: hidden;
}

/* 顶栏小写品牌行：微字距、与展示标题区分层级 */
.landing-page #nav span.uppercase {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.landing-page main h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw + 1rem, 3.5rem) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  /* Keep serif fallback and Fraunces closer in first paint. */
  font-size-adjust: 0.47;
  letter-spacing: -0.02em;
}

/**
 * Hero 主标题：WoWo 单独一行；副标题行较小（两行独立字号）
 */
.landing-page main h1.hero-title-stack {
  font-size: inherit !important;
  line-height: 1.2 !important;
  letter-spacing: normal;
}

.landing-page .hero-title-brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw + 1rem, 3.5rem) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.02em;
}

.landing-page .hero-title-sub {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.1vw + 1.2rem, 2.1rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
  vertical-align: bottom;
}

.landing-page #hero-title {
  text-wrap: balance;
}

@media (max-width: 420px) {
  .landing-page .hero-title-sub {
    font-size: 1.4rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
  }
}

@media (max-width: 360px) {
  .landing-page .hero-title-sub {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
  }
}

.landing-page .hero-title-sub .hero-word {
  vertical-align: bottom;
}

.landing-page main h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2vw + 0.9rem, 2.125rem) !important;
  font-weight: 700 !important;
  line-height: 1.22 !important;
  font-size-adjust: 0.47;
  letter-spacing: -0.015em;
}

/* Browser-preview persistence: hero proof heading desktop size tuned down to 28px. */
.landing-page #proof-heading {
  font-size: 28px !important;
}

.landing-page main h3,
.landing-page main dt {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 0.8vw + 0.95rem, 1.3125rem) !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em;
}

/* 长段落：限制行长，减轻深色底上的阅读疲劳 */
.landing-page main p {
  max-width: 65ch;
}

.landing-page main dd {
  max-width: 65ch;
}

.landing-page main .text-center p {
  margin-inline: auto;
}

/* FAQ：标题与 dl 已 text-center；dd 最大宽度 800px（覆盖 main dd 的 65ch） */
.landing-page #faq dd {
  max-width: min(800px, 100%);
  margin-inline: auto;
  text-align: center;
}

/* Guides 导航：最小 800px（在容器够宽时）；内容超过 800px 时随内容变宽，最大不超过主栏 */
.landing-page #guides nav.landing-guides-nav {
  display: block;
  width: max-content;
  max-width: 100%;
  min-width: min(800px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 639px) {
  .landing-page #guides nav.landing-guides-nav > a {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.guide-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw + 1rem, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.guide-page h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.5vw + 0.9rem, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 0 0 0.5rem;
}

.guide-page .card p,
.guide-page .wrap > p.muted {
  max-width: 65ch;
}

.guide-page table {
  font-variant-numeric: tabular-nums;
}

.landing-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.landing-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.26;
}

.landing-orb--primary {
  width: 280px;
  height: 280px;
  background: var(--auth-primary);
  top: -80px;
  right: -60px;
}

.landing-orb--secondary {
  width: 200px;
  height: 200px;
  background: var(--auth-cyan);
  bottom: -40px;
  left: -40px;
}

.landing-orb--accent {
  width: 160px;
  height: 160px;
  background: var(--auth-accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.13;
}

.landing-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--landing-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--landing-grid-line) 1px, transparent 1px);
  background-size: 35px 35px;
}

.nav-glass {
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));
}

/* Limit transition scope to landing nav — /quieter 顶栏过渡更短、偏 ease-out */
#nav {
  transition:
    background 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

/**
 * 顶栏锚点：hover 主题色 + 下划线展开（仅精细指针，避免触控误触）
 */
@media (hover: hover) and (pointer: fine) {
  .landing-page .landing-nav-link {
    position: relative;
  }

  .landing-page .landing-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-primary), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .landing-page .landing-nav-link:hover {
    color: var(--auth-primary) !important;
  }

  .landing-page .landing-nav-link:hover::after {
    transform: scaleX(1);
  }
}

.cta-glass {
  background: var(--cta-glass-bg);
  backdrop-filter: blur(var(--cta-glass-blur));
  -webkit-backdrop-filter: blur(var(--cta-glass-blur));
  -moz-backdrop-filter: blur(var(--cta-glass-blur));
  border: 1px solid var(--cta-glass-border);
}

.product-demo-video {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.landing-page .hero-copy {
  max-width: 620px;
}

.landing-page .hero-demo {
  width: 100%;
}

.landing-page .hero-lede {
  margin: 0;
}

.landing-page .hero-flow-label {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.landing-page .hero-flow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-page .hero-flow-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border: 1px solid var(--auth-border);
  border-radius: 999px !important;
  background: #eef2fb;
  color: var(--auth-text);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}

[data-theme="dark"] .landing-page .hero-flow-chip {
  background: rgba(26, 26, 46, 0.4);
  color: #d7e4f7;
}

.landing-page .hero-video-volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-page .hero-video-shell {
  position: relative;
}

.landing-page .hero-video-volume--overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 8px;
  background: rgba(5, 0, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out, visibility 0.18s ease-out;
}

.landing-page .hero-video-shell:hover .hero-video-volume--overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.landing-page .hero-video-volume-btn {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.landing-page .hero-video-volume-btn:hover {
  border-color: var(--auth-primary);
}

.landing-page .hero-video-volume-label {
  font-size: 0.8125rem;
}

.landing-page .hero-video-volume-range {
  width: min(140px, 35vw);
  accent-color: var(--auth-primary);
}

.landing-page .theme-toggle img {
  display: block;
}

.landing-page .theme-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.landing-page .theme-toggle:hover {
  opacity: 0.72;
}

[data-theme="dark"] .landing-page .theme-toggle img {
  filter: invert(1) brightness(1.15);
}

.defer-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 920px;
}

/**
 * ScrollTrigger 区块：关闭 content-visibility，避免离屏未布局导致起点偏移
 */
.landing-page .defer-section.defer-section--scroll-anim {
  content-visibility: visible;
}

/**
 * GSAP：仅在脚本加入 html.js-animations 后隐藏待滚动揭示元素（无 JS 时仍可见）
 */
html.js-animations .landing-page .js-reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

/* Hero 词级动画由 GSAP 设置 transform；保留行内排版 */
.landing-page .hero-word {
  display: inline-block;
}

/**
 * Hero Logo：光标驱动透视倾斜（与 GSAP demo cursor-driven perspective tilt 同类交互）
 */
.landing-page .hero-logo-tilt {
  perspective: 900px;
  perspective-origin: 50% 50%;
}

.landing-page .hero-logo-inner {
  transform-style: preserve-3d;
  will-change: transform;
}

/**
 * 主 CTA：启用 GSAP 时由脚本控制 scale；CSS 只过渡颜色与 box-shadow，避免与 transform 冲突。
 */
.landing-page .js-primary-cta {
  transition:
    background-color 0.15s ease-out,
    border-color 0.15s ease-out,
    color 0.15s ease-out,
    box-shadow 0.22s ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .landing-page .js-primary-cta:hover {
    box-shadow: 0 10px 32px rgba(255, 0, 128, 0.42);
  }
}

/**
 * Guides 表格行：hover 左侧强调条 + 轻微位移
 */
@media (hover: hover) and (pointer: fine) {
  .landing-page #guides nav > a {
    transition:
      background-color 0.2s ease-out,
      box-shadow 0.2s ease-out,
      transform 0.2s ease-out;
  }

  [data-theme="light"] .landing-page #guides nav > a:hover {
    background-color: #1a2138 !important;
    box-shadow: inset 4px 0 0 var(--auth-primary);
    transform: translateX(3px);
  }

  [data-theme="light"] .landing-page #guides nav > a:hover .text-auth-text,
  [data-theme="light"] .landing-page #guides nav > a:hover .text-auth-muted {
    color: #f3f6ff !important;
  }

  [data-theme="dark"] .landing-page #guides nav > a:hover {
    background-color: rgba(26, 26, 46, 0.55);
    box-shadow: inset 4px 0 0 var(--auth-primary);
    transform: translateX(3px);
  }
}

/**
 * FAQ Privacy 外链：hover 主题色与下划线偏移
 */
.landing-page .faq-privacy-link {
  transition:
    color 0.2s ease-out,
    text-underline-offset 0.2s ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .landing-page .faq-privacy-link:hover {
    color: var(--auth-primary) !important;
    text-underline-offset: 5px;
  }
}

/**
 * 首屏 / 第二屏：整屏 scroll-snap（文档滚动需作用在根层，与 GSAP infinite loop sections 整屏感类似）
 * @see https://demos.gsap.com/demo/infinite-looped-scrolling-sections/
 */
html:has(body.landing-page) {
  /**
   * 默认 proximity（无 JS 或减弱动效时仍略有吸附感）。
   * 启用 initLandingWheelSnap 时加 .js-landing-wheel-snap，关闭 CSS snap，改由 GSAP ScrollToPlugin 分段滚动，避免与 ScrollTrigger pin 冲突（参见 gsap.com ScrollTrigger / ScrollToPlugin）。
   */
  scroll-snap-type: y proximity;
  scroll-padding-top: 4.75rem;
}

html.js-landing-wheel-snap:has(body.landing-page) {
  scroll-snap-type: none;
}

@media (min-width: 768px) {
  html:has(body.landing-page) {
    scroll-padding-top: 5rem;
  }
}

.landing-page .landing-snap-screen {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* 仅 Hero / Product demo 强吸附类；其余 section 默认不参与，避免与 ScrollTrigger 争抢 */
.landing-page section:not(.landing-snap-screen) {
  scroll-snap-align: none;
}

/* 第三屏：允许作为 proximity 落点，减轻「滑过第二屏却吸不住第三屏」的落空感；不用 mandatory，避免与 pin 长滚动冲突 */
.landing-page #features {
  scroll-snap-align: start;
}

/**
 * 首屏动画未完成前隐藏后续区块（避免视频与 Hero 文字同时出现）
 */
html.js-animations:not(.hero-intro-done) .landing-page .landing-post-hero {
  opacity: 0;
  pointer-events: none;
}

html.js-animations.hero-intro-done .landing-page .landing-post-hero {
  opacity: 1;
  pointer-events: auto;
}

/* Hero 内「What you get」与主时间线同步揭示 */
html.js-animations .landing-page .js-hero-proof {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
}

/**
 * Hero proof：左侧独立竖线（非 border），仅在首屏 Hero 时间线完成（html.hero-intro-done）后自上向下展开。
 * 无 JS / 无动效类时默认显示完整竖线，避免内容不可见。
 * #hero-proof 使用纵向 flex；.hero-proof-body 为横向 flex + 左对齐；.proof-list 文本左对齐。
 */
.landing-page #hero-proof {
  display: flex;
  flex-direction: column;
}

.landing-page .hero-proof-body {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.landing-page .proof-list {
  text-align: left;
}

.landing-page .hero-proof-block .proof-list li {
  max-width: 48ch;
}

.landing-page .hero-proof-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--auth-primary) 0%, rgba(255, 0, 128, 0.45) 100%);
  transform: scaleY(0);
  transform-origin: top center;
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

html.hero-intro-done .landing-page .hero-proof-line,
html:not(.js-animations) .landing-page .hero-proof-line {
  transform: scaleY(1);
}

@media (prefers-reduced-motion: reduce) {
  .landing-page .hero-proof-line {
    transition: none;
    transform: scaleY(1);
  }
}

/**
 * Features：Lateral Pin（与 ScrollTrigger Lateral Pin Indicator 示例一致：左侧列表 + fill 条 + 右侧叠化）
 * 参考项目内 ScrollTrigger Lateral Pin Indicator 与 GSAP Demo
 */
.landing-page .features-pin-left {
  position: relative;
}

/**
 * 桌面：左侧栏与右侧幻灯片栈同高（由 Grid 叠层撑开高度，不再使用 min(72vh,640px) 空壳，避免竖线区高于 article）
 */
@media (min-width: 768px) {
  .landing-page .features-pin-content {
    align-items: stretch;
  }

  .landing-page .features-pin-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: flex-start;
    min-height: 0;
  }

  /* 与 .features-pin-shot 的 max-height 一致，竖线 fill 高度与截图区对齐；超出时纵向滚动，勿用 flex-wrap:wrap 折列 */
  .landing-page .features-pin-list {
    min-height: var(--features-pin-shot-max);
    max-height: var(--features-pin-shot-max);
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  /* 四张幻灯片叠在同一格，行高取子项最大高度，容器与左侧栏自然对齐 */
  .landing-page .features-pin-slides--stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, auto);
    align-content: start;
  }

  .landing-page .features-pin-slides--stack > .features-pin-slide {
    grid-area: 1 / 1;
    position: relative;
    width: 100%;
    min-width: 0;
  }

  /**
   * GSAP initFeaturesPinScroll 在首屏时间线结束后才执行；此前若用户已滚到二屏，四张会叠在同一格全部可见。
   * 在启用动画时先用 CSS 只露出第一张，脚本设置 autoAlpha 后与 scrub 时间线一致。
   */
  html.js-animations .landing-page .features-pin-slides--stack > .features-pin-slide:not(:first-child) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/**
 * 竖屏截图过高时限制最大高度，避免 article 撑出整屏；object-fit:contain + top 与文案列顶部对齐。
 */
.landing-page .features-pin-shot {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  max-height: var(--features-pin-shot-max);
  opacity: 1;
  box-shadow: none;
  filter: drop-shadow(0 14px 30px rgba(8, 16, 36, 0.26));
}

.landing-page .features-pin-slides picture {
  opacity: 1;
  color: rgba(255, 255, 255, 1);
}

.landing-page .features-pin-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  /* 禁止 wrap：column+wrap 在固定 max-height 下会把项折到右侧第二列，侧栏过窄时第四项会被裁切 */
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
}

.landing-page .features-pin-list-item {
  padding-top: 30px;
  padding-bottom: 30px;
  transition: color 0.2s ease-out;
}

.landing-page .features-pin-list-item.is-active {
  color: var(--auth-primary) !important;
}

/* 视口偏矮时略减上下内边距，降低四项总高度、减少滚动概率 */
@media (min-width: 768px) and (max-height: 780px) {
  .landing-page .features-pin-list-item {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

.landing-page .features-pin-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background-color: var(--auth-primary);
  transform-origin: top left;
  z-index: 0;
}

@media (max-width: 767px) {
  .landing-page .features-pin-slide {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* 桌面：取消 grid 叠层，改为纵向排列，避免四项仍占同一格导致重叠 */
  @media (min-width: 768px) {
    .landing-page .features-pin-slides--stack {
      display: flex;
      flex-direction: column;
      gap: 2.5rem;
    }

    .landing-page .features-pin-slides--stack > .features-pin-slide {
      grid-area: auto !important;
    }
  }

  .landing-page .features-pin-slide {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .landing-page .features-pin-left {
    display: none;
  }
}

/*
 * Tailwind custom-color fallback
 * 当 Tailwind CDN 的 `tailwind.config` 未能按预期生效时，确保按钮/底色仍可见（主题色以 logo 的 #ff0080 为准）。
 */
.bg-auth-bg { background-color: var(--auth-bg) !important; }
.text-auth-text { color: var(--auth-text) !important; }
.text-auth-muted { color: var(--auth-muted) !important; }
.text-auth-muted-2 { color: var(--auth-muted-2) !important; }
.bg-auth-card { background-color: var(--auth-card) !important; }
.border-auth-border { border-color: var(--auth-border) !important; }
.bg-auth-primary { background-color: var(--auth-primary) !important; }
.bg-auth-primary-hover { background-color: var(--auth-primary-hover) !important; }
.border-auth-primary { border-color: var(--auth-primary) !important; }

.hover\\:bg-auth-primary-hover:hover { background-color: var(--auth-primary-hover) !important; }
.hover\\:border-auth-primary-hover:hover { border-color: var(--auth-primary-hover) !important; }

/* Skip link: keyboard users need a clear entry point */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 100;
  background: var(--auth-bg);
  border: 2px solid var(--auth-primary);
  color: var(--auth-text);
  padding: 10px 14px;
  text-decoration: none;
}
.skip-link:focus-visible {
  left: 10px;
}

/* Consistent visible focus across all landing pages */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--auth-primary);
  outline-offset: 3px;
}

/* Avoid fixed nav covering in-page anchors */
.landing-page section[id] {
  scroll-margin-top: 72px;
}

/* Guide pages touch targets */
.guide-page a.touch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* >= 44x44px recommended tap target */
  padding: 10px 14px;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .landing-orb {
    filter: blur(16px);
    opacity: 0.18;
  }
  #nav {
    transition: none !important;
  }
  .nav-glass,
  .cta-glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    -moz-backdrop-filter: none;
  }

  html.js-animations .landing-page .js-reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  html.js-animations .landing-page .js-hero-proof {
    opacity: 1 !important;
    transform: none !important;
  }

  html:has(body.landing-page) {
    scroll-snap-type: none;
  }

  .landing-page .hero-logo-inner {
    will-change: auto;
    transform: none !important;
  }
}

/* Mobile: reduce blur cost on small screens */
@media (max-width: 767px) {
  .landing-orb {
    filter: blur(44px);
    opacity: 0.22;
  }

  .landing-page .hero-copy {
    max-width: 100%;
  }

  .landing-page .hero-demo {
    margin-left: 0;
    max-width: 100%;
  }

  .landing-page .hero-flow-chip {
    font-size: 0.8125rem;
  }
}

/* 顶栏语言：触发器无底色边框；展开列表与 nav 同款毛玻璃（非原生 <select>） */
.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;
}

.landing-lang {
  position: relative;
  z-index: 35;
}

.landing-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0.2rem 0.15rem;
  font-family: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--auth-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  box-shadow: none;
}

@media (min-width: 768px) {
  .landing-lang-btn {
    font-size: 0.8125rem;
  }
}

.landing-lang-btn:hover {
  color: var(--auth-text);
}

.landing-lang-btn:focus-visible {
  outline: 2px solid var(--auth-primary);
  outline-offset: 2px;
}

.landing-lang-btn[aria-expanded="true"] .landing-lang-chevron {
  transform: rotate(180deg);
}

.landing-lang-chevron {
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 语言菜单：与顶栏 .nav-glass 同一套变量（--nav-glass-bg / --nav-glass-blur / 边框） */
.landing-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 10.5rem;
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(var(--nav-glass-blur));
  -webkit-backdrop-filter: blur(var(--nav-glass-blur));
  border: 1px solid var(--cta-glass-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  transition:
    background 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] .landing-lang-menu {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.landing-lang-menu--hidden {
  display: none !important;
}

.landing-lang-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.85rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--auth-text);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

a.landing-lang-item:hover,
button.landing-lang-item:hover {
  background: rgba(255, 0, 128, 0.08);
  color: var(--auth-text);
}

.landing-lang-item--current {
  font-weight: 600;
  color: var(--auth-primary);
  cursor: default;
}

.landing-lang-item--current:hover {
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .landing-lang-btn[aria-expanded="true"] .landing-lang-chevron {
    transform: none;
  }

  .landing-lang-menu {
    transition: none;
  }
}
