/* ============================================================
   数字指南 — 流量卡推荐落地页
   Google Material Design 3 风格 · 纯 HTML + CSS，零 JavaScript
   ============================================================ */

/* ---------- 本地字体 ---------- */

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./files/fonts/roboto-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./files/fonts/roboto-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./files/fonts/roboto-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('./files/fonts/material-symbols-outlined.ttf') format('truetype');
}

/* ---------- Material 3 设计令牌（白色主题） ---------- */

:root {
  color-scheme: light;

  --md-sys-color-primary: #6750a4;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #eaddff;
  --md-sys-color-on-primary-container: #21005d;
  --md-sys-color-secondary: #625b71;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #e8def8;
  --md-sys-color-on-secondary-container: #1d192b;
  --md-sys-color-tertiary: #7d5260;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #ffd8e4;
  --md-sys-color-on-tertiary-container: #31111d;

  /* 白色主题：中性白色表面 */
  --md-sys-color-background: #ffffff;
  --md-sys-color-on-background: #1c1b1d;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: #1c1b1d;
  --md-sys-color-on-surface-variant: #47464a;
  --md-sys-color-outline: #7a777d;
  --md-sys-color-outline-variant: #e0dee2;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #fafafb;
  --md-sys-color-surface-container: #f4f3f5;
  --md-sys-color-surface-container-high: #eeedef;
  --md-sys-color-surface-container-highest: #e8e7e9;

  --md-ref-typeface: 'Roboto', system-ui, -apple-system, 'PingFang SC',
    'Microsoft YaHei', sans-serif;
}

/* ---------- 基础 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  font-family: var(--md-ref-typeface);
  -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-balance {
  text-wrap: balance;
}
.text-pretty {
  text-wrap: pretty;
}

/* ---------- M3 字阶（typescale） ---------- */

.md-typescale-display-medium {
  font-size: 2.8125rem; /* 45px */
  line-height: 3.25rem;
  font-weight: 400;
  letter-spacing: 0;
}

.md-typescale-display-small {
  font-size: 2.25rem; /* 36px */
  line-height: 2.75rem;
  font-weight: 400;
  letter-spacing: 0;
}

.md-typescale-headline-large {
  font-size: 2rem; /* 32px */
  line-height: 2.5rem;
  font-weight: 400;
  letter-spacing: 0;
}

.md-typescale-title-large {
  font-size: 1.375rem; /* 22px */
  line-height: 1.75rem;
  font-weight: 400;
  letter-spacing: 0;
}

.md-typescale-title-medium {
  font-size: 1rem; /* 16px */
  line-height: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.009em;
}

.md-typescale-body-large {
  font-size: 1rem; /* 16px */
  line-height: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.031em;
}

.md-typescale-body-medium {
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.018em;
}

.md-typescale-body-small {
  font-size: 0.75rem; /* 12px */
  line-height: 1rem;
  font-weight: 400;
  letter-spacing: 0.033em;
}

