/* ========================================
   荷聚云 AI 实训平台 - 官网样式
   ======================================== */

/* ---------- Variables ---------- */
:root {
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --primary-light: #4ade80;
  --accent: #10b981;
  --accent-dark: #059669;
  --cyan: #14b8a6;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --gradient: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

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

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #052e16;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.45);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-large {
  padding: 16px 40px;
  font-size: 17px;
  border-radius: 12px;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 16, 12, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 222, 128, 0.08);
  transition: background var(--transition);
  will-change: background;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.nav-links a:not(.btn-nav-login):hover {
  color: #fff;
}

.nav-links a:not(.btn-nav-login)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-links a:not(.btn-nav-login):hover::after {
  width: 100%;
}

.btn-nav-login {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff !important;
  transition: all var(--transition);
}

.btn-nav-login:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-nav-student {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.35);
}

.btn-nav-student:hover {
  background: rgba(34, 197, 94, 0.28);
  border-color: rgba(74, 222, 128, 0.55);
}

.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: #fff;
  border-radius: 1px;
  transition: all var(--transition);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #051b10 0%, #0a2818 50%, #051b10 100%);
  position: relative;
  overflow: hidden;
  padding: 100px 24px 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 80%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  color: #fff;
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-light);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-metrics {
  display: flex;
  gap: 40px;
}

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

.metric-num {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

/* ---------- Hero Visual ---------- */
.hero-visual {
  position: relative;
  width: 100%;
  height: 420px;
  perspective: 800px;
}

.visual-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, rgba(16, 185, 129, 0.12) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(24px);
  animation: glow-pulse 4s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes glow-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-visual .card {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 20px 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
  animation: card-float 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.8s);
  will-change: transform;
}

.card-icon {
  width: 36px;
  height: 36px;
  color: var(--primary-light);
  margin-bottom: 4px;
}

.hero-visual .card strong {
  font-size: 14px;
  font-weight: 700;
}

.hero-visual .card span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.card-admin {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.card-mini {
  top: 8%;
  right: 8%;
  animation-delay: 1.5s;
}

.card-h5 {
  bottom: 18%;
  left: 5%;
  animation-delay: 3s;
}

.card-backend {
  bottom: 14%;
  right: 12%;
  animation-delay: 4.5s;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-visual .card:hover {
  transform: translateY(-6px) scale(1.04);
  background: rgba(255, 255, 255, 0.18);
}

/* ========== SECTIONS (通用) ========== */
.section {
  padding: 100px 24px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 600px;
}

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

.section-tag {
  display: inline-block;
  padding: 5px 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

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

/* ========== MODULES ========== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.module-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: all var(--transition);
}

.module-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.module-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
  border-radius: 14px;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.module-icon svg {
  width: 28px;
  height: 28px;
}

.module-item h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.module-item p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== ROLES ========== */
.roles {
  background: var(--bg-soft);
}

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

.role-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.role-card:nth-child(1)::before { background: var(--primary); }
.role-card:nth-child(2)::before { background: var(--accent); }
.role-card:nth-child(3)::before { background: var(--cyan); }

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

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.role-super {
  background: rgba(34, 197, 94, 0.1);
  color: var(--primary-dark);
}

.role-school {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-dark);
}

.role-teacher {
  background: rgba(20, 184, 166, 0.1);
  color: var(--cyan);
}

.role-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.role-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== SCENARIOS ========== */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.scenario-item {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.scenario-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.scenario-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: var(--bg-muted);
  border-radius: 16px;
  color: var(--primary);
  transition: all var(--transition);
}

.scenario-item:hover .scenario-icon {
  background: var(--gradient);
  color: #fff;
}

.scenario-icon svg {
  width: 32px;
  height: 32px;
}

.scenario-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.scenario-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== CTA ========== */
.cta-section {
  padding: 100px 24px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
}

.cta-box {
  background: linear-gradient(135deg, #051b10 0%, #0a2818 100%);
  border-radius: 24px;
  padding: 72px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -10%;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.cta-box p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.cta-box .btn {
  position: relative;
  z-index: 1;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.footer-brand .logo-icon {
  width: 28px;
  height: 28px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-tertiary);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-metrics {
    justify-content: center;
  }

  .hero-visual {
    height: 320px;
    max-width: 480px;
    margin: 0 auto;
  }

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

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

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

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(8, 16, 12, 0.95);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.08);
  }

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 16px 60px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-visual {
    display: none;
  }

  .section {
    padding: 64px 16px;
  }

  .section-header {
    margin-bottom: 40px;
  }

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

  .hero-metrics {
    gap: 24px;
  }

  .metric-num {
    font-size: 24px;
  }

  .cta-box {
    padding: 48px 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- 性能优化 ---------- */
.hero-visual.is-paused .card,
.hero-visual.is-paused .visual-glow {
  animation-play-state: paused;
}

@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;
  }
}
