/* 
 * SLDevs Design System
 * Modern glassmorphism theme with vibrant gradients
 * Built for 2026
 */

/* ===== CSS Custom Properties ===== */
:root {
  /* Colors */
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #12121a;
  --color-bg-tertiary: #1a1a25;

  --color-accent-primary: #6366f1;
  --color-accent-secondary: #22d3ee;
  --color-accent-tertiary: #a855f7;

  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;

  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-hover: rgba(99, 102, 241, 0.5);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(34, 211, 238, 0.1) 50%, rgba(168, 85, 247, 0.1) 100%);
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-blur: blur(20px);
  --glass-border: 1px solid var(--color-border);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', var(--font-primary);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background effects */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.1), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(168, 85, 247, 0.1), transparent);
  pointer-events: none;
  z-index: -1;
}

/* Grid overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

p {
  color: var(--color-text-secondary);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-24) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  transition: var(--transition-base);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.nav-logo img {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-text h1 {
  margin-bottom: var(--space-6);
}

.hero-text h1 span {
  display: block;
}

.hero-text p {
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-2xl);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--color-text-primary);
  border: var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border-hover);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ===== Cards ===== */
.card {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius-2xl);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
  transition: var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-content {
  padding: var(--space-6);
}

.card-content h3 {
  margin-bottom: var(--space-3);
}

.card-content p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent-secondary);
  background: rgba(34, 211, 238, 0.1);
  border-radius: var(--radius-full);
}

.tag--purple {
  color: var(--color-accent-tertiary);
  background: rgba(168, 85, 247, 0.1);
}

/* ===== Products Grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-8);
}

/* ===== Features Section ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.feature-card {
  padding: var(--space-8);
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--glass-blur);
  transition: var(--transition-base);
}

.feature-card:hover {
  border-color: var(--color-border-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
}

.feature-card h4 {
  margin-bottom: var(--space-2);
}

.feature-card p {
  font-size: var(--text-sm);
}

/* ===== Mission Section ===== */
.mission {
  background: var(--gradient-hero);
  border-radius: var(--radius-2xl);
  padding: var(--space-16);
  text-align: center;
  border: var(--glass-border);
}

.mission h2 {
  margin-bottom: var(--space-4);
}

.mission p {
  font-size: var(--text-lg);
  max-width: 700px;
  margin: 0 auto var(--space-8);
}

/* ===== Guide Sections ===== */
.guide-section {
  margin-bottom: var(--space-12);
}

.guide-section h3 {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: var(--glass-border);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.step {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--glass-blur);
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-sm);
}

.step-content h4 {
  margin-bottom: var(--space-2);
}

.step-content p {
  font-size: var(--text-sm);
}

.code-block {
  background: var(--color-bg-tertiary);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-top: var(--space-3);
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: var(--text-sm);
  color: var(--color-accent-secondary);
  overflow-x: auto;
}

/* ===== Product Hero ===== */
.product-hero {
  padding-top: 120px;
  padding-bottom: var(--space-16);
}

.product-hero-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-12);
  align-items: center;
}

.product-hero-text h1 {
  margin-bottom: var(--space-4);
}

.product-hero-text p {
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

.product-hero-image img {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

/* ===== Footer ===== */
.footer {
  padding: var(--space-16) 0 var(--space-8);
  border-top: var(--glass-border);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  max-width: 300px;
}

.footer-links h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-accent-secondary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: var(--glass-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.social-links {
  display: flex;
  gap: var(--space-4);
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.social-links a:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }

  .product-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .product-hero-image {
    order: -1;
    max-width: 600px;
    margin: 0 auto;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-6);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 var(--space-16);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .mission {
    padding: var(--space-10);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-4);
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

/* ===== Accessibility ===== */

/* Skip Link - Hidden until focused */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-6);
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-lg);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 2px solid var(--color-accent-secondary);
  outline-offset: 2px;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent-secondary);
  outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-base);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.3);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(99, 102, 241, 0.4);
}

/* ===== 404 Page ===== */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.error-content {
  text-align: center;
  max-width: 500px;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.error-content h1 {
  margin-bottom: var(--space-4);
}

.error-content p {
  margin-bottom: var(--space-8);
}

/* ===== Enhanced Animations ===== */

/* Staggered animation delays for cards */
.fade-in:nth-child(1) {
  transition-delay: 0ms;
}

.fade-in:nth-child(2) {
  transition-delay: 100ms;
}

.fade-in:nth-child(3) {
  transition-delay: 200ms;
}

.fade-in:nth-child(4) {
  transition-delay: 300ms;
}

.fade-in:nth-child(5) {
  transition-delay: 400ms;
}

.fade-in:nth-child(6) {
  transition-delay: 500ms;
}

/* Glow pulse animation */
@keyframes glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
  }
}

.btn-primary:hover {
  animation: glow-pulse 2s infinite;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
  :root {
    --color-border: rgba(255, 255, 255, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.1);
  }

  .btn-secondary {
    border-width: 2px;
  }
}