.md-typescale-label-large {
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.007em;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--md-sys-color-surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.brand-mark .material-symbols-outlined {
  font-size: 22px;
}

.brand-name {
  font-weight: 500;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-nav a {
  text-decoration: none;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 100px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.header-nav a:hover {
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}

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

.hero {
  background: linear-gradient(
    180deg,
    var(--md-sys-color-surface-container-low) 0%,
    var(--md-sys-color-surface) 100%
  );
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  width: fit-content;
}

.hero-eyebrow .material-symbols-outlined {
  font-size: 18px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
}

.hero-sub {
  margin: 0;
  max-width: 34em;
  color: var(--md-sys-color-on-surface-variant);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* ---------- M3 按钮（纯 CSS 实现） ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: box-shadow 0.2s ease, background-color 0.2s ease, filter 0.2s ease;
}

.btn .material-symbols-outlined {
  font-size: 20px;
}

.btn-filled {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.btn-filled:hover {
  box-shadow: 0 1px 3px 1px rgb(0 0 0 / 0.15), 0 1px 2px rgb(0 0 0 / 0.3);
  filter: brightness(1.08);
}

.btn-tonal {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.btn-tonal:hover {
  box-shadow: 0 1px 3px 1px rgb(0 0 0 / 0.12), 0 1px 2px rgb(0 0 0 / 0.2);
  filter: brightness(1.04);
}

.btn-outlined {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
}

.btn-outlined:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.btn:active {
  filter: brightness(0.96);
}

.btn:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* ---------- Hero 横幅（纯 CSS 图形） ---------- */

.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 48px 40px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(
    135deg,
    var(--md-sys-color-primary-container) 0%,
    var(--md-sys-color-tertiary-container) 100%
  );
  color: var(--md-sys-color-on-primary-container);
  box-shadow: 0 1px 3px 1px rgb(0 0 0 / 0.1), 0 1px 2px rgb(0 0 0 / 0.15);
}

.banner-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.banner-orb-a {
  width: 220px;
  height: 220px;
  right: -60px;
  top: -80px;
  background: color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
}

.banner-orb-b {
  width: 140px;
  height: 140px;
  right: 60px;
  bottom: -60px;
  background: color-mix(in srgb, var(--md-sys-color-tertiary) 20%, transparent);
}

.banner-line1 {
  margin: 0;
  position: relative;
}

.banner-line2 {
  margin: 0;
  position: relative;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.banner-line2 span {
  color: var(--md-sys-color-tertiary);
}

.banner-chip {
  position: relative;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
}

.banner-chip .material-symbols-outlined {
  font-size: 18px;
  color: var(--md-sys-color-tertiary);
}

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

.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: 24px;
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: box-shadow 0.25s ease, transform 0.25s ease,
    background-color 0.25s ease;
}

.feature-card:hover {
  background: var(--md-sys-color-surface-container);
  box-shadow: 0 2px 6px 2px rgb(0 0 0 / 0.1), 0 1px 2px rgb(0 0 0 / 0.15);
  transform: translateY(-2px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.feature-icon .material-symbols-outlined {
  font-size: 26px;
}

.feature-card h3 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
}

.feature-card p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.7;
}

/* ---------- FAQ ---------- */

.faq {
  background: var(--md-sys-color-surface-container-low);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 72px 24px 88px;
}

.faq-head {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

.faq-head h2 {
  margin: 0 0 12px;
  color: var(--md-sys-color-on-surface);
}

.faq-head p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: 20px;
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.faq-item[open] {
  background: var(--md-sys-color-surface-container-lowest);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  color: var(--md-sys-color-on-surface);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 5%, transparent);
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: -3px;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--md-sys-color-on-surface-variant);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-item > p {
  margin: 0;
  padding: 0 24px 20px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.8;
}

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

.site-footer {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 28px 24px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

/* ---------- 文章页面 ---------- */

.article-page {
  background: var(--md-sys-color-surface);
}

.article-hero {
  background: linear-gradient(
    180deg,
    var(--md-sys-color-surface-container-low) 0%,
    var(--md-sys-color-surface) 100%
  );
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.article-hero-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  text-align: center;
}

.article-hero h1 {
  margin: 0 0 16px;
  color: var(--md-sys-color-on-surface);
}

.article-hero .hero-sub {
  margin: 0 auto;
  max-width: 640px;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-body section {
  margin-bottom: 48px;
}

.article-body h2 {
  margin: 0 0 16px;
  color: var(--md-sys-color-on-surface);
}

.article-body h3 {
  margin: 32px 0 12px;
  color: var(--md-sys-color-on-surface);
}

.article-body p {
  margin: 0 0 16px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.8;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 24px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.8;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
}

.article-highlight {
  padding: 24px;
  border-radius: 20px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  margin-bottom: 32px;
}

.article-highlight p {
  margin: 0;
  color: inherit;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
}

.article-table th,
.article-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.article-table th {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
}

.article-table td {
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
}

.article-table tbody tr:last-child th,
.article-table tbody tr:last-child td {
  border-bottom: 0;
}

.article-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0 32px;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: 20px;
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.article-card h4 {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: 1.125rem;
  font-weight: 500;
}

.article-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-tips {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 32px;
}

.article-tip {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.article-tip-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  flex-shrink: 0;
}

.article-tip-icon .material-symbols-outlined {
  font-size: 20px;
}

.article-tip-content h4 {
  margin: 0 0 6px;
  color: var(--md-sys-color-on-surface);
  font-size: 1rem;
  font-weight: 500;
}

.article-tip-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (max-width: 839px) {
  .article-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .article-hero-inner {
    padding: 48px 16px 36px;
  }

  .article-body {
    padding: 36px 16px 64px;
  }

  .article-cards {
    grid-template-columns: 1fr;
  }

  .article-table th,
  .article-table td {
    padding: 12px;
    font-size: 0.875rem;
  }
}

/* ---------- 响应式（M3 断点：compact < 600 / medium < 840） ---------- */

@media (max-width: 839px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 24px;
    gap: 36px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .header-nav {
    display: none;
  }

  .hero-inner {
    padding: 36px 16px;
  }

  .hero-copy h1 {
    font-size: 2.25rem;
    line-height: 1.15;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero-banner {
    padding: 36px 24px;
    min-height: 220px;
  }

  .features {
    padding: 8px 16px 56px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .faq {
    padding: 56px 16px 64px;
  }
}
