/* ============================================
   合肥专升本 AI 速成 — Design System
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-primary: #0F172A;
  --color-on-primary: #FFFFFF;
  --color-secondary: #2563EB;
  --color-on-secondary: #FFFFFF;
  --color-accent: #D97706;
  --color-on-accent: #FFFFFF;
  --color-background: #FFFBEB;
  --color-foreground: #0F172A;
  --color-card: #FFFFFF;
  --color-card-foreground: #0F172A;
  --color-muted: #F6F6F6;
  --color-muted-foreground: #64748B;
  --color-border: #EEEDED;
  --color-destructive: #DC2626;
  --color-ring: #2563EB;
  --color-step-problem: #DC2626;
  --color-step-process: #D97706;
  --color-step-solution: #059669;

  /* Typography */
  --font-heading: 'Noto Sans SC', 'Poppins', sans-serif;
  --font-body: 'Noto Serif SC', 'Open Sans', serif;
  --font-ui: 'Noto Sans SC', 'Open Sans', sans-serif;
  --text-hero: 2rem;
  --text-h1: 1.75rem;
  --text-h2: 1.25rem;
  --text-h3: 1.125rem;
  --text-body: 1rem;
  --text-small: 0.875rem;
  --line-height-body: 1.6;
  --line-height-heading: 1.3;

  /* Spacing (8dp rhythm) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}

/* Desktop overrides */
@media (min-width: 768px) {
  :root {
    --text-hero: 2.5rem;
    --text-h1: 2rem;
    --text-h2: 1.5rem;
    --text-h3: 1.25rem;
  }
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--line-height-body);
  color: var(--color-foreground);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--color-primary);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-3xl) 0;
}

/* --- Bento Card --- */
.bento-card {
  border-radius: 16px;
  padding: var(--space-lg);
  background: var(--color-card);
  color: var(--color-card-foreground);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.bento-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* --- CTA Buttons --- */
.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: none;
  border-radius: 12px;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-body);
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.cta-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
}

.cta-primary:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.cta-mini {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: transparent;
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
  border-radius: 8px;
  padding: 12px var(--space-lg);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-small);
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms ease-out, color 200ms ease-out;
}

.cta-mini:hover {
  background: var(--color-secondary);
  color: var(--color-on-secondary);
}

.cta-mini:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

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

.slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.slide-left.visible,
.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger-1 { transition-delay: 0ms; }
.stagger-2 { transition-delay: 80ms; }
.stagger-3 { transition-delay: 160ms; }
.stagger-4 { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .fade-in, .slide-left, .slide-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Icon --- */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-sm { width: 24px; height: 24px; }
.icon-md { width: 32px; height: 32px; }
.icon-lg { width: 48px; height: 48px; }

/* --- Trust Badge --- */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: var(--color-secondary);
}

/* ============================================
   Section: Hero
   ============================================ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: var(--space-3xl) 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero__content {
  text-align: center;
}

.hero__title {
  font-size: var(--text-hero);
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-family: var(--font-ui);
  font-size: var(--text-h3);
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.1em;
}

.hero__cta {
  margin-bottom: var(--space-xl);
}

.hero__image img {
  border-radius: 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  .hero__content {
    text-align: left;
  }
}

/* ============================================
   Section: Comparison
   ============================================ */
.comparison {
  background: var(--color-muted);
}

.comparison__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.comparison__card--old {
  background: #F1F5F9;
  border-left: 4px solid #94A3B8;
}

.comparison__card--new {
  background: #EFF6FF;
  border-left: 4px solid var(--color-secondary);
}

.comparison__card h3 {
  margin-bottom: var(--space-md);
}

.comparison__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-family: var(--font-ui);
}

.comparison__item + .comparison__item {
  border-top: 1px solid var(--color-border);
}

.comparison__image {
  margin-top: var(--space-xl);
}

