/* ========================================
   BK8 Guide Hub - Custom Styles
   ======================================== */

/* ----------------------------------------
   Font Faces - AvertaStd-Regular
   ---------------------------------------- */

/* Regular - 400 */
@font-face {
  font-family: 'AvertaStd-Regular';
  src: local('AvertaStd-Regular'), local('Averta Std Regular'), local('Averta Regular'), local('Averta');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* SemiBold - 600 */
@font-face {
  font-family: 'AvertaStd-Regular';
  src: local('AvertaStd-Semibold'), local('Averta Std Semibold'), local('Averta Semibold');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Bold - 700 */
@font-face {
  font-family: 'AvertaStd-Regular';
  src: local('AvertaStd-Bold'), local('Averta Std Bold'), local('Averta Bold');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ExtraBold - 800 */
@font-face {
  font-family: 'AvertaStd-Regular';
  src: local('AvertaStd-ExtraBold'), local('Averta Std ExtraBold'), local('Averta ExtraBold');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Black - 900 */
@font-face {
  font-family: 'AvertaStd-Regular';
  src: local('AvertaStd-Black'), local('Averta Std Black'), local('Averta Black');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------
   Base Styles
   ---------------------------------------- */

body {
  background-color: #F4F7FA;
  color: #111827;
  font-family: 'AvertaStd-Regular', 'Inter', 'Arial', sans-serif;
  overflow-x: hidden;
}

/* ----------------------------------------
   Custom Scrollbar
   ---------------------------------------- */

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ----------------------------------------
   Custom Animations
   ---------------------------------------- */

/* Shine effect for JOIN button */
@keyframes shine {
  0% { left: -100%; }
  100% { left: 200%; }
}

.animate-shine {
  animation: shine 3s infinite linear;
}

/* Pulse scale for JOIN button */
@keyframes pulse-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-pulse-scale {
  animation: pulse-scale 2s ease-in-out infinite;
}

/* Fade in animation */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

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

/* Slide up animation */
@keyframes slideUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.animate-slide-up {
  animation: slideUp 0.5s ease-out forwards;
}

/* Breathing/floating animation for decorative elements */
@keyframes breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(5deg); }
}

.animate-breathe {
  animation: breathe 6s ease-in-out infinite;
}

/* Slow breathing for blobs */
@keyframes breathe-slow {
  0%, 100% {
    transform: scale(1) rotate(0deg) translateX(0);
  }
  50% {
    transform: scale(1.2) rotate(45deg) translateX(50px);
  }
}

.animate-breathe-slow {
  animation: breathe-slow 20s ease-in-out infinite;
}

@keyframes breathe-slow-reverse {
  0%, 100% {
    transform: scale(1) rotate(0deg) translateX(0);
  }
  50% {
    transform: scale(1.3) rotate(-30deg) translateX(-30px);
  }
}

.animate-breathe-slow-reverse {
  animation: breathe-slow-reverse 15s ease-in-out infinite;
}

/* Float animation for app icon */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-10px) rotate(12deg); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Pulsing glow for buttons */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 10px 15px -3px rgba(247, 181, 23, 0.3); }
  50% { box-shadow: 0 10px 15px -3px rgba(247, 181, 23, 0.6); }
}

.animate-glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* ----------------------------------------
   Scroll Animation Classes (Intersection Observer)
   ---------------------------------------- */

/* Initial hidden state */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Stagger children - set via inline style or data attribute */
.scroll-animate-stagger {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Scale on visible */
.scroll-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Slide from left */
.scroll-slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.scroll-slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ----------------------------------------
   Carousel Styles
   ---------------------------------------- */

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.carousel-slide.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 1;
}

.carousel-slide.prev {
  opacity: 0;
  transform: translateX(-100%);
}

/* ----------------------------------------
   Utility Classes
   ---------------------------------------- */

/* Safe area padding for notched devices */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Hide scrollbar but allow scrolling */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Line clamp for text truncation */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----------------------------------------
   Hover State Transitions
   ---------------------------------------- */

/* Card hover lift effect */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Card hover small lift */
.hover-lift-sm {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift-sm:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

/* Scale on hover */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Scale active/tap */
.active-scale:active {
  transform: scale(0.98);
}

/* ----------------------------------------
   Range Slider Styling
   ---------------------------------------- */

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #f7b517;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(247, 181, 23, 0.4);
  transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #f7b517;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(247, 181, 23, 0.4);
}

/* ----------------------------------------
   Typing Cursor Animation
   ---------------------------------------- */

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
  margin-left: 2px;
  color: #9ca3af;
}

/* ----------------------------------------
   Mobile Menu Animation
   ---------------------------------------- */

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-menu.open {
  max-height: 80vh;
  overflow-y: auto;
}

/* Hamburger animation */
.hamburger-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translateY(6px);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translateY(-6px);
}

/* ----------------------------------------
   Dropdown Animation
   ---------------------------------------- */

.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ----------------------------------------
   Sticky Bar Animation
   ---------------------------------------- */

.sticky-bar {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sticky-bar.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ----------------------------------------
   Tab Content Animation
   ---------------------------------------- */

.tab-content {
  display: none;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

.tab-content.active {
  display: block;
  opacity: 1;
}

/* ----------------------------------------
   Back to Top Button
   ---------------------------------------- */

.back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

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

/* ----------------------------------------
   Prose Styles (for article content)
   ---------------------------------------- */

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: #184391;
  font-weight: 700;
}

.prose a:hover {
  text-decoration: underline;
  color: #f7b517;
}
