/* =========================================================
   FDE 课程官网样式 — 苹果风格
   大留白 · 大标题 · 深浅屏交替 · 滚动渐入动画
   ========================================================= */

/* ---------- 基础 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-white: #ffffff;
  --bg-light: #f5f5f7;      /* 苹果经典的浅灰 */
  --bg-dark: #000000;       /* 苹果经典的深黑 */
  --bg-dark-2: #1d1d1f;
  --text-dark: #1d1d1f;
  --text-light: #86868b;
  --text-white: #f5f5f7;
  --text-white-dim: #a1a1a6;
  --blue: #0071e3;          /* 苹果经典蓝 */
  --blue-hover: #0077ed;
  --border-light: #d2d2d7;
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.site-header.scrolled {
  border-bottom-color: var(--border-light);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.logo-dot {
  color: var(--blue);
}

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

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links .nav-cta {
  background: var(--blue);
  color: #fff;
  padding: 7px 18px;
  border-radius: 980px;
  opacity: 1;
  font-weight: 600;
}

.nav-links .nav-cta:hover {
  background: var(--blue-hover);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* ---------- 屏幕通用 ---------- */
.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  scroll-margin-top: 52px;
  position: relative;
}

.screen-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 14px;
  font-weight: 600;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 620px;
  margin: 0 auto 48px;
}

/* ---------- 深色屏 ---------- */
.dark-screen {
  background: var(--bg-dark);
  color: var(--text-white);
}

.dark-screen .section-kicker {
  color: var(--text-white-dim);
}

.dark-screen .section-desc {
  color: var(--text-white-dim);
}

/* ---------- 浅色屏 ---------- */
.light-screen {
  background: var(--bg-light);
}

/* ---------- Hero 屏 ---------- */
.hero-screen {
  background: #000;
  color: var(--text-white);
  text-align: center;
  flex-direction: column;
}

.hero-kicker {
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-white-dim);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.3rem;
  color: var(--text-white-dim);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-white-dim);
  font-size: 1.8rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-white {
  background: var(--blue);
  color: #fff;
}

.btn-white:hover {
  background: var(--blue-hover);
}

.btn-link {
  background: none;
  color: var(--blue);
  padding: 12px 0;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-blue {
  background: var(--blue);
  color: #fff;
}

.btn-blue:hover {
  background: var(--blue-hover);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ---------- 课程简介卡片 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-item {
  background: var(--bg-dark-2);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: left;
  transition: transform 0.3s;
}

.feature-item:hover {
  transform: translateY(-4px);
}

.feature-item h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-white);
}

.feature-item p {
  font-size: 0.92rem;
  color: var(--text-white-dim);
}

/* ---------- 课程安排时间轴 ---------- */
.timeline {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.timeline-item {
  display: flex;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue);
  min-width: 56px;
  line-height: 1.2;
}

.timeline-body h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.timeline-body p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ---------- 适合人群卡片 ---------- */
.who-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.who-card {
  background: var(--bg-dark-2);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: left;
  transition: transform 0.3s;
}

.who-card:hover {
  transform: translateY(-4px);
}

.who-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.who-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-white);
}

.who-card p {
  font-size: 0.92rem;
  color: var(--text-white-dim);
}

/* ---------- 学员风采 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-dark);
  font-weight: 500;
  text-align: center;
  background: var(--bg-white);
  line-height: 1.3;
}

/* ---------- 报名表单 ---------- */
.signup-screen {
  background: var(--bg-white);
}

.signup-inner {
  max-width: 640px;
}

.signup-form {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 40px;
  text-align: left;
  margin-top: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ff3b30;
}

.form-group .error-msg {
  display: none;
  color: #ff3b30;
  font-size: 0.8rem;
  margin-top: 6px;
}

.form-group input.invalid + .error-msg,
.form-group textarea.invalid + .error-msg {
  display: block;
}

.form-actions {
  margin-top: 8px;
}

.form-tip {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 16px;
}

/* 提交成功 */
.form-success {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #34c759;
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-success h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.form-success p {
  color: var(--text-light);
  margin-bottom: 24px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
  padding: 36px 24px;
  text-align: center;
}

.site-footer p {
  color: var(--text-light);
  font-size: 0.85rem;
}

.footer-small {
  margin-top: 4px;
  font-size: 0.78rem !important;
  color: var(--text-light) !important;
}

/* ---------- 滚动渐入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.6rem;
  }

  .hero-sub {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .feature-grid,
  .who-grid {
    grid-template-columns: 1fr;
  }

  /* 学员风采在移动端也保持三列 */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 100%;
  }

  .gallery-item img {
    height: 70px;
  }

  .gallery-item figcaption {
    font-size: 0.68rem;
    padding: 6px 4px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .signup-form {
    padding: 28px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 20px 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-light);
  }

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

  .nav-toggle {
    display: block;
  }
}