.comparison__image img {
  border-radius: 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .comparison__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   Section: AI Demo (AI 改变学习方式)
   ============================================ */
.ai-demo {
  background: var(--color-muted);
}

.ai-demo__comparison {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.ai-demo__old {
  background: #F1F5F9;
  border-left: 4px solid #94A3B8;
}

.ai-demo__new {
  background: #EFF6FF;
  border-left: 4px solid var(--color-secondary);
  padding-bottom: var(--space-md);
}

.ai-demo__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-h3);
  margin-bottom: var(--space-md);
}

.ai-demo__label--old {
  color: #94A3B8;
}

.ai-demo__label--new {
  color: var(--color-secondary);
}

.ai-demo__wordlist {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: var(--color-muted-foreground);
  line-height: 2;
}

.ai-demo__word {
  padding: 2px 0;
  border-bottom: 1px dashed var(--color-border);
}

.ai-demo__word span {
  color: #94A3B8;
  margin-left: var(--space-sm);
}

.ai-demo__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.ai-demo__image-wrap img {
  border-radius: 12px;
  width: 100%;
}

.ai-demo__verdict {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: #94A3B8;
  text-align: center;
  margin-top: var(--space-md);
  font-style: italic;
}

.ai-demo__verdict--good {
  color: var(--color-step-solution);
  font-weight: 500;
}

/* --- AI Demo: Math Gallery --- */
.ai-demo__math-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.ai-demo__math-gallery .ai-demo__image-wrap img {
  border-radius: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .ai-demo__math-gallery {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* --- AI Demo: Divider --- */
.ai-demo__divider {
  text-align: center;
  margin: var(--space-2xl) 0 var(--space-lg);
  position: relative;
}

.ai-demo__divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-border);
}

.ai-demo__divider span {
  position: relative;
  background: var(--color-muted);
  padding: 0 var(--space-lg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-h3);
  color: var(--color-primary);
}

/* --- AI Demo: Math Old --- */
.ai-demo__math-old {
  font-family: var(--font-ui);
  font-size: var(--text-small);
}

.ai-demo__math-title {
  color: #94A3B8;
  margin-bottom: var(--space-sm);
  font-size: 0.8125rem;
}

.ai-demo__formula {
  background: #E2E8F0;
  border-radius: 8px;
  padding: var(--space-md);
  font-family: 'Courier New', monospace;
  font-size: 0.8125rem;
  line-height: 1.8;
  color: #475569;
}

.ai-demo__math-step {
  padding-left: var(--space-md);
}

.ai-demo__thought {
  margin-top: var(--space-md);
  color: var(--color-step-problem);
  font-style: italic;
  font-size: 0.8125rem;
}

/* --- AI Demo: Chat Bubbles --- */
.ai-demo__chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ai-demo__bubble {
  border-radius: 12px;
  padding: var(--space-md);
  font-family: var(--font-ui);
  font-size: var(--text-small);
  line-height: 1.7;
  position: relative;
}

.ai-demo__bubble-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: var(--space-xs);
}

.ai-demo__bubble--think {
  background: #FEF3C7;
  border-left: 3px solid var(--color-accent);
  font-style: italic;
  color: #92400E;
}

.ai-demo__bubble--think .ai-demo__bubble-tag {
  background: var(--color-accent);
  color: white;
}

.ai-demo__bubble--step {
  background: #EFF6FF;
  border-left: 3px solid var(--color-secondary);
  color: #1E40AF;
}

.ai-demo__bubble--step .ai-demo__bubble-tag {
  background: var(--color-secondary);
  color: white;
}

.ai-demo__bubble--warn {
  background: #FEF2F2;
  border-left: 3px solid var(--color-step-problem);
  color: #991B1B;
}

.ai-demo__bubble--warn .ai-demo__bubble-tag {
  background: var(--color-step-problem);
  color: white;
}

.ai-demo__bubble--summary {
  background: #ECFDF5;
  border-left: 3px solid var(--color-step-solution);
  color: #065F46;
}

.ai-demo__bubble--summary .ai-demo__bubble-tag {
  background: var(--color-step-solution);
  color: white;
}

