/* ========================================
   T5Online Education Portal - Landing CSS
   ======================================== */

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

:root {
  --primary: #6366f1;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.5);

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #475569;

  --font: 'Pretendard', 'Inter', system-ui, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Animated Background ---- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: floatGlow 8s ease-in-out infinite;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  bottom: 0;
  left: -100px;
  animation-delay: -3s;
}

.bg-glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.07) 0%, transparent 70%);
  top: 50%;
  left: 40%;
  animation-delay: -6s;
}

@keyframes floatGlow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ---- Layout ---- */
.site-header, .hero, .courses-section, .path-section, .site-footer {
  position: relative;
  z-index: 1;
}

.header-inner, .hero-inner, .section-inner, .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.7);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  color: #a5b4fc;
  font-weight: 500;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* ---- Hero ---- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  font-size: 0.85rem;
  color: #a5b4fc;
  font-weight: 600;
  letter-spacing: 0.3px;
  animation: fadeInDown 0.6s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.8;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 24px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.7s ease 0.35s both;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ---- Courses Section ---- */
.courses-section {
  padding: 40px 0 80px;
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.section-header {
  text-align: center;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---- Course Cards ---- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease both;
}

.course-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-color-from, rgba(99,102,241,0.08)), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.course-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.2);
}

.course-card:hover::before {
  opacity: 1;
}

.course-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.6rem;
}

.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.card-order {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-beginner { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-intermediate { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-advanced { background: rgba(239,68,68,0.15); color: #f87171; }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.info-item svg {
  opacity: 0.6;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.3);
  transition: all var(--transition);
}

.course-card:hover .card-arrow {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateX(3px);
}

/* Card topic tags */
.card-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-tag {
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Learning Path ---- */
.path-section {
  padding: 0 0 80px;
}

.learning-path {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}

.learning-path::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 32px;
  right: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  transform: translateY(-50%);
  opacity: 0.3;
  border-radius: 1px;
}

.path-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  text-align: center;
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.path-step:hover {
  transform: translateY(-4px);
}

.path-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  border: 2px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}

.path-step:hover .path-number {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--primary-glow);
}

.path-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
}

.path-connector {
  width: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 1.2rem;
  padding-bottom: 40px;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-tag {
  font-size: 0.8rem;
  color: var(--text-faint);
  padding: 3px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---- Animations ---- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 24px;
    padding: 20px 32px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .learning-path::before {
    display: none;
  }

  .learning-path {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .path-step {
    flex-direction: row;
    text-align: left;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .path-connector {
    display: none;
  }
}

@media (max-width: 600px) {
  .header-nav {
    display: none;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
