/* ==========================================================================
   极光新视 / 泡泡题库 官网样式（手写可读版，2026-09-29）
   唯一入口：/static/css/site.css —— 全站 9 个页面共用，改这里全站生效。
   命名规范：全小写 + 连字符（如 .site-header / .legal-section），
             修饰态用 .is-xxx（如 .site-nav.is-open），不再有构建哈希后缀。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 自托管字体（站酷小薇子集）：避免 Google Fonts 阻塞渲染（中文 CSS 可达 90KB+）
      woff2 文件：/fonts/zcool-xiaowei-subset.woff2，改字体只需换这个文件
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "ZCOOL XiaoWei";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/zcool-xiaowei-subset.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   2. 设计变量：品牌色、文字层级、背景、描边、毛玻璃、展示字体
      改颜色只改这一段即可（全站引用 var(...)）
   -------------------------------------------------------------------------- */
:root {
  /* 品牌蓝 */
  --paopao-blue: #2f78f0;
  --paopao-blue-active: #1b56bf;
  --paopao-blue-soft: #e8f1fe;
  --paopao-blue-soft-hover: #d4e5fc;
  --paopao-blue-soft-border: #a8c6fa;

  /* Semi 变量别名（页面直接沿用 Semi 语义，不再依赖 Semi 的 154KB CSS） */
  --semi-color-primary: var(--paopao-blue);
  --semi-color-primary-hover: #2568d9;
  --semi-color-primary-active: var(--paopao-blue-active);
  --semi-color-primary-light-default: var(--paopao-blue-soft);
  --semi-color-primary-light-hover: var(--paopao-blue-soft-hover);
  --semi-color-primary-light-active: var(--paopao-blue-soft-border);
  --semi-color-text-0: #1f2329;
  --semi-color-text-1: #41464c;
  --semi-color-text-2: #646a73;
  --semi-color-text-3: #8f959e;
  --semi-color-bg-0: #fff;
  --semi-color-bg-1: #f7f8fa;
  --semi-color-bg-2: #f0f2f5;
  --semi-color-fill-0: #f5f6f8;
  --semi-color-fill-1: #eef0f3;
  --semi-color-border: #1f23291f;
  --semi-shadow-elevated: 0 8px 24px #1f232914;

  /* 顶栏毛玻璃（当前为不透明实色，改这里可开模糊） */
  --aurvis-glass-bg: var(--semi-color-bg-0);
  --aurvis-glass-bg-strong: var(--semi-color-bg-0);
  --aurvis-glass-border: var(--semi-color-border);
  --aurvis-glass-shadow: var(--semi-shadow-elevated);
  --aurvis-glass-blur: none;

  --aurvis-hero-grad: #f2f3f9;

  /* 展示字体（品牌名 / Hero 标题 / 合规页公司名） */
  --aurvis-display-font: "ZCOOL XiaoWei", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
}

/* --------------------------------------------------------------------------
   3. 基础重置与全局排印
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  color: var(--semi-color-text-0);
  background: var(--semi-color-bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

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

/* 内容宽度容器（首页各区块共用） */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   4. 首页（/）—— 顶栏 / Hero / 分区 / 产品网格 / 价值观 / 页脚
   ========================================================================== */

/* 整页纵向骨架 */
.wrap {
  flex-direction: column;
  min-height: 100vh;
  display: flex;
}

/* ---- 顶栏 ---- */
.site-header {
  z-index: 100;
  height: calc(64px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--semi-color-bg-0);
  border-bottom: 1px solid var(--semi-color-border);
  position: sticky;
  top: 0;
}

.header-inner {
  align-items: center;
  gap: 32px;
  height: 64px;
  display: flex;
  position: relative;
}

.brand {
  flex: 1;
  align-items: center;
  min-width: 0;
  max-width: min(100%, 640px);
  display: flex;
}

/* 公司全称：渐变文字（浅底上做品牌色描字） */
.brand-name {
  font-family: var(--aurvis-display-font);
  letter-spacing: 0.02em;
  color: #0000;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: linear-gradient(115deg, #243568 0%, #3a579c 48%, #1fae91 120%);
  -webkit-background-clip: text;
  background-clip: text;
  min-width: 0;
  font-size: clamp(16px, 1.9vw, 22px);
  font-weight: 400;
  line-height: 1.2;
  overflow: hidden;
}

