/* ==================== Base ==================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

.delay-100 {
  animation-delay: 0.1s;
  opacity: 0;
}

.delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.grid > .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.grid > .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.grid > .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.grid > .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.grid > .animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.grid > .animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ==================== Feature Cards ==================== */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #B8956A, #C9A876);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

/* ==================== Screenshot Placeholders ==================== */
.screenshot-placeholder {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184, 149, 106, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(44, 62, 80, 0.03) 0%, transparent 50%);
  min-height: 280px;
}

/* When real screenshots are added, use this class */
.screenshot-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ==================== Language Toggle ==================== */
#lang-toggle,
#lang-toggle-mobile {
  position: relative;
  min-width: 52px;
  text-align: center;
}

/* ==================== Navbar ==================== */
#navbar {
  transition: box-shadow 0.3s ease;
}

/* ==================== Selection Color ==================== */
::selection {
  background-color: rgba(184, 149, 106, 0.2);
  color: #2C3E50;
}

/* ==================== Responsive ==================== */
@media (max-width: 640px) {
  .screenshot-placeholder {
    min-height: 200px;
  }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-fade-in-up {
    animation: none;
    opacity: 1;
  }

  .delay-100,
  .delay-200 {
    opacity: 1;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
