/* ============================================================
   ShaderStudy – Intro Page Styles
   ============================================================ */

/* ── Nav ───────────────────────────────────────────────────── */
.intro-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  animation: pulse-glow 3s ease-in-out infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { transform: scaleX(1); }

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--space-20) 0 var(--space-16);
}

/* Animated background mesh */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -100px;
  left: -150px;
  animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #c026d3, transparent 70%);
  top: 100px;
  right: -50px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #2563eb, transparent 70%);
  bottom: 0;
  left: 40%;
  animation: float 12s ease-in-out infinite;
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-badge {
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-actions .btn {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
}

/* 3D Shader card floating on right */
.hero-visual {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 440px;
  padding: var(--space-4);
  pointer-events: none;
}

.shader-preview-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: float 7s ease-in-out infinite;
}

.shader-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.shader-card-filename {
  margin-left: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.shader-card-body {
  padding: var(--space-4);
  background: #0a0a14;
}

.shader-card-body pre {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: #a0a0c0;
  white-space: pre;
  overflow: hidden;
}

/* Token colors */
.tok-keyword  { color: #c084fc; }
.tok-string   { color: #86efac; }
.tok-number   { color: #fb923c; }
.tok-comment  { color: #4b5563; font-style: italic; }
.tok-type     { color: #67e8f9; }
.tok-fn       { color: #fbbf24; }
.tok-prop     { color: #f0f0ff; }
.tok-punct    { color: #6b7280; }

/* ── Stats Row ─────────────────────────────────────────────── */
.stats-row {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-8);
  text-align: center;
}

.stat-item {}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Features Section ──────────────────────────────────────── */
.features-section {
  padding: var(--space-20) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(124,58,237,0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent-soft);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: var(--space-5);
}

.feature-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.feature-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Curriculum Section ────────────────────────────────────── */
.curriculum-section {
  padding: var(--space-20) 0;
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-surface) 50%, var(--bg-base) 100%);
}

.curriculum-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 800px;
  margin: 0 auto;
}

.chapter-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.chapter-card:hover { border-color: var(--border-accent); }

.chapter-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  user-select: none;
}

.chapter-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-accent-soft);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-2);
  flex-shrink: 0;
}

.chapter-title {
  font-size: var(--text-base);
  font-weight: 600;
  flex: 1;
}

.chapter-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.chapter-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}
.chapter-card.open .chapter-chevron { transform: rotate(180deg); }

.chapter-lessons {
  display: none;
  border-top: 1px solid var(--border-subtle);
}
.chapter-card.open .chapter-lessons { display: block; }

.chapter-lesson-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6) var(--space-3) var(--space-16);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.chapter-lesson-item:last-child { border-bottom: none; }
.chapter-lesson-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  padding-left: calc(var(--space-16) + 4px);
}

.lesson-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-muted);
  flex-shrink: 0;
  transition: background var(--transition-fast);
}
.chapter-lesson-item:hover .lesson-dot { background: var(--accent-2); }

.curriculum-empty {
  text-align: center;
  padding: var(--space-16);
  color: var(--text-muted);
}
.curriculum-empty-icon { font-size: 48px; margin-bottom: var(--space-4); }
.curriculum-empty p { font-size: var(--text-sm); }

/* ── CTA Section ───────────────────────────────────────────── */
.cta-section {
  padding: var(--space-20) 0;
}

.cta-box {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-16) var(--space-12);
  text-align: center;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-accent-soft);
  pointer-events: none;
}

.cta-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  position: relative;
}
.cta-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  position: relative;
}
.cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ── Footer ────────────────────────────────────────────────── */
.intro-footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-visual { display: none; }
  .hero-content { max-width: 100%; }
}

@media (max-width: 768px) {
  .intro-nav { padding: var(--space-3) var(--space-4); }
  .nav-links { display: none; }
  .hero-title { font-size: var(--text-4xl); }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-box { padding: var(--space-12) var(--space-6); }
  .footer-inner { justify-content: center; text-align: center; }
}
