/* ============================================================
   First Bird 官网样式
   纯静态站点，零 JavaScript。所有交互（导航折叠、FAQ 展开）
   都由原生 HTML 元素承担，见 <details>。
   ============================================================ */

/* ---------- 字体 ----------
   Montserrat 自托管，不走 Google Fonts CDN：隐私政策声明本站不做任何
   第三方追踪，而 CDN 会把访客 IP 发给 Google。
   中文不自托管（字形子集要几 MB），走系统字体栈。
   这是一个可变字体文件，400-800 全覆盖。 */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* ---------- 设计令牌 ---------- */
:root {
  --navy: #16265e;          /* 标题、导航文字、logo */
  --navy-soft: #2c3e6b;     /* 正文 */
  --footer-bg: #14286a;
  --sand: #c6b9a4;          /* How it works 区块底色 */
  --badge-blue: #c5d5ee;    /* 序号圆圈 */
  --line-blue: #3a6fb0;     /* 波浪线、焦点框、正文里的强调线 */
  --paper: #f4f7fb;         /* 长文页底色 */

  /* 图标的三个颜色，取样自 App 图标 Icon-App-1024x1024@1x.png。
     只给标志用（导航 logo、How it works 插图、favicon），不进站点配色。 */
  --icon-orange: #f4702f;
  --icon-teal: #0e9b88;
  --icon-brown: #43241a;     /* favicon 底板，以及插图里的电线杆、电线 */

  --wrap: 1180px;
  --nav-h: 58px;

  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC',
    'Source Han Sans SC', sans-serif;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 32px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--navy-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

/* 只给键盘用户的焦点框 */
:focus-visible {
  outline: 3px solid var(--line-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 跳到主内容，屏幕阅读器和键盘用户用 */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--navy);
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ============================================================
   导航栏 —— 胶囊形毛玻璃，浮在 Hero 之上
   ============================================================ */
.nav-outer {
  position: absolute;
  inset-inline: 0;
  top: 18px;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--nav-h);
  padding: 8px 14px 8px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 6px 24px rgba(12, 30, 70, 0.10);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
.brand svg { width: 24px; height: 24px; flex: none; }

/* 标志：两块错开的圆角方块，橙在后、青绿在前，橙色让出一道缺口。
   几何见 CLAUDE.md「One mark」一节。 */
.mark-o { fill: var(--icon-orange); }
.mark-t { fill: var(--icon-teal); }

/* details 做无 JS 的移动端折叠菜单 */
.menu { margin-left: auto; }
.menu > summary {
  list-style: none;
  cursor: pointer;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: rgba(255, 255, 255, 0.35); }
.menu > summary svg { width: 22px; height: 22px; }

.menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-links a {
  color: var(--navy);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
}
.menu-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.lang {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}
.lang a { text-decoration: none; opacity: 0.62; }
.lang a:hover { opacity: 1; }
.lang [aria-current='true'] { opacity: 1; text-decoration: none; }
.lang .sep { opacity: 0.45; margin-inline: 5px; }

/* 桌面 / 移动各显示一份链接列表 */
.nav-desktop { display: none; }
.nav-mobile { display: block; margin-left: auto; }

/* 移动端：菜单收进 details，展开后是一张下拉卡片 */
@media (max-width: 899px) {
  /* 这些下拉样式必须限定在 .nav-mobile 内。桌面那份列表的 class 是
     "menu-links nav-desktop"，不限定的话它也会被命中，而本媒体查询
     在文件里更靠后，会盖掉 .nav-desktop { display: none }，
     结果桌面列表在手机上一直漏出来。 */
  .menu[open] > summary { background: rgba(255, 255, 255, 0.4); }
  .nav-mobile .menu-links {
    position: absolute;
    right: 24px;
    top: calc(100% + 10px);
    min-width: 190px;
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 32px rgba(12, 30, 70, 0.18);
  }
  .nav-mobile .menu-links li a {
    display: block;
    padding: 9px 12px;
    border-radius: 9px;
  }
  .nav-mobile .menu-links li a:hover {
    background: rgba(22, 38, 94, 0.07);
    text-decoration: none;
  }
  /* 语言切换是一行内联的 “EN / 中”，不能跟着上面的 li a 变成块级，
     否则 “中” 会被挤到下一行 */
  .nav-mobile .menu-links li.lang {
    display: flex;
    align-items: center;
    margin-top: 4px;
    padding: 10px 12px 4px;
    border-top: 1px solid rgba(22, 38, 94, 0.12);
  }
  .nav-mobile .menu-links li.lang a {
    display: inline;
    padding: 0;
    border-radius: 0;
  }
  .nav-mobile .menu-links li.lang a:hover { background: none; }
}

/* 桌面端：隐藏折叠菜单，平铺那一份链接 */
@media (min-width: 900px) {
  .nav-mobile { display: none; }
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  background-image: url('../img/hero.jpg');
  background-size: cover;
  /* 焦点偏右，让日落和瓶子留在画面里；拉伸发生在水面，看不出来 */
  background-position: 62% center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* 提亮蒙版。不是装饰 —— 原图左侧是中蓝色水面，深海军蓝标题直接压上去
   对比度不达标。这层从左向右渐隐的浅色把文字区拉到 WCAG AA 之上，
   同时右侧的日落和瓶子保持原样。 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(238, 244, 250, 0.94) 0%,
    rgba(238, 244, 250, 0.88) 26%,
    rgba(238, 244, 250, 0.58) 44%,
    rgba(238, 244, 250, 0.18) 60%,
    rgba(238, 244, 250, 0) 74%
  );
}

.hero .wrap { position: relative; }

.hero-copy { max-width: 640px; padding-block: 88px 52px; }

.hero h1 {
  margin: 0;
  /* slogan 比原来的 Speak/Connect/Grow 长得多（Find your courage. 18 字符），
     5.4rem 会撑破 .hero-copy 的 640px。字号实测到不溢出为止。 */
  font-size: clamp(2.05rem, 4.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.028em;
  color: var(--navy);
}
.hero h1 span { display: block; }

.hero-sub {
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.45;
  color: var(--navy);
  max-width: 30ch;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}
/* 上架前的占位：实底深蓝胶囊，自带对比度，不依赖首屏遮罩。
   上架时换回官方徽章，规则见 CLAUDE.md「Store badges」 */
.soon {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

/* 公共语音池告知，收进商店徽章旁边的问号里。
   零 JS：:hover 管桌面悬停，:focus-within 管键盘 Tab 和手机点按
   —— 点按会让 button 获得焦点，所以触屏上同样能展开。
   不用 <details>：它只能点击展开，CSS 没法让它响应悬停。 */
.hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: center;
}

.hint-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  background: rgba(255, 255, 255, 0.55);
  color: var(--navy);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.hint-btn:hover { background: rgba(255, 255, 255, 0.9); }

.hint-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  translate: -50% 0;
  z-index: 5;
  width: max-content;
  /* 夹住宽度，避免窄屏把页面撑出横向滚动条 */
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 15px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(22, 38, 94, 0.14);
  box-shadow: 0 10px 30px rgba(12, 30, 70, 0.18);
  color: var(--navy-soft);
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.hint:hover .hint-bubble,
.hint:focus-within .hint-bubble {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .hint-bubble { transition: none; }
}

/* ============================================================
   How it works —— 沙色区块
   ============================================================ */
.how {
  background: var(--sand);
  padding: 44px 0 56px;
}

.how h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.wave {
  display: block;
  margin: 6px auto 0;
  width: 232px;
  height: 12px;
  color: var(--line-blue);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.card {
  position: relative;
  padding: 22px 22px 26px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.55);
  text-align: center;
}

.card-num {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--badge-blue);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.1rem;
}

.card-art {
  height: 112px;
  margin: 0 auto 12px;
}
/* 插图：语音气泡站在电线上。几何见 CLAUDE.md「One mark」一节 */
.card-art .mark-b { fill: var(--icon-brown); }
.card-art .bar { fill: #fff; }
.card-art .wire { fill: none; stroke: var(--icon-brown); stroke-width: 1.2; opacity: 0.5; }
.card-art .pole { fill: var(--icon-brown); opacity: 0.65; }
.card-art .sing { fill: none; stroke: var(--icon-orange); stroke-width: 2; stroke-linecap: round; }
.card-art svg { height: 100%; width: auto; margin-inline: auto; }

.card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--navy-soft);
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.9);
  padding: 24px 0;
  font-size: 0.94rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-inline: auto;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-links .sep { opacity: 0.4; }
