/* ==========================================================================
   EzPOS 官网首页样式
   版式系统按 Chowbus 官网 1:1 还原（字号阶梯 / 间距 / 圆角 / 断点），
   配色换成 EzPOS 自己的。想换主色只改 :root 里的 --brand。
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  color-scheme: light dark;

  /* 深色面：按钮/横幅/页脚的底色，浅色深色两个主题都不变 */
  --ink: #1d1b2e;
  --ink-hover: #32343a;
  --ink-active: #43464d;
  --white: #fff;

  --brand: #ff6b6b;         /* EzPOS 主色 */
  --brand-strong: #ee5a24;  /* 主色深一档，用于 hover */

  /* 会跟随主题变的：正文色 / 页面底 / 卡片底 / 浅灰面 */
  --fg: #1d1b2e;
  --page: #ffffff;
  --card: #ffffff;
  --soft: #f5f5f5;
  --softer: #fafafa;
  --hero-bg: #e9ebec;
  --muted: #92929f;
  --line: rgba(29, 27, 46, .06);

  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 72px;
  --bar-h: 0px;             /* 手机端底部操作条高度，JS 不用管，媒体查询里设 */

  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC',
          Arial, sans-serif;
}

/* 深色模式：只翻转「会变的」那几个 token，深色面保持原样 */
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e9e9f0;
    --page: #131220;
    --card: #1c1b2a;
    --soft: #22212f;
    --softer: #1a1927;
    --hero-bg: #1a1927;
    --muted: #8d8da0;
    --line: rgba(255, 255, 255, .08);
  }
  /* logo 是深色描边图，深色底上会糊掉，反白处理（页脚一直是这么做的） */
  .nav-logo img { filter: brightness(0) invert(1); }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 手机上滑到头别把整个页面拽动 */
  overscroll-behavior-y: none;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* 去掉安卓/iOS 点击时的灰色方块，并消除 300ms 双击缩放延迟 */
a, button, input, textarea, select, [role='button'] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
img { display: block; max-width: 100%; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, h5, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 流体字号 ----------
   clamp(最小, 随视口线性, 最大)：375px 到 1440px 之间连续放大，
   不再像原来那样在 767px 断点上「啪」地跳一下。 */
.t-h1    { font-size: clamp(3rem, 2.47rem + 2.25vw, 4.5rem);       line-height: 1.18; font-weight: 800; letter-spacing: -.02em; }
.t-h2    { font-size: clamp(2.375rem, 1.80rem + 2.44vw, 4rem);     line-height: 1.18; font-weight: 800; letter-spacing: -.02em; }
.t-h3    { font-size: clamp(2rem, 1.65rem + 1.50vw, 3rem);         line-height: 1.20; font-weight: 800; letter-spacing: -.015em; }
.t-h4    { font-size: clamp(1.75rem, 1.53rem + 0.94vw, 2.375rem);  line-height: 1.26; font-weight: 800; letter-spacing: -.015em; }
.t-h5    { font-size: clamp(1.125rem, 0.99rem + 0.56vw, 1.5rem);   line-height: 1.30; font-weight: 700; }
.t-sub   { font-size: clamp(1.125rem, 0.99rem + 0.56vw, 1.5rem);   line-height: 1.30; font-weight: 400; }
.t-20    { font-size: clamp(1rem, 0.91rem + 0.38vw, 1.25rem);      line-height: 1.55; }
.t-18    { font-size: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);     line-height: 1.55; }

/* 标题断行更好看：避免最后一行只剩一两个字 */
.t-h1, .t-h2, .t-h3, .t-h4 { text-wrap: balance; }
p, .hero-desc, .switch-item-desc { text-wrap: pretty; }
.t-16    { font-size: 1rem;     line-height: 1.5rem; }
.t-16-md { font-size: 1rem;     line-height: 1.5rem;   font-weight: 600; }
.t-16-bd { font-size: 1rem;     line-height: 1.5rem;   font-weight: 700; }

/* 锚点跳转时给吸顶栏留位置，否则标题会被盖住 */
#top, #switch, #hardware, #stories, #demo { scroll-margin-top: calc(var(--nav-h) + 1rem); }

