/* ============================================================
 * AIPro 新手训练营宣传页 · 基础样式
 * 结构：设计 tokens → reset → 排版基线 → 通用组件
 * 视觉系统：深空蓝 + 阿里云橙点缀（与主 KV 同体系）
 * ============================================================ */

/* ---------- 设计 Tokens ---------- */
:root {
  /* 色彩 */
  --c-primary: #0A1F4D;      /* 深空蓝：Hero / S8 背景、强调 */
  --c-primary-2: #123B7A;    /* 量子蓝：渐变端点 */
  --c-primary-3: #1E56A8;   /* 亮蓝：图标 / 链接 */
  --c-accent: #FF6A00;       /* 阿里云橙：唯一"请点我"色 */
  --c-accent-2: #FF8F3D;     /* 橙渐变端点 */
  --c-cyan: #00C8D4;         /* 青色：AI 光效点缀 */
  --c-cyan-2: #33BBFF;       /* 天蓝：图表辅助 */
  --ink-1: #1A2233;          /* 标题 */
  --ink-2: #4A5568;          /* 正文 */
  --ink-3: #8A94A6;          /* 次要说明 */
  --bg-page: #FFFFFF;
  --bg-alt: #F5F7FA;         /* 模块交替背景 */
  --line: #E6EBF2;           /* 卡片描边 */

  /* 字体 */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-num: "DIN Alternate", "Inter", "Segoe UI", system-ui, sans-serif; /* 数字：倒计时 / 数据条 */

  /* 尺寸与形状 */
  --container: 1200px;      /* PRD：内容区最大宽度 */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;

  /* 阴影 */
  --shadow-card: 0 4px 16px rgba(10, 31, 77, .06);
  --shadow-card-hover: 0 12px 32px rgba(10, 31, 77, .12);
  --shadow-cta: 0 8px 24px rgba(255, 106, 0, .35);

  --topbar-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ---------- 布局基线 ---------- */
.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }

/* ---------- 图标 ---------- */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

/* ---------- 按钮（全页唯一"请点我"形态） ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:focus-visible { outline: 3px solid rgba(51, 187, 255, .55); outline-offset: 2px; }
.btn--primary {
  background: linear-gradient(135deg, var(--c-accent-2), var(--c-accent));
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 106, 0, .42); }
.btn--primary:active { transform: translateY(0); }
.btn--xl { min-width: 208px; min-height: 56px; padding: 0 40px; font-size: 18px; }
.btn--sm { min-height: 38px; padding: 0 18px; font-size: 14px; border-radius: 10px; box-shadow: 0 4px 14px rgba(255, 106, 0, .28); }
.btn--sm:hover { box-shadow: 0 6px 18px rgba(255, 106, 0, .34); }
.btn .icon { width: 18px; height: 18px; }

/* FR-01：报名链接未配置 / 已截止 的状态样式 */
.btn.is-pending { opacity: .8; }
.btn.is-expired {
  background: #98A2B3;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- 顶栏（悬浮于 Hero 深色区） ---------- */
.topbar { position: absolute; inset: 0 0 auto 0; z-index: 10; padding-top: 8px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .5px; }
/* 瓴羊 Logo（PNG 热链，高度对齐品牌字行；换白色版 / 矢量图时直接换 img 地址即可） */
.brand-mark { height: 32px; display: flex; align-items: center; }
.brand-mark img { height: 100%; width: auto; }
.topbar-right { display: flex; align-items: center; gap: 16px; }

/* FR-06 语言切换 */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
}
.lang-btn {
  min-width: 44px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255, 255, 255, .75);
}
.lang-btn.is-active { background: #fff; color: var(--c-primary); font-weight: 600; }

/* ---------- 模块通用结构 ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head h2 { font-size: 32px; line-height: 1.3; font-weight: 700; color: var(--ink-1); letter-spacing: .5px; }
.section-sub { margin-top: 14px; font-size: 16px; color: var(--ink-2); }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--c-primary-3);
  background: rgba(30, 86, 168, .08);
}

/* ---------- 倒计时（FR-01，Hero / S8 / 吸底栏共用结构） ---------- */
.countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 22px;
  border-radius: var(--radius-m);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}
.countdown-label { font-size: 14px; color: rgba(255, 255, 255, .7); }
.countdown-time {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.countdown-time b { min-width: 1.4em; text-align: center; font-size: 26px; color: var(--c-accent-2); }
.countdown-time span { margin-right: 4px; font-family: var(--font-sans); font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .65); }

/* 截止后的统一状态（由 main.js 切换 .is-expired） */
.js-countdown .cd-expired { display: none; font-weight: 600; color: #FFB38A; }
.js-countdown.is-expired .countdown-label,
.js-countdown.is-expired .countdown-time,
.js-countdown.is-expired .sticky-time { display: none; }
.js-countdown.is-expired .cd-expired { display: inline-flex; }

/* ---------- 动效兜底（可访问性） ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
