/* Coding Bear Studio – kiegészítő stílusok Tailwind mellé */

/* Szebb font renderelés */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Body smooth scroll, ha majd lesznek anchor linkek */
  html {
    scroll-behavior: smooth;
  }
  
  /* Linkek alap stílusa (ha nem Tailwindes) */
  a {
    text-decoration: none;
  }
  
  /* Szöveg kijelölés színe */
  ::selection {
    background-color: rgba(56, 189, 248, 0.25); /* cbs-accent-soft */
    color: #e5e7eb; /* cbs-text */
  }
  
  /* Custom scrollbar dark témához (modern böngészők) */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: #050712;
  }
  
  ::-webkit-scrollbar-thumb {
    background: #1f2933;
    border-radius: 9999px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
  }


/* === 3D tilt kártyák === */

.tilt-card {
  position: relative;
  transform-style: preserve-3d;
  transition:
    transform 0.25s ease-out,
    box-shadow 0.25s ease-out,
    border-color 0.25s ease-out;
}

.tilt-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.22), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.tilt-card.is-tilting {
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.7),
    0 0 22px rgba(56, 189, 248, 0.25);
}

.tilt-card:hover::before {
  opacity: 1;
}

/* === Halvány grid háttér a body mögé === */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;

  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.09) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* === Page fade-in animáció === */

.page-fade {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}

.page-fade.page-fade-visible {
  opacity: 1;
  transform: translateY(0);
}

/* === HERO PARALLAX BACKGROUND === */

#hero-parallax {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.parallax-layer {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* Layer 1: mély gradient */
.layer-1 {
  background: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.15), transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(147, 51, 234, 0.15), transparent 60%);
  filter: blur(40px);
  z-index: 1;
}

/* Layer 2: zaj overlay */
.layer-2 {
  background-image: url('/static/img/noise.png');
  opacity: 0.12;
  z-index: 2;
}

/* Layer 3: glow particles */
.layer-3 {
  background: radial-gradient(circle at 20% 70%, rgba(56, 189, 248, 0.25), transparent 70%),
              radial-gradient(circle at 80% 30%, rgba(147, 51, 234, 0.22), transparent 70%);
  filter: blur(60px);
  z-index: 3;
}


/* === CODING BEAR LOADER – ALAP === */

#bear-loader {
  backdrop-filter: blur(12px);
}

.bear-anim {
  position: relative;
  background: url('/static/img/logo.png') center/contain no-repeat;
}

/* === VARIÁNS A – PIXEL BEAR === */

.bear-anim--pixel {
  image-rendering: pixelated;
  filter: contrast(1.2) saturate(1.1);
  animation: bearPixel 0.9s steps(5) infinite;
}

@keyframes bearPixel {
  0% {
    transform: translate(0, 0) scale(1);
    filter: contrast(1.2) saturate(1.1) drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
  }
  20% {
    transform: translate(-1px, 0) scale(1.02);
  }
  40% {
    transform: translate(1px, -1px) scale(1);
  }
  60% {
    transform: translate(0, 1px) scale(1.03);
  }
  80% {
    transform: translate(-1px, 0) scale(1);
  }
  100% {
    transform: translate(0, 0) scale(1.01);
    filter: contrast(1.2) saturate(1.1) drop-shadow(0 0 5px rgba(147, 51, 234, 0.7));
  }
}

/* === VARIÁNS B – NEON LINE-ART BEAR === */

.bear-anim--neon {
  filter:
    drop-shadow(0 0 12px rgba(56, 189, 248, 0.9))
    drop-shadow(0 0 24px rgba(147, 51, 234, 0.6));
  animation: bearNeonPulse 1.4s ease-in-out infinite;
}

/* Glow kör a bear körül */
.bear-anim--neon::before {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background:
    conic-gradient(
      from 0deg,
      rgba(56, 189, 248, 0.0) 0deg,
      rgba(56, 189, 248, 0.6) 60deg,
      rgba(147, 51, 234, 0.6) 120deg,
      rgba(56, 189, 248, 0.0) 180deg,
      rgba(56, 189, 248, 0.0) 360deg
    );
  mix-blend-mode: screen;
  opacity: 0.0;
  pointer-events: none;
  animation: bearNeonRing 2.4s linear infinite;
}

@keyframes bearNeonPulse {
  0% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 10px rgba(56, 189, 248, 0.8))
      drop-shadow(0 0 18px rgba(147, 51, 234, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter:
      drop-shadow(0 0 16px rgba(56, 189, 248, 1))
      drop-shadow(0 0 28px rgba(147, 51, 234, 0.9));
  }
  100% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 10px rgba(56, 189, 248, 0.8))
      drop-shadow(0 0 18px rgba(147, 51, 234, 0.5));
  }
}

@keyframes bearNeonRing {
  0% {
    transform: rotate(0deg);
    opacity: 0.0;
  }
  20% {
    opacity: 0.6;
  }
  60% {
    opacity: 0.3;
  }
  100% {
    transform: rotate(360deg);
    opacity: 0.0;
  }
}

/* === VARIÁNS C – LIQUID MORPHING BEAR === */

.bear-anim--liquid {
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.7));
  animation: bearLiquidFloat 2.2s ease-in-out infinite;
}

/* A folyékony blob a bear mögött */
.bear-anim--liquid::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 60% 40% 65% 35% / 55% 45% 55% 45%;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.65), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.6), transparent 65%);
  filter: blur(12px);
  opacity: 0.8;
  mix-blend-mode: screen;
  animation: bearLiquidBlob 3.4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes bearLiquidFloat {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes bearLiquidBlob {
  0% {
    border-radius: 60% 40% 65% 35% / 55% 45% 55% 45%;
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }
  50% {
    border-radius: 50% 50% 60% 40% / 50% 60% 40% 50%;
    transform: translate(-4px, 3px) scale(1.08);
    opacity: 1;
  }
  100% {
    border-radius: 65% 35% 55% 45% / 60% 40% 60% 40%;
    transform: translate(3px, -3px) scale(1.04);
    opacity: 0.85;
  }
}
