/* ============================================
   ArkSMS 云信 · Base：reset / 排版 / 通用元件
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: var(--lh-tight); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 16px; }
p { margin: 0; }
a { color: var(--color-action-primary); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--color-action-primary-hover); }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(0, 113, 227, 0.18); }
:focus-visible { outline: 2px solid var(--color-action-primary); outline-offset: 2px; border-radius: 4px; }

/* --- Layout --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 76px 0; }
.section-alt { background: var(--color-bg-surface); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { font-size: 16px; line-height: var(--lh-loose); color: var(--color-text-secondary); }
.eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 5px 14px;
  border-radius: var(--radius-chip);
  background: var(--color-state-info-bg); color: var(--color-action-primary);
  font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.08em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 22px; white-space: nowrap;
  border-radius: var(--radius-control);
  font-size: var(--fs-body); font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.btn-primary { background: var(--color-action-primary); color: #fff; }
.btn-primary:hover { background: var(--color-action-primary-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-raised); }
.btn-ghost { background: transparent; color: var(--color-text-primary); border: 1px solid var(--color-border); }
.btn-ghost:hover { border-color: var(--color-action-primary); color: var(--color-action-primary); }
.btn-white { background: #fff; color: #5b4bc4; }
.btn-white:hover { background: rgba(255, 255, 255, 0.92); color: #4636a8; transform: translateY(-1px); box-shadow: var(--shadow-raised); }
.btn-outline-white { border: 1px solid rgba(255, 255, 255, 0.65); color: #fff; }
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.btn-lg { height: 48px; padding: 0 30px; font-size: 16px; border-radius: 10px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: var(--fs-small); }
.btn-block { width: 100%; }

/* --- Chips --- */
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: var(--radius-chip);
  background: var(--color-bg-muted); border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary); font-size: var(--fs-caption); font-weight: 500;
}
.chip-blue { background: var(--color-state-info-bg); border-color: transparent; color: var(--color-action-primary); }
.chip-green { background: var(--color-state-success-bg); border-color: transparent; color: #1d8f3f; }
.chip-orange { background: var(--color-state-warning-bg); border-color: transparent; color: #b25e00; }
.chip-red { background: var(--color-state-danger-bg); border-color: transparent; color: #c62828; }
.chip-purple { background: #f3eaff; border-color: transparent; color: #722ed1; }

/* 待替换占位（电话/备案号等） */
.placeholder { color: var(--color-text-tertiary); border-bottom: 1px dashed var(--color-border); }

/* --- Cards --- */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); }
a.card h3 { color: var(--color-text-primary); }
a.card:hover h3 { color: var(--color-action-primary); }

/* --- Grids --- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Data table --- */
.table-wrap { overflow-x: auto; background: var(--color-bg-surface); border: 1px solid var(--color-border-light); border-radius: var(--radius-card); }
table.data { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--fs-body); }
.data th, .data td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--color-divider); }
.data th { background: var(--color-bg-muted); color: var(--color-text-secondary); font-size: var(--fs-small); font-weight: 600; }
.data tr:last-child td { border-bottom: 0; }

/* --- FAQ (原生 details，零脚本) --- */
.faq details { margin-bottom: 12px; overflow: hidden; background: var(--color-bg-surface); border: 1px solid var(--color-border-light); border-radius: var(--radius-card); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--color-text-tertiary); border-bottom: 2px solid var(--color-text-tertiary);
  transform: rotate(45deg); transition: transform var(--t-mid) var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq .faq-body { padding: 0 20px 18px; color: var(--color-text-secondary); line-height: var(--lh-loose); }

/* --- Code block --- */
.codeblock {
  padding: 20px 22px; overflow-x: auto;
  background: #1d1d1f; color: #f5f5f7; border-radius: var(--radius-card);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.75;
}
.codeblock .c { color: #86868b; }
.codeblock .k { color: #64d2ff; }
.codeblock .s { color: #30d158; }

/* --- CTA band --- */
.cta-band { position: relative; overflow: hidden; padding: 76px 24px; text-align: center; background: var(--grad-hero); color: #fff; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(620px circle at 15% 15%, rgba(255, 255, 255, 0.18), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: 12px; color: #fff; font-size: var(--fs-h1); }
.cta-band p { margin-bottom: 30px; color: rgba(255, 255, 255, 0.86); font-size: 16px; }
.cta-band .cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- Reveal on scroll --- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Responsive --- */
@media (max-width: 1023px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cta-band { padding: 56px 20px; }
  .cta-band h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
