/* MoodleBot Landing - Exact Clerk.com Clone */

/* CSS Variables */
:root {
  /* Colors - Clerk's exact palette */
  --color-primary: #6C47FF;
  --color-primary-dark: #5639CC;
  --color-primary-light: #8366FF;
  --color-secondary: #0A0E27;
  --color-background: #FFFFFF;
  --color-surface: #F7F7F8;
  --color-surface-hover: #F0F0F2;
  --color-text-primary: #0A0E27;
  --color-text-secondary: #5E6370;
  --color-text-muted: #9CA0B0;
  --color-border: #E6E6E9;
  --color-border-hover: #D0D0D6;
  --color-success: #0AC572;
  --color-warning: #FFB800;
  --color-error: #FF3B3B;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6C47FF 0%, #8366FF 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(108, 71, 255, 0.15) 0%, transparent 70%);
  --gradient-meteor: linear-gradient(135deg, rgba(108, 71, 255, 0.4) 0%, transparent 100%);
  
  /* Typography */
  --font-display: 'Colfax', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', Consolas, monospace;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  
  /* Font sizes */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 40px;
  --font-size-5xl: 48px;
  
  /* Sizing */
  --container-max: 1280px;
  --header-height: 72px;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(108, 71, 255, 0.2);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* Dark Theme */
[data-theme="dark"] {
  --color-background: #0F172A;
  --color-surface: #1E293B;
  --color-surface-hover: #334155;
  --color-text-primary: #F1F5F9;
  --color-text-secondary: #CBD5E1;
  --color-text-muted: #94A3B8;
  --color-border: #334155;
  --color-border-hover: #475569;
  /* Lighter gradient for dark mode */
  --gradient-primary: linear-gradient(135deg, #818CF8 0%, #A78BFA 100%);
}

[data-theme="dark"] .nav-links {
  background: var(--color-background);
}

[data-theme="dark"] .code-content {
  background: var(--color-surface);
}

[data-theme="dark"] .code-header {
  background: var(--color-surface);
}

[data-theme="dark"] .feature-card {
  background: var(--color-surface);
}

[data-theme="dark"] .cta {
  background: var(--color-background);
}

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

/* Fix horizontal scroll on mobile */
*, *::before, *::after {
  max-width: 100%;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: box-shadow var(--transition-base);
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 20px;
  transition: opacity var(--transition-base);
  letter-spacing: -0.5px;
}

/* Consistent MoodleBot brand letter spacing */
.moodlebot-brand,
.logo span:last-child {
  letter-spacing: -0.5px;
}

.logo:hover {
  opacity: 0.8;
}

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

.nav-link {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  border: none;
  background: none;
  transition: color var(--transition-base);
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  min-width: 220px;
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

[data-theme="dark"] .nav-dropdown-menu {
  background: var(--color-surface);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.nav-dropdown-menu a:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

[data-theme="dark"] .nav-dropdown-menu a:hover {
  background: var(--color-surface-hover);
}

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

.nav-dashboard {
  color: var(--color-text-secondary);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: color var(--transition-base), background-color var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--color-text-primary);
  background-color: var(--color-surface);
}

.theme-icon-light {
  display: block;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  padding: var(--space-sm);
  color: var(--color-text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  z-index: 100;
  position: relative;
}

.mobile-menu-btn:hover {
  background: var(--color-surface);
}

@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: block !important;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all var(--transition-base);
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
    box-shadow: var(--shadow-lg);
    z-index: 90;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  
  /* Mobile nav styles moved outside */
  
  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-link {
    width: 100%;
    padding: var(--space-sm) 0;
  }
  
  .nav-dropdown {
    width: 100%;
  }
  
  .nav-dropdown button {
    width: 100%;
    justify-content: space-between;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .nav-dropdown-menu {
    position: static !important;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    box-shadow: none !important;
    transform: none !important;
    margin-top: 0;
    padding: 0;
    transition: all 0.3s ease;
    width: 100%;
  }
  
  .nav-dropdown.active .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    max-height: 300px;
    padding: var(--space-sm) 0;
  }
  
  .nav-dropdown-menu a {
    padding-left: var(--space-xl);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-align: center;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: none;
  padding: var(--space-sm) var(--space-md);
}

.btn-ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-surface);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 16px;
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  min-height: 85vh;
  overflow-x: visible;
  overflow-y: hidden;
  display: flex;
  align-items: center;
}

/* Meteor animations */
.meteors {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.meteor {
  position: absolute;
  width: 2px;
  height: 100px;
  background: var(--gradient-meteor);
  transform: rotate(45deg);
  opacity: 0;
  animation: meteor 3s linear infinite;
}

.meteor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-primary);
}

.meteor-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.meteor-2 {
  top: 40%;
  left: 70%;
  animation-delay: 1s;
}

.meteor-3 {
  top: 10%;
  left: 50%;
  animation-delay: 2s;
}

.meteor-4 {
  top: 60%;
  left: 90%;
  animation-delay: 1.5s;
}

@keyframes meteor {
  0% {
    opacity: 0;
    transform: translateY(-100px) translateX(-100px) rotate(45deg);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(300px) translateX(300px) rotate(45deg);
  }
}

.hero-container {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  overflow-x: visible;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--space-xl);
  overflow-x: visible;
}

