/* mypacino.com 官网共用样式。页面主体沿用设计稿里的行内样式，这里只放行内样式做不到的：
   自托管字体（Google Fonts 在国内打不开，外链会卡住整页渲染）、焦点框、常见问题折叠、窄屏规则。 */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/site/fonts/archivo-latin-ext.woff2) format("woff2");
  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;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/site/fonts/archivo-latin.woff2) format("woff2");
  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: "Jost";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(/site/fonts/jost-latin-ext.woff2) format("woff2");
  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;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(/site/fonts/jost-latin.woff2) format("woff2");
  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;
}

/* 矮屏整体等比缩小（相当于浏览器缩放）：版面按约 1000px 高的窗口设计，笔记本那种矮窗口
   （去掉浏览器栏只剩 600 多）里一屏装不下几样东西。页面里的尺寸都写成「N × 单位」：
   --z 管所有尺寸和大字号，窗口越矮缩得越多，最多缩到 0.67（用户在 67% 缩放时觉得合适）；
   --zt 管正文级字号（<22px），最多缩到 0.8、且不小于 11px，免得小字看不清。
   手机宽度下两个单位恒为 1px，版面和原来一模一样。新加的尺寸也照这个写。 */
:root {
  --z: 1px;
  --zt: 1px;
}
@media (min-width: 761px) {
  :root {
    --z: clamp(0.67px, calc(100vh / 1000), 1px);
    --zt: clamp(0.8px, calc(100vh / 1000), 1px);
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: #f6f5f3;
}
body {
  margin: 0;
  background: #f6f5f3;
  color: #1f1d1b;
}
img,
video {
  max-width: 100%;
}
[id] {
  scroll-margin-top: calc(84 * var(--z));
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
/* 桌面上字号和段落宽度会跟着窗口缩，折行跟原稿不完全一样，避免末行只剩一两个字 */
@media (min-width: 761px) {
  p {
    text-wrap: pretty;
  }
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid #b06a1f;
  outline-offset: 2px;
  border-radius: 10px;
}
a:hover {
  opacity: 0.86;
}

/* 常见问题：原生 <details>，没有 JS 也能展开 */
.faq-item > summary {
  list-style: none;
}
.faq-item > summary::-webkit-details-marker {
  display: none;
}
.faq-icon {
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

/* App Store 还没上架：<html data-appstore="soon"> 时显示「即将上架」，去掉这个属性就换回下载入口 */
html[data-appstore="soon"] .appstore-live {
  display: none !important;
}
html:not([data-appstore="soon"]) .appstore-soon {
  display: none !important;
}
.appstore-soon {
  opacity: 0.62;
}

/* 顶栏：链接放不下就整组收起（中文能逐字折行，不收会只剩半个「功」字），手机上只留标志、兑换、下载 */
.nav-links > a {
  white-space: nowrap;
}

/* 首屏下面那一排收词方式：按文字宽度排、不拆字，放不下就整齐地 3 个一行（手机 2 个一行），不画格子线 */
.ways {
  list-style: none;
  margin: 0;
  padding: calc(26 * var(--z)) clamp(calc(16 * var(--z)), 4vw, calc(40 * var(--z)));
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: space-between;
  gap: calc(20 * var(--z)) calc(24 * var(--z));
}
.ways > li {
  display: flex;
  gap: calc(12 * var(--z));
  align-items: flex-start;
  white-space: nowrap;
}
@media (max-width: 1099px) {
  .ways {
    grid-template-columns: repeat(3, auto);
  }
}
@media (max-width: 760px) {
  .ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ways > li {
    white-space: normal;
  }
}
@media (max-width: 360px) {
  .ways {
    column-gap: 12px;
  }
  .ways > li {
    gap: 8px;
  }
}

/* 首屏的贴纸和小卡只在宽屏出现，窄屏手机太小，会压住截图 */
@media (max-width: 760px) {
  .hero-accent {
    display: none !important;
  }
  .nav-links {
    display: none !important;
  }
  .nav-actions {
    margin-left: auto;
  }
}
@media (max-width: 380px) {
  nav[aria-label="主导航"] {
    gap: 8px !important;
  }
  .nav-actions a:first-child {
    padding: 0 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .faq-icon {
    transition: none;
  }
}
