/* === Design Tokens === */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1e293b;
  --bg-alt: #0d1321;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);

  --border-color: rgba(255, 255, 255, 0.06);

  --font-stack: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  --max-width: 1120px;
  --section-py: clamp(72px, 12vw, 120px);
  --radius: 12px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.08);

  --nav-h: 60px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-stack);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: var(--accent-cyan); text-decoration: none; }

/* === Nav === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 14, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--text-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent-gradient) !important;
  color: #fff !important;
  padding: 7px 18px;
  border-radius: 6px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 520px; }

/* === Section === */
.section {
  padding: var(--section-py) 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-primary);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 25%, transparent 70%);
}
.hero-glow {
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.14) 0%, rgba(6, 182, 212, 0.06) 40%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + 20px);
}
.hero-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: #fff;
}
.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-stack);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.4);
}
.btn-block { width: 100%; text-align: center; }

/* === Cards === */
.card-grid {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}
.card-grid-3 { grid-template-columns: 1fr; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  color: var(--accent-blue);
  margin-bottom: 20px;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.transition-text {
  text-align: center;
  margin-top: 48px;
  font-size: 1.15rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

/* Role Cards */
.card-role { text-align: center; }
.role-emoji {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* === Mechanism === */
.mechanism-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
}
.mechanism-layer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 460px;
}
.layer-ai { border-left: 3px solid var(--accent-blue); }
.layer-human { border-left: 3px solid var(--accent-cyan); }

.layer-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.layer-badge-human {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
}
.layer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.layer-list {
  list-style: none;
}
.layer-list li {
  padding: 7px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding-left: 20px;
  position: relative;
}
.layer-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 15px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
}
.layer-human .layer-list li::before { background: var(--accent-cyan); }

/* Arrow */
.mechanism-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.arrow-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.arrow-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  writing-mode: vertical-lr;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.arrow-line {
  width: 2px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 1px;
}
.arrow-head {
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--accent-cyan);
}

/* Flywheel */
.flywheel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.flywheel-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.flywheel-arrow {
  color: var(--accent-blue);
  font-size: 1.1rem;
  font-weight: 700;
}

/* === Feed === */
.feed-list {
  max-width: 640px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feed-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.25s;
}
.feed-item:hover { border-color: rgba(59, 130, 246, 0.15); }
.feed-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.feed-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.feed-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* === Register Section === */
.section-register {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    var(--bg-primary);
  border-top: 1px solid rgba(59, 130, 246, 0.08);
}
.register-form {
  margin-top: 36px;
}

/* === Form === */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-stack);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-group input.error,
.form-group select.error { border-color: #ef4444; }

.form-success {
  display: none;
  text-align: center;
  padding: 40px 0;
}
.form-success.show { display: block; }
.form-success svg { margin: 0 auto 20px; }
.form-success p { font-size: 1.1rem; color: var(--text-secondary); }

/* === Footer === */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.footer-copy { color: var(--text-muted); }
.footer a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer a:hover { color: var(--text-primary); }

/* === Reveal Animation === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.card-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.feed-list .reveal:nth-child(2) { transition-delay: 0.08s; }
.feed-list .reveal:nth-child(3) { transition-delay: 0.16s; }
.feed-list .reveal:nth-child(4) { transition-delay: 0.24s; }
.feed-list .reveal:nth-child(5) { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* === Responsive: Tablet+ === */
@media (min-width: 768px) {
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .mechanism-layout {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
  }
  .mechanism-layer { max-width: 420px; }
  .mechanism-arrow {
    flex-direction: column;
    padding: 0;
  }
  .arrow-line { height: 60px; }
  .flywheel { gap: 12px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 24px 20px; }
  .btn { padding: 12px 28px; font-size: 0.95rem; }
  .flywheel-step { padding: 8px 14px; font-size: 0.85rem; }
}