.hero-title {
  font-size: clamp(44px, 5.5vw, 75px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
  overflow: visible;
  position: relative;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--color-primary); /* Fallback for browsers that don't support background-clip */
  display: inline-block;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* Specific for hero rotating text */
.hero-item .gradient-text {
  white-space: nowrap;
  padding: 0 10px;
  font-size: 1em; /* Smaller on desktop */
  letter-spacing: -0.01em; /* Tighten letter spacing */
}

/* Smaller size for long texts */
.hero-item .gradient-text-long {
  font-size: 0.55em; /* Much smaller to prevent any cutting */
  letter-spacing: -0.05em; /* Maximum tight spacing */
  padding: 0 2px; /* Minimal padding */
  white-space: nowrap;
  display: inline-block;
}

/* Ensure gradient works in all sections */
.code-examples-text .gradient-text,
.features-title .gradient-text,
.section-title .gradient-text,
h2 .gradient-text,
h3 .gradient-text {
  background: var(--gradient-primary) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  display: inline-block;
}

/* Hero rotation */
.hero-rotating {
  position: relative;
  display: block;
  min-height: 2em;
  line-height: 1.4;
  overflow: visible;
  width: 100%;
  padding-bottom: 10px;
  text-align: center;
}

.hero-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-align: center;
  filter: blur(4px);
  z-index: 1;
  visibility: hidden;
  pointer-events: none;
}

.hero-item.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
  z-index: 10;
  visibility: visible;
  pointer-events: auto;
}