/* ---------- 统一 section 内边距 ---------- */
.section { padding: 7.5rem 5rem; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: .625rem 1.625rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.btn-lg { padding: 1rem 1.5rem; font-size: 1.5rem; line-height: 1.75rem; }

.btn-primary { background: var(--ink); color: var(--white); border: 1px solid var(--ink); }
.btn-primary:hover  { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn-primary:active { background: var(--ink-active); }

.btn-brand { background: var(--brand); color: var(--white); border: 1px solid var(--brand); }
.btn-brand:hover { background: var(--brand-strong); border-color: var(--brand-strong); }

.btn-soft { background: var(--soft); color: var(--fg); min-width: 8.75rem; }
.btn-soft:hover { background: color-mix(in srgb, var(--soft) 85%, var(--fg)); }

.btn-white { background: var(--white); color: #1d1b2e; }
.btn-white:hover { background: #ececec; }

/* 红色文字链接 “了解更多 ›” */
.link-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand-strong);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
}
.link-brand svg { width: 16px; height: 16px; transition: transform .2s; }
.link-brand:hover svg { transform: translateX(3px); }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  height: 100%;
  padding: 0 2.3125rem;
}
.nav-left  { display: flex; align-items: center; gap: 20px; height: 100%; }
.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-logo { display: flex; align-items: center; gap: .5rem; }
.nav-logo img { width: 38px; height: 38px; object-fit: contain; }
.nav-logo span { font-size: 1.625rem; font-weight: 800; letter-spacing: -.02em; }

.nav-menu { display: flex; align-items: center; gap: 2px; height: 100%; }
.nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 5px 12px;
  font-weight: 700;
  letter-spacing: .25px;
  transition: color .2s;
}
.nav-link:hover { color: var(--muted); }

/* 语言切换 */
.lang { position: relative; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  display: none;
}
.lang.is-open .lang-menu { display: block; }
.lang-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  border-radius: 6px;
  font-size: 1rem;
}
.lang-menu button:hover { background: var(--soft); }
.lang-menu button[aria-current='true'] { color: var(--brand-strong); font-weight: 700; }

/* ==========================================================================
   首屏轮播
   ========================================================================== */
.hero { position: relative; overflow: hidden; }
.hero-track { display: flex; transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
.hero-slide { flex: 0 0 100%; min-width: 100%; }

.hero-panel {
  position: relative;
  height: 36.875rem;
  padding: 0 5rem;
  background: var(--hero-bg);
  overflow: hidden;
}
.hero-panel-inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  width: 38rem;   /* 比 Chowbus 的 35.375rem 略宽：中文字宽，标题才不折行 */
}
.hero-eyebrow { margin: 0; }
.hero-title { margin: 0; }
.hero-desc { opacity: .65; max-width: 32rem; }

.hero-media {
  position: absolute;
  top: 0;
  right: -4.5rem;   /* 和 Chowbus 一样，图向右出血一点 */
  bottom: 0;
  left: 52%;        /* 起点跟着视口走，保证文字永远不压在照片上 */
  z-index: 1;
  overflow: hidden;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* 图片左侧渐隐，避免压到文字 */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 14rem;
  background: linear-gradient(90deg,
    var(--hero-bg) 0%,
    color-mix(in srgb, var(--hero-bg) 60%, transparent) 55%,
    color-mix(in srgb, var(--hero-bg) 0%, transparent) 100%);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: .75rem;
  z-index: 3;
  display: flex;
  gap: 0;
  transform: translateX(-50%);
}
/* 视觉上还是一根小横条，但整个按钮 44×44 都能点中 */
.hero-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
}
.hero-dot::before {
  content: '';
  display: block;
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--fg) 25%, transparent);
  transition: background-color .3s, width .3s;
}
.hero-dot.is-active::before { width: 36px; background: var(--fg); }

/* ==========================================================================
   因店制宜（左列表 + 右配图）
   ========================================================================== */
.switch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}
.switch-title { text-align: center; }
.switch-card { display: flex; align-items: center; gap: 24px; width: 100%; }

.switch-left {
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
  width: 30.125rem;
  min-height: 37.375rem;
  padding: 2.5rem 1.5rem;
  background: var(--soft);
  border-radius: var(--radius);
}
.switch-item { position: relative; display: flex; flex-direction: column; gap: 4px; padding-left: 16px; }
.switch-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s ease;
}
.switch-item.is-active::before { transform: scaleY(1); }
.switch-item-title { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; cursor: pointer; }
.switch-item.is-active .switch-item-title { color: var(--fg); }
.switch-item:not(.is-active) .switch-item-title { color: var(--muted); }
.switch-item-body { display: none; flex-direction: column; gap: 12px; overflow: hidden; }
.switch-item.is-active .switch-item-body { display: flex; }
.switch-item-desc { font-size: 1.0625rem; line-height: 1.6; color: var(--fg); opacity: .75; }

