/* Base styles and CSS reset for Ten Z Vault */

/* CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: #1f2937;
  /* Background image with soft dark gradient overlay for readability */
  background: 
    linear-gradient(180deg, rgba(10,15,25,0.78) 0%, rgba(15,23,42,0.82) 50%, rgba(17,24,39,0.9) 100%),
    url('../newbgx.jpg') center center / cover no-repeat fixed,
    #121c33; /* final color fallback */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Dedicated image layer so content section backgrounds don't fully hide it */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../newbgx.jpg') center center / cover no-repeat;
  z-index: -4; /* behind everything */
  /* opacity: 0.85; adjust visibility */
  pointer-events: none;
}

/* Minimal fallback if gradients unsupported */
@supports not (background: radial-gradient(circle,#000,#111)) {
  body { background:#121c33; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Smooth transitions */
* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #3b82f6;
  color: white;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 6px;
}

/* 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) ")";
  }
  
  .no-print {
    display: none !important;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  * {
    border-color: currentColor;
  }
}

/* Hero section specific styles */
.hero-section {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 48px 0 rgba(59, 130, 246, 0.18), 0 2px 8px 0 rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(24px) brightness(1.08);
  -webkit-backdrop-filter: blur(24px) brightness(1.08);
  border: 1.5px solid rgba(59, 130, 246, 0.10);
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  padding: 2.5rem 0;
  transition: box-shadow 0.3s, background 0.3s;
}

/* Animation utility classes */
.pulse {
  animation: pulseBtn 0.6s cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulseBtn {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Card animations */
.card-animate {
  opacity: 0;
  transform: scale(0.95);
  animation: cardFadeIn 0.7s cubic-bezier(0.5, 1.5, 0.5, 1) forwards;
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: none;
  }
}

.card-hover {
  transition: transform 0.2s cubic-bezier(0.5, 1.5, 0.5, 1), box-shadow 0.2s;
}

.card-hover:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(91, 33, 182, 0.12);
}

/* Snap scrolling for sliders */
#categories-slider {
  scroll-snap-type: x mandatory;
}

#categories-slider > * {
  scroll-snap-align: start;
}

/* Crystal text styling */
.crystal-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1rem;
  box-shadow: 0 2px 16px rgba(59, 130, 246, 0.08);
  padding: 0.5rem 1.5rem;
  display: inline-block;
  animation: pulseText 2.5s infinite alternate;
}

@keyframes pulseText {
  from { box-shadow: 0 2px 16px rgba(59, 130, 246, 0.08); }
  to { box-shadow: 0 8px 32px rgba(59, 130, 246, 0.18); }
}
