/* ScaleUp Global — Custom Styles */

:root {
  /* Default: Dark Theme */
  --bg-color: #0a0a0a;
  --surface-color: #111111;
  --surface-200: #1a1a1a;
  --surface-300: #222222;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa; /* text-zinc-400 */
  --text-muted: #71717a; /* text-zinc-500 */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.2);
  --brand-color: #00e676;
  --brand-hover: #00c853;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --nav-bg: rgba(10, 10, 10, 0.95);
  --footer-bg: #111111;
  --grid-color: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] {
  --bg-color: #fafafa;
  --surface-color: #ffffff;
  --surface-200: #f4f4f5;
  --surface-300: #e4e4e7;
  --text-primary: #18181b; /* text-zinc-900 */
  --text-secondary: #52525b; /* text-zinc-600 */
  --text-muted: #71717a; /* text-zinc-500 */
  --border-color: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.15);
  --brand-color: #059669; /* deeper green for better light contrast */
  --brand-hover: #047857;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --nav-bg: rgba(250, 250, 250, 0.95);
  --footer-bg: #f4f4f5;
  --grid-color: rgba(0, 0, 0, 0.03);
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--surface-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-color); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 230, 118, 0.3); }
  50% { box-shadow: 0 0 20px rgba(0, 230, 118, 0.6); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes progressFill {
  from { width: 0%; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.animate-slide-left { animation: slideInLeft 0.6s ease-out forwards; }
.animate-slide-right { animation: slideInRight 0.6s ease-out forwards; }
.animate-pulse-glow { animation: pulse-glow 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-scale-in { animation: scaleIn 0.4s ease-out forwards; }

/* Intersection observer animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #00e676, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass effect */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* Card hover */
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.3);
}

/* Button primary */
.btn-primary {
  background: var(--brand-color);
  color: #ffffff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.3);
}

/* Button secondary */
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-secondary:hover {
  border-color: var(--brand-color);
  color: var(--brand-color);
  transform: translateY(-2px);
}

/* Sticky CTA button */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  animation: pulse-glow 2s infinite;
}

/* Navigation */
.nav-link {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-link:hover, .nav-link.active {
  color: var(--brand-color);
}

/* Step indicator line */
.step-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-color), #10b981);
  z-index: 0;
}

/* Grid pattern background */
.bg-grid {
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Radial glow */
.radial-glow {
  background: radial-gradient(ellipse at center, rgba(0, 230, 118, 0.08) 0%, transparent 70%);
}

/* Hero overlay */
.hero-overlay {
  background: linear-gradient(180deg, var(--bg-color) 0%, var(--surface-color) 50%, var(--surface-200) 100%);
}

/* Mobile nav */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open {
  transform: translateX(0);
}

/* Toast notification */
.toast {
  animation: slideInRight 0.4s ease-out, fadeIn 0.4s ease-out;
}

/*New light/dark mode styles*/
[data-theme="light"] .dark\:hidden {
  display: block !important;
}
[data-theme="light"] .dark\:block {
  display: none !important;
}
[data-theme="dark"] .dark\:hidden {
  display: none !important;
}
[data-theme="dark"] .dark\:block {
  display: block !important;
}

/* ── Light Mode Text Color Overrides ────────────────────────────────────
   Tailwind hardcodes colors like text-white, text-zinc-300 etc.
   In light mode, these become invisible when rendered on white glass cards.
   Override them to use theme-aware colors. */

[data-theme="light"] .text-white {
  color: var(--text-primary) !important;
}
[data-theme="light"] .text-zinc-100,
[data-theme="light"] .text-zinc-200,
[data-theme="light"] .text-zinc-300 {
  color: var(--text-secondary) !important;
}
[data-theme="light"] .text-zinc-400 {
  color: var(--text-muted) !important;
}

/* Light mode glass cards need dark text */
[data-theme="light"] .glass {
  color: var(--text-primary);
}
[data-theme="light"] .glass h1,
[data-theme="light"] .glass h2,
[data-theme="light"] .glass h3,
[data-theme="light"] .glass h4,
[data-theme="light"] .glass p,
[data-theme="light"] .glass span,
[data-theme="light"] .glass label {
  color: inherit;
}

/* Light mode table/surface text */
[data-theme="light"] .bg-surface-200,
[data-theme="light"] .bg-surface-100 {
  color: var(--text-primary);
}

/* Light mode nav links */
[data-theme="light"] .nav-link {
  color: var(--text-secondary);
}
[data-theme="light"] .nav-link:hover {
  color: var(--brand-color);
}

/* Ensure body text always has correct contrast in both themes */
[data-theme="light"] body {
  color: var(--text-primary);
}

/* Assessment and form inputs in light mode */
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  color: var(--text-primary) !important;
  background-color: var(--surface-200) !important;
  border-color: rgba(0,0,0,0.15) !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: var(--text-muted) !important;
}

/* Dashboard sidebar in light mode */
[data-theme="light"] #dashboard-sidebar {
  background-color: var(--surface-100);
  border-color: var(--border-color);
}
