/* Custom Animations and Styles */

* {
  scroll-behavior: smooth;
}

/* Dot Matrix Pattern */
.dot-matrix {
  background-image: radial-gradient(circle, #55772d 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.3;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 1s ease-out forwards;
}

.animate-slideInRight {
  animation: slideInRight 1s ease-out forwards;
}

.animate-slideInUp {
  animation: slideInUp 0.8s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 3s ease-in-out infinite;
}

/* Feature Cards */
.feature-card {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

.feature-card:hover {
  transform: translateY(-5px);
}

/* Screenshot Cards */
.screenshot-card {
  opacity: 0;
}

/* Phone Mockup */
.phone-mockup {
  animation: float 3s ease-in-out infinite;
}

/* Light Mode Styles */
html:not(.dark) {
  background-color: #ffffff;
  color: #0a0a0a;
}

html:not(.dark) .bg-dark-bg {
  background-color: #ffffff;
}

html:not(.dark) .bg-dark-surface {
  background-color: #f5f5f5;
}

html:not(.dark) .bg-dark-card {
  background-color: #ffffff;
}

html:not(.dark) .border-dark-border {
  border-color: #e5e5e5;
}

html:not(.dark) .text-white {
  color: #0a0a0a;
}

html:not(.dark) .text-gray-400 {
  color: #666666;
}

html:not(.dark) nav {
  background-color: rgba(255, 255, 255, 0.8);
}

html:not(.dark) footer {
  background-color: #f5f5f5;
}

/* Smooth Transitions */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #55772d;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6a8f38;
}

html:not(.dark) ::-webkit-scrollbar-track {
  background: #f5f5f5;
}

/* Button Hover Effects */
button,
a {
  transition: all 0.3s ease;
}

/* Selection Color */
::selection {
  background-color: #55772d;
  color: white;
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(215, 25, 33, 0.2),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  to {
    left: 100%;
  }
}

/* Responsive Image Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
  outline: 2px solid #55772d;
  outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  nav,
  footer,
  .animate-fadeIn,
  .animate-slideInLeft,
  .animate-slideInRight {
    animation: none !important;
  }
}

/* Hero Gradient Animation */
.hero-gradient {
  background: linear-gradient(135deg, #55772d 0%, #000000 100%);
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Card Glow Effect */
.feature-card:hover {
  box-shadow: 0 0 30px rgba(215, 25, 33, 0.3);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .phone-mockup {
    max-width: 300px;
    margin: 0 auto;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Interactive Elements */
.interactive-hover {
  position: relative;
  overflow: hidden;
}

.interactive-hover::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(215, 25, 33, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.interactive-hover:hover::before {
  width: 300px;
  height: 300px;
}

/* Glitch Effect (Optional) */
@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #141414 25%, #1a1a1a 50%, #141414 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }

  h2 {
    font-size: 2rem !important;
  }

  .phone-mockup img {
    max-width: 100%;
    height: auto;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  .text-5xl {
    font-size: 2rem !important;
  }

  .text-6xl {
    font-size: 2.5rem !important;
  }

  .text-7xl {
    font-size: 3rem !important;
  }
}
