/* ===== Mission Pages Styles ===== */
/* Extends the paxember.com design system (style.css / style-new.css) */

/* Mission Hero */
.mission-hero {
  position: relative;
  padding: 140px 0 60px;
  background: var(--color-bg-dark);
  overflow: hidden;
  text-align: center;
}

.mission-hero .hero-bg {
  position: absolute;
  inset: 0;
}

.mission-hero.pixel .hero-bg {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(124, 58, 237, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(124, 58, 237, 0.1) 0%, transparent 40%);
}

.mission-hero.echo .hero-bg {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(6, 182, 212, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
}

.mission-hero.algo .hero-bg {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(249, 115, 22, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(249, 115, 22, 0.1) 0%, transparent 40%);
}

.mission-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.mission-hero .chapter-label {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.mission-hero.pixel .chapter-label {
  background: rgba(124, 58, 237, 0.2);
  color: var(--color-purple-light);
  border: 1px solid rgba(124, 58, 237, 0.4);
}

.mission-hero.echo .chapter-label {
  background: rgba(6, 182, 212, 0.2);
  color: var(--color-teal);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.mission-hero.algo .chapter-label {
  background: rgba(249, 115, 22, 0.2);
  color: var(--color-orange);
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.mission-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.mission-hero .mission-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.mission-hero .mission-time {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.5rem 1.2rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  color: var(--color-text-light);
  font-size: 0.95rem;
  font-weight: 500;
}

.mission-hero .char-img {
  position: absolute;
  bottom: -10px;
  right: 10%;
  width: 100px;
  opacity: 0.15;
  z-index: 1;
}

/* Mission Content Area */
.mission-content {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-light);
}

.mission-content .container {
  max-width: 800px;
}

/* Superpowers Section */
.superpowers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

.superpower-card {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
}

.superpower-card.human {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
}

.superpower-card.ai {
  background: linear-gradient(135deg, #f0f9ff, #dbeafe);
  border: 1px solid #bfdbfe;
}

.superpower-card.together {
  background: linear-gradient(135deg, #fefce8, #fef3c7);
  border: 1px solid #fde68a;
}

.superpower-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.superpower-card.human h3 { color: #16a34a; }
.superpower-card.ai h3 { color: #2563eb; }
.superpower-card.together h3 { color: #d97706; }

.superpower-card ul {
  list-style: none;
  text-align: left;
}

.superpower-card li {
  padding: 0.3rem 0;
  font-size: 0.95rem;
  color: var(--color-text-body);
  line-height: 1.5;
}

.superpower-card li::before {
  content: "✦ ";
  font-size: 0.8em;
}

.superpower-card.human li::before { color: #16a34a; }
.superpower-card.ai li::before { color: #2563eb; }
.superpower-card.together li::before { color: #d97706; }

/* What You'll Need */
.needs-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-3xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

.needs-box h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-lg);
}

.checklist {
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: 0.6rem 0;
  font-size: 1rem;
  color: var(--color-text-body);
  line-height: 1.5;
}

.checklist li::before {
  content: "☐";
  font-size: 1.2em;
  flex-shrink: 0;
  margin-top: -1px;
}

/* Step Sections */
.step {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  position: relative;
}

.step-number {
  position: absolute;
  top: -14px;
  left: var(--space-xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
}

.pixel .step-number { background: var(--color-pixel); }
.echo .step-number { background: var(--color-echo); }
.algo .step-number { background: var(--color-algo); }

.step h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
}

.step .time-est {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.step p, .step li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-body);
  margin-bottom: var(--space-md);
}

.step ul, .step ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.step li {
  margin-bottom: var(--space-sm);
}

/* Fill-in blanks */
.fill-in {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.fill-in label {
  display: block;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

.fill-in .blank {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 2px solid #94a3b8;
  background: transparent;
  padding: var(--space-sm) 0;
  font-size: 1rem;
  color: var(--color-text-dark);
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
}

.fill-in .blank:focus {
  outline: none;
  border-bottom-color: var(--color-cyan);
}

.fill-in .blank-large {
  min-height: 80px;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  resize: vertical;
  width: 100%;
  font-size: 1rem;
  font-family: var(--font-body);
  background: white;
}

/* Pro Tips */
.pro-tip {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-left: 4px solid #3b82f6;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.pro-tip::before {
  content: "💡 Pro Tip";
  display: block;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pro-tip p {
  margin-bottom: 0;
  color: #1e40af;
}

/* Parent Note */
.parent-note {
  background: linear-gradient(135deg, #fefce8, #fef3c7);
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.parent-note::before {
  content: "👨‍👩‍👧 Parent Note";
  display: block;
  font-weight: 700;
  color: #92400e;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Example boxes */
.example {
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border: 1px solid #e2e8f0;
}

.example::before {
  content: "Example";
  display: block;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* AI Prompt Template */
.prompt-template {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  position: relative;
}

.prompt-template::before {
  content: "Copy this prompt:";
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-cyan);
  margin-bottom: var(--space-md);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Success Criteria */
.success-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-3xl) 0 var(--space-xl);
}

.success-box h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: var(--space-lg);
}

.success-box li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: 0.5rem 0;
  font-size: 1rem;
  color: #166534;
  line-height: 1.5;
}

.success-box li::before {
  content: "✅";
  flex-shrink: 0;
}

/* Troubleshooting */
.troubleshoot {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  border: 1px solid #e2e8f0;
}

.troubleshoot h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-lg);
}

.troubleshoot-item {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid #e2e8f0;
}

.troubleshoot-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.troubleshoot-item .problem {
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
}

.troubleshoot-item .solution {
  color: var(--color-text-body);
  padding-left: var(--space-lg);
  border-left: 3px solid #e2e8f0;
  line-height: 1.7;
}

/* Talk About It */
.talk-about {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

.talk-about h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-lg);
}

.talk-about .group {
  margin-bottom: var(--space-xl);
}

.talk-about .group:last-child {
  margin-bottom: 0;
}

.talk-about .group h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}

.talk-about .group.kids h3 { color: var(--color-cyan); }
.talk-about .group.parents h3 { color: var(--color-purple); }

.talk-about ul {
  list-style: disc;
  margin-left: var(--space-xl);
}

.talk-about li {
  padding: 0.4rem 0;
  font-size: 1rem;
  color: var(--color-text-body);
  line-height: 1.6;
}

/* Character Quote */
.character-quote {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
}

.character-quote.pixel { background: linear-gradient(135deg, #f5f3ff, #ede9fe); border: 1px solid #c4b5fd; }
.character-quote.echo { background: linear-gradient(135deg, #ecfeff, #cffafe); border: 1px solid #67e8f9; }
.character-quote.algo { background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 1px solid #fdba74; }

.character-quote img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}

.character-quote blockquote {
  font-size: 1.05rem;
  line-height: 1.6;
  font-style: italic;
}

.character-quote.pixel blockquote { color: #5b21b6; }
.character-quote.echo blockquote { color: #0e7490; }
.character-quote.algo blockquote { color: #c2410c; }

/* Mission Navigation */
.mission-nav {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-dark);
  text-align: center;
}

.mission-nav h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
}

.mission-nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.mission-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text-light);
}

.mission-nav-links a:hover {
  transform: translateY(-2px);
}

.mission-nav-links a.pixel { border-color: var(--color-pixel); }
.mission-nav-links a.pixel:hover { background: rgba(124, 58, 237, 0.2); }
.mission-nav-links a.echo { border-color: var(--color-echo); }
.mission-nav-links a.echo:hover { background: rgba(6, 182, 212, 0.2); }
.mission-nav-links a.algo { border-color: var(--color-algo); }
.mission-nav-links a.algo:hover { background: rgba(249, 115, 22, 0.2); }

.back-to-hub {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.back-to-hub:hover {
  color: var(--color-text-light);
}

/* Print Styles */
@media print {
  .header, .mission-nav, .back-to-hub, .mission-hero .char-img { display: none; }
  .mission-hero { padding: 20px 0; background: white; }
  .mission-hero h1 { color: black; font-size: 1.8rem; }
  .mission-hero .chapter-label { border: 1px solid #333; color: #333; background: #eee; }
  .mission-hero .mission-subtitle, .mission-hero .mission-time { color: #333; }
  .step, .needs-box, .success-box, .troubleshoot, .talk-about { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .fill-in .blank { border-bottom: 1px solid #999; }
  .prompt-template { background: #f0f0f0; color: black; }
}

/* Hub Page */
.hub-hero {
  position: relative;
  padding: 140px 0 80px;
  background: var(--color-bg-dark);
  overflow: hidden;
  text-align: center;
}

.hub-hero .hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(124, 58, 237, 0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 30%, rgba(6, 182, 212, 0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(249, 115, 22, 0.15) 0%, transparent 40%);
}

.hub-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.hub-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.hub-hero p {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

.chapter-section:nth-child(odd) {
  background: var(--color-bg-light);
}

.chapter-section:nth-child(even) {
  background: white;
}

.chapter-section h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.chapter-section .chapter-desc {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
  font-size: 1.05rem;
}

.mission-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.mission-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  text-align: center;
  border-top: 4px solid transparent;
}

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

.mission-card.pixel { border-top-color: var(--color-pixel); }
.mission-card.pixel:hover { box-shadow: 0 20px 40px rgba(124, 58, 237, 0.15); }
.mission-card.echo { border-top-color: var(--color-echo); }
.mission-card.echo:hover { box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15); }
.mission-card.algo { border-top-color: var(--color-algo); }
.mission-card.algo:hover { box-shadow: 0 20px 40px rgba(249, 115, 22, 0.15); }

.mission-card img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin: 0 auto var(--space-md);
}

.mission-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
}

.mission-card .time {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.mission-card p {
  font-size: 0.95rem;
  color: var(--color-text-body);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.mission-card .btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  transition: all var(--transition-base);
}

.mission-card.pixel .btn { background: var(--color-pixel); }
.mission-card.pixel .btn:hover { background: #6d28d9; }
.mission-card.echo .btn { background: var(--color-echo); }
.mission-card.echo .btn:hover { background: #0891b2; }
.mission-card.algo .btn { background: var(--color-algo); }
.mission-card.algo .btn:hover { background: #ea580c; }

/* Responsive */
@media (max-width: 768px) {
  .superpowers {
    grid-template-columns: 1fr;
  }
  .mission-cards {
    grid-template-columns: 1fr;
  }
  .mission-nav-links {
    flex-direction: column;
    align-items: center;
  }
  .character-quote {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