.hero-item.exiting {
  opacity: 0;
  transform: translateY(-30px);
  filter: blur(4px);
  z-index: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease-out;
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Title Carousel */
.hero-title-carousel {
  margin-bottom: var(--space-2xl);
  position: relative;
}

.title-slides {
  position: relative;
  min-height: 250px; /* Increased height for hero titles */
  overflow: visible;
  margin-bottom: var(--space-2xl);
}

@media (max-width: 768px) {
  .title-slides {
    height: auto;
    min-height: 100px;
  }
  
  .hero-rotating {
    min-height: 40px;
  }
  
  .hero-title-carousel {
    margin-bottom: var(--space-xl);
  }
  
  .hero-title {
    font-size: clamp(50px, 7vw, 65px) !important; /* Smaller white text on mobile */
  }
  
  .hero-item .gradient-text {
    font-size: 1.2em; /* Larger violet text on mobile */
  }
  
  .hero-item .gradient-text-long {
    font-size: 0.9em; /* Smaller for long texts on mobile */
    letter-spacing: -0.03em;
  }
}

.title-slide {
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.5s ease;
}

.title-slide.active {
  opacity: 1;
  transform: translateX(0);
}

/* Keep the subtitle styles for backward compatibility */
.hero-subtitle-carousel {
  margin-bottom: var(--space-2xl);
  position: relative;
}

.subtitle-slides {
  position: relative;
  height: 60px;
  overflow: hidden;
}

.subtitle-slide {
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.5s ease;
}

.subtitle-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.subtitle-static {
  margin-right: 0.3em;
}

.subtitle-rotating {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  min-width: 200px;
}

.subtitle-item {
  position: absolute;
  left: 0;
  opacity: 0;
  white-space: nowrap;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(10px);
}

.subtitle-item.active {
  opacity: 1;
  transform: translateY(0);
}

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.dot.active {
  opacity: 1;
  background: var(--color-primary);
  width: 24px;
  border-radius: 4px;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

/* Code preview */
.code-preview {
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: white;
  border-bottom: 1px solid var(--color-border);
}

.code-dots {
  display: flex;
  gap: var(--space-sm);
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-border);
}

.code-dots span:nth-child(1) { background: #FF5F57; }
.code-dots span:nth-child(2) { background: #FFBD2E; }
.code-dots span:nth-child(3) { background: #28CA42; }

.code-filename {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-muted);
}

.code-content {
  padding: var(--space-lg);
  background: #FAFAFA;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-primary);
}

.code-comment {
  color: #6A737D;
}

.code-tag {
  color: #22863A;
}

.code-attr {
  color: #6F42C1;
}

.code-string {
  color: #032F62;
}

/* Logo cloud */
.logo-cloud {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.logo-cloud-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xl);
}

.logo-cloud-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  opacity: 0.6;
  filter: grayscale(100%);
}

.logo-item {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: var(--space-sm) var(--space-lg);
}

/* Features Grid */
.features {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
}

.features-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.features-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.features-title {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.features-subtitle {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

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

.feature-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  color: var(--color-primary);
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Code Examples */
.code-examples {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
}

@media (max-width: 768px) {
  .code-examples {
    padding: var(--space-2xl) 0;
  }
}

.code-examples-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.code-examples-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.code-examples-text h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .code-examples-text h2 {
    font-size: 28px;
  }
}

.code-examples-text p {
  font-size: 18px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .code-examples-text p {
    font-size: 16px;
    margin-bottom: var(--space-lg);
  }
}

.code-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.code-tab {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-base);
}

.code-tab:hover {
  background: var(--color-surface);
}

.code-tab.active {
  background: var(--color-primary);
  color: white;
}

.code-examples-preview {
  position: relative;
}

.code-example {
  display: none;
  background: #1E1E1E;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-xl);
}

.code-example.active {
  display: block;
}

.code-example pre {
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
}

.code-example code {
  color: #D4D4D4;
}

.code-keyword {
  color: #C586C0;
}

.code-method {
  color: #DCDCAA;
}

.code-property {
  color: #9CDCFE;
}

/* Pricing Section with Calculator */
.pricing {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
}

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

.section-title {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.pricing-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Pricing Calculator */
.pricing-calculator {
  max-width: 1000px;
  margin: 0 auto;
}

.calculator-input {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.calculator-input label {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

.calculator-input input[type="range"] {
  width: 100%;
  max-width: 400px;
  margin: 0 auto var(--space-md);
  display: block;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
}

.calculator-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
}

.calculator-input input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 8px rgba(108, 71, 255, 0.1);
}

.calculator-input input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
}

#studentDisplay {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-primary);
}