.switch-right {
  position: relative;
  flex: 1;
  height: 37.375rem;
  overflow: hidden;
  border-radius: var(--radius);
}
.switch-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity .4s ease;
}
.switch-img.is-active { opacity: 1; }

/* ==========================================================================
   深色横幅
   ========================================================================== */
.band-wrap { padding: 0 5rem; }
.band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 63.25rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 3rem 1rem;
  background: var(--ink);
  border-radius: var(--radius);
  text-align: center;
}
.band-title { color: var(--white); }
.band-desc  { color: rgba(255, 255, 255, .8); }
.band .btn {
  width: 20.25rem;
  max-width: 100%;
  padding: 1.25rem .625rem;
  font-size: 1.5rem;
  line-height: 1.75rem;
  font-weight: 400;
}

/* ==========================================================================
   客户口碑滑块
   ========================================================================== */
.stories { display: flex; flex-direction: column; gap: 4rem; overflow: hidden; }

.slider { position: relative; }

/* 用原生横向滚动 + scroll-snap，而不是 JS 挪 transform。
   这样手机上才有惯性、回弹、跟手 —— 和原生 App 的滑动一致。 */
.slider-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;              /* Firefox */
  -webkit-overflow-scrolling: touch;
}
.slider-viewport::-webkit-scrollbar { display: none; }   /* Safari / Chrome */
.slider-track { display: flex; gap: 1.5rem; }
.story-card, .hw-card { scroll-snap-align: start; }

/* 关掉动画偏好时不做平滑滚动 */
@media (prefers-reduced-motion: reduce) {
  html, .slider-viewport { scroll-behavior: auto; }
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .75rem;
  flex: 0 0 auto;
  width: 20.25rem;
  height: 31.25rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.story-card-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 35%, rgba(0, 0, 0, .78) 100%);
}
.story-card > *:not(.story-card-bg) { position: relative; z-index: 2; }
.story-quote { color: var(--white); font-size: 1.125rem; line-height: 1.6rem; font-weight: 700; }
.story-who { display: flex; align-items: center; gap: 12px; }
.story-avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; background: var(--soft); }
.story-who-text { display: flex; flex-direction: column; gap: 2px; color: var(--white); font-size: .9375rem; line-height: 1.25rem; }
.story-who-text span:last-child { opacity: .7; }

.slider-nav { display: flex; gap: 12px; }
.slider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--soft);
  transition: background-color .2s, opacity .2s;
}
.slider-btn:hover { background: color-mix(in srgb, var(--soft) 85%, var(--fg)); }
.slider-btn[disabled] { opacity: .35; cursor: default; }
.slider-btn svg { width: 1.5rem; height: 1.5rem; }

/* ==========================================================================
   品牌墙（无限滚动）
   ========================================================================== */
.logos { display: flex; flex-direction: column; align-items: center; gap: 4rem; }
.marquee { position: relative; width: 100%; overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin: 0 1.125rem;
  background: var(--soft);
  border-radius: .75rem;
  overflow: hidden;
  transition: transform .3s;
}
.logo-item:hover { transform: translateY(-4px); }
.logo-item img { width: 11.25rem; height: 7.5rem; object-fit: contain; }

.marquee-mask-l, .marquee-mask-r {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12rem;
  pointer-events: none;
}
.marquee-mask-l { left: 0;  background: linear-gradient(90deg, var(--page), color-mix(in srgb, var(--page) 0%, transparent)); }
.marquee-mask-r { right: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--page) 0%, transparent), var(--page)); }

/* ==========================================================================
   硬件推荐滑块（浅灰底）
   ========================================================================== */
.hardware { display: flex; flex-direction: column; gap: 4rem; background: var(--soft); overflow: hidden; padding-bottom: 5rem; }
.hardware .marquee-mask-l, .hardware .marquee-mask-r { display: none; }

.hw-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 0 0 auto;
  width: 31.6875rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
}
.hw-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.hw-card-title { margin: 0; }
.hardware .slider-btn { background: var(--card); }
.hardware .slider-btn:hover { background: color-mix(in srgb, var(--card) 88%, var(--fg)); }

/* ==========================================================================
   预约表单
   ========================================================================== */