.copyright { margin-left: auto; opacity: 0.82; white-space: nowrap; }

@media (max-width: 720px) {
  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { margin-inline: 0; justify-content: center; }
  .copyright { margin-left: 0; width: 100%; text-align: center; }
}

/* ============================================================
   内页（About / FAQ / 法律页）
   ============================================================ */
/* 内页没有 Hero，导航栏改为实底贴在顶部 */
.page-top {
  position: relative;
  background: var(--navy);
  padding-bottom: 18px;
}
.page-top .nav {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}
.page-top .brand,
.page-top .menu-links a,
.page-top .lang,
.page-top .menu > summary { color: #fff; }
.page-top .menu-links a:hover { color: #fff; }

@media (max-width: 899px) {
  .page-top .menu-links a { color: var(--navy); }
}

.page-head {
  background: var(--navy);
  color: #fff;
  /* 导航栏是绝对定位、脱离文档流的（top:18px，高 58px），
     这里必须留出它的高度，否则标题会被压在导航下面。
     只写 padding-block，避免简写把 .wrap 的左右内边距一起覆盖掉。 */
  padding-block: 104px 54px;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head .updated {
  margin: 12px 0 0;
  font-size: 0.92rem;
  opacity: 0.75;
}

.prose {
  max-width: 760px;
  margin-inline: auto;
  padding: 48px 24px 72px;
}
.prose .intro p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--navy);
}
.prose section { margin-top: 40px; }
.prose h2 {
  margin: 0 0 14px;
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.prose p { margin: 0 0 14px; line-height: 1.72; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; line-height: 1.68; }
.prose li::marker { color: var(--line-blue); }

/* note 块：政策里的补充说明 */
.prose .note {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-left: 3px solid var(--line-blue);
  background: rgba(58, 111, 176, 0.07);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* 待填写的占位标记，视觉上刻意扎眼，免得上线时漏掉 */
.todo {
  background: #ffe9a8;
  color: #6b4b00;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin-inline: auto; padding: 48px 24px 72px; }

.faq-item {
  border: 1px solid rgba(22, 38, 94, 0.14);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.03rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 14px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '';
  margin-left: auto;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--line-blue);
  border-bottom: 2px solid var(--line-blue);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
  flex: none;
}
.faq-item[open] > summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}
.faq-item > summary:hover { background: rgba(58, 111, 176, 0.06); }
.faq-answer {
  padding: 0 22px 20px;
  line-height: 1.7;
  color: var(--navy-soft);
}

/* ============================================================
   语言选择页（根路径）
   ============================================================ */
.picker {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  /* url() 相对样式表解析，不是相对文档 —— 这里必须和 .hero 一样用 ../ */
  background-image: url('../img/hero.jpg');
  background-size: cover;
  background-position: 62% center;
  position: relative;
  padding: 24px;
}
.picker::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(238, 244, 250, 0.82);
}
.picker-inner { position: relative; }
.picker h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.picker p { margin: 0 0 32px; color: var(--navy-soft); }
.picker-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.picker-links a {
  min-width: 150px;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: transform 0.15s ease;
}
.picker-links a:hover { transform: translateY(-2px); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 899px) {
  .cards { grid-template-columns: 1fr; gap: 18px; max-width: 460px; margin-inline: auto; }
  .hero { min-height: 440px; }
  .hero-copy { padding-block: 84px 44px; }
  /* 窄屏时照片横向被裁得厉害，蒙版改成整体提亮，保证文字始终可读 */
  .hero::before {
    background: linear-gradient(
      170deg,
      rgba(238, 244, 250, 0.86) 0%,
      rgba(238, 244, 250, 0.70) 55%,
      rgba(238, 244, 250, 0.40) 100%
    );
  }
}

@media (max-width: 899px) {
  /* 窄屏时问号可能落在靠左位置，居中的浮层会溢出屏幕左侧，
     改成从按钮左沿向右展开 */
  .hint-bubble {
    left: 0;
    translate: 0 0;
  }
}

@media (max-width: 520px) {
  .wrap { padding-inline: 18px; }
  .soon { height: 48px; padding: 0 20px; font-size: 0.95rem; }
  .brand { font-size: 18px; }
}
