/* 全都录 TakeAll · 首页（22 号方案）。build.py 原样复制到 site/css/home.css。
   只用访客系统自带的字体，不引用任何外部资源；没有行内样式，符合 site/_headers 的 CSP。
   配色跟图标「同框 · 满版」：上黄下黑，手机像图标里的自拍窗一样骑在分界线上。
   手机图是苹果官方外框（拍板 3），原样显示：这里不给它加阴影、圆角、背景，也不让任何东西压在上面。 */

:root {
  color-scheme: light dark;
  --brand: #FFD60A;               /* 图标、App Store 截图的黄 */
  --on-brand: #111113;
  --on-brand-muted: rgba(17, 17, 19, .72);
  --stage: #111113;               /* 展示区：浅色、深色模式下都是深色，像取景器 */
  --on-stage: #F2F2F3;
  --on-stage-muted: #A1A1A8;
  --bg: #FFFFFF;
  --bg-soft: #F4F4F5;
  --fg: #111113;
  --muted: #5D5D63;
  --line: #E4E4E7;
  --card: #FFFFFF;
  --link: #8A6A00;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  /* 首屏正中那台手机（外框图 1470×3000，高 = 宽 × 2.0408）。改这里也要改 home.py 的 HERO_SIZES */
  --dev-w: min(78vw, 330px);
  --dev-h: calc(var(--dev-w) * 2.0408);
  --dev-gap: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #F5C800;             /* 图标深色外观的黄：晚上没那么刺眼 */
    --stage: #000000;
    --bg: #0E0E10;
    --bg-soft: #161618;
    --fg: #F2F2F3;
    --muted: #A1A1A8;
    --line: #2A2A2E;
    --card: #1C1C1F;
    --link: #FFD60A;
  }
}

