/* ============================================
   Vonce Frontend - Main Stylesheet
   ============================================ */

/* --- CSS Variables (Tailwind-like) --- */
:root {
  --color-neutral: #0a0a0f;
  --color-surface: #13131a;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-tertiary: #8b26ff;
  --color-body-text: #928aa6;
  --color-white: #ffffff;
  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --font-grotesk: "Space Grotesk", "Inter", system-ui, sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-display);
  background-color: var(--color-neutral);
  color: var(--color-body-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --- Selection --- */
::selection {
  background: rgba(139, 38, 255, 0.3);
  color: white;
}

/* --- Utility Classes --- */

/* Background */
.bg-neutral {
  background-color: var(--color-neutral);
}
.bg-surface {
  background-color: var(--color-surface);
}
.bg-tertiary {
  background-color: var(--color-tertiary);
}
.bg-tertiary\/10 {
  background-color: rgba(139, 38, 255, 0.1);
}
.bg-tertiary\/5 {
  background-color: rgba(139, 38, 255, 0.05);
}
.bg-white\/\[0\.04\] {
  background-color: rgba(255, 255, 255, 0.04);
}
.bg-white\/\[0\.08\] {
  background-color: rgba(255, 255, 255, 0.08);
}
.bg-emerald-500\/10 {
  background-color: rgba(16, 185, 129, 0.1);
}
.bg-red-500\/10 {
  background-color: rgba(239, 68, 68, 0.1);
}
.bg-yellow-500\/10 {
  background-color: rgba(234, 179, 8, 0.1);
}

/* Text */
.text-white {
  color: var(--color-white);
}
.text-tertiary {
  color: var(--color-tertiary);
}
.text-body-text {
  color: var(--color-body-text);
}
.text-gray-500 {
  color: #6b7280;
}
.text-emerald-400 {
  color: #34d399;
}
.text-red-400 {
  color: #f87171;
}
.text-yellow-400 {
  color: #fbbf24;
}

/* Border */
.border-border {
  border-color: var(--color-border);
}
.border-tertiary {
  border-color: var(--color-tertiary);
}
.border-tertiary\/20 {
  border-color: rgba(139, 38, 255, 0.2);
}
.border-tertiary\/30 {
  border-color: rgba(139, 38, 255, 0.3);
}
.border-tertiary\/40 {
  border-color: rgba(139, 38, 255, 0.4);
}
.border-emerald-500\/20 {
  border-color: rgba(16, 185, 129, 0.2);
}
.border-red-500\/20 {
  border-color: rgba(239, 68, 68, 0.2);
}

/* Font */
.font-display {
  font-family: var(--font-display);
}
.font-grotesk {
  font-family: var(--font-grotesk);
}

/* Animations */
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 8px 40px rgba(139, 38, 255, 0.25);
  }
  50% {
    box-shadow: 0 8px 60px rgba(139, 38, 255, 0.4);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Tailwind-like responsive grid helpers --- */
.grid {
  display: grid;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Flex helpers */
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-end {
  justify-content: flex-end;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-1\.5 {
  gap: 0.375rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-2\.5 {
  gap: 0.625rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-5 {
  gap: 1.25rem;
}
.gap-6 {
  gap: 1.5rem;
}
.gap-8 {
  gap: 2rem;
}
.shrink-0 {
  flex-shrink: 0;
}
.flex-1 {
  flex: 1 1 0%;
}

@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }
}

/* Spacing */
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.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-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-3\.5 {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-5 {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.py-16 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.pt-4 {
  padding-top: 1rem;
}
.pt-6 {
  padding-top: 1.5rem;
}
.pt-20 {
  padding-top: 5rem;
}
.pb-24 {
  padding-bottom: 6rem;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 1.25rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding: 2rem;
}
.p-10 {
  padding: 2.5rem;
}

/* Margin */
.mt-1 {
  margin-top: 0.25rem;
}
.mt-1\.5 {
  margin-top: 0.375rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-8 {
  margin-top: 2rem;
}
.mt-10 {
  margin-top: 2.5rem;
}
.mt-12 {
  margin-top: 3rem;
}
.mt-14 {
  margin-top: 3.5rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-1\.5 {
  margin-bottom: 0.375rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-5 {
  margin-bottom: 1.25rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.mb-10 {
  margin-bottom: 2.5rem;
}
.mb-12 {
  margin-bottom: 3rem;
}
.mb-14 {
  margin-bottom: 3.5rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Width / Max-width */
.w-full {
  width: 100%;
}
.w-8 {
  width: 2rem;
}
.w-9 {
  width: 2.25rem;
}
.w-10 {
  width: 2.5rem;
}
.w-12 {
  width: 3rem;
}
.w-14 {
  width: 3.5rem;
}
.w-20 {
  width: 5rem;
}
.w-64 {
  width: 16rem;
}
.max-w-xs {
  max-width: 20rem;
}
.max-w-sm {
  max-width: 24rem;
}
.max-w-md {
  max-width: 28rem;
}
.max-w-lg {
  max-width: 32rem;
}
.max-w-xl {
  max-width: 36rem;
}
.max-w-2xl {
  max-width: 42rem;
}
.max-w-3xl {
  max-width: 48rem;
}
.max-w-4xl {
  max-width: 56rem;
}
.max-w-5xl {
  max-width: 64rem;
}
.max-w-6xl {
  max-width: 72rem;
}
.min-w-0 {
  min-width: 0;
}
.min-h-\[70vh\] {
  min-height: 70vh;
}

/* Height */
.h-8 {
  height: 2rem;
}
.h-9 {
  height: 2.25rem;
}
.h-10 {
  height: 2.5rem;
}
.h-12 {
  height: 3rem;
}
.h-14 {
  height: 3.5rem;
}
.h-20 {
  height: 5rem;
}
.h-64 {
  height: 16rem;
}
.h-px {
  height: 1px;
}

/* Border Radius */
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-xl {
  border-radius: 0.75rem;
}
.rounded-2xl {
  border-radius: 1rem;
}
.rounded-3xl {
  border-radius: 1.5rem;
}
.rounded-4xl {
  border-radius: 2rem;
}
.rounded-full {
  border-radius: 9999px;
}
.rounded-\[4px\] {
  border-radius: 4px;
}
.rounded-\[6px\] {
  border-radius: 6px;
}

/* Border */
.border {
  border-width: 1px;
  border-style: solid;
}
.border-2 {
  border-width: 2px;
  border-style: solid;
}
.border-t {
  border-top-width: 1px;
  border-top-style: solid;
}
.border-b {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}
.border-none {
  border: none;
}

/* Text sizes */
.text-\[8px\] {
  font-size: 8px;
}
.text-\[9px\] {
  font-size: 9px;
}
.text-\[10px\] {
  font-size: 10px;
}
.text-xs {
  font-size: 0.75rem;
}
.text-sm {
  font-size: 0.875rem;
}
.text-base {
  font-size: 1rem;
}
.text-lg {
  font-size: 1.125rem;
}
.text-2xl {
  font-size: 1.5rem;
}
.text-3xl {
  font-size: 1.875rem;
}
.text-4xl {
  font-size: 2.25rem;
}
.text-5xl {
  font-size: 3rem;
}
.text-6xl {
  font-size: 3.75rem;
}
.text-7xl {
  font-size: 4.5rem;
}

@media (min-width: 768px) {
  .md\:text-3xl {
    font-size: 1.875rem;
  }
  .md\:text-4xl {
    font-size: 2.25rem;
  }
  .md\:text-5xl {
    font-size: 3rem;
  }
  .md\:text-6xl {
    font-size: 3.75rem;
  }
  .md\:text-7xl {
    font-size: 4.5rem;
  }
  .md\:w-24 {
    width: 6rem;
  }
  .md\:h-24 {
    height: 6rem;
  }
  .md\:p-8 {
    padding: 2rem;
  }
  .md\:p-10 {
    padding: 2.5rem;
  }
  .md\:p-14 {
    padding: 3.5rem;
  }
  .md\:py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
  .md\:pt-28 {
    padding-top: 7rem;
  }
  .md\:pb-32 {
    padding-bottom: 8rem;
  }
  .md\:gap-12 {
    gap: 3rem;
  }
}

/* Font weight */
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}
.font-medium {
  font-weight: 500;
}

/* Text transform */
.uppercase {
  text-transform: uppercase;
}
.capitalize {
  text-transform: capitalize;
}
.tracking-tight {
  letter-spacing: -0.025em;
}
.tracking-\[1px\] {
  letter-spacing: 1px;
}
.tracking-\[1\.5px\] {
  letter-spacing: 1.5px;
}
.tracking-\[2px\] {
  letter-spacing: 2px;
}

/* Text alignment */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}

/* Leading */
.leading-relaxed {
  line-height: 1.625;
}
.leading-\[1\.1\] {
  line-height: 1.1;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}
.overflow-x-auto {
  overflow-x: auto;
}
.overflow-y-auto {
  overflow-y: auto;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Position */
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.top-0 {
  top: 0;
}
.top-1\/4 {
  top: 25%;
}
.top-20 {
  top: 5rem;
}
.right-0 {
  right: 0;
}
.right-6 {
  right: 1.5rem;
}
.left-1\/2 {
  left: 50%;
}
.-top-3 {
  top: -0.75rem;
}
.z-\[9999\] {
  z-index: 9999;
}
.z-50 {
  z-index: 50;
}

/* Transform */
.-translate-x-1\/2 {
  transform: translateX(-50%);
}
.-translate-y-1\/2 {
  transform: translateY(-50%);
}
.translate-x-0 {
  transform: translateX(0);
}
.scale-105 {
  transform: scale(1.05);
}
.hover\:-translate-y-0\.5:hover {
  transform: translateY(-0.125rem);
}

/* Pointer events */
.pointer-events-none {
  pointer-events: none;
}

/* Object fit */
.object-cover {
  object-fit: cover;
}

/* Blur */
.blur-\[80px\] {
  filter: blur(80px);
}
.blur-\[120px\] {
  filter: blur(120px);
}
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

/* Shadow */
.shadow-lg {
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.shadow-\[0_4px_16px_rgba\(139\,38\,255\,0\.2\)\] {
  box-shadow: 0 4px 16px rgba(139, 38, 255, 0.2);
}
.shadow-\[0_4px_20px_rgba\(139\,38\,255\,0\.25\)\] {
  box-shadow: 0 4px 20px rgba(139, 38, 255, 0.25);
}
.shadow-\[0_6px_30px_rgba\(139\,38\,255\,0\.35\)\] {
  box-shadow: 0 6px 30px rgba(139, 38, 255, 0.35);
}
.shadow-\[0_8px_40px_rgba\(139\,38\,255\,0\.25\)\] {
  box-shadow: 0 8px 40px rgba(139, 38, 255, 0.25);
}
.shadow-\[0_0_40px_rgba\(139\,38\,255\,0\.1\)\] {
  box-shadow: 0 0 40px rgba(139, 38, 255, 0.1);
}

/* Transitions */
.transition-all {
  transition: all 0.2s ease;
}
.transition-colors {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

/* Hover states */
.hover\:bg-tertiary\/90:hover {
  background-color: rgba(139, 38, 255, 0.9);
}
.hover\:bg-tertiary\/20:hover {
  background-color: rgba(139, 38, 255, 0.2);
}
.hover\:bg-white\/\[0\.08\]:hover {
  background-color: rgba(255, 255, 255, 0.08);
}
.hover\:bg-red-500\/20:hover {
  background-color: rgba(239, 68, 68, 0.2);
}
.hover\:text-tertiary:hover {
  color: var(--color-tertiary);
}
.hover\:text-white:hover {
  color: white;
}
.hover\:border-tertiary\/30:hover {
  border-color: rgba(139, 38, 255, 0.3);
}
.hover\:border-tertiary\/60:hover {
  border-color: rgba(139, 38, 255, 0.6);
}
.hover\:border-border\/60:hover {
  border-color: rgba(255, 255, 255, 0.1);
}
.hover\:shadow-\[0_6px_30px_rgba\(139\,38\,255\,0\.35\)\]:hover {
  box-shadow: 0 6px 30px rgba(139, 38, 255, 0.35);
}

/* Group hover */
.group:hover .group-hover\:bg-tertiary\/20 {
  background-color: rgba(139, 38, 255, 0.2);
}
.group:hover .group-hover\:text-tertiary {
  color: var(--color-tertiary);
}

/* Display helpers */
.hidden {
  display: none;
}
.block {
  display: block;
}

/* Space between */
.space-y-2 > * + * {
  margin-top: 0.5rem;
}
.space-y-2\.5 > * + * {
  margin-top: 0.625rem;
}
.space-y-3 > * + * {
  margin-top: 0.75rem;
}
.space-y-4 > * + * {
  margin-top: 1rem;
}
.space-y-5 > * + * {
  margin-top: 1.25rem;
}
.space-y-8 > * + * {
  margin-top: 2rem;
}

/* Outline */
.outline-none {
  outline: none;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer;
}

/* Resize */
.resize-none {
  resize: none;
}

/* Font mono */
.font-mono {
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

/* Accent color */
.accent-tertiary {
  accent-color: var(--color-tertiary);
}

/* No underline */
.no-underline {
  text-decoration: none;
}

/* Background gradient */
.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-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}
.from-tertiary {
  --tw-gradient-from: var(--color-tertiary);
  --tw-gradient-stops:
    var(--tw-gradient-from), var(--tw-gradient-to, rgba(139, 38, 255, 0));
}
.from-tertiary\/10 {
  --tw-gradient-from: rgba(139, 38, 255, 0.1);
  --tw-gradient-stops:
    var(--tw-gradient-from), var(--tw-gradient-to, rgba(139, 38, 255, 0));
}
.from-tertiary\/20 {
  --tw-gradient-from: rgba(139, 38, 255, 0.2);
  --tw-gradient-stops:
    var(--tw-gradient-from), var(--tw-gradient-to, rgba(139, 38, 255, 0));
}
.from-tertiary\/50 {
  --tw-gradient-from: rgba(139, 38, 255, 0.5);
  --tw-gradient-stops:
    var(--tw-gradient-from), var(--tw-gradient-to, rgba(139, 38, 255, 0));
}
.via-surface\/80 {
  --tw-gradient-via: rgba(19, 19, 26, 0.8);
  --tw-gradient-stops:
    var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to);
}
.to-surface\/80 {
  --tw-gradient-to: rgba(19, 19, 26, 0.8);
}
.to-\[\#6B1FA0\] {
  --tw-gradient-to: #6b1fa0;
}
.to-purple-400 {
  --tw-gradient-to: #a78bfa;
}
.to-transparent {
  --tw-gradient-to: transparent;
}
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}
.text-transparent {
  color: transparent;
}

/* Table */
table {
  border-collapse: collapse;
}
thead {
  border-bottom: 1px solid var(--color-border);
}
th {
  font-weight: 600;
  text-align: left;
}

/* Select / Input base */
select,
input,
textarea,
button {
  font-family: inherit;
}

/* Select styling */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23928AA6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Checkbox */
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* Canvas for Chart.js */
canvas {
  max-width: 100%;
}

/* Focus visible */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(139, 38, 255, 0.3);
  outline-offset: 2px;
}

/* Placeholder */
::placeholder {
  color: #6b7280;
  opacity: 1;
}

/* --- Mobile Menu --- */
@media (max-width: 767px) {
  .mobile-menu-open {
    display: flex !important;
    flex-direction: column;
  }
}

/* --- Print --- */
@media print {
  body {
    background: white;
    color: black;
  }
  .no-print {
    display: none !important;
  }
}
