/* ========================================
   CodoLearn — Premium Digital Agency
   Modern, High-End Design System
   ======================================== */

/* CSS Custom Properties (Variables) */
:root {
  /* Colors - Deep dark with neon accents */
  --bg-dark: #0a0a0a;
  --bg-darker: #060606;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-elevated: rgba(255, 255, 255, 0.08);

  /* Borders & Strokes */
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --border-glow: rgba(124, 92, 255, 0.4);

  /* Text Colors */
  --text: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-subtle: rgba(255, 255, 255, 0.5);

  /* Neon Gradient Colors */
  --neon-1: #667eea;    /* Blue-purple */
  --neon-2: #764ba2;    /* Purple */
  --neon-3: #f093fb;    /* Pink */
  --neon-4: #4facfe;    /* Cyan-blue */
  --neon-5: #00f2fe;    /* Cyan */
  --neon-6: #43e97b;    /* Green */
  --neon-7: #38f9d7;    /* Teal */

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--neon-1), var(--neon-2));
  --gradient-secondary: linear-gradient(135deg, var(--neon-4), var(--neon-5));
  --gradient-accent: linear-gradient(135deg, var(--neon-3), var(--neon-2));
  --gradient-dark: linear-gradient(180deg, var(--bg-dark), var(--bg-darker));

  /* Shadows */
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.25);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Selection */
::selection {
  background: rgba(102, 126, 234, 0.4);
  color: #fff;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Loading Screen */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__content {
  text-align: center;
}

.loader__logo {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.loader__bar {
  width: 200px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.loader__fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand__logo {
  width: 42px;
  height: 42px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  color: #fff;
}

.brand__name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-md), 0 0 20px rgba(102, 126, 234, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(102, 126, 234, 0.5);
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--bg-glass);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn--full {
  width: 100%;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__content {
  max-width: 800px;
  margin-bottom: 80px;
}

.hero__title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 32px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__cta .btn {
  padding: 18px 36px;
  font-size: 1.1rem;
}

/* Stats */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 900px;
}

.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
}

.stat-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.stat-card__value {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-card__label {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Section Styles */
.courses,
.contact {
  padding: 120px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--neon-5);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

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

/* Courses Grid */
.courses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.course-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.course-card__image {
  position: relative;
  aspect-ratio: 673 / 239;
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}

.course-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 8px;
  margin-bottom: 12px;
}

.badge--primary {
  background: var(--gradient-primary);
  color: #fff;
}

.badge--hot {
  background: var(--gradient-accent);
  color: #fff;
}

.course-card__body {
  padding: 24px;
}

.course-card__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.course-card__description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Digital Solutions Section */
.digital-solutions {
  padding: 120px 0;
}

.solutions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  height: 100%;
  transition: all var(--transition-base);
  cursor: pointer;
}

.solution-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.solution-card__icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.solution-card__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.solution-card__description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Contact Section */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__description {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.contact__icon {
  font-size: 1.5rem;
}

/* Contact Form */
.contact__form {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--neon-5);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 24px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal.modal--open {
  opacity: 1;
  visibility: visible;
}

.modal__content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.modal.modal--open .modal__content {
  transform: translateY(0);
}

.modal__header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.modal__image-container {
  flex: 0 0 100%;
  margin-bottom: 8px;
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 673 / 239;
}

.modal__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (min-width: 600px) {
  .modal__image-container {
    flex: 0 0 auto;
    width: 300px;
  }
}

.modal__icon {
  width: 100%;
  aspect-ratio: 673 / 239;
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

@media (min-width: 600px) {
  .modal__icon {
    width: 300px;
  }
}

.modal__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal__description {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.modal__section {
  margin-bottom: 28px;
}

.modal__section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--neon-5);
}

.modal__section-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal__section-content li {
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.modal__section-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--neon-5);
}

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

.footer__content {
  text-align: center;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer__tagline {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer__copyright {
  color: var(--text-subtle);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero__content {
    margin-bottom: 48px;
  }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card__value {
    font-size: 2rem;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .courses__grid {
    grid-template-columns: 1fr;
  }

  .solutions__grid {
    grid-template-columns: 1fr;
  }

  .modal__header {
    flex-direction: column;
  }

  .modal__content {
    padding: 24px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__content,
.hero__stats,
.section-header,
.course-card,
.solution-card,
.contact__info,
.contact__form {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.hero__content { animation-delay: 0.2s; }
.hero__stats { animation-delay: 0.4s; }
.section-header { animation-delay: 0.2s; }
.course-card:nth-child(1) { animation-delay: 0.2s; }
.course-card:nth-child(2) { animation-delay: 0.3s; }
.course-card:nth-child(3) { animation-delay: 0.4s; }
.course-card:nth-child(4) { animation-delay: 0.5s; }
.course-card:nth-child(5) { animation-delay: 0.6s; }
.course-card:nth-child(6) { animation-delay: 0.7s; }
.contact__info { animation-delay: 0.2s; }
.contact__form { animation-delay: 0.4s; }
.solution-card:nth-child(1) { animation-delay: 0.2s; }
.solution-card:nth-child(2) { animation-delay: 0.3s; }
.solution-card:nth-child(3) { animation-delay: 0.4s; }
.solution-card:nth-child(4) { animation-delay: 0.5s; }
.solution-card:nth-child(5) { animation-delay: 0.6s; }
.solution-card:nth-child(6) { animation-delay: 0.7s; }
