/* SR Studio 主样式表 - 移动优先与可访问性优化 */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/NotoSansSC-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/NotoSansSC-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/NotoSansSC-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/FiraCode-Medium.ttf') format('truetype');
}

:root {
  --bg-900: #0b1220;
  --bg-800: #111827;
  --bg-700: #1f2937;
  --text-100: #f3f4f6;
  --text-300: #cbd5e1;
  --text-500: #9ca3af;
  --primary: #8c24f0;
  --primary-strong: #a855f7;
  --accent: #22d3ee;
  --card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
  --radius-lg: 18px;
  --radius-sm: 10px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(140, 36, 240, 0.08), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.08), transparent 25%),
              var(--bg-800);
  color: var(--text-100);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.75rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-100);
}

p {
  margin: 0 0 1rem;
  color: var(--text-300);
}

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

a {
  color: var(--primary-strong);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-block: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 720px;
}

.section-lead {
  color: var(--text-300);
}

.eyebrow {
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--text-500);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.small {
  font-size: 0.9rem;
}

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

/* 跳转与无障碍 */
.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

/* 导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 32, 0.75);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(11, 18, 32, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.brand-name {
  font-weight: 700;
  color: #fff;
}

.nav-links {
  position: absolute;
  top: 100%;
  right: 0;
  width: min(320px, 90vw);
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0.5rem 1rem;
  display: none;
}

.nav-links ul {
  display: grid;
  gap: 0.25rem;
}

.nav-links a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--text-100);
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: rgba(140, 36, 240, 0.12);
  color: #fff;
}

.nav-links.is-open {
  display: block;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 780px) {
  .nav-toggle {
    display: none;
  }
  .nav-links {
    position: static;
    width: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: block;
  }
  .nav-links ul {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .nav-links a {
    padding: 0.5rem 0.75rem;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 5rem 0 3rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(140, 36, 240, 0.18), rgba(17, 24, 39, 0.9)),
              url('images/hero-bg.png') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.16), transparent 35%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  z-index: 1;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
}

.lead {
  font-size: 1.05rem;
  color: var(--text-300);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.hero-card {
  background: rgba(11, 18, 32, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 460px;
  margin-left: auto;
}

.hero-card__header {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.hero-card__body {
  padding: 1.25rem;
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-100);
}

.code-line { margin: 0.35rem 0; }
.code-key { color: var(--accent); }
.code-str { color: #c084fc; }
.code-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(140, 36, 240, 0.18);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.9fr;
  }
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 15px 30px rgba(140, 36, 240, 0.35);
  border-color: transparent;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn:hover {
  transform: translateY(-2px);
}

/* 卡片与网格 */
.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.card-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card h3 {
  margin-bottom: 0.35rem;
}

.card p {
  margin-bottom: 0.85rem;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(140, 36, 240, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.card-featured {
  border: 1px solid rgba(140, 36, 240, 0.4);
  background: linear-gradient(180deg, rgba(140, 36, 240, 0.14), rgba(11, 18, 32, 0.9));
}

.card-wide {
  grid-column: 1 / -1;
}

.card-label {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.35rem 0.7rem;
  background: rgba(140, 36, 240, 0.9);
  color: #fff;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}

.card-compact {
  padding: 1.25rem;
  text-align: left;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(140, 36, 240, 0.14);
  color: var(--primary-strong);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.card-grid.card-grid--three .card {
  gap: 0.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.tag {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-100);
  font-size: 0.85rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.text-link i { font-size: 0.9rem; }

/* About 与团队 */
.about-grid {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

.team-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.team-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.team-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(140, 36, 240, 0.35);
  object-fit: cover;
}

.team-card--more {
  justify-content: center;
  text-align: center;
}

/* 联系方式 */
.contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-list li + li {
  margin-top: 0.5rem;
}

.contact-list a {
  color: var(--text-100);
  text-decoration-color: rgba(140, 36, 240, 0.45);
}

.contact-list a:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

/* 页脚 */
.site-footer {
  padding: 3rem 0 2rem;
  background: var(--bg-900);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-title {
  margin-bottom: 0.75rem;
}

.footer-links li + li { margin-top: 0.35rem; }

.footer-links a,
.contact-list a {
  color: var(--text-100);
  text-decoration-color: rgba(140, 36, 240, 0.45);
}

.footer-links a:hover,
.contact-list a:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

.footer-bottom {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-500);
  display: grid;
  gap: 0.35rem;
}

/* 法律页面 */
.legal-page {
  min-height: 100vh;
  padding: 2.5rem 0;
  background: var(--bg-800);
}

.legal-container {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.legal-container h1 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.legal-container h2 {
  margin-top: 1.75rem;
  padding-left: 0.6rem;
  border-left: 4px solid var(--primary);
}

.legal-container ul,
.legal-container ol {
  padding-left: 1.25rem;
  color: var(--text-300);
}

.legal-meta {
  color: var(--text-500);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.highlight {
  background: rgba(140, 36, 240, 0.16);
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
}

/* 区块间距 */
.section + .section {
  border-top: 1px solid var(--border);
}

section { scroll-margin-top: 96px; }

@media (min-width: 960px) {
  .section {
    padding: 5rem 0;
  }
  .about-grid {
    grid-template-columns: 1.1fr 1.2fr;
  }
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

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