@media (min-width: 768px) {
  .ai-demo__comparison {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}

/* ============================================
   Section: Funnel (3-Step Process)
   ============================================ */
.funnel__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.funnel__step {
  text-align: center;
  position: relative;
}

.funnel__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.funnel__icon--problem { background: rgba(220, 38, 38, 0.1); color: var(--color-step-problem); }
.funnel__icon--process { background: rgba(217, 119, 6, 0.1); color: var(--color-step-process); }
.funnel__icon--solution { background: rgba(5, 150, 105, 0.1); color: var(--color-step-solution); }

.funnel__step h3 {
  margin-bottom: var(--space-sm);
}

.funnel__step p {
  color: var(--color-muted-foreground);
  font-size: var(--text-small);
}

.funnel__arrow {
  display: none;
}

.funnel__image {
  margin-top: var(--space-xl);
}

.funnel__image img {
  border-radius: 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .funnel__grid {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: flex-start;
  }
  .funnel__arrow {
    display: flex;
    align-items: center;
    padding-top: 20px;
    color: var(--color-muted-foreground);
  }
}

/* ============================================
   Section: Mentor (Trust & Authority)
   ============================================ */
.mentor .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.mentor__image img {
  border-radius: 16px;
  width: 100%;
}

.mentor__quote {
  font-family: var(--font-body);
  font-size: var(--text-h2);
  font-style: italic;
  color: var(--color-primary);
  border-left: 4px solid var(--color-accent);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
}

.mentor__skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.skill-tag {
  padding: var(--space-xs) var(--space-md);
  background: rgba(37, 99, 235, 0.08);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: var(--color-secondary);
  font-weight: 500;
}

@media (min-width: 768px) {
  .mentor .container {
    grid-template-columns: 2fr 3fr;
  }
}

/* ============================================
   Section: Partner Plan
   ============================================ */
.partner__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.partner__card .icon-lg {
  margin-bottom: var(--space-md);
  color: var(--color-accent);
}

.partner__card h3 {
  font-size: var(--text-h3);
  margin-bottom: var(--space-sm);
}

.partner__card p {
  color: var(--color-muted-foreground);
  font-size: var(--text-small);
}

.partner__image {
  margin-top: var(--space-xl);
}

.partner__image img {
  border-radius: 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .partner__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   Section: Final CTA
   ============================================ */
.final-cta {
  text-align: center;
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.final-cta h2 {
  color: var(--color-on-primary);
}

.final-cta__qr {
  width: 280px;
  height: 280px;
  margin: var(--space-xl) auto;
  background: var(--color-card);
  border-radius: 20px;
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
}

.final-cta__qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.final-cta__sub {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-small);
  margin-top: var(--space-md);
}

/* ============================================
   Sticky Mobile CTA
   ============================================ */
.sticky-cta {
  display: none;
}

@media (max-width: 767px) {
  .sticky-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom));
    background: rgba(255, 251, 235, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--color-border);
    z-index: 100;
    justify-content: center;
  }

  .sticky-cta .cta-primary {
    width: 100%;
    max-width: 400px;
  }

  /* Prevent content from being hidden behind sticky CTA */
  body {
    padding-bottom: 80px;
  }
}

/* ============================================
   QR Modal (Mobile)
   ============================================ */
.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.qr-modal.active {
  display: flex;
}

.qr-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.qr-modal__content {
  position: relative;
  background: var(--color-card);
  border-radius: 16px;
  padding: var(--space-xl);
  text-align: center;
  max-width: 320px;
  width: 90%;
}

.qr-modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted-foreground);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-modal__close:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

/* ============================================
   Section utility
   ============================================ */
.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__header h2 {
  font-size: var(--text-h1);
  margin-bottom: var(--space-sm);
}

.section__header p {
  color: var(--color-muted-foreground);
  max-width: 600px;
  margin: 0 auto;
}

.section__footer {
  text-align: center;
  margin-top: var(--space-xl);
}
