/* Volkin Reborn — Sections: Scroll-to-top, Animations, Footer, Accessibility */

/* ========================================
   13. SCROLL TO TOP BUTTON
   Liquid glass style jak inne elementy
   ======================================== */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  z-index: var(--z-navbar);

  display: flex;
  align-items: center;
  justify-content: center;

  /* Purple Liquid Glass */
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;

  color: white;
  box-shadow:
    0 4px 24px rgba(68, 136, 239, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 40px rgba(68, 136, 239, 0.2);

  /* Domyślnie ukryty */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform var(--transition-magnetic),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);

  /* Magnetic effect */
  --magnetic-strength: var(--magnetic-btn);
}

.scroll-top-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-secondary));
  box-shadow:
    0 8px 32px rgba(68, 136, 239, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 50px rgba(68, 136, 239, 0.3);
}

.scroll-top-btn:focus {
  outline: none;
  box-shadow:
    0 4px 24px rgba(68, 136, 239, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 4px rgba(68, 136, 239, 0.3);
}

.scroll-top-btn:active {
  transform: scale(0.95) !important;
}

/* Widoczny stan */
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  position: relative;
  z-index: 1;
}

/* Cursor glow effect */
.scroll-top-btn .glow-effect {
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: blur(10px);
}

/* .scroll-top-btn:hover .glow-effect — kontrolowane przez JS (CursorGlow) */


/* ========================================
   14. ANIMACJE
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtelne pulsowanie glow */
@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/* ========================================
   FLOATING BADGES GROUP
   Glass effect + levitation shadow + float animation
   ======================================== */
@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(68, 136, 239, 0.2);
  }
  50% {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(68, 136, 239, 0.35);
  }
}

.floating-badge {
  display: inline-block;
  animation: floatBadge 3s ease-in-out infinite;

  /* Glass jak navbar */
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;

  /* Ciemny blue tekst */
  color: #2656DC !important;
  font-weight: 600;

  /* Delikatny cień */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Dark mode - jak navbar */
.dark .floating-badge {
  background: rgba(45, 45, 60, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #CACFFF !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Różne opóźnienia dla naturalnego efektu */
.floating-badge--delay-1 { animation-delay: 0.4s; }
.floating-badge--delay-3 { animation-delay: 1.2s; }
.floating-badge--delay-4 { animation-delay: 1.6s; }

/* Reduced motion — wyłącz animacje i przejścia */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* ========================================
   15. THEME TOGGLE (wewnątrz navbar)
   Przełącznik trybu jasnego/ciemnego
   ======================================== */
.navbar__theme-toggle {
  display: flex;
  gap: 0.125rem;
  padding: 0.2rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 9999px;
  margin-left: 0;
}

.dark .navbar__theme-toggle {
  background: rgba(255, 255, 255, 0.1);
}

.theme-toggle__btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #6b7280;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.theme-toggle__btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: filter var(--transition-fast);
}

/* Hover states */
.theme-toggle__btn--light:hover {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.theme-toggle__btn--dark:hover {
  color: var(--color-primary);
  background: rgba(68, 136, 239, 0.1);
}

/* Aktywne słoneczko - żółty z poświatą od ikony */
.theme-toggle__btn--light.active {
  color: #f59e0b;
  background: transparent;
}

.theme-toggle__btn--light.active svg {
  filter:
    drop-shadow(0 0 3px rgba(255, 200, 50, 0.8))
    drop-shadow(0 0 6px rgba(255, 180, 50, 0.6))
    drop-shadow(0 0 10px rgba(255, 160, 0, 0.4));
}

/* Aktywny księżyc - fioletowy z nocną poświatą od ikony */
.dark .theme-toggle__btn--dark.active {
  color: var(--color-primary);
  background: transparent;
}

.dark .theme-toggle__btn--dark.active svg {
  filter:
    drop-shadow(0 0 3px rgba(68, 136, 239, 0.9))
    drop-shadow(0 0 6px rgba(118, 75, 162, 0.7))
    drop-shadow(0 0 12px rgba(68, 136, 239, 0.5));
}

/* Dark mode - słoneczko zachowuje żółty odcień */
.dark .theme-toggle__btn--light {
  color: #9ca3af;
}

.dark .theme-toggle__btn--light:hover {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}


/* ========================================
   16. FOOTER
   Profesjonalna stopka z liquid glass
   ======================================== */
.footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  color: white;
  padding: 3rem 0 3rem;
  overflow: hidden;
}

/* Dekoracyjny gradient w tle */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(68, 136, 239, 0.5) 50%,
    transparent 100%
  );
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 1.5rem;
}

/* Opis w kolumnie Volkin */
.footer__description {
  color: #9ca3af;
  line-height: 1.7;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Social icons */
.footer__social {
  display: flex;
  gap: 0.5rem;
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #9ca3af;
  transition: all 0.2s ease;
}

.footer__social-link:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-color: transparent;
  color: white;
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Kolumny w stopce */
.footer__column {
  text-align: left;
}

.footer__column--left {
  justify-self: start;
  max-width: 280px;
}

.footer__column:not(.footer__column--left) {
  justify-self: end;
}

.footer__column h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nagłówek Volkin z gradientem */
.footer__column--left h3 {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pozioma nawigacja w stopce */
.footer__nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer__nav-link {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s ease;
}

.footer__nav-link:hover {
  color: white;
}

/* Kontakt */

/* Separator */
.footer__separator {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.1) 80%,
    transparent 100%
  );
  margin-bottom: 0.625rem;
}

/* Copyright */
.footer__bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer__copyright {
  color: #6b7280;
  font-size: 0.875rem;
}

.footer__legal {
  display: flex;
  gap: 1.5rem;
}

.footer__legal-link {
  color: #6b7280;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__legal-link:hover {
  color: white;
}

/* Responsywność */
@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer__social {
    justify-content: center;
  }

  .footer__column,
  .footer__column--left,
  .footer__column:not(.footer__column--left) {
    justify-self: center;
    text-align: center;
  }

  .footer__nav {
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 2.5rem 0 2.5rem;
  }

  .footer__nav {
    gap: 0.75rem 1rem;
    font-size: 0.75rem;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer__legal {
    justify-content: center;
  }
}


/* ========================================
   ACCESSIBILITY
   Skip link i focus states dla nawigacji klawiaturą
   ======================================== */

/* Skip link - widoczny tylko po focus */
.skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-skip-link);
  padding: 1rem 2rem;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* Focus States */

/* Globalne focus-visible */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Navbar links */
.navbar__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Buttons */
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  box-shadow: var(--btn-shadow-hover), 0 0 0 4px rgba(68, 136, 239, 0.2);
}

/* Theme toggle */
.theme-toggle__btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Hamburger menu */
.navbar__hamburger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Form inputs */
input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 8px 2px rgba(68, 136, 239, 0.25);
}

/* Footer links */
.footer__nav-link:focus-visible,
.footer__social-link:focus-visible,
.footer__legal-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Scroll to top */
.scroll-top-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

/* Dla starszych przeglądarek - fallback */
@supports not selector(:focus-visible) {
  :focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
}