.start { display: flex; align-items: flex-start; gap: 1.875rem; }
.start-left  { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; width: 50%; }
.start-right { width: 50%; }
.start-desc p { margin-bottom: 8px; font-size: 1.125rem; line-height: 1.6875rem; }
.start-desc a { color: var(--brand-strong); font-weight: 700; }

.clients { width: 100%; margin-top: 2.5rem; }
.clients-title { margin-bottom: .75rem; font-size: 2.25rem; line-height: 3rem; font-weight: 800; }
.clients-wrap { width: 100%; max-width: 700px; overflow: hidden; }
.clients-track { display: flex; gap: 12px; width: max-content; animation: marquee 30s linear infinite; }
.clients-track img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--soft);
}

.form-card {
  padding: 2rem;
  background: var(--soft);
  border-radius: 18px;
}
.form-row { display: flex; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 6px; flex: 1; margin-bottom: 1rem; }
.form-field label { font-size: .875rem; font-weight: 700; color: var(--muted); }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: .875rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s;
}
.form-field textarea { min-height: 96px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--brand); }
.form-card .btn { width: 100%; }
.form-note { margin-top: .75rem; font-size: .875rem; line-height: 1.25rem; color: var(--muted); }
.form-card .btn[disabled] { opacity: .6; cursor: default; }

/* 蜜罐：对人不可见，但不用 display:none —— 那样部分机器人会跳过它 */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* 提交结果提示：三种状态用三种颜色，别让「成功」长得像「报错」 */
.form-ok {
  display: none;
  margin-top: 1rem;
  padding: .875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  line-height: 1.4rem;
  font-weight: 700;
}
.form-ok a { text-decoration: underline; }

/* 提交中：中性灰 */
.form-ok.is-pending { background: rgba(29, 27, 46, .06); color: var(--muted); }

