/* ============================================
   云开·全站app官方网站 /assets/site.css
   共享样式：变量、重置、头部、页脚、通用组件
   ============================================ */

/* ---------- 0. CSS 变量 ---------- */
:root {
  --color-cream: #F5F0E8;
  --color-oxford: #001F3F;
  --color-orange: #FF5A36;
  --color-ink: #2A2622;
  --color-soft-gray: #E8E6E1;
  --color-white: #FFFFFF;
  --color-muted-blue: #4A6B8F;
  --color-teal: #2E7D6E;
  --font-heading: Inter, 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: Roboto, 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --container-max: 1280px;
  --header-h: 72px;
  --shadow-card: 0 1px 3px rgba(0, 31, 63, 0.06), 0 6px 24px rgba(0, 31, 63, 0.05);
  --ease: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 1. 重置与基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink);
  background-color: var(--color-cream);
  background-image: radial-gradient(rgba(0, 31, 63, 0.028) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-oxford);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--color-orange); }

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-oxford);
}

:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 2. 内容容器 ---------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

/* ---------- 3. 跳转链接与进度条 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.site-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-orange) 0%, #ff8a5c 100%);
  border-radius: 0 3px 3px 0;
  z-index: 300;
  pointer-events: none;
}

/* ---------- 4. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 31, 63, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand:hover { opacity: 0.9; }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-oxford);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 31, 63, 0.3);
}
.brand-mark::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-orange);
  box-shadow: 0 0 14px rgba(255, 90, 54, 0.7);
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--color-oxford);
  letter-spacing: -0.01em;
}
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-muted-blue);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.brand-tagline::before {
  content: "●";
  color: var(--color-teal);
  font-size: 0.6875rem;
  margin-right: 4px;
  vertical-align: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  padding: 12px;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-oxford);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease), background-color var(--ease);
}
.nav-toggle:hover .nav-toggle-bar { background: var(--color-orange); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-ink);
  white-space: nowrap;
  transition: background-color var(--ease), color var(--ease);
}
.nav-link:hover {
  background: rgba(255, 90, 54, 0.1);
  color: var(--color-orange);
}
.nav-link[aria-current="page"] {
  background: var(--color-oxford);
  color: var(--color-cream);
}
.nav-link[aria-current="page"]:hover {
  background: var(--color-oxford);
  color: var(--color-cream);
}

/* ---------- 5. 页脚 ---------- */
.site-footer {
  background: var(--color-oxford);
  color: var(--color-cream);
  margin-top: 80px;
  padding: 56px 0 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--color-orange) 0 48px, transparent 48px 72px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--color-cream);
  margin-bottom: 12px;
}
.footer-logo::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-orange);
  box-shadow: 0 0 0 5px rgba(255, 90, 54, 0.2);
}

.footer-about {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(245, 240, 232, 0.72);
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-orange);
  margin-bottom: 16px;
}

.footer-nav,
.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-link {
  color: rgba(245, 240, 232, 0.72);
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: color var(--ease), padding-left var(--ease);
}
.footer-link:hover {
  color: var(--color-orange);
  padding-left: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(245, 240, 232, 0.72);
}
.footer-contact-item {
  line-height: 1.6;
}
.footer-contact-item::before {
  content: "›";
  color: var(--color-orange);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-right: 6px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(245, 240, 232, 0.12);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: rgba(245, 240, 232, 0.5);
}
.footer-icp {
  letter-spacing: 0.04em;
}