/* Pricing Tiers */
.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.tier-card {
  position: relative;
  padding: var(--space-xl);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

[data-theme="dark"] .tier-card {
  background: var(--color-surface);
}

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

.tier-card.popular {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.tier-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-header h3 {
  font-size: 24px;
  margin-bottom: var(--space-sm);
}

.tier-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.price-amount {
  font-size: 36px;
  font-weight: 900;
  color: var(--color-primary);
}

.price-period {
  color: var(--color-text-secondary);
}

.tier-features {
  margin-bottom: var(--space-lg);
}

.tier-limit {
  font-weight: 600;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.tier-features ul {
  list-style: none;
}

.tier-features li {
  padding: var(--space-sm) 0;
  color: var(--color-text-secondary);
}

.tier-total {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

.tier-cta {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.tier-cta:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.pricing-notes {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .pricing-notes {
  background: var(--color-surface);
}

.pricing-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.pricing-header h2 {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.pricing-header p {
  font-size: 18px;
  color: var(--color-text-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  transition: all var(--transition-base);
}

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

.pricing-card.popular {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card-header h3 {
  font-size: 24px;
  margin-bottom: var(--space-md);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.price-currency {
  font-size: 24px;
  color: var(--color-text-secondary);
}

.price-amount {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-period {
  font-size: 18px;
  color: var(--color-text-secondary);
}

.price-text {
  font-size: 24px;
  font-weight: 600;
}

.pricing-description {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  color: var(--color-text-secondary);
}

.pricing-features svg {
  color: var(--color-success);
  flex-shrink: 0;
}

.btn-block {
  width: 100%;
}

/* Demo Section */
.demo-section {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
}

[data-theme="dark"] .demo-section {
  background: var(--color-background);
}

.demo-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .demo-container {
  background: var(--color-surface);
}

.demo-info h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.demo-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.demo-stat-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.demo-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.demo-stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  margin: 0 auto var(--space-md);
  color: var(--color-primary);
}

.stat-number {
  display: block;
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
}

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

.stat-label {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
}

.demo-courses {
  margin-bottom: var(--space-2xl);
}

.demo-courses h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.demo-courses ul {
  list-style: none;
}

.demo-courses li {
  padding: var(--space-sm) 0;
  color: var(--color-text-secondary);
  font-size: 16px;
}

.demo-credentials {
  margin-bottom: var(--space-2xl);
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .demo-credentials {
  background: var(--color-background);
}

[data-theme="dark"] .demo-stat-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .demo-stat-card:hover {
  border-color: var(--color-primary);
}

.demo-credentials h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.credential-group {
  margin-bottom: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.credential-group strong {
  font-weight: 600;
  min-width: 100px;
  flex-shrink: 0;
}

.credential-group code {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  word-break: break-all;
  flex: 1;
  min-width: 200px;
}

[data-theme="dark"] .credential-group code {
  background: var(--color-surface-hover);
}

.demo-actions {
  text-align: center;
  margin-bottom: var(--space-lg);
  margin-top: var(--space-xl);
}

.demo-actions .btn-primary {
  font-size: 18px;
  padding: var(--space-md) var(--space-2xl);
  gap: var(--space-md);
}

.demo-reset-info {
  text-align: center;
  padding: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  margin-top: var(--space-lg);
  border: 1px solid var(--color-border);
}

.demo-reset-info p {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin: 0;
}

[data-theme="dark"] .demo-reset-info {
  background: var(--color-surface-hover);
}

/* CTA Section */
.cta {
  padding: var(--space-4xl) 0;
  background: white;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  text-align: center;
}

.cta h2 {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.cta p {
  font-size: 18px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.cta-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Footer */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-content {
  margin-bottom: var(--space-3xl);
}

.footer-logo {
  display: none;
}

.footer-description {
  display: none;
}

.footer-section {
  display: none;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3xl);
  max-width: 100%;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: normal;
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

.footer-column a {
  display: block;
  color: var(--color-text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--transition-base);
}

.footer-column a:hover {
  color: var(--color-text-primary);
}

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

.footer-bottom p {
  color: var(--color-text-muted);
}

.footer-social {
  display: flex;
  gap: var(--space-lg);
}

.footer-social a {
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.footer-social a:hover {
  color: var(--color-text-primary);
}

@media (max-width: 768px) {
  /* Fix viewport issues */
  * {
    max-width: 100vw;
    box-sizing: border-box;
  }
  
  .nav-links {
    top: 60px !important;
    max-height: calc(100vh - 60px);
  }
  
  .nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }
  
  .nav-right .btn-primary {
    display: none;
  }
  
  .nav-right .nav-dashboard {
    display: none;
  }
  
  /* Fix wide elements */
  .hero-title, .hero-rotating, .hero-item, .code-preview {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .code-content, pre, code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
  }
}

/* Responsive - Tablets */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Hero específico para tablets */
  .hero {
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
    min-height: 70vh;
  }
  
  .hero-title {
    font-size: clamp(36px, 5vw, 60px);
  }
  
  .title-slides {
    height: 150px;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  /* Navigation */
  /* Removed display: none to allow mobile menu to work properly */
  
  .nav-container {
    padding: 0 var(--space-md);
  }
  
  /* Hero */
  .hero-title {
    font-size: clamp(32px, 5vw, 60px);
  }
  
  .title-slides {
    height: 150px;
  }
  
  /* Code examples */
  .code-examples-content {
    grid-template-columns: 1fr;
  }
  
  /* Footer */
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Container */
  .container {
    padding: 0 var(--space-md);
  }
  
  /* Navigation */
  .nav {
    height: 60px;
  }
  
  .nav-container {
    height: 60px;
    padding: 0 var(--space-lg) 0 var(--space-xl); /* More padding on the left */
  }
  
  .logo {
    font-size: 18px;
  }
  
  .btn {
    padding: var(--space-xs) var(--space-md);
    font-size: 14px;
  }
  
  /* Larger text for primary buttons on mobile */
  .btn-primary {
    font-size: 16px;
    padding: var(--space-sm) var(--space-lg);
    font-weight: 600;
  }
  
  .btn-lg {
    font-size: 18px;
    padding: var(--space-md) var(--space-xl);
  }
  
  /* Hero */
  .hero {
    padding-top: calc(60px + var(--space-4xl));
    padding-bottom: var(--space-lg);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }
  
  .hero-title {
    font-size: 40px;
    line-height: 1.1;
    font-weight: 700;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    margin-bottom: var(--space-lg);
  }
  
  .hero-rotating {
    display: block;
    margin-top: 10px;
    margin-bottom: -30px;
    min-height: 40px;
    position: relative;
    overflow: visible;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-lg);
    width: 100%;
    max-width: 100%;
    margin: -20px auto 0;
    margin-bottom: var(--space-2xl);
    padding: 0;
  }
  
  .btn-lg {
    padding: var(--space-md) var(--space-lg);
  }
  
  /* Carousel dots */
  .carousel-dots {
    margin-top: var(--space-md);
  }
  
  /* Code preview */
  .code-preview {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-2xl);
  }
  
  .code-content {
    font-size: 12px;
    padding: var(--space-md);
  }
  
  /* Features */
  .features {
    padding: var(--space-lg) 0;
  }
  
  .features-title {
    font-size: 24px;
    line-height: 1.2;
  }
  
  .features-subtitle {
    font-size: 18px;
    line-height: 1.6;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .feature-card {
    padding: var(--space-lg);
  }
  
  /* Pricing */
  .pricing {
    padding: var(--space-lg) 0;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .pricing-card {
    padding: var(--space-lg);
  }
  
  .price-amount {
    font-size: 36px;
  }
  
  /* CTA */
  .cta {
    padding: var(--space-lg) 0;
  }
  
  .cta h2 {
    font-size: 28px;
  }
  
  .cta p {
    font-size: 16px;
  }
  
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  /* Footer */
  .footer {
    padding: var(--space-2xl) 0 var(--space-lg);
  }
  
  .footer-content {
    margin-bottom: var(--space-xl);
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  /* Fix any remaining width issues */
  * {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  body, html {
    width: 100vw;
    overflow-x: hidden;
  }
  
  /* Hero */
  .hero-title {
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    width: 100%;
    max-width: 100%;
    font-weight: 700;
    word-break: keep-all;
    hyphens: none;
  }
  
  .title-slides {
    min-height: 140px;
  }
  
  .hero-rotating {
    margin-top: 8px;
    margin-bottom: -25px;
    min-height: 36px;
    overflow: visible;
  }
  
  .hero-actions {
    margin-top: 0;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
  }
  
  .hero-item {
    font-size: 36px;
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    white-space: nowrap;
    overflow: visible;
    line-height: 1.1;
    text-align: center;
  }
  
  /* Sections */
  .section-title,
  .features-title,
  .cta h2 {
    font-size: 20px;
    line-height: 1.2;
  }
  
  /* Cards */
  .feature-card,
  .pricing-card {
    padding: var(--space-md);
  }
  
  /* Demo section mobile */
  .demo-container {
    margin: 0 var(--space-md);
    padding: var(--space-lg);
  }
  
  .demo-details {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .credential-group {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
  
  .credential-group strong {
    min-width: auto;
    width: 100%;
  }
  
  .credential-group code {
    width: 100%;
    min-width: auto;
    font-size: 12px;
  }
  
  .feature-card h3 {
    font-size: 18px;
  }
  
  .feature-card p {
    font-size: 14px;
  }
  
  .price-amount {
    font-size: 28px;
  }
  
  /* Code examples mobile */
  .code-examples-text h2 {
    font-size: 20px;
  }
  
  .code-examples-text p {
    font-size: 14px;
  }
  
  /* General spacing */
  section {
    padding: var(--space-lg) 0;
  }
  
  /* Fix buttons */
  .btn {
    font-size: 14px;
    padding: var(--space-sm) var(--space-md);
  }
  
  .btn-lg {
    padding: var(--space-sm) var(--space-lg);
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .meteor,
  .hero-item,
  .title-slide {
    animation: none !important;
    transition: opacity 0.01ms !important;
  }
}