/* 真的发出去了：绿 */
.form-ok.is-ok { background: rgba(22, 163, 74, .12); color: #15803d; }
.form-ok.is-ok::before { content: '✓ '; font-weight: 800; }

/* 退回 mailto：不是错误，但要用户再动一下手，用琥珀色 */
.form-ok.is-info { background: rgba(217, 119, 6, .12); color: #b45309; }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ink);
  color: var(--white);
}
.footer-title { margin-bottom: 3.75rem; text-align: center; color: var(--white); }
.footer-buttons { display: flex; justify-content: center; gap: 20px; margin-bottom: 7.5rem; }
.footer-buttons .btn { padding: 1.25rem 3.25rem; font-size: 20px; font-weight: 600; }

.footer-extra { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem 2.5rem;
  width: 100%;
  text-align: center;
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  line-height: 24px;
}
.footer-contact a:hover { opacity: .7; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-logo { display: flex; align-items: center; gap: .5rem; }
.footer-logo img { width: 33px; height: 33px; object-fit: contain; filter: brightness(0) invert(1); }
.footer-logo span { font-size: 1.375rem; font-weight: 800; }
.footer-bottom-right { display: flex; align-items: center; gap: 1rem; font-size: .9375rem; }
.footer-bottom-right a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-split { width: 1px; height: 1rem; background: rgba(255, 255, 255, .4); }

/* ==========================================================================
   手机端拇指区操作条（桌面不显示）
   ========================================================================== */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  display: none;
  gap: .625rem;
  padding: .625rem 1rem;
  /* 避开 iPhone 底部那根横条 */
  padding-bottom: max(.625rem, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.mobile-bar.is-on { transform: none; }
.mobile-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.mobile-bar-call {
  flex: 0 0 auto;
  padding: 0 1.125rem;
  background: var(--soft);
  color: var(--fg);
}
.mobile-bar-call svg { width: 18px; height: 18px; }
.mobile-bar-cta { flex: 1; background: var(--ink); color: var(--white); font-size: 1.0625rem; }

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateY(8px);
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   滚动进场动画
   用 CSS 的 animation-timeline: view()，不占 JS、不掉帧；
   浏览器不支持时 @supports 里的东西整块不生效，元素保持原样可见。
   ========================================================================== */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .switch-title, .switch-card, .band, .stories > h2, .slider,
    .logos > h2, .hardware > h2, .start-left, .start-right, .footer-title {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
    @keyframes reveal {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: none; }
    }
  }
}

/* ==========================================================================
   性能：首屏之外的区块先不渲染，滚到了再画
   contain-intrinsic-size 给个高度占位，避免滚动条乱跳
   ========================================================================== */
.stories, .logos, .hardware, .start {
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (min-width: 1440px) {
  .section    { padding-left: 13.75rem; padding-right: 13.75rem; }
  .band-wrap  { padding-left: 13.75rem; padding-right: 13.75rem; }
  .hero-panel { padding-left: 8rem; padding-right: 8rem; height: 40rem; }
}

@media (max-width: 1200px) {
  .switch-left { width: 24rem; }
  .hero-content { width: 32rem; }
  .hero-media { left: 50%; }
}

@media (max-width: 991px) {
  .section   { padding: 4rem 2rem; }
  .band-wrap { padding: 0 2rem; }

  /* 手机端才出现底部操作条；回到顶部按钮让位给它 */
  .mobile-bar { display: flex; }
  .to-top { display: none; }
  .footer { padding-bottom: calc(3rem + 68px + env(safe-area-inset-bottom)); }

  /* 顶栏在窄屏收紧一点，但不再有汉堡/抽屉 */
  .nav-inner { gap: 1rem; padding: 0 2rem; }
  .nav-logo span { font-size: 1.375rem; }

  /* 首屏改为上下堆叠 */
  .hero-panel { height: auto; padding: 2rem; }
  .hero-panel-inner { flex-direction: column; gap: 1.5rem; }
  .hero-content { width: 100%; }
  .hero-media {
    position: static;
    width: 100%;
    height: 20rem;
    border-radius: var(--radius);
  }
  .hero-media::after { display: none; }
  .hero-dots { position: static; margin: 1.5rem auto 0; transform: none; }

  /* 因店制宜：改成上图下列表（column-reverse 让 .switch-right 排到上面） */
  .switch { gap: 1.5rem; }
  .switch-card { flex-direction: column-reverse; gap: 1.25rem; }
  .switch-left { width: 100%; min-height: 0; padding: 8px 0 0; background: transparent; }
  .switch-right {
    display: block;
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;   /* 手机上别用桌面那种竖框，太占屏 */
  }

  /* 手机上直接用手指滑，箭头多余且会被底部操作条压住 */
  .slider-nav { display: none; }

  /* 滑块出血到屏幕两侧，右边露半张卡，用户一眼知道能滑 */
  .slider-viewport {
    margin-inline: -2rem;
    padding-inline: 2rem;
    scroll-padding-inline-start: 2rem;
  }

  .start { flex-direction: column; gap: 2rem; }
  .start-left, .start-right { width: 100%; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-buttons { flex-direction: column; width: 100%; margin-bottom: 4rem; }
  .footer-buttons .btn { width: 100%; }
}

@media (max-width: 767px) {
  .section { padding: 3rem max(1.25rem, env(safe-area-inset-left)) 3rem max(1.25rem, env(safe-area-inset-right)); }
  .band-wrap { padding: 0 1.25rem; }
  .band { border-radius: var(--radius); padding: 2rem 1.25rem; }
  .band .btn { width: 100%; font-size: 1.125rem; }

  /* 窄屏顶栏：藏掉锚点，按钮全部收窄，别把 logo 挤掉 */
  .nav-inner { gap: .5rem; padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left)); }
  .nav-menu { display: none; }
  .nav-right { gap: 6px; }
  .nav-right .btn { min-width: 0; min-height: 44px; padding: .5rem .875rem; font-size: .9375rem; }
  .nav-logo { min-height: 44px; }
  .nav-logo img { width: 32px; height: 32px; }
  .nav-logo span { font-size: 1.25rem; }
  .lang-menu { min-width: 120px; }

  .hero-panel { padding: 1.5rem 1.25rem 2rem; }
  .hero-media { height: 13rem; }
  .switch-item-title { font-size: 1.375rem; line-height: 1.4; }

  .slider-viewport {
    margin-inline: -1.25rem;
    padding-inline: 1.25rem;
    scroll-padding-inline-start: 1.25rem;
  }
  .story-card { width: 17.5rem; height: 26rem; }
  .hw-card { width: 19rem; }
  .logo-item img { width: 8.5rem; height: 5.6rem; }
  .clients-title { font-size: 1.75rem; line-height: 2.25rem; }
  .form-row { flex-direction: column; gap: 0; }
  .form-card { padding: 1.25rem; }
  .footer-title { margin-bottom: 2rem; }
}
