/*
 * iOS Control Center — Landing 测试页样式
 * 纯静态：无外部字体/图片/CDN/第三方依赖；设计变量与基础重置见 index.html 内联 <style>。
 * 仅用于渠道归因联调，文案与视觉保持中性，不含个人标识。
 */

.container {
  width: min(100% - 40px, 1080px);
  margin-inline: auto;
}

/* ---------- 提示条 ---------- */

.noscript-note {
  margin: 0;
  padding: 12px 20px;
  background: #fef3c7;
  color: #7c2d12;
  font-size: 14px;
  text-align: center;
}

/* ---------- 顶栏 ---------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.72);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.brand-name {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge[data-mode="live"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 56px;
  background: radial-gradient(1200px 460px at 50% -20%, #e3ecff 0%, rgba(246, 247, 251, 0) 62%);
}

.hero-inner {
  max-width: 760px;
  text-align: center;
}

.eyebrow {
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-title {
  margin-top: 14px;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--color-text-muted);
  font-size: clamp(15px, 2.2vw, 17px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.hero-meta {
  margin-top: 18px;
  color: var(--color-text-faint);
  font-size: 13px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  border-color: var(--color-border);
  background: #ffffff;
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: #c7d2e4;
  background: #f8fafc;
}

/* ---------- 通用区块 ---------- */

.section {
  padding: 8px 0 48px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 22px;
}

.section-title {
  font-size: clamp(20px, 3.4vw, 26px);
  line-height: 1.3;
}

.section-desc {
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 15px;
}

/* ---------- 特性卡 ---------- */

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-title {
  margin-top: 14px;
  font-size: 17px;
}

.card-text {
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 14.5px;
}

/* ---------- 三步说明 ---------- */

.section-steps {
  padding-bottom: 64px;
}

.step-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.step-num {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.step-title {
  margin-top: 12px;
  font-size: 16px;
}

.step-text {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.steps-note {
  margin-top: 18px;
  color: var(--color-text-faint);
  font-size: 13px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 22px 0;
}

.copyright {
  color: var(--color-text-muted);
  font-size: 13px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.footer-note {
  color: var(--color-text-faint);
  font-size: 13px;
}

.link-button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--color-accent-strong);
}

/* ---------- 行内代码 ---------- */

code {
  padding: 1px 6px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-2);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.92em;
  word-break: break-all;
}

/* ---------- 弹窗（原生 dialog） ---------- */

.dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(86vh, 720px);
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--color-text);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  overflow: auto;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.44);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}

.dialog-title {
  font-size: 18px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px -10px 0 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-button:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.dialog-body {
  padding: 14px 20px 4px;
}

.dialog-text {
  color: var(--color-text-muted);
  font-size: 14.5px;
}

.dialog-text + .dialog-text {
  margin-top: 10px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px 20px;
}

.dialog .btn {
  min-height: 44px;
  padding: 0 22px;
}

.muted {
  color: var(--color-text-faint);
}

/* ---------- 自检详情 ---------- */

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-border);
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-row dt {
  color: var(--color-text-faint);
  font-size: 12.5px;
}

.detail-row dd {
  font-size: 14px;
  word-break: break-all;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 12.5px;
}

.status-pill[data-state="ok"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-pill[data-state="warn"] {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  max-width: calc(100% - 40px);
  padding: 11px 18px;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 响应式 ---------- */

@media (min-width: 820px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .step-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 48px 0 40px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .dialog-actions .btn {
    flex: 1;
  }
}

/* ---------- 动效偏好 / 打印 ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .toast {
    display: none;
  }

  body {
    background: #ffffff;
  }
}
