/* ==========================================================================
   HHPoker Landing Page - Custom Styles
   Premium SaaS-style design system
   ========================================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-primary-light: #6366f1;
  --color-accent: #f59e0b;
  --color-bg-dark: #0f172a;
  --color-bg-darker: #020617;
  --color-text-primary: #1e293b;
  --color-text-secondary: #64748b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Base & Reset --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(79, 70, 229, 0.2);
  color: var(--color-primary-dark);
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary));
  border-radius: 4px;
}

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

/* --- Navbar Glass Effect --- */
.navbar-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-base);
}

.navbar-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- Mobile Menu --- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth), opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
}

.mobile-menu.active {
  max-height: 500px;
  opacity: 1;
}

/* --- Hero Section --- */
.hero-gradient-text {
  background: linear-gradient(135deg, #1e293b 0%, #4f46e5 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-badge {
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Hero floating decorative elements */
.hero-decorative-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  pointer-events: none;
}

/* --- Button Styles --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.5);
}

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

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primary);
  background: rgba(79, 70, 229, 0.06);
  border: 2px solid rgba(79, 70, 229, 0.15);
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1);
}

/* --- Feature Cards --- */
.feature-card {
  transition: all var(--transition-smooth);
  cursor: default;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border-color: rgba(79, 70, 229, 0.12);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all var(--transition-base);
}

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

/* --- Stats Section --- */
.stats-section {
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.stat-number {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Testimonial Cards --- */
.testimonial-card {
  transition: all var(--transition-smooth);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
}

.star-rating {
  color: var(--color-accent);
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-base);
  margin-bottom: 0.75rem;
}

.faq-item[open] {
  border-color: rgba(79, 70, 229, 0.2);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.06);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  color: var(--color-text-primary);
  transition: color var(--transition-base);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  display: none;
  content: '';
}

.faq-item summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.85rem;
  color: #94a3b8;
  transition: transform var(--transition-base);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-item[open] summary {
  color: var(--color-primary);
}

.faq-item .faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.cta-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.2;
  pointer-events: none;
}

.cta-glow-left {
  background: #818cf8;
  top: -100px;
  left: -100px;
}

.cta-glow-right {
  background: #c084fc;
  bottom: -100px;
  right: -100px;
}

.cta-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  background: #ffffff;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.cta-btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

.cta-btn-white:active {
  transform: translateY(0);
}

/* --- Footer --- */
.footer-link {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-base);
  text-decoration: none;
}

.footer-link:hover {
  color: #ffffff;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.5);
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Stats Counter Pulse --- */
@keyframes countPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.counting {
  animation: countPulse 0.6s ease-in-out;
}

/* --- Responsive Tweaks --- */
@media (max-width: 768px) {
  .hero-gradient-text {
    font-size: 2rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .feature-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-badge,
  .feature-card,
  .testimonial-card,
  .btn-primary,
  .btn-secondary,
  .cta-btn-white,
  .back-to-top,
  .reveal {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* --- Loading shimmer effect for images --- */
.image-placeholder {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Custom shadow for cards on dark backgrounds --- */
.shadow-glow {
  box-shadow: 0 0 40px rgba(79, 70, 229, 0.08);
}
