/* ==========================================================================
   细掌兔官网复刻 · 视觉层
   基础框架：Foundation for Sites 6.9.0（XY Grid / 工具类）
   交互增强：htmx 4.0.2
   说明：颜色、间距、圆角、断点与原站保持一致，布局改用 Foundation 网格承载。
   ========================================================================== */

:root {
  /* 主题色：青绿 #009688 */
  --brand-900: #004d40;
  --brand-800: #00695c;
  --brand-700: #00796b;
  --brand-600: #009688;
  --brand-500: #26a69a;
  --brand-300: #80cbc4;
  --brand-100: #b2dfdb;
  --brand-50: #e0f2f1;
  --ink: #152b27;
  --ink-soft: #4f6b65;
  --line: #d5ebe6;
  --bg: #ffffff;
  --bg-soft: #f2faf8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 150, 136, 0.12);
}

/* Foundation 基础样式覆盖 -------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Foundation 的 .button 会带默认外边距与直角，这里统一归零 */
.button {
  margin: 0;
}

/* 基础布局 ---------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 84px 0;
}

section[id] {
  scroll-margin-top: 84px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--brand-700);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 68px;
  flex-wrap: nowrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--brand-900);
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.site-nav a {
  display: inline-block;
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--brand-700);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

.burger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-active span:nth-child(2) {
  opacity: 0;
}

.burger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: 90px 0 48px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--brand-50) 0%, #ffffff 55%, var(--brand-50) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 150, 136, 0.16), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 150, 136, 0.10), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  gap: 56px;
  align-items: center;
  width: 100%;
}

.hero-inner > .cell {
  flex: 1 1 0;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.hero-inner > .hero-text {
  flex-grow: 1.05;
}

.hero-inner > .hero-visual {
  flex-grow: 0.95;
}

.hero-text {
  text-align: left;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--brand-900);
}

.hero h1 em {
  font-style: normal;
  color: var(--brand-600);
}

.hero p.lead {
  max-width: 560px;
  margin: 0 0 30px;
  font-size: 18px;
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 16px;
}

.hero-tip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}

.hero-tip svg {
  width: 16px;
  height: 16px;
  color: var(--brand-600);
  flex: 0 0 auto;
}

.hero-tip .brand-hl {
  color: var(--brand-700);
  font-weight: 700;
}

.copy-tip {
  font-size: 13px;
  color: var(--brand-700);
}

.copy-tip:not(:empty) {
  margin-top: 10px;
}

.hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 36px;
  margin-top: 42px;
}

.hero-stats .stat .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-700);
}

.hero-stats .stat .stat-label {
  font-size: 13px;
  color: var(--ink-soft);
}

/* 主行动按钮（沿用 Foundation .button 语义，覆盖为品牌样式）
   底色用 brand-700，白字对比度 5.32:1，满足 WCAG AA */
.button.btn-primary {
  padding: 14px 32px;
  border-radius: 30px;
  background: var(--brand-700);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 121, 107, 0.28);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.button.btn-primary:hover,
.button.btn-primary:focus {
  background: var(--brand-800);
  color: #fff;
  transform: translateY(-2px);
}

.button.btn-ghost {
  padding: 14px 30px;
  border: 1px solid var(--brand-300);
  border-radius: 30px;
  background: #fff;
  color: var(--brand-700);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.button.btn-ghost:hover,
.button.btn-ghost:focus {
  background: var(--brand-50);
  border-color: var(--brand-500);
  color: var(--brand-700);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 644px;
}

/* 手机背后柔光，缓和深色机身与浅青背景的落差别 */
.hero-visual::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 560px;
  height: 560px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 150, 136, 0.16), rgba(0, 150, 136, 0.05) 58%, transparent 74%);
}

.hero-phone-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* 手机模型遮罩：机身 + 顶部刘海，模特照片作为屏幕内容 */
.hero-phone {
  position: relative;
  flex-shrink: 0;
  width: 268px;
  height: 560px;
  overflow: hidden;
  border: 9px solid #0b3d38;
  border-radius: 38px;
  background: #0b3d38;
  animation: floaty 8s ease-in-out infinite;
  box-shadow:
    0 30px 60px rgba(5, 60, 54, 0.20),
    0 12px 26px -14px rgba(5, 60, 54, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-phone .notch {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 6;
  width: 96px;
  height: 22px;
  transform: translateX(-50%);
  border-bottom-right-radius: 13px;
  border-bottom-left-radius: 13px;
  background: #0b3d38;
}

.hero-phone-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
}

/* 机身外圈柔光：削弱深色边框的硬边 */
.phone-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 78%;
  height: 82%;
  transform: translate(-50%, -50%);
  border-radius: 60px;
  background: radial-gradient(60% 60% at 50% 45%, rgba(0, 150, 136, 0.18), transparent 70%);
  filter: blur(30px);
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== Section 通用标题 ===== */
.sec-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.sec-head .kicker {
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sec-head h2 {
  margin: 10px 0 14px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--brand-900);
}

.sec-head p {
  font-size: 16px;
  color: var(--ink-soft);
}

/* ===== 平台优势 ===== */
.adv {
  background: var(--bg-soft);
}

.adv-grid {
  gap: 24px;
}

.adv-grid > .cell {
  display: flex;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

.adv-card {
  width: 100%;
  height: 100%;
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
}

.adv-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.adv-card .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-600);
}