/* 宽屏首屏是三台手机并排：250 + 2 × 210 + 2 × 20 = 710，760 宽的屏放得下；1040 起 330 + 2 × 277 + 2 × 28 = 940 */
@media (min-width: 760px) { :root { --dev-w: 250px; } }
@media (min-width: 1040px) { :root { --dev-w: 330px; --dev-gap: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; }
h1, h2, h3 { text-wrap: balance; }
:lang(zh) :is(h1, h2, h3), :lang(ja) :is(h1, h2, h3) { text-wrap: wrap; }
/* 中文的标题和导语只在标点、空格处换行，不把「拍照」这种词拆成两行；实在放不下再随便断，不会撑破屏幕 */
:lang(zh) :is(h1, h2, h3, .lead, .label, .sub, .cta-note) { word-break: keep-all; overflow-wrap: anywhere; }
/* 日语按词组换行（支持的浏览器）；韩语按空格换行（韩文的习惯） */
:lang(ja) :is(h1, h2, h3, .lead, .section-lead) { word-break: auto-phrase; }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
/* 长单词（德语、法语）在窄格子里断字，不撑破 */
:lang(de) :is(.label, .sub, figcaption, .checks li, .buy p), :lang(fr) :is(.label, .sub) { hyphens: auto; }
.label, .sub, .chip, .plan, .facts li, .buy p { overflow-wrap: anywhere; }
p { margin: 0; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }
#main:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.narrow { max-width: 760px; }
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 10px;
  background: var(--on-brand); color: var(--brand); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* 语言提示：浏览器语言是 9 种之一、又和这一页不一样时，home.js 才把对应那一条显示出来（不跳转，不存任何东西） */
.lang-hint { background: var(--on-brand); color: #F2F2F3; font-size: 15px; }
.lang-hint .wrap { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.lang-hint a { color: var(--brand); font-weight: 600; }
.lang-hint button {
  min-width: 44px; min-height: 44px; border: 0; background: none; color: inherit; font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}

/* 顶栏：在黄底上 */
.top { background: var(--brand); color: var(--on-brand); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand img { width: 32px; height: 32px; flex: none; border-radius: 22.4%; box-shadow: 0 0 0 1px rgba(17, 17, 19, .14); }

/* 语言菜单：<details>/<summary>，不用脚本就能开合；面板浮在首屏上面，浅色深色都是实底 */
.lang-menu { position: relative; z-index: 30; flex: none; }
.lang-menu summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid rgba(17, 17, 19, .28); color: var(--on-brand); font-size: 15px; font-weight: 600; white-space: nowrap;
  cursor: pointer; list-style: none; -webkit-user-select: none; user-select: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: rgba(17, 17, 19, .08); }
.lang-menu summary svg { flex: none; }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; margin: 0; padding: 6px; list-style: none;
  background: var(--card); color: var(--fg); border-radius: 16px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 44px rgba(0, 0, 0, .24);
}
.lang-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 14px;
  border-radius: 10px; color: var(--fg); font-size: 16px; text-decoration: none;
}
.lang-list a:hover { background: var(--bg-soft); }
.lang-list a:focus-visible { outline-offset: -3px; }
.lang-list a[aria-current="page"] { font-weight: 700; }
.lang-list a[aria-current="page"]::after { content: "✓"; content: "✓" / ""; color: var(--link); }
/* 320 宽的屏上放不下地球图标：只留语言名和箭头 */
@media (max-width: 359px) { .lang-menu .globe { display: none; } .lang-menu summary { padding: 0 12px; } }

/* 首屏：黄底，手机的下半落到下面的深色展示区 */
.hero { display: flow-root; background: var(--brand); color: var(--on-brand); text-align: center; padding-top: 20px; }
.eyebrow { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--on-brand-muted); }
.hero h1 { margin: 10px 0 0; font-size: clamp(36px, 10.5vw, 84px); line-height: 1.08; font-weight: 800; letter-spacing: -.01em; }
.hero h1 span { display: block; }
.hero h1:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) { letter-spacing: -.025em; }
/* 法、西、意、德的口号长：小一号，免得挤成三四行 */
.hero h1.long { font-size: clamp(32px, 8.4vw, 64px); }
.lead { max-width: 23em; margin: 18px auto 0; font-size: clamp(17px, 4.6vw, 22px); line-height: 1.5; font-weight: 500; }
.lead:lang(en) { max-width: 28em; }
.cta { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* 上架前的「即将登陆 App Store」：普通的字，不做成像苹果徽章的样子（苹果营销规范） */
.soon {
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 48px; padding: 10px 22px;
  border-radius: 999px; background: var(--on-brand); color: #F2F2F3; font-size: 17px; font-weight: 700; line-height: 1.3; text-align: center;
}
.cta-note { font-size: 15px; color: var(--on-brand-muted); }

.devices {
  position: relative; z-index: 1;
  display: flex; justify-content: center; align-items: center; gap: var(--dev-gap);
  margin: 40px auto calc(var(--dev-h) / -2);
}
/* 苹果官方外框：原样显示，不加阴影、倒影、圆角、背景（图片四角本身是透明的） */
.device { width: var(--dev-w); flex: none; }
.device.side { display: none; width: calc(var(--dev-w) * .84); }
@media (min-width: 760px) { .device.side { display: block; } }

/* 深色展示区：三个机位 + 场景 */
.stage { background: var(--stage); color: var(--on-stage); padding: calc(var(--dev-h) / 2 + 72px) 0 80px; }
.stage .section-lead, .stage .fine { color: var(--on-stage-muted); }
.stage section + section { margin-top: 96px; }

.section-title { margin: 0; text-align: center; font-size: clamp(28px, 7.2vw, 48px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.section-title:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) { letter-spacing: -.02em; }
.section-title span { display: inline-block; }
.section-lead { max-width: 34em; margin: 16px auto 0; text-align: center; color: var(--muted); font-size: clamp(17px, 4.3vw, 20px); line-height: 1.55; }
.section-lead:lang(zh) { max-width: 26em; }
.fine { max-width: 46em; margin: 28px auto 0; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* 全景 + 特写 + 你 = 一条成片（照片卡片，不是设备图，不套外框） */
.equation { list-style: none; padding: 0; margin: 44px auto 0; max-width: 980px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 22px; align-items: start; }
.equation li { position: relative; text-align: center; }
.equation img { width: 100%; border-radius: 14px; }
.equation .angle:not(:first-child)::before,
.equation .result::before {
  position: absolute; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-size: 18px; font-weight: 800; line-height: 1;
}
.equation .angle:not(:first-child)::before { content: "+"; content: "+" / ""; left: -24px; top: 34%; }
.equation .result { grid-column: 1 / -1; justify-self: center; width: min(62vw, 270px); }
.equation .result::before { content: "="; content: "=" / ""; left: 50%; top: -31px; transform: translateX(-50%); }
.equation .result img { border-radius: 18px; }
.label { margin-top: 10px; font-weight: 700; font-size: 16px; line-height: 1.35; }
.label .zoom { color: var(--brand); font-weight: 700; }
.sub { margin-top: 2px; color: var(--on-stage-muted); font-size: 14px; line-height: 1.45; }
@media (min-width: 900px) {
  .equation { grid-template-columns: 1fr 1fr 1fr 1.1fr; gap: 40px; align-items: center; }
  .equation .angle:not(:first-child)::before { left: -33px; top: 38%; }
  .equation .result { grid-column: auto; width: 100%; }
  .equation .result::before { left: -33px; top: 42%; transform: none; }
}

/* 场景：四张成片示意（不是设备图，不套外框） */
.scenes { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
.scenes figure { margin: 0; }
.scenes img { width: 100%; border-radius: 18px; }
.scenes figcaption { margin-top: 12px; font-size: 15px; line-height: 1.45; color: var(--on-stage-muted); }
.scenes figcaption strong { display: block; color: var(--on-stage); font-size: 17px; margin-bottom: 2px; }
.chip {
  display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 12px; line-height: 1.4;
  background: rgba(255, 214, 10, .14); color: var(--brand); font-size: 13px; font-weight: 600;
}
@media (min-width: 900px) { .scenes { grid-template-columns: repeat(4, 1fr); gap: 28px; } }

/* 功能：手机 + 文字，宽屏左右交替 */
.features { padding: 88px 0 24px; }
.feature { display: grid; gap: 28px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { margin-top: 40px; }
.feature-device { justify-self: center; width: min(66vw, 290px); }
.feature h3 { margin: 0; font-size: clamp(23px, 5.6vw, 32px); line-height: 1.25; font-weight: 800; }
.feature p, .feature li { color: var(--muted); font-size: 17px; line-height: 1.6; }
.feature p { margin-top: 12px; }
.feature ul { margin: 14px 0 0; padding-left: 1.15em; }
.feature li + li { margin-top: 8px; }
.feature li strong { color: var(--fg); }
.feature .note { margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: var(--bg-soft); font-size: 15px; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; padding: 64px 0; }
  .feature:nth-of-type(even) .feature-device { order: 2; }
  .feature-device { width: 330px; }
}

/* 免费 / Pro */
.plans { background: var(--bg-soft); padding: 88px 0; }
.plan-grid { display: grid; gap: 18px; margin: 40px auto 0; max-width: 900px; }
@media (min-width: 760px) { .plan-grid { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px 24px; }
.plan h3 { margin: 0; font-size: 24px; line-height: 1.2; }
.plan-pro { border: 2px solid var(--brand); }
.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li { position: relative; padding-left: 30px; line-height: 1.5; }
.checks li + li { margin-top: 10px; }
/* 勾：纯 CSS 画的，不用图片也不用字体图标 */
.checks li::before {
  content: ""; position: absolute; left: 4px; top: .32em; width: 7px; height: 12px;
  border: solid var(--fg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.plan-pro .checks li::before { border-color: var(--link); }
.buy { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.buy p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.buy strong { display: block; color: var(--fg); font-size: 16px; }

/* 隐私 */
.privacy { padding: 88px 0; text-align: center; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.facts li { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.privacy .more { margin-top: 20px; }
.privacy .more a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 600; }

/* 常见问题：details 不用脚本就能展开 */
.faq { padding: 0 0 88px; }
.faq-list { margin-top: 32px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; display: block; min-height: 44px; padding: 18px 44px 18px 0;
  font-weight: 650; font-size: 18px; line-height: 1.4; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; content: "−" / ""; }
.faq details p { padding: 0 0 20px; color: var(--muted); }

/* 结尾：再回到黄色 */
.outro { background: var(--brand); color: var(--on-brand); text-align: center; padding: 72px 0; }
.outro img { width: 88px; height: 88px; margin: 0 auto; border-radius: 22.4%; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.outro h2 { margin: 22px 0 0; font-size: clamp(26px, 6.6vw, 44px); line-height: 1.2; font-weight: 800; }
.outro .soon { margin-top: 22px; }

/* 页脚 */
.foot { padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; line-height: 1.6; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0 0 10px -10px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); }
.foot p + p { margin-top: 6px; }

@media (prefers-reduced-motion: no-preference) {
  .lang-menu summary { transition: background-color .15s ease; }
  .lang-menu .chev { transition: transform .15s ease; }
}
