/* ============================================
   idepark.com - Custom Styles
   Dark "Product Studio / Lab" Aesthetic
   ============================================ */

/* CSS Variables */
:root {
  --bg-primary: #0B0F14;
  --bg-secondary: #0E1218;
  --bg-card: rgba(14, 18, 24, 0.8);
  --bg-card-hover: rgba(20, 26, 34, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  /* Accent colors - muted cyan and desaturated purple */
  --accent-cyan: #67E8F9;
  --accent-cyan-muted: #22D3EE;
  --accent-purple: #A78BFA;
  --accent-purple-muted: #8B5CF6;
  
  /* Text colors */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* Selection */
::selection {
  background: rgba(103, 232, 249, 0.3);
  color: var(--text-primary);
}

/* ============================================
   Lab Background - Core Theme Classes
   ============================================ */

/* Main lab background with dotted grid overlay */
.bg-lab {
  background-color: var(--bg-primary);
  position: relative;
}

.bg-lab::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.035) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Glass card - semi-transparent with blur and soft border */
.card-glass {
  background: rgba(14, 18, 24, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.card-glass:hover {
  background: rgba(20, 26, 34, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Muted text for secondary content */
.text-muted {
  color: var(--text-muted);
}

/* High contrast text for better accessibility */
.text-readable {
  color: #CBD5E1; /* slate-300 - 7.06:1 contrast on #0B0F14 */
}

/* Soft border for subtle dividers */
.border-soft {
  border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================
   Legacy Grid Overlay (deprecated, use .bg-lab)
   ============================================ */

/* Grid overlay background */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 32px 32px;
}

/* Gradient orbs for ambient effect */
.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.gradient-orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-cyan);
  top: -200px;
  right: -200px;
}

.gradient-orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-purple);
  bottom: -150px;
  left: -150px;
}

/* Background grid overlay */
.bg-grid {
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Alternative dotted pattern */
.bg-dots {
  background-image: 
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Glassy card effect (legacy, prefer .card-glass) */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* Gradient text for headings */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtle glow effects */
.glow-cyan {
  box-shadow: 0 0 40px rgba(91, 154, 154, 0.15);
}

.glow-purple {
  box-shadow: 0 0 40px rgba(139, 123, 168, 0.15);
}

/* Status tag styles */
.status-tag {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Navbar active link */
.nav-link.active {
  color: var(--accent-cyan);
}

/* Language toggle */
.lang-toggle span.active {
  color: var(--accent-cyan);
}

.lang-toggle span:not(.active) {
  color: var(--text-muted);
}

/* Smooth page transitions */
.page-transition {
  animation: fadeIn 0.4s ease-out;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Skip to content link for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-cyan);
  color: var(--bg-primary);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

/* Insight card hover effect */
.insight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.insight-card:hover::before {
  opacity: 1;
}

/* Form input styles */
.form-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-cyan);
  outline: none;
}

/* Button styles */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
/* ============================================
   Additional Component Styles
   ============================================ */

/* Typography */
.heading-xl {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.heading-md {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.heading-sm {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Monospace text */
.mono {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
}

.tag-cyan {
  background: rgba(103, 232, 249, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(103, 232, 249, 0.2);
}

.tag-purple {
  background: rgba(167, 139, 250, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.tag-amber {
  background: rgba(251, 191, 36, 0.1);
  color: #FBBF24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.tag-muted {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Filter Buttons */
.filter-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.filter-btn.active {
  background: rgba(103, 232, 249, 0.1);
  border-color: rgba(103, 232, 249, 0.3);
  color: var(--accent-cyan);
}

/* Navigation */
.nav-link {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--accent-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 1px;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.lang-btn {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.lang-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.lang-btn.active {
  background: rgba(103, 232, 249, 0.1);
  border-color: rgba(103, 232, 249, 0.3);
  color: var(--accent-cyan);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Section styles */
.section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* Form styles */
.form-group {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* Fade up animation */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.mobile-menu-btn:hover {
  border-color: var(--border-hover);
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger to X animation */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu slide down */
.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: #0E1218;
  border-bottom: 1px solid var(--border-color);
  z-index: 40;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.35s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
  max-height: calc(100vh - 72px);
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-link {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu .nav-link:last-child {
  border-bottom: none;
}

@media (max-width: 1023px) {
  .mobile-menu-btn {
    display: flex;
  }
}

/* Social icons */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.social-icon:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(103, 232, 249, 0.05);
}

/* Product cards */
.product-card {
  display: block;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card .card-glass {
  height: 100%;
}

/* Products grid transition */
#products-grid {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sticky positioning helper */
@media (min-width: 1024px) {
  .lg\:sticky {
    position: sticky;
  }
  .lg\:top-32 {
    top: 8rem;
  }
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}