/* Purybit - Custom Styles */
/* Complements Tailwind CSS with custom animations and brand-specific styles */

:root {
  /* Brand Colors */
  --color-primary: #4F46E5;
  --color-primary-dark: #4338CA;
  --color-secondary: #7C3AED;
  --color-accent: #06B6D4;
  --color-dark: #1E293B;
  --color-light: #F8FAFC;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.1)100%);
}

/* Roboto, served from this site (SIL Open Font License, see fonts/OFL.txt) */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/roboto-semibold.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-bold.woff2') format('woff2');
}

.font-roboto {
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Home hero: white with soft lavender light */
.hero-glow {
  background-color: #fff;
  background-image:
    radial-gradient(ellipse 340px 300px at calc(50% - 600px) 360px, rgba(73, 155, 237, 0.13) 0%, rgba(73, 155, 237, 0) 100%),
    radial-gradient(ellipse 230px 250px at calc(50% - 150px) 550px, rgba(234, 228, 253, 1) 0%, rgba(234, 228, 253, 0) 100%),
    radial-gradient(ellipse 260px 220px at calc(50% + 60px) 410px, rgba(236, 231, 253, 1) 0%, rgba(236, 231, 253, 0) 100%),
    radial-gradient(ellipse 280px 230px at calc(50% + 240px) 220px, rgba(237, 232, 253, 1) 0%, rgba(237, 232, 253, 0) 100%),
    radial-gradient(ellipse 380px 240px at calc(50% + 470px) 30px, rgba(234, 228, 253, 1) 0%, rgba(234, 228, 253, 0) 100%);
}

@media (min-width: 1400px) {
  .hero-glow {
    background-image:
    radial-gradient(ellipse 360px 318px at calc(50% - 676px) 360px, rgba(73, 155, 237, 0.13) 0%, rgba(73, 155, 237, 0) 100%),
    radial-gradient(ellipse 244px 265px at calc(50% - 169px) 550px, rgba(234, 228, 253, 1) 0%, rgba(234, 228, 253, 0) 100%),
    radial-gradient(ellipse 276px 233px at calc(50% + 68px) 410px, rgba(236, 231, 253, 1) 0%, rgba(236, 231, 253, 0) 100%),
    radial-gradient(ellipse 297px 244px at calc(50% + 271px) 220px, rgba(237, 232, 253, 1) 0%, rgba(237, 232, 253, 0) 100%),
    radial-gradient(ellipse 403px 254px at calc(50% + 530px) 30px, rgba(234, 228, 253, 1) 0%, rgba(234, 228, 253, 0) 100%);
  }
}

@media (min-width: 1536px) {
  .hero-glow {
    background-image:
    radial-gradient(ellipse 401px 354px at calc(50% - 742px) 403px, rgba(73, 155, 237, 0.13) 0%, rgba(73, 155, 237, 0) 100%),
    radial-gradient(ellipse 271px 295px at calc(50% - 185px) 616px, rgba(234, 228, 253, 1) 0%, rgba(234, 228, 253, 0) 100%),
    radial-gradient(ellipse 307px 260px at calc(50% + 74px) 459px, rgba(236, 231, 253, 1) 0%, rgba(236, 231, 253, 0) 100%),
    radial-gradient(ellipse 330px 271px at calc(50% + 297px) 246px, rgba(237, 232, 253, 1) 0%, rgba(237, 232, 253, 0) 100%),
    radial-gradient(ellipse 448px 283px at calc(50% + 581px) 34px, rgba(234, 228, 253, 1) 0%, rgba(234, 228, 253, 0) 100%);
  }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #b3b3b3;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: #000;
}

@media (min-width: 768px) {
  .hero-pill {
    padding: 0 16px;
    font-size: 16px;
  }
}

@media (min-width: 1280px) {
  .hero-pill {
    width: 175px;
    padding: 0;
  }
}

@media (min-width: 1536px) {
  .hero-pill {
    width: 200px;
    height: 36px;
    font-size: 18px;
  }
}

/* Pills whose text is longer than the fixed width: keep the size, let them grow */
@media (min-width: 1280px) {
  .hero-pill.hero-pill-auto {
    width: auto;
    min-width: 175px;
    padding: 0 20px;
  }
}

@media (min-width: 1536px) {
  .hero-pill.hero-pill-auto {
    min-width: 200px;
    padding: 0 22px;
  }
}

.hero-shot {
  filter: drop-shadow(14px 16px 22px rgba(0, 0, 0, 0.17)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

/* Navigation over the hero: transparent at the top, solid once the page scrolls */
.site-nav {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav.scrolled {
  background-color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* Hero animated background */
.hero-gradient {
  background: linear-gradient(-45deg, #667eea, #764ba2, #4F46E5, #7C3AED);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button animations */
.btn-primary {
  background: #1c172c;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(28, 23, 44, 0.3);
}

/* Fade-in animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in-up-delay-1 {
  animation: fadeInUp 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

.fade-in-up-delay-2 {
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.fade-in-up-delay-3 {
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

/* Pulse animation for CTA */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile menu animation */
.mobile-menu {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(100%);
}

.mobile-menu.active {
  transform: translateX(0);
}

/* Feature icon container */
.feature-icon {
  background: var(--gradient-card);
  transition: all 0.3s ease;
}

.feature-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Pricing toggle */
.toggle-checkbox:checked {
  right: 0;
  border-color: var(--color-primary);
}

.toggle-checkbox:checked + .toggle-label {
  background: var(--color-primary);
}

/* Back to top button */
#backToTop {
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

/* Badge styles */
.badge-new {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  animation: pulse 2s infinite;
}

.badge-coming-soon {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* Screenshot carousel */
.screenshot-carousel {
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.screenshot-carousel::-webkit-scrollbar {
  display: none;
}

.screenshot-carousel > * {
  scroll-snap-align: start;
}

.screenshot-slider .screenshot-carousel {
  cursor: grab;
  overscroll-behavior-x: contain;
}

.screenshot-slider .screenshot-carousel > * {
  flex: 0 0 100%;
  user-select: none;
}

.screenshot-slider .screenshot-carousel.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.screenshot-dots button {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.3s ease, background 0.3s ease;
}

.screenshot-dots button[aria-current="true"] {
  width: 24px;
  background: #fff;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .hero-gradient {
    background-size: 200% 200%;
  }
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Section reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}