.adv-card .ico svg {
  width: 26px;
  height: 26px;
}

.adv-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.adv-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ===== 使用流程 ===== */
.proc {
  background: var(--bg-soft);
}

.proc-grid {
  gap: 20px;
}

.proc-grid > .cell {
  display: flex;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

.proc-step {
  width: 100%;
  height: 100%;
  padding: 36px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.proc-step .num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.proc-step h4 {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.proc-step p {
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ===== App 下载 ===== */
.appsec {
  background: linear-gradient(160deg, var(--brand-50) 0%, #fff 60%, var(--brand-50) 100%);
}

.appsec-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.app-info .kicker {
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.app-info h2 {
  margin: 10px 0 16px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--brand-900);
}

.app-info > p {
  max-width: 460px;
  margin: 0 auto 30px;
  font-size: 16px;
  color: var(--ink-soft);
}

.dl-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.dl-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dl-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.dl-btn:hover,
.dl-btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow);
}

.dl-btn .txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.dl-btn .txt .s {
  font-size: 11px;
  color: var(--ink-soft);
}

.dl-btn .txt .t {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* ===== Footer ===== */
.site-footer {
  padding: 60px 0 30px;
  background: #004d40;
  color: #a7d8d1;
}

.foot-grid {
  gap: 40px;
  margin-bottom: 40px;
}

.foot-grid > .cell {
  flex: 1 1 0;
  width: auto;
  max-width: 100%;
}

.foot-grid > .foot-brand {
  flex-grow: 1.6;
}

.foot-brand .logo {
  margin-bottom: 16px;
  color: #fff;
}

.foot-brand .logo img {
  height: 48px;
}

.foot-brand p {
  max-width: 380px;
  font-size: 14px;
  line-height: 1.8;
  color: #8fc9c2;
}

.foot-col h4 {
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.foot-col a,
.foot-col li {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: #8fc9c2;
}

.foot-col a:hover,
.foot-col a:focus-visible {
  color: var(--brand-300);
}

.foot-copy {
  padding: 0;
  border: 0;
  background: none;
  color: #8fc9c2;
  font-size: 14px;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.foot-copy:hover,
.foot-copy:focus-visible {
  color: var(--brand-300);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  color: #6fa8a2;
}

.foot-bottom a {
  color: #6fa8a2;
}

.foot-bottom a:hover,
.foot-bottom a:focus-visible {
  color: var(--brand-300);
}

.icp {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* ===== 响应式（与原站断点一致：900px / 680px） ===== */
@media (min-width: 681px) {
  .adv-grid > .cell {
    flex: 0 0 calc(50% - 12px);
    width: calc(50% - 12px);
    max-width: calc(50% - 12px);
  }

  .proc-grid > .cell {
    flex: 0 0 calc(50% - 10px);
    width: calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (min-width: 901px) {
  .adv-grid > .cell {
    flex: 0 0 calc(25% - 18px);
    width: calc(25% - 18px);
    max-width: calc(25% - 18px);
  }

  .proc-grid > .cell {
    flex: 0 0 calc(25% - 15px);
    width: calc(25% - 15px);
    max-width: calc(25% - 15px);
  }
}

@media (max-width: 900px) {
  .hero-text {
    text-align: center;
  }

  .hero-inner {
    gap: 40px;
  }

  .hero-inner > .cell {
    flex: 0 0 100%;
    width: 100%;
  }

  .hero-visual {
    min-height: 580px;
  }

  .hero-phone {
    width: 236px;
    height: 494px;
  }

  .hero-visual::before {
    width: 460px;
    height: 460px;
  }

  .phone-glow {
    border-radius: 50px;
  }

  .hero p.lead {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-cta,
  .hero-tip,
  .hero-stats {
    justify-content: center;
  }

  .foot-grid {
    gap: 30px;
  }

  .foot-grid > .cell {
    flex: 0 0 calc(50% - 15px);
    width: calc(50% - 15px);
  }

  .foot-grid > .foot-brand {
    flex-grow: 0;
  }
}

@media (max-width: 680px) {
  section {
    padding: 60px 0;
  }

  .site-nav {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    z-index: 49;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 18px;
    width: auto;
    max-width: none;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(-150%);
    transition: transform 0.3s;
  }

  .site-nav.is-open {
    transform: translateY(0);
  }

  .site-nav a {
    width: 100%;
  }

  .burger {
    display: inline-flex;
  }

  .hero {
    min-height: auto;
    padding: 60px 0 56px;
  }

  .hero-visual {
    min-height: 480px;
    padding-top: 8px;
  }

  .hero-phone {
    width: 196px;
    height: 410px;
    border-width: 7px;
    border-radius: 30px;
  }

  .hero-phone .notch {
    width: 76px;
    height: 18px;
  }

  .hero-visual::before {
    width: 330px;
    height: 330px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .foot-grid > .cell {
    flex: 0 0 100%;
    width: 100%;
  }

  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .dl-wrap {
    gap: 22px;
  }
}

/* 降低动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}