.site-nav {
  align-items: center;
  gap: 8px;
  margin-left: auto;
  display: flex;
}

.nav-link {
  color: var(--semi-color-text-2);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--semi-color-primary);
}

.nav-link.is-active {
  color: var(--semi-color-primary);
  font-weight: 600;
}

/* 移动端汉堡按钮（≥801px 隐藏） */
.menu-btn {
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  display: none;
}

.menu-btn span {
  background: var(--semi-color-text-0);
  border-radius: 1px;
  width: 18px;
  height: 2px;
  display: block;
}

/* ---- Hero 首屏 ---- */
.hero {
  isolation: isolate;
  color: #e8f6fa;
  background: #1a2748;
  min-height: clamp(360px, 42vw, 520px);
  position: relative;
  overflow: hidden;
}

.hero-scene {
  z-index: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.hero-scene-img {
  object-fit: cover;
  object-position: 68% 92%;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
}

/* 压暗层：保证左侧文案在插画上有足够对比度 */
.hero-scrim {
  background: linear-gradient(90deg, #121c348c 0%, #121c3447 28%, #121c340f 48%, #0000 62%),
    linear-gradient(#14203a1a 0%, #0000 22% 80%, #101a301a 100%);
  position: absolute;
  inset: 0;
}

.hero-inner {
  z-index: 1;
  align-items: center;
  min-height: 0;
  display: flex;
  position: relative;
}

.hero-copy {
  z-index: 1;
  text-align: left;
  flex: 1;
  min-width: 0;
  max-width: 32em;
  padding: clamp(56px, 6vw, 80px) 0;
  position: relative;
}

.hero-brand {
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
  display: flex;
}

.hero-title {
  font-family: var(--aurvis-display-font);
  letter-spacing: 0.12em;
  color: #0000;
  filter: drop-shadow(0 1px 14px #0c162a47);
  background: linear-gradient(115deg, #fff 0%, #d6eff5 42%, #73e8c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0;
  font-size: clamp(40px, 5.2vw, 60px);
  font-weight: 400;
  line-height: 1.06;
}

.hero-sub {
  letter-spacing: 0.06em;
  color: #f4fbfd;
  text-shadow: 0 1px 12px #0c142852;
  margin: 0;
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 500;
  line-height: 1.4;
}

.hero-desc {
  color: #e8f6fad6;
  text-shadow: 0 1px 10px #0c142847;
  max-width: 30em;
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.7;
}

.hero-desc a {
  color: #d6eff5;
  text-underline-offset: 2px;
  text-decoration: underline;
}

.hero-cta {
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  display: flex;
}

/* 实心按钮（Hero 主 CTA） */
.btn-solid {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  color: var(--semi-color-primary);
  background: #fff;
  border: 1px solid #ffffffe6;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
}

.btn-solid:hover {
  background: #ffffffeb;
}

/* 幽灵按钮（Hero 次 CTA） */
.btn-ghost {
  color: #fff !important;
  background: none !important;
  border: 1px solid #ffffff73 !important;
}

.btn-ghost:hover {
  background: #ffffff1f !important;
}

/* ---- 通用分区 ---- */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--semi-color-bg-0);
}

.section-title {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 700;
}

.section-lead {
  color: var(--semi-color-text-2);
  max-width: 640px;
  margin-bottom: 36px;
  font-size: 15px;
}

/* ---- 产品网格 ---- */
.product-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  display: grid;
}

.product-card {
  color: inherit;
  background: none;
  border-radius: 12px;
  gap: 16px;
  padding: 20px 8px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
}

a.product-card:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px #5d6db01f;
}

.product-logo {
  object-fit: contain;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #1f23291f;
  border-radius: 12px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  box-shadow: 0 1px 2px #1f23290f;
}

/* 无 logo 时的首字占位块 */
.product-logo-fallback {
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  color: var(--semi-color-text-2);
  background: #fff;
  border: 1px solid #1f23291f;
  border-radius: 12px;
  flex-shrink: 0;
  place-items: center;
  font-weight: 700;
  display: grid;
  box-shadow: 0 1px 2px #1f23290f;
}

.product-name {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 700;
}

.product-blurb {
  color: var(--semi-color-text-2);
  font-size: 14px;
  line-height: 1.65;
}

.badge {
  background: var(--semi-color-fill-1);
  color: var(--semi-color-text-2);
  vertical-align: middle;
  border-radius: 999px;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

/* ---- 价值观四宫格 ---- */
.values {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  display: grid;
}

.value-card {
  padding: 4px 8px 0 0;
}

.value-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.value-card p {
  color: var(--semi-color-text-2);
  font-size: 13px;
  line-height: 1.65;
}

/* ---- 页脚 ---- */
.site-footer {
  border-top: 1px solid var(--semi-color-border);
  background: var(--semi-color-bg-0);
  margin-top: auto;
  padding: 40px 0 28px;
}

.footer-inner {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  display: flex;
}

.footer-brand {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  max-width: 480px;
  display: flex;
}

.footer-brand-copy {
  flex-direction: column;
  flex: 1;
  gap: 6px;
  min-width: 0;
  display: flex;
}

/* 页脚公司名允许换行（顶栏那种 nowrap 会溢出） */
.footer-brand .brand-name {
  white-space: normal;
  letter-spacing: 0.02em;
  text-overflow: unset;
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.35;
  overflow: visible;
}

.footer-logo {
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}

.footer-slogan {
  color: var(--semi-color-text-2);
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.footer-col {
  color: var(--semi-color-text-2);
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  display: flex;
}

.footer-col-title {
  color: var(--semi-color-text-0);
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid var(--semi-color-border);
  color: var(--semi-color-text-3);
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  font-size: 12px;
  display: flex;
}

.footer-links {
  flex-wrap: wrap;
  gap: 14px;
  display: flex;
}

/* ==========================================================================
   5. 合规页（privacy / terms / help / about / feedback / sdk-share / permissions / qualifications）
   ========================================================================== */

/* 合规页顶栏（比首页矮，品牌名 + 当前页名） */
.legal-header {
  z-index: 50;
  min-height: 56px;
  padding: env(safe-area-inset-top, 0px) 16px 0;
  height: calc(56px + env(safe-area-inset-top, 0px));
  background: var(--aurvis-glass-bg);
  -webkit-backdrop-filter: var(--aurvis-glass-blur);
  border-bottom: 1px solid var(--aurvis-glass-border);
  align-items: center;
  gap: 10px;
  display: flex;
  position: sticky;
  top: 0;
}

.legal-brand {
  color: var(--semi-color-text-0);
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(62vw, 360px);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
}

/* 公司名渐变字（与首页同款，字号随视口收缩） */
.legal-company {
  font-family: var(--aurvis-display-font);
  letter-spacing: 0.05em;
  color: #0000;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(115deg, #243568 0%, #3a579c 48%, #1fae91 120%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(12px, 2.8vw, 15px);
  font-weight: 400;
  line-height: 1.25;
  overflow: hidden;
}

.legal-header-title {
  color: var(--semi-color-text-2);
  border-left: 1px solid var(--semi-color-border);
  padding-left: 10px;
  font-size: 13px;
}

/* 正文容器 */
.legal-page {
  background: var(--semi-color-bg-0);
  min-height: 100vh;
}

.legal-container {
  max-width: 800px;
  padding: 12px 24px calc(48px + env(safe-area-inset-bottom));
  margin: 24px auto 48px;
}

.legal-h1 {
  color: var(--semi-color-text-0);
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.legal-meta {
  color: var(--semi-color-text-3);
  margin-bottom: 28px;
  font-size: 12px;
}

/* 章节：h2 左侧品牌色竖条 */
.legal-section {
  margin-bottom: 28px;
}

.legal-section h2 {
  color: var(--semi-color-text-0);
  border-left: 3px solid var(--semi-color-primary);
  margin: 0 0 12px;
  padding-left: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.legal-section p {
  color: var(--semi-color-text-1);
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.85;
}

.legal-section ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.legal-section li {
  color: var(--semi-color-text-1);
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.85;
}

.legal-section strong {
  color: var(--semi-color-text-0);
  font-weight: 600;
}

.legal-section a,
.legal-contact a {
  color: var(--semi-color-primary);
}

.legal-section a:hover,
.legal-contact a:hover {
  text-decoration: underline;
}

/* 联系方式段（行多、字号略小） */
.legal-contact {
  color: var(--semi-color-text-1);
  font-size: 14px;
  line-height: 1.9;
}

/* 章节导语 / 附注 */
.legal-note {
  color: var(--semi-color-text-2);
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.7;
}

/* ---- 第三方清单表格（窄屏横向滚动） ---- */
.legal-table-wrap {
  -webkit-overflow-scrolling: touch;
  margin: 0 0 12px;
  overflow-x: auto;
}

.legal-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 13px;
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--semi-color-border);
  text-align: left;
  vertical-align: top;
  color: var(--semi-color-text-1);
  padding: 10px 12px;
  line-height: 1.65;
}

.legal-table th {
  background: var(--semi-color-fill-0);
  color: var(--semi-color-text-0);
  white-space: nowrap;
  font-weight: 600;
}

/* ---- 资质页：证照照片 + 信息卡 ---- */
.license-photo-wrap {
  background: #f6f7fb;
  border: 1px solid #1c2b4a1f;
  border-radius: 8px;
  margin: 0 0 16px;
  overflow: hidden;
}

.license-photo {
  width: 100%;
  height: auto;
  display: block;
}

.license-card {
  background: linear-gradient(#fffaf4 0%, #fff 55%);
  border: 8px solid #c45c4a;
  border-radius: 4px;
  padding: 20px 22px 18px;
  position: relative;
  overflow: hidden;
}

.license-head {
  text-align: center;
  letter-spacing: 0.12em;
  color: #9b2c1f;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 700;
}

.license-row {
  color: var(--semi-color-text-1);
  grid-template-columns: 96px 1fr;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.7;
  display: grid;
}

.license-row b {
  color: var(--semi-color-text-0);
  font-weight: 600;
}

/* ==========================================================================
   6. 响应式
   ========================================================================== */

/* 平板 / 手机横屏：导航折叠、Hero 收紧、网格单列 */
@media (max-width: 800px) {
  .brand {
    max-width: calc(100% - 56px);
  }

  .brand-name {
    letter-spacing: 0.01em;
    white-space: normal;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    font-size: clamp(14px, 3.6vw, 17px);
    display: -webkit-box;
    overflow: hidden;
  }

  .hero {
    min-height: clamp(300px, 62vw, 360px);
  }

  .hero-scene-img {
    object-fit: cover;
    object-position: 68% 75%;
  }

  .hero-scrim {
    background: linear-gradient(90deg, #121c349e 0%, #121c3459 36%, #121c3414 58%, #0000 74%),
      linear-gradient(#14203a1f 0%, #0000 26% 74%, #101a301f 100%);
  }

  .hero-copy {
    max-width: none;
    padding: 36px 0 40px;
  }

  .hero-brand {
    gap: 12px;
    margin-bottom: 16px;
  }

  .hero-title {
    letter-spacing: 0.1em;
    font-size: clamp(34px, 9vw, 44px);
  }

  .hero-sub {
    letter-spacing: 0.04em;
    font-size: 16px;
  }

  .hero-desc {
    max-width: none;
    margin-bottom: 26px;
    font-size: 14px;
    line-height: 1.65;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-cta > a {
    width: 100%;
    min-height: 44px;
  }

  .product-grid,
  .values {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

  /* 汉堡菜单：默认收起，点开由脚本加 .is-open */
  .menu-btn {
    display: flex;
  }

  .site-nav {
    background: var(--semi-color-bg-0);
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 8px;
    display: none;
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    box-shadow: 0 14px 36px #5d6db024;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    font-size: 16px;
  }

  .site-footer {
    padding: 32px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* 手机竖屏：容器内边距收紧 + 合规页排版缩小 + 表单控件 ≥16px 防 iOS 放大 */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  .legal-container {
    padding: 8px 16px calc(40px + env(safe-area-inset-bottom));
    margin: 8px 0 24px;
  }

  .legal-h1 {
    font-size: 19px;
  }

  .legal-section h2 {
    font-size: 15px;
  }

  .legal-section p,
  .legal-section li {
    font-size: 14.5px;
    line-height: 1.8;
  }
}

/* ==========================================================================
   7. 页面专属小样式（原先散落在 HTML 的 style="" 里，集中到这里）
   ========================================================================== */

/* Hero 插画容器：picture 不生成盒子，让 img 直接铺满 */
.hero-scene picture {
  display: contents;
}

/* 合规页顶栏的泡泡题库 logo */
.legal-brand img {
  border-radius: 6px;
}

/* 页脚「公安备案」链接（图标 + 文字） */
.police-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 反馈页客服二维码 */
.qr-code {
  margin-top: 16px;
  width: 120px;
}

.qr-code img {
  border-radius: 8px;
}
