/* 龙花跳绳官网 — 对齐 App UI 规范（学校蓝 Material 风格） */
:root {
  --primary: #2196F3;
  --primary-dark: #1976D2;
  --primary-light: #BBDEFB;
  --primary-surface: #E3F2FD;
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-disabled: #BDBDBD;
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --divider: #E0E0E0;
  --shadow: 0 2px 8px rgba(33, 150, 243, 0.08);
  --shadow-lg: 0 8px 32px rgba(33, 150, 243, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Roboto", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  user-select: none;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.internal-banner {
  margin: 0;
  padding: 10px 20px;
  background: #FFF8E1;
  color: #6D4C00;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid #FFE082;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius);
}

.nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.is-active { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero */
.hero {
  padding: 72px 0 80px;
  background: linear-gradient(160deg, var(--primary-surface) 0%, var(--surface) 45%, var(--bg) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-surface);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid var(--primary-light);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-transform: none;
  letter-spacing: 0.02em;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.45);
}

.btn-outline {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--primary-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-surface);
  color: var(--primary-dark);
}

.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--divider);
}

.hero-visual img { width: 100%; height: auto; }

/* Section common */
.section {
  padding: 80px 0;
}

.section-alt { background: var(--surface); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 24px 20px;
  background: var(--primary-surface);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

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

.feature-card h3 {
  font-size: 1.0625rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

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

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--divider);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--primary-surface);
}

.product-body { padding: 24px; }

.product-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--primary-surface);
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.product-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.product-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.product-specs {
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.product-specs li {
  padding: 8px 0;
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
}

.product-specs li span { color: var(--text-secondary); }

/* Sub-projects / Progress */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: start;
  transition: box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.project-item:hover { box-shadow: var(--shadow-lg); }

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.project-main h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 600;
}

.project-main .project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid var(--divider);
}

.progress-wrap { width: 100%; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.progress-bar {
  height: 6px;
  background: var(--divider);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 1s ease;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
}

.status-done { background: #E8F5E9; color: #2E7D32; }
.status-active { background: #FFF3E0; color: #E65100; }
.status-plan { background: var(--primary-surface); color: var(--primary-dark); }
.status-todo { background: var(--bg); color: var(--text-disabled); border: 1px solid var(--divider); }

.project-milestones {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.project-milestones ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.project-milestones li::before {
  content: "✓ ";
  color: var(--success);
  font-weight: 700;
}

.project-milestones li.pending::before {
  content: "○ ";
  color: var(--text-disabled);
}

/* Architecture */
.arch-diagram {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1565C0 100%);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  color: #fff;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
}

.arch-flow {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.arch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.arch-node {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  font-size: 0.875rem;
  text-align: center;
  min-width: 120px;
}

.arch-node.highlight {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(187, 222, 251, 0.3);
}

.arch-arrow {
  color: var(--primary-light);
  font-size: 1.25rem;
  font-weight: 700;
}

.arch-label {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item.future::before {
  background: var(--divider);
  box-shadow: 0 0 0 2px var(--divider);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.timeline-item h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-weight: 600;
}

.timeline-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Download page */
.download-hero {
  padding: 64px 0 48px;
  text-align: center;
}

.download-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
}

.download-app-icon {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.download-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.download-hero .hero-desc {
  margin-inline: auto;
}

.download-unavailable {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warning, #ff9800) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning, #ff9800) 35%, transparent);
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.download-card.is-unavailable {
  opacity: 0.72;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.download-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.download-platform-icon {
  font-size: 32px;
  color: var(--primary);
  background: var(--primary-surface);
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-card-head h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.download-card-head p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.download-qr {
  aspect-ratio: 1;
  width: min(180px, 100%);
  margin-inline: auto;
  border: 1px dashed var(--primary-light);
  border-radius: var(--radius);
  background: var(--primary-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.download-qr .material-symbols-outlined {
  font-size: 48px;
  color: var(--primary);
  opacity: 0.55;
}

.download-qr img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) - 2px);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download-actions .btn {
  flex: 1;
  min-width: 140px;
}

.btn.is-disabled,
.btn.is-disabled:hover {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
  cursor: not-allowed;
  box-shadow: none;
}

.download-note {
  font-size: 0.8125rem;
  color: var(--text-disabled);
  text-align: center;
}

.download-extra {
  text-align: center;
}

.download-extra .section-header {
  margin-bottom: 24px;
}

/* Legal / 公开文档 */
.legal-page {
  padding-top: 40px;
  padding-bottom: 64px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.legal-aside {
  position: sticky;
  top: 88px;
}

.legal-aside-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.legal-nav a:hover {
  background: var(--primary-surface);
  color: var(--primary-dark);
}

.legal-nav a.is-active {
  background: var(--primary-surface);
  color: var(--primary-dark);
  font-weight: 600;
}

.legal-doc {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  max-width: 720px;
}

.legal-doc h2 {
  font-size: 1.375rem;
  margin: 1.5em 0 0.6em;
  color: var(--text-primary);
  line-height: 1.35;
}

.legal-doc h2:first-child {
  margin-top: 0;
}

.legal-doc h3 {
  font-size: 1.125rem;
  margin: 1.25em 0 0.5em;
}

.legal-doc h4 {
  font-size: 1rem;
  margin: 1.1em 0 0.4em;
}

.legal-doc p {
  margin: 0.7em 0;
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal-doc strong {
  font-weight: 600;
}

.legal-doc a {
  word-break: break-all;
}

.legal-doc em {
  color: var(--text-secondary);
  font-style: normal;
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 32px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-col h4 {
  color: #fff;
  font-size: 0.875rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8125rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
  margin: 0.35em 0;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom a:hover {
  color: #fff;
}

.company-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  line-height: 1.7;
}

.company-card p {
  margin: 0.55em 0;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.company-card a {
  color: var(--primary);
  word-break: break-all;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-height: 280px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr; }
  .project-item { grid-template-columns: 1fr; }
  .status-badge { justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-aside { position: static; }
  .legal-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .legal-doc { padding: 24px 20px; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 20px 4vw;
    border-bottom: 1px solid var(--divider);
    gap: 16px;
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 56px 0; }
  .project-item { padding: 20px; }
}