/* ---------- 6. 通用组件 ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.4;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: none;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-oxford);
  color: var(--color-cream);
}
.btn-outline {
  border-color: var(--color-oxford);
  color: var(--color-oxford);
}
.btn-outline:hover {
  background: var(--color-oxford);
  color: var(--color-cream);
}
.btn-ghost {
  color: var(--color-muted-blue);
  padding-inline: 16px;
}
.btn-ghost:hover {
  color: var(--color-orange);
  background: rgba(255, 90, 54, 0.08);
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 31, 63, 0.08);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}
.badge--orange { background: var(--color-orange); color: var(--color-white); }
.badge--blue { background: rgba(0, 31, 63, 0.08); color: var(--color-oxford); }
.badge--teal { background: rgba(46, 125, 110, 0.12); color: var(--color-teal); }
.badge--outline { border: 1px solid rgba(0, 31, 63, 0.22); color: var(--color-muted-blue); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 31, 63, 0.18);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-muted-blue);
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.chip:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
}
.chip[data-active="true"],
.chip[aria-pressed="true"] {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: var(--color-white);
}

.page-hero {
  padding: 48px 0 40px;
  margin-bottom: 48px;
  border-bottom: 1px dashed rgba(0, 31, 63, 0.18);
}
.page-hero-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  color: var(--color-oxford);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 16px;
}
.page-hero-desc {
  font-size: 1.0625rem;
  color: var(--color-muted-blue);
  line-height: 1.7;
  max-width: 640px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-muted-blue);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--color-muted-blue);
  text-decoration: none;
  transition: color var(--ease);
}
.breadcrumb a:hover { color: var(--color-orange); }
.breadcrumb-sep { color: rgba(0, 31, 63, 0.25); }

.section { margin-bottom: 64px; }
.section-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}
.section-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-orange);
  line-height: 1;
}
.section-number::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-oxford);
  margin-top: 10px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2.125rem);
  font-weight: 800;
  color: var(--color-oxford);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-note {
  font-size: 0.875rem;
  color: var(--color-muted-blue);
  line-height: 1.7;
  max-width: 420px;
}

.chapter { margin-bottom: 56px; }
.chapter-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-orange);
  background: rgba(255, 90, 54, 0.12);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.chapter-title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 800;
  color: var(--color-oxford);
}
.chapter-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
}
.chapter-annotation {
  font-size: 0.875rem;
  color: var(--color-muted-blue);
  line-height: 1.75;
  border-left: 3px solid var(--color-orange);
  padding-left: 16px;
}

.stat {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 31, 63, 0.08);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 90, 54, 0.07);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-oxford);
  line-height: 1.15;
  display: block;
}
.stat-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-muted-blue);
  margin-top: 6px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.data-table th {
  background: var(--color-oxford);
  color: var(--color-cream);
  padding: 12px 20px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.data-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-soft-gray);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-ink);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255, 90, 54, 0.04); }
.data-table .is-verified { color: var(--color-teal); font-weight: 700; }
.data-table .is-pending { color: var(--color-orange); font-weight: 700; }

.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--color-muted-blue) 0 4px, transparent 4px 8px);
}
.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-orange);
  border: 3px solid var(--color-cream);
  box-shadow: 0 0 0 2px rgba(255, 90, 54, 0.25);
}
.timeline-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-orange);
  margin-bottom: 4px;
}
.timeline-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-oxford);
  margin-bottom: 4px;
}
.timeline-desc {
  font-size: 0.875rem;
  color: var(--color-muted-blue);
  line-height: 1.6;
}

.visual-frame {
  position: relative;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 31, 63, 0.04), rgba(255, 90, 54, 0.05));
  border: 1px dashed rgba(0, 31, 63, 0.22);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 31, 63, 0.07) 1px, transparent 1px);
  background-size: 16px 16px;
}
.visual-frame::after {
  content: "图形占位";
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted-blue);
  z-index: 1;
}
.visual-frame--wide { aspect-ratio: 16 / 9; }
.visual-frame--tall { aspect-ratio: 3 / 4; }
.visual-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 7. 响应式调整 ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .col-3,
  .col-4 { grid-column: span 6; }
  .col-5,
  .col-7,
  .col-8,
  .col-9 { grid-column: span 12; }
}

@media (max-width: 880px) {
  :root { --header-h: 60px; }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-oxford);
    padding: 14px 16px 18px;
    overflow-x: auto;
    flex-direction: row;
    gap: 8px;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    box-shadow: 0 16px 32px rgba(0, 31, 63, 0.22);
    -webkit-overflow-scrolling: touch;
  }
  .site-nav[data-open="true"] {
    display: flex;
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex-shrink: 0;
    color: var(--color-cream);
    padding: 10px 20px;
    font-size: 0.9375rem;
  }
  .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-cream);
  }
  .nav-link[aria-current="page"] {
    background: var(--color-orange);
    color: var(--color-white);
  }
  .nav-link[aria-current="page"]:hover {
    background: var(--color-orange);
    color: var(--color-white);
  }
}

@media (max-width: 640px) {
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .brand-mark::before {
    width: 11px;
    height: 11px;
    top: 4px;
    right: 3px;
  }
  .brand-mark::after {
    top: 7px;
    left: 7px;
    width: 16px;
    height: 16px;
  }
  .brand-name { font-size: 0.9375rem; }
  .brand-tagline { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section-number::after { margin-top: 6px; }

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

  .grid-12 { gap: 16px; }
  .col-3,
  .col-4,
  .col-5,
  .col-6,
  .col-7,
  .col-8,
  .col-9,
  .col-12 {
    grid-column: span 12;
  }

  .stat-value { font-size: 1.5rem; }
}

/* ---------- 8. 减弱动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
