/* ==========================================================
   成帆教育 — AI 思维训练平台样式表
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

/* ========== Reset & Variables ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --accent: #00CEC9;
  --accent-warm: #FDCB6E;
  --accent-pink: #FD79A8;
  --dark: #1a1a2e;
  --dark2: #16213e;
  --text: #2d3436;
  --text-light: #636e72;
  --white: #ffffff;
  --radius: 20px;
  --shadow: 0 8px 32px rgba(108, 92, 231, 0.10);
  --shadow-lg: 0 20px 60px rgba(108, 92, 231, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, sans-serif;
  color: var(--text);
  background: #fafafa;
  overflow-x: hidden;
  line-height: 1.7;
}

/* ========== Navigation ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(108, 92, 231, 0.08);
  transition: all 0.3s;
}

nav.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}

.nav-logo {
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.logo {
  height: 45px;
  display: block;
}

.nav-logo span {
  font-size: 13px;
  font-weight: 400;
  -webkit-text-fill-color: var(--text-light);
  margin-left: 8px;
  letter-spacing: 1px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color 0.25s;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.25s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary), #8B5CF6);
  color: white;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.4);
}

/* ========== Hero ========== */
.hero {
  padding: 140px 48px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(160deg, #0f0c29 0%, #1a1a40 30%, #24243e 60%, #1a1a2e 100%);
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb.o1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -100px;
  right: -100px;
}

.hero-orb.o2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -80px;
  left: -80px;
  animation-delay: -3s;
}

.hero-orb.o3 {
  width: 300px;
  height: 300px;
  background: var(--accent-pink);
  top: 40%;
  left: 30%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  text-align: center;
}

.hero-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  max-width: 800px;
  width: 100%;
}

/* Section visual images */
.ai-visual,
.path-visual,
.cases-visual {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
}

.ai-visual img,
.path-visual img,
.cases-visual img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.path-visual img {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 900;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #8B5CF6);
  color: white;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.5);
}

.btn-outline {
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  background: transparent;
  color: white;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

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

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  width: 100%;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  font-size: 30px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat .label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

/* ========== Section Common ========== */
section {
  padding: 80px 48px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 12px;
  background: rgba(108, 92, 231, 0.08);
  color: var(--primary);
}

.tag-ai    { background: rgba(0, 206, 201, 0.1);  color: var(--accent); }
.tag-path  { background: rgba(253, 203, 110, 0.15); color: #e0a800; }
.tag-course { background: rgba(253, 121, 168, 0.1); color: var(--accent-pink); }
.tag-cases { background: rgba(108, 92, 231, 0.08);  color: var(--primary); }

.section-header h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ========== AI Core ========== */
.ai-core {
  background: var(--white);
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.ai-card {
  padding: 32px 24px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #f8f7ff, #fff);
  border: 1px solid rgba(108, 92, 231, 0.06);
  text-align: center;
  transition: all 0.3s;
}

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

.ai-card-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.ai-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ai-card p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ========== Subjects ========== */
.subjects {
  background: #fafafa;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.subject-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.subject-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  transition: transform 0.3s;
}

.subject-card:hover .subject-icon {
  transform: scale(1.1) rotate(-3deg);
}

.subject-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.subject-card p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
}

.subject-card .topics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.subject-card .topics span {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-light);
  transition: all 0.25s;
}

.subject-card:hover .topics span {
  background: rgba(108, 92, 231, 0.06);
  color: var(--primary);
}

/* Subject icon color variants */
.s-chinese .subject-icon   { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.s-math .subject-icon      { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.s-english .subject-icon   { background: linear-gradient(135deg, #d4fc79, #96e6a1); }
.s-physics .subject-icon   { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.s-chemistry .subject-icon { background: linear-gradient(135deg, #f093fb, #f5576c); color: white; }
.s-biology .subject-icon   { background: linear-gradient(135deg, #4facfe, #00f2fe); color: white; }
.s-history .subject-icon   { background: linear-gradient(135deg, #fccb90, #d57eeb); }
.s-geography .subject-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.s-politics .subject-icon  { background: linear-gradient(135deg, #fa709a, #fee140); }

/* ========== Learning Path ========== */
.path {
  background: var(--dark);
  color: white;
  position: relative;
  overflow: hidden;
}

.path .hero-orb { opacity: 0.15; }

.path .section-header h2 { color: white; }
.path .section-header p  { color: rgba(255, 255, 255, 0.5); }

.path-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.path-step {
  text-align: center;
}

.step-num {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.3);
}

.path-step h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.path-step p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}

/* ========== Courses ========== */
.courses {
  background: linear-gradient(180deg, #f8f7ff 0%, var(--white) 100%);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.course-card {
  padding: 36px 28px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.course-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.c-starter .course-badge  { background: rgba(0, 206, 201, 0.12); color: var(--accent); }
.c-advanced .course-badge  { background: rgba(108, 92, 231, 0.1);  color: var(--primary); }
.c-elite .course-badge     { background: rgba(253, 121, 168, 0.12); color: var(--accent-pink); }

.course-card h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 4px;
}

.course-level {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.course-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.course-features {
  list-style: none;
}

.course-features li {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
  padding-left: 20px;
}

.course-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ========== Cases ========== */
.cases {
  background: var(--white);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.case-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #f8f7ff, #fff);
  border: 1px solid rgba(108, 92, 231, 0.06);
  transition: all 0.3s;
}

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

.case-stars {
  color: var(--accent-warm);
  font-size: 16px;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.case-card blockquote {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
  font-style: italic;
}

.case-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.case-name {
  font-size: 15px;
  font-weight: 700;
}

.case-info {
  font-size: 13px;
  color: var(--text-light);
}

/* ========== CTA ========== */
.cta-section {
  padding: 80px 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--white) 0%, #f0eeff 100%);
}

.cta-box {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 48px;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark), var(--dark2));
}

.cta-box .hero-orb {
  opacity: 0.3;
}

.cta-box h2 {
  font-size: 32px;
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

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

.cta-box .btn-primary {
  position: relative;
  z-index: 2;
  font-size: 16px;
  padding: 16px 44px;
}

/* ========== Footer ========== */
footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.5);
  padding: 48px 48px 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 40px;
}

.footer-brand .nav-logo {
  font-size: 24px;
  margin-bottom: 12px;
  display: inline-block;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  max-width: 280px;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.beian {
  color: #666;
  text-decoration: none;
}

/* ========== Animations ========== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  nav {
    padding: 14px 24px;
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 60px 20px;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .ai-grid,
  .path-grid,
  .courses-grid,
  .cases-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .ai-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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