/*
 * Commerce41 Landing Page - Custom Styles
 *
 * This file contains custom CSS styles that extend or override
 * Tailwind CSS and DaisyUI defaults.
 */

/* Smooth theme transition */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body,
.hero,
.navbar,
.btn {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Add custom styles below as needed */

/* ==========================================
   Hero Section Responsive Height
   ========================================== */

/* Hero section with content-based height and generous margins */
.hero {
  min-height: 500px;
  padding: 8rem 0;
  background-image: url('assets/dot-pattern.svg');
  background-repeat: repeat;
  background-size: 400px 400px;
  color: hsl(var(--bc));
}

[data-theme="dark"] .hero {
  background-color: #335;
}

/* Responsive padding adjustments */
@media (max-width: 1024px) {
  .hero {
    padding: 6rem 0;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 4rem 0;
    min-height: 400px;
  }
}

/* ==========================================
   Hero Background Circles
   ========================================== */

/* Container for background circles */
.hero-circles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Base circle styles */
.circle {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: multiply;
  will-change: transform;
}

/* Left circle - yellow/gold */
.circle-left {
  width: 700px;
  height: 700px;
  background: #ffe34dc0;
  top: 50%;
  left: 50%;
  transform: translate(-75%, -50%);
  animation: float-left 25s ease-in-out infinite;
}

/* Right circle - pink/magenta */
.circle-right {
  width: 700px;
  height: 700px;
  background: #f389dab2;
  top: 50%;
  left: 50%;
  transform: translate(-25%, -50%);
  animation: float-right 30s ease-in-out infinite;
}

/* Floating animation for left circle */
@keyframes float-left {
  0%, 100% {
    transform: translate(-75%, -50%);
  }
  25% {
    transform: translate(calc(-75% + 30px), calc(-50% + 50px));
  }
  50% {
    transform: translate(calc(-75% + 50px), calc(-50% + 100px));
  }
  75% {
    transform: translate(calc(-75% + 20px), calc(-50% + 75px));
  }
}

/* Floating animation for right circle */
@keyframes float-right {
  0%, 100% {
    transform: translate(-25%, -50%);
  }
  25% {
    transform: translate(calc(-25% - 20px), calc(-50% + 60px));
  }
  50% {
    transform: translate(calc(-25% - 50px), calc(-50% + 80px));
  }
  75% {
    transform: translate(calc(-25% - 30px), calc(-50% + 100px));
  }
}

/* Responsive: Tablet (640px - 1024px) */
@media (max-width: 1024px) {
  .circle-left,
  .circle-right {
    width: 500px;
    height: 500px;
  }

  .circle-left {
    transform: translate(-75%, -50%);
  }

  .circle-right {
    transform: translate(-25%, -50%);
  }

  @keyframes float-left {
    0%, 100% {
      transform: translate(-75%, -50%);
    }
    25% {
      transform: translate(calc(-75% + 20px), calc(-50% + 35px));
    }
    50% {
      transform: translate(calc(-75% + 35px), calc(-50% + 70px));
    }
    75% {
      transform: translate(calc(-75% + 15px), calc(-50% + 50px));
    }
  }

  @keyframes float-right {
    0%, 100% {
      transform: translate(-25%, -50%);
    }
    25% {
      transform: translate(calc(-25% - 15px), calc(-50% + 40px));
    }
    50% {
      transform: translate(calc(-25% - 35px), calc(-50% + 60px));
    }
    75% {
      transform: translate(calc(-25% - 20px), calc(-50% + 70px));
    }
  }
}

/* Responsive: Mobile (<640px) */
@media (max-width: 640px) {
  .circle-left,
  .circle-right {
    width: 400px;
    height: 400px;
  }

  .circle-left {
    transform: translate(-75%, -50%);
  }

  .circle-right {
    transform: translate(-25%, -50%);
  }

  /* Reduce animation movement on mobile for performance */
  @keyframes float-left {
    0%, 100% {
      transform: translate(-75%, -50%);
    }
    50% {
      transform: translate(calc(-75% + 20px), calc(-50% + 40px));
    }
  }

  @keyframes float-right {
    0%, 100% {
      transform: translate(-25%, -50%);
    }
    50% {
      transform: translate(calc(-25% - 20px), calc(-50% + 40px));
    }
  }
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .circle {
    animation: none;
  }
}

/* ==========================================
   Browser Window Wrapper (macOS Style)
   ========================================== */

/* Main browser wrapper container */
.browser-wrapper {
  background: #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Title bar with traffic lights */
.browser-titlebar {
  height: 30px;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid hsl(var(--bc) / 0.1);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Traffic light controls container */
.browser-controls {
  display: flex;
  gap: 4px;
}

/* Individual traffic light buttons */
.browser-control {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
}

.browser-control.red {
  background: #ff5f57;
}

.browser-control.yellow {
  background: #febc2e;
}

.browser-control.green {
  background: #28c840;
}

/* Screenshot content area */
.browser-content {
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

/* Screenshot image */
.browser-content img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

/* Dark mode adjustments */
[data-theme="dark"] .browser-wrapper {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Responsive sizing */
@media (max-width: 768px) {
  .browser-titlebar {
    height: 28px;
  }

  .browser-control {
    width: 7px;
    height: 7px;
  }
}
