/* =====================================================
   LOKAVOK DESIGN SYSTEM v2
   Premium | Modern | High-Tech | Flexfuel E85
   Palette: Deep Night, Anthracite, Cream, Ethanol Green, Cyan, Amber
   ===================================================== */

/* -----------------------------------------------------
   1. TOKENS & ROOT VARIABLES
   ----------------------------------------------------- */
:root {
  /* Primary Palette */
  --night-50: #f4f6f8;
  --night-100: #e2e8f0;
  --night-200: #cbd5e1;
  --night-300: #94a3b8;
  --night-400: #64748b;
  --night-500: #475569;
  --night-600: #334155;
  --night-700: #1e293b;
  --night-800: #0f172a;
  --night-900: #0a1628;
  --night-950: #060e1a;

  /* Ethanol Green */
  --ethanol-50: #ecfdf5;
  --ethanol-100: #d1fae5;
  --ethanol-200: #a7f3d0;
  --ethanol-300: #6ee7b7;
  --ethanol-400: #34d399;
  --ethanol-500: #10b981;
  --ethanol-600: #059669;
  --ethanol-700: #047857;

  /* Cyan Accent */
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;

  /* Amber Accent */
  --amber-400: #fb923c;
  --amber-500: #f97316;
  --amber-600: #ea580c;

  /* Cream / Off-white */
  --cream-50: #fdfcfa;
  --cream-100: #f8f7f4;
  --cream-200: #f0eeea;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.25);
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.2);

  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------
   2. BASE & RESET
   ----------------------------------------------------- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--cream-100);
  color: var(--night-800);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

::selection {
  background-color: var(--ethanol-200);
  color: var(--night-900);
}

/* -----------------------------------------------------
   3. SCROLLBAR
   ----------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--night-300);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--night-400);
}

/* -----------------------------------------------------
   4. TYPOGRAPHY
   ----------------------------------------------------- */
.text-gradient {
  background: linear-gradient(135deg, var(--ethanol-400), var(--cyan-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-hero {
  background: linear-gradient(135deg, #ffffff 0%, var(--ethanol-300) 50%, var(--cyan-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -----------------------------------------------------
   5. BUTTONS
   ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ethanol-600), var(--ethanol-500));
  color: white;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45), var(--shadow-glow-green);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--night-800);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-secondary:hover {
  background: var(--night-700);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--night-200);
  color: var(--night-700);
}
.btn-outline:hover {
  border-color: var(--ethanol-500);
  color: var(--ethanol-600);
  background: var(--ethanol-50);
}

.btn-ghost {
  background: transparent;
  color: var(--night-500);
}
.btn-ghost:hover {
  background: var(--night-100);
  color: var(--night-800);
}

.btn-white {
  background: white;
  color: var(--night-900);
  box-shadow: var(--shadow-md);
}
.btn-white:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-xl);
}

/* -----------------------------------------------------
   6. CARDS
   ----------------------------------------------------- */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-200);
  transition: all var(--transition-base);
}

.card-hover {
  transition: all var(--transition-base);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--ethanol-200);
}

.card-premium {
  background: linear-gradient(180deg, #ffffff 0%, var(--cream-50) 100%);
  border: 1px solid rgba(16, 185, 129, 0.12);
  box-shadow: 0 4px 24px rgba(10, 22, 40, 0.06);
}
.card-premium:hover {
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 12px 40px rgba(10, 22, 40, 0.1), var(--shadow-glow-green);
}

/* -----------------------------------------------------
   7. BADGES
   ----------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.25rem;
  letter-spacing: 0.01em;
}

.badge-green {
  background: var(--ethanol-50);
  color: var(--ethanol-700);
  border: 1px solid var(--ethanol-200);
}
.badge-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.badge-amber {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-red {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.badge-purple {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.badge-gray {
  background: var(--night-50);
  color: var(--night-600);
  border: 1px solid var(--night-200);
}
.badge-dark {
  background: var(--night-800);
  color: white;
}

/* Dot inside badge */
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* -----------------------------------------------------
   8. ALERTS / MESSAGES
   ----------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}

.alert-success {
  background: var(--ethanol-50);
  border: 1px solid var(--ethanol-200);
  color: var(--ethanol-700);
}
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* -----------------------------------------------------
   9. FORMS
   ----------------------------------------------------- */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--night-800);
  background: white;
  border: 1.5px solid var(--night-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}
.form-input::placeholder {
  color: var(--night-300);
}
.form-input:focus {
  outline: none;
  border-color: var(--ethanol-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.form-input:disabled {
  background: var(--night-50);
  color: var(--night-400);
  cursor: not-allowed;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--night-700);
  margin-bottom: 0.375rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* -----------------------------------------------------
   10. TABLES
   ----------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.data-table thead th {
  padding: 0.875rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--night-400);
  background: var(--cream-100);
  border-bottom: 1px solid var(--cream-200);
}
.data-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--cream-200);
  color: var(--night-700);
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
  background: var(--cream-50);
}

/* -----------------------------------------------------
   11. NAVIGATION
   ----------------------------------------------------- */
.nav-link {
  position: relative;
  color: var(--night-300);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.nav-link:hover {
  color: white;
}
.nav-link.active {
  color: white;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ethanol-500), var(--cyan-500));
  border-radius: var(--radius-full);
}

/* -----------------------------------------------------
   12. HERO & SECTIONS
   ----------------------------------------------------- */
.hero-glow {
  position: relative;
  overflow: hidden;
}
.hero-glow::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-glow::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ethanol-600);
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--ethanol-500), var(--cyan-400));
  border-radius: var(--radius-full);
}

/* -----------------------------------------------------
   13. ANIMATIONS
   ----------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

.animate-pulse-glow {
  animation: pulse-glow 2s infinite;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Stagger delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* -----------------------------------------------------
   14. UTILITAIRES
   ----------------------------------------------------- */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--night-200), transparent);
}

.divider-dark {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

/* Image overlays */
.img-overlay {
  position: relative;
}
.img-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.6) 0%, transparent 50%);
  border-radius: inherit;
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--ethanol-500);
  outline-offset: 2px;
}

/* Price tag */
.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.125rem;
}
.price-tag .amount {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--night-900);
}
.price-tag .currency {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--night-400);
}
.price-tag .period {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--night-400);
}
