/* CSS Variables for theming */
:root {
  --background: 0 0% 0%; /* black */
  --foreground: 0 0% 98%; /* white */
  --card: 240 10% 3.9%; /* gray-900 */
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 267 75% 50%; /* purple-500 */
  --primary-foreground: 0 0% 98%;
  --secondary: 240 3.7% 15.9%; /* gray-800 */
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%; /* gray-400 */
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 267 75% 50%;
  --radius: 0.5rem;

  /* Purple color variables */
  --purple-400: 168 76% 74%; /* #a78bfa */
  --purple-500: 271 81% 56%; /* #8b5cf6 */
  --purple-600: 271 91% 47%; /* #7c3aed */
  --purple-700: 271 97% 35%; /* #6d28d9 */
  --purple-800: 271 100% 27%; /* #5b21b6 */
  --purple-900: 272 91% 21%; /* #4c1d95 */

  /* Gray colors */
  --gray-300: 210 20% 76%;
  --gray-400: 210 14% 59%;
  --gray-500: 210 11% 42%;
  --gray-700: 214 14% 24%;
  --gray-800: 217 19% 15%;
  --gray-900: 222 23% 11%;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility classes */
.min-h-screen {
  min-height: 100vh;
}

.bg-black {
  background-color: rgb(0 0 0);
}

.bg-gray-800 {
  background-color: rgb(31 41 55);
}

.bg-gray-900 {
  background-color: rgb(17 24 39);
}

.text-white {
  color: rgb(255 255 255);
}

.text-gray-300 {
  color: rgb(209 213 219);
}

.text-gray-400 {
  color: rgb(156 163 175);
}

.text-gray-500 {
  color: rgb(107 114 128);
}

.text-purple-400 {
  color: rgb(167 139 250);
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.top-4 {
  top: 1rem;
}

.right-4 {
  right: 1rem;
}

.inset-0 {
  inset: 0;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.z-50 {
  z-index: 50;
}

.overflow-hidden {
  overflow: hidden;
}

/* Flexbox utilities */
.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

/* Grid utilities */
.gap-4 {
  gap: 1rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

/* Base grid - single column for mobile */
.grid {
  display: grid;
  grid-template-columns: 1fr;
}

/* Services and training grids - responsive layout */
#services .grid,
#training .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  #services .grid,
  #training .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Footer grid */
footer .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  footer .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Spacing utilities */
.p-0 {
  padding: 0;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.pt-8 {
  padding-top: 2rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.ml-auto {
  margin-left: auto;
}

.ml-2 {
  margin-left: 0.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-12 {
  margin-top: 3rem;
}

/* Sizing utilities */
.w-full {
  width: 100%;
}

.w-4 {
  width: 1rem;
}

.w-6 {
  width: 1.5rem;
}

.w-10 {
  width: 2.5rem;
}

.w-12 {
  width: 3rem;
}

.w-96 {
  width: 24rem;
}

.h-4 {
  height: 1rem;
}

.h-6 {
  height: 1.5rem;
}

.h-10 {
  height: 2.5rem;
}

.h-12 {
  height: 3rem;
}

.h-96 {
  height: 24rem;
}

.h-1/2 {
  height: 50%;
}

.h-auto {
  height: auto;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

/* Typography */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.font-medium {
  font-weight: 500;
}

.font-bold {
  font-weight: 700;
}

.font-mono {
  font-family: 'Fira Code', 'Cascadia Code', 'SF Mono', Monaco, monospace;
}

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

/* Border utilities */
.border {
  border-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-transparent {
  border-color: transparent;
}

.border-purple-500 {
  border-color: rgb(139 92 246);
}

.border-purple-900\/30 {
  border-color: rgb(76 29 149 / 0.3);
}

.border-purple-900\/40 {
  border-color: rgb(76 29 149 / 0.4);
}

.border-gray-700 {
  border-color: rgb(55 65 81);
}

.border-gray-800 {
  border-color: rgb(31 41 55);
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* Background utilities */
.bg-transparent {
  background-color: transparent;
}

.bg-purple-500\/20 {
  background-color: rgb(139 92 246 / 0.2);
}

.bg-purple-600\/30 {
  background-color: rgb(124 58 237 / 0.3);
}

.bg-purple-800\/20 {
  background-color: rgb(91 33 182 / 0.2);
}

.bg-purple-900\/20 {
  background-color: rgb(76 29 149 / 0.2);
}

.bg-gradient-to-b {
  background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-stops));
}

.from-black {
  --tw-gradient-from: #000;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-gray-900 {
  --tw-gradient-from: rgb(17 24 39);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-purple-700 {
  --tw-gradient-from: rgb(109 40 217);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-purple-900\/10 {
  --tw-gradient-from: rgb(76 29 149 / 0.1);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-purple-900\/20 {
  --tw-gradient-from: rgb(76 29 149 / 0.2);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.to-black {
  --tw-gradient-to: #000;
}

.to-black\/40 {
  --tw-gradient-to: rgb(0 0 0 / 0.4);
}

.to-gray-900 {
  --tw-gradient-to: rgb(17 24 39);
}

.to-purple-500 {
  --tw-gradient-to: rgb(139 92 246);
}

.to-transparent {
  --tw-gradient-to: transparent;
}

/* Filter utilities */
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.blur-3xl {
  --tw-blur: blur(64px);
  filter: var(--tw-blur);
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.grayscale {
  --tw-grayscale: grayscale(100%);
  filter: var(--tw-grayscale);
}

/* Transition utilities */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

/* Shadow utilities */
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
}

.shadow-purple-500\/10 {
  box-shadow: 0 10px 15px -3px rgb(139 92 246 / 0.1), 0 4px 6px -2px rgb(139 92 246 / 0.1);
}

/* Header specific styles */
#header {
  backdrop-filter: blur(4px);
}

#header.scrolled {
  border-color: rgb(76 29 149 / 0.4);
  background-color: rgb(0 0 0 / 0.95);
}

/* Dropdown styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(139 92 246);
  color: rgb(167 139 250);
  border-radius: 0.375rem;
  transition: all 150ms;
}

.dropdown-trigger:hover {
  background-color: rgb(139 92 246 / 0.1);
}

.dropdown-content {
  position: absolute;
  background-color: rgb(17 24 39);
  border: 1px solid rgb(76 29 149 / 0.3);
  border-radius: 0.375rem;
  min-width: 8rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
  z-index: 50;
  padding: 0.25rem;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: color 150ms;
}

.dropdown-item:hover {
  background-color: rgb(55 65 81 / 0.5);
}

/* Button styles */
button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}

.email-modal-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 150ms;
  text-decoration: none;
}

.email-modal-trigger:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Service card link styles */
.service-card a,
.training-card a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 500;
  transition: color 150ms;
}

.service-card a:hover,
.training-card a:hover {
  text-decoration: none;
}

.service-card a svg,
.training-card a svg {
  transition: transform 150ms;
}

.service-card a:hover svg,
.training-card a:hover svg {
  transform: translateX(2px);
}

/* Card hover effects */
.service-card:hover,
.training-card:hover {
  transform: translateY(-2px);
}

/* Modal styles */
dialog {
  border: none;
  border-radius: 0.5rem;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

dialog::backdrop {
  background-color: rgb(0 0 0 / 0.8);
  backdrop-filter: blur(4px);
}

dialog[open] {
  animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Toast styles */
.toast {
  background-color: rgb(17 24 39);
  border: 1px solid rgb(76 29 149 / 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  color: white;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  animation: toast-slide-in 0.3s ease-out;
  min-width: 300px;
}

.toast.success {
  border-color: rgb(34 197 94);
}

.toast.error {
  border-color: rgb(239 68 68);
}

@keyframes toast-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive design */
@media (min-width: 768px) {
  .grid.md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .grid.md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .md\:flex-row {
    flex-direction: row;
  }
  
  .md\:w-1\/2 {
    width: 50%;
  }
  
  .md\:py-32 {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
  
  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  
  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }
  
  .md\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
  
  .md\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
}

@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }
}

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

/* Footer list styles - remove bullets and underlines */
footer ul {
  list-style: none;
  padding: 0;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  text-decoration: none;
}

/* Focus styles for accessibility */
button:focus,
a:focus {
  outline: 2px solid rgb(139 92 246);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

::-webkit-scrollbar-track {
  background: rgb(17 24 39);
}

::-webkit-scrollbar-thumb {
  background: rgb(76 29 149);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(139 92 246);
}