/* 版式照抄 getsubo.app 的计算样式（字号、行高、字重、字距、间距），强调色按品牌规范用黑白灰。 */

@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2f0ee;
  --card: #fff;
  --ink: rgb(0 0 0 / 0.94);
  --muted: rgb(0 0 0 / 0.6);
  --line: rgb(0 0 0 / 0.08);
  --radius-card: 52px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem/1.2 "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans CN", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subo 每个文字元素按自身字号取 -0.01em，不能在 body 上设一次让子元素继承 px 值 */
body * { letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.wrap { width: min(960px, 100% - 48px); margin-inline: auto; }

/* Apple 的图标轮廓是连续曲率的超椭圆，不是圆角矩形 */
.app-icon { -webkit-mask: url("/img/squircle.svg") center / 100% 100% no-repeat; mask: url("/img/squircle.svg") center / 100% 100% no-repeat; }

/* 仿商店徽章的「即将上线」标签，不可点 */
.soon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  height: 52px;
  padding: 0 20px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: start;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.3);
}

.soon small { font-size: 0.75rem; font-weight: 500; letter-spacing: 0; color: rgb(255 255 255 / 0.75); }

/* 真机外框来自 fastlane/frameit-frames（iPhone 17 Pro 深蓝、iPad Pro 12.9 深空灰），屏幕区按它的 offsets.json 用百分比定位，外框叠在截图上面 */
/* 容器按外框图的长宽比撑开，截图绝对定位到屏幕区（百分比相对容器自身，不像 padding 那样相对父级），截图比开口每边大 0.2%，多出的部分压在边框下面，开口不居中（iPad 左 102px、右 96px）或取整时也不会漏出底色。圆角照外框屏幕开口的圆角裁掉截图直角。投影打在截图上而不是用 filter：Safari 给 filter 图层会在设备四周画出一块浅色矩形 */
.phone, .tablet { position: relative; }
.phone::after, .tablet::after { content: ""; position: absolute; inset: 0; background: var(--frame) center / 100% 100% no-repeat; pointer-events: none; }
.phone img, .tablet img { position: absolute; left: var(--sx); top: var(--sy); width: var(--sw); height: var(--sh); border-radius: var(--sr); box-shadow: var(--shadow); }
.phone { --frame: url("/img/frame-iphone.webp"); --sx: 5.2%; --sy: 2.3%; --sw: 89.6%; --sh: 95.4%; --sr: 16.6% / 7.6%; aspect-ratio: 1350 / 2760; --shadow: 0 40px 80px rgb(0 0 0 / 0.22); }
.phone.landscape { --frame: url("/img/frame-iphone-landscape.webp"); --sx: 2.3%; --sy: 5.2%; --sw: 95.4%; --sh: 89.6%; --sr: 7.6% / 16.6%; aspect-ratio: 2760 / 1350; --shadow: 0 20px 40px rgb(0 0 0 / 0.15); }
.tablet { --frame: url("/img/frame-ipad.webp"); --sx: 3.3%; --sy: 4.3%; --sw: 93.6%; --sh: 91.6%; --sr: 1.02% / 1.37%; aspect-ratio: 2930 / 2245; --shadow: 0 20px 40px rgb(0 0 0 / 0.15); }

/* 首屏 */
.hero {
  /* 照 Subo：首屏底色延伸到黑色横幅后面，在横幅高度内渐变成页面底色 */
  background: linear-gradient(180deg, transparent calc(100% - 420px), var(--bg) 100%), #d9dadb url("/img/bg-hero.webp") center top / cover;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 1130px;
  padding-bottom: 230px;
}

.hero .copy { grid-column: 2; grid-row: 1; }
.hero .phone { grid-column: 1; grid-row: 1; width: 300px; justify-self: center; margin-top: 160px; }

.brand { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; line-height: 1.2; font-weight: 700; }

.hero h1 { margin-top: 28px; font-size: 2.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.03em; }
.hero h1 span { color: rgb(0 0 0 / 0.5); letter-spacing: inherit; }
.hero p span { display: inline-block; }
.hero p { margin-top: 20px; max-width: 500px; color: rgb(0 0 0 / 0.7); }
.hero .soon { margin-top: 32px; }

/* 黑色横幅，压在首屏底边上 */
.band {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  width: min(1130px, 100% - 48px);
  margin: -230px auto 0;
  padding: 60px 85px;
  border-radius: var(--radius-card);
  background: #000;
  color: #fff;
}

/* 图标高度不一，统一放进同一高度的行里底对齐，标题才在同一条线上 */
.band > div { display: grid; grid-template-rows: 37px auto auto; align-content: start; }
.band svg { align-self: end; margin-bottom: 14px; }
.band h2 { font-size: 1.4375rem; line-height: 1.2; font-weight: 600; }
.band p { margin-top: 6px; max-width: 250px; color: rgb(255 255 255 / 0.6); }

/* 功能卡片 */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 64px; }

