/* ============================================================
   VITALITY OPTIMIZATION - MAIN STYLES
   Professional-grade website with modern design system
   ============================================================ */

/* ============================================================
   CSS VARIABLES & CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Color Palette - Professional Purple Theme */
  --primary: #7534b3;
  --primary-light: #8b1cfb;
  --primary-dark: #4a1c7a;
  --primary-rgb: 117, 52, 179;
  
  --accent: #9147ff;
  --accent-light: #b57bff;
  --accent-dark: #7225e3;
  --accent-rgb: 145, 71, 255;
  
  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --bg-light: #1a1a1a;
  --bg-lighter: #2a2a2a;
  
  --text-light: #ffffff;
  --text-dim: #cccccc;
  --text-darker: #999999;
  
  --border-light: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.2);
  --border-dark: rgba(255, 255, 255, 0.05);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
  color: var(--text-dim);
}

a {
  color: var(--text-light);
  text-decoration: none;
  transition: all var(--transition-normal);
}

a:hover {
  color: var(--text-light) !important;
  text-decoration: underline;
}

strong {
  font-weight: 600;
  color: var(--text-light);
}

em {
  font-style: italic;
  color: var(--text-dim);
}

code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--accent-light);
}

pre {
  background: rgba(0, 0, 0, 0.4);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--spacing-lg) 0;
  border: 1px solid var(--border-light);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-light);
}

/* ============================================================
   LAYOUT & CONTAINERS
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-3xl) 0;
}

.section-sm {
  padding: var(--spacing-2xl) 0;
}

.section-lg {
  padding: calc(var(--spacing-3xl) * 2) 0;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ============================================================
   FLEXBOX UTILITIES
   ============================================================ */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

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

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

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

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* ============================================================
   SPACING UTILITIES
   ============================================================ */
.m-0 { margin: 0; }
.m-sm { margin: var(--spacing-sm); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }
.m-xl { margin: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.pt-0 { padding-top: 0; }
.pt-sm { padding-top: var(--spacing-sm); }
.pt-md { padding-top: var(--spacing-md); }
.pt-lg { padding-top: var(--spacing-lg); }
.pt-xl { padding-top: var(--spacing-xl); }

.pb-0 { padding-bottom: 0; }
.pb-sm { padding-bottom: var(--spacing-sm); }
.pb-md { padding-bottom: var(--spacing-md); }
.pb-lg { padding-bottom: var(--spacing-lg); }
.pb-xl { padding-bottom: var(--spacing-xl); }

/* ============================================================
   TEXT UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-light { color: var(--text-light); }
.text-dim { color: var(--text-dim); }
.text-darker { color: var(--text-darker); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.75; }

/* ============================================================
   BACKGROUND UTILITIES
   ============================================================ */
.bg-dark { background-color: var(--bg-dark); }
.bg-darker { background-color: var(--bg-darker); }
.bg-light { background-color: var(--bg-light); }
.bg-lighter { background-color: var(--bg-lighter); }
.bg-primary { background-color: var(--primary); }
.bg-accent { background-color: var(--accent); }

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.bg-gradient-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.bg-gradient-dark {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
}

/* ============================================================
   BORDER UTILITIES
   ============================================================ */
.border { border: 1px solid var(--border-light); }
.border-t { border-top: 1px solid var(--border-light); }
.border-b { border-bottom: 1px solid var(--border-light); }
.border-l { border-left: 1px solid var(--border-light); }
.border-r { border-right: 1px solid var(--border-light); }

.border-primary { border-color: var(--primary); }
.border-accent { border-color: var(--accent); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: 9999px; }

/* ============================================================
   SHADOW UTILITIES
   ============================================================ */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

.shadow-primary {
  box-shadow: 0 4px 14px 0 rgba(var(--primary-rgb), 0.4);
}

.shadow-accent {
  box-shadow: 0 4px 14px 0 rgba(var(--accent-rgb), 0.4);
}

/* ============================================================
   TRANSITION UTILITIES
   ============================================================ */
.transition { transition: all var(--transition-normal); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

.transition-colors {
  transition: color var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
}

.transition-transform {
  transition: transform var(--transition-normal);
}

.transition-opacity {
  transition: opacity var(--transition-normal);
}

/* ============================================================
   INTERACTIVE STATES
   ============================================================ */
.hover\:scale-105:hover {
  transform: scale(1.05);
}

.hover\:scale-110:hover {
  transform: scale(1.1);
}

.hover\:translate-y-1:hover {
  transform: translateY(-0.25rem);
}

.hover\:translate-y-2:hover {
  transform: translateY(-0.5rem);
}

.hover\:shadow-lg:hover {
  box-shadow: var(--shadow-lg);
}

.hover\:shadow-xl:hover {
  box-shadow: var(--shadow-xl);
}

.hover\:shadow-primary:hover {
  box-shadow: 0 8px 25px 0 rgba(var(--primary-rgb), 0.6);
}

.hover\:shadow-accent:hover {
  box-shadow: 0 8px 25px 0 rgba(var(--accent-rgb), 0.6);
}

/* ============================================================
   FOCUS STATES
   ============================================================ */
.focus\:outline-none:focus {
  outline: none;
}

.focus\:ring:focus {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.5);
}

.focus\:ring-primary:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.5);
}

.focus\:ring-accent:focus {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.5);
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 640px) {
  .sm\:hidden { display: none; }
  .sm\:block { display: block; }
  .sm\:flex { display: flex; }
  .sm\:grid { display: grid; }
  
  .sm\:text-center { text-align: center; }
  .sm\:text-left { text-align: left; }
  .sm\:text-right { text-align: right; }
  
  .sm\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:flex { display: flex; }
  .md\:grid { display: grid; }
  
  .md\:text-center { text-align: center; }
  .md\:text-left { text-align: left; }
  .md\:text-right { text-align: right; }
  
  .md\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:block { display: block; }
  .lg\:flex { display: flex; }
  .lg\:grid { display: grid; }
  
  .lg\:text-center { text-align: center; }
  .lg\:text-left { text-align: left; }
  .lg\:text-right { text-align: right; }
  
  .lg\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1280px) {
  .xl\:hidden { display: none; }
  .xl\:block { display: block; }
  .xl\:flex { display: flex; }
  .xl\:grid { display: grid; }
  
  .xl\:text-center { text-align: center; }
  .xl\:text-left { text-align: left; }
  .xl\:text-right { text-align: right; }
}

/* ============================================================
   ANIMATION UTILITIES
   ============================================================ */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

.animate-slide-down {
  animation: slideDown 0.6s ease-out;
}

.animate-slide-left {
  animation: slideLeft 0.6s ease-out;
}

.animate-slide-right {
  animation: slideRight 0.6s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

.animate-bounce-in {
  animation: bounceIn 0.6s ease-out;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  from {
  opacity: 0;
    transform: translateX(-30px);
}
  to {
  opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-sm);
}

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

/* ============================================================
   SELECTION STYLING
   ============================================================ */
::selection {
  background: rgba(var(--accent-rgb), 0.3);
  color: var(--text-light);
}

::-moz-selection {
  background: rgba(var(--accent-rgb), 0.3);
  color: var(--text-light);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  
  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  
  thead {
    display: table-header-group;
  }
  
  tr,
  img {
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
  
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2,
  h3 {
    page-break-after: avoid;
  }
}

