/* SQ Interactive - Optimized Global Styles */

/* Base Styles */
body { 
  font-family: 'Plus Jakarta Sans', sans-serif; 
  background: #121212; 
  color: #f5f5f5; 
  line-height: 1.6;
}

h1, h2, h3, h4 { 
  font-family: 'Playfair Display', serif; 
  font-weight: 600;
}

.gold { color: #d4af37; }

/* Performance Optimizations */
img { 
  max-width: 100%; 
  height: auto; 
  loading: lazy;
}

video {
  object-fit: cover;
  object-position: center;
}

/* Demo Button */
.demo-btn {
  position: fixed; 
  bottom: 2rem; 
  right: 2rem; 
  z-index: 999;
  background: linear-gradient(135deg, #d4af37 0%, #f1c40f 100%);
  box-shadow: 0 4px 15px rgba(212,175,55,0.3);
  animation: pulse 5s infinite;
  transition: all 0.3s ease;
}

.demo-btn:hover { 
  box-shadow: 0 0 20px rgba(212,175,55,0.5); 
  transform: translateY(-3px); 
}

@keyframes pulse { 
  0%, 100% { transform: scale(1); } 
  50% { transform: scale(1.05); } 
}

/* Before/After Slider */
.before-after { 
  position: relative; 
  height: 24rem; 
  overflow: hidden; 
  border-radius: 1rem; 
}

.before-after img { 
  position: absolute; 
  inset: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.slider-handle { 
  position: absolute; 
  width: 4px; 
  height: 100%; 
  background: #d4af37; 
  left: 50%; 
  cursor: ew-resize; 
}

.slider-handle:after {
  content: ''; 
  position: absolute; 
  width: 32px; 
  height: 32px; 
  border-radius: 50%;
  background: #d4af37; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
}

/* Labels */
.label { 
  position: absolute; 
  top: 10px; 
  padding: 4px 10px; 
  background: rgba(0,0,0,0.6); 
  color: #f5f5f5; 
  font-size: 0.875rem; 
  border-radius: 6px; 
}

.label.left { left: 10px; }
.label.right { right: 10px; }

/* Steam Background */
.steam-bg {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  z-index: 0;
}

.steam-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(0,0,0,0.7), rgba(18,18,18,0.95));
  backdrop-filter: blur(4px);
  z-index: -1;
}

/* Scrollbar Hide */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { 
  -ms-overflow-style: none; 
  scrollbar-width: none; 
}

/* Portfolio Cards */
.portfolio-card { 
  position: relative; 
  overflow: hidden; 
  border-radius: 1rem; 
  background: #0f0f0f; 
}

.portfolio-card img { 
  transition: transform 0.5s ease; 
}

.portfolio-card:hover img { 
  transform: scale(1.08); 
}

.portfolio-overlay {
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.8);
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center;
  opacity: 0; 
  transition: opacity 0.4s ease; 
  padding: 1.5rem; 
  text-align: center;
}

.portfolio-card:hover .portfolio-overlay { 
  opacity: 1; 
}

.portfolio-overlay h3 { 
  color: #d4af37; 
  font-size: 1.25rem; 
  margin-bottom: 0.5rem; 
}

.portfolio-overlay p { 
  color: #ccc; 
  font-size: 0.9rem; 
  margin-bottom: 1rem; 
}

/* Filter Buttons */
.filter-btn { 
  border: 1px solid #d4af37; 
  color: #d4af37; 
  border-radius: 9999px; 
  padding: 0.5rem 1.25rem; 
  font-size: 0.875rem; 
  transition: 0.3s; 
}

.filter-btn:hover, 
.filter-btn.active { 
  background: #d4af37; 
  color: black; 
}

/* Glass Effect */
.glass { 
  background: rgba(255,255,255,0.05); 
  border: 1px solid rgba(255,255,255,0.1); 
  backdrop-filter: blur(8px); 
}

/* Button Styles */
.btn-gold { 
  background: linear-gradient(90deg, #d4af37, #b8860b); 
  color: #121212; 
  transition: all 0.3s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(212,175,55,0.5);
}

/* Responsive Optimizations */
@media (max-width: 768px) {
  .demo-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .before-after {
    height: 16rem;
  }
  
  .steam-bg {
    background-attachment: scroll;
  }
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .demo-btn {
    animation: none;
  }
  
  .portfolio-card img {
    transition: none;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
button:focus,
a:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .demo-btn,
  nav,
  footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}