/* 底图在文字区压成纯色，只在设备周围透出 */
.card { --fill: var(--card); display: flex; flex-direction: column; border-radius: var(--radius-card); background: linear-gradient(180deg, var(--fill) 18%, transparent 55%), var(--fill) var(--mesh, none) center bottom / cover; overflow: hidden; }
.card .text { padding: 32px 32px 0; }
.card h2 { font-size: 1.375rem; line-height: 1.2; font-weight: 600; }
.card p { margin-top: 6px; color: rgb(0 0 0 / 0.55); }
.card .phone { width: 300px; margin: 44px auto -330px; }
/* 宽度写死，不靠 flex 拉伸：WebKit 对拉伸出来的宽度套 aspect-ratio 时会漏掉左右外边距 */
.card .phone.landscape { width: calc(100% - 64px); margin: 40px auto 44px; }
.card.dark { --fill: #000; color: #fff; }
.card.dark p { color: rgb(255 255 255 / 0.55); }
.card.wide { grid-column: 1 / -1; }
.card.wide p { max-width: 406px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-block: auto; padding: 32px 32px 44px; }
.chips span { padding: 10px 16px; border-radius: 99px; background: var(--bg); font-size: 0.875rem; font-weight: 600; }
.card.dark .chips span { background: rgb(255 255 255 / 0.12); }

.tablet { margin: 44px 64px -150px; }
.card .text:has(+ .tablet.small) { padding-bottom: 32px; }
.tablet.small { margin: auto 32px -60px; }

/* 居中文段 */
.section { padding-top: 140px; text-align: center; }
.section h2 { font-size: 2rem; line-height: 1.2; font-weight: 700; }
.section h2 span { color: rgb(0 0 0 / 0.5); }
.section .lead { max-width: 540px; margin: 20px auto 0; font-size: 1.125rem; color: rgb(0 0 0 / 0.55); }
.section .soon { margin-top: 40px; }

.checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; margin: 32px 0 0; padding: 0; list-style: none; font-size: 0.875rem; letter-spacing: 0; }
.checks li { letter-spacing: normal; }
.checks li::before { content: "✓"; margin-inline-end: 8px; }

/* 常见问题：原生 details */
.faq { width: min(550px, 100%); margin: 40px auto 0; text-align: start; }
.faq details { margin-top: 12px; border-radius: 28px; background: var(--card); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 50px; padding: 12px 16px; cursor: pointer; font-size: 0.9375rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border: solid rgb(0 0 0 / 0.55); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq details p { padding: 0 16px 16px; font-size: 0.9375rem; line-height: 1.4; color: rgb(0 0 0 / 0.55); }

.closing { padding-bottom: 160px; }

/* 页尾 */
footer { background: #000; color: #fff; font-size: 0.9375rem; line-height: 1; }
footer .wrap { display: grid; grid-template-columns: 1.6fr 0.8fr 1.3fr 1.4fr; gap: 32px; padding: 96px 0 120px; }
footer h2 { margin: 0; font-size: inherit; font-weight: 500; }
footer a, footer p { display: block; margin-top: 10px; color: #999; text-decoration: none; }
footer a { color: rgb(255 255 255 / 0.6); }
footer a[href^="mailto:"] { white-space: nowrap; }
@media (hover: hover) { footer a:hover { color: #fff; } }

/* 文档页 */
.doc-header { width: min(760px, 100% - 48px); padding: 28px 0; }
.doc-header a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.doc { width: min(760px, 100% - 48px); margin: 0 auto 120px; padding: 56px; border-radius: var(--radius-card); background: var(--card); }
.doc h1 { font-size: 2.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.03em; }
.doc h2 { margin: 44px 0 12px; font-size: 1.375rem; line-height: 1.2; font-weight: 600; }
.doc p, .doc li { line-height: 1.6; color: rgb(0 0 0 / 0.7); }
.doc p + p { margin-top: 12px; }
.doc .updated { margin: 8px 0 32px; color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.875rem; line-height: 1.4; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc a { text-underline-offset: 0.2em; }

@media (max-width: 809px) {
  .hero h1 { font-size: 2.3125rem; }
  .band h2 { font-size: 1.5rem; }
  .band p { line-height: 1.4; max-width: none; }
  .card { border-radius: 46px; }
  .card h2 { font-size: 1.25rem; }
  .section h2 { font-size: 2.25rem; }
  .checks { flex-direction: column; align-items: center; font-size: 1rem; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 56px; padding-top: 64px; padding-bottom: 0; text-align: center; }
  .hero .copy, .hero .phone { grid-column: 1; grid-row: auto; }
  .hero .phone { width: 280px; margin: 0 auto -200px; }
  .brand { flex-direction: column; }
  .brand span { display: none; }
  .hero p { margin-inline: auto; }
  .hero p span { display: inline; }
  .band { grid-template-columns: minmax(0, 1fr); width: 100%; margin-top: 0; padding: 82px 32px; gap: 56px; border-radius: 0; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card .text { padding: 20px 20px 0; }
  .card .phone { width: 260px; }
  .tablet { margin: 32px 24px -16px; }
  .chips { padding: 24px 20px 28px; }
  footer .wrap { grid-template-columns: 1fr 1fr; padding: 64px 0 80px; }
  footer .wrap > :first-child, footer .wrap > :nth-child(n+3) { grid-column: 1 / -1; }
  .doc { padding: 32px 24px; border-radius: 32px; }
}
