/* =========================================================
   Footer Styles
   Modern glassmorphism design
========================================================= */
@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --footer-bg: rgba(10, 15, 10, 0.95);
  --footer-wave: rgba(10, 15, 10, 1);
  --footer-border: rgba(255, 255, 255, 0.06);
  --footer-text: rgba(240, 253, 244, 0.9);
  --footer-text-muted: rgba(240, 253, 244, 0.5);
  --footer-accent: #22c55e;
  --footer-surface: rgba(255, 255, 255, 0.03);
  --footer-surface-hover: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
  --footer-bg: rgba(245, 247, 245, 0.98);
  --footer-wave: rgba(245, 247, 245, 1);
  --footer-border: rgba(0, 0, 0, 0.06);
  --footer-text: rgba(10, 31, 10, 0.9);
  --footer-text-muted: rgba(10, 31, 10, 0.5);
  --footer-surface: rgba(0, 0, 0, 0.03);
  --footer-surface-hover: rgba(0, 0, 0, 0.05);
}

/* Footer container */
.site-footer {
  position: relative;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  backdrop-filter: blur(20px);
  font-family: "Geologica", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Wave decoration */
.site-footer__divider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(34, 197, 94, 0.5) 20%, 
    rgba(34, 197, 94, 0.5) 80%, 
    transparent 100%
  );
}

/* Main footer content */
.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 60px;
}

/* Brand column */
.site-footer__col--brand {
  max-width: 380px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.site-footer__logo {
  font-size: 28px;
  color: var(--footer-accent);
  filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.4));
  line-height: 1;
}

.site-footer__name {
  font-weight: 800;
  font-size: 22px;
  color: var(--footer-text);
  letter-spacing: -0.02em;
}

.site-footer__tag {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--footer-border);
  background: var(--footer-surface);
  color: var(--footer-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer__desc {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--footer-text-muted);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  font-size: 13px;
}

.site-footer__copy {
  color: var(--footer-text-muted);
}

.site-footer__link {
  color: var(--footer-text-muted);
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
}

.site-footer__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--footer-accent);
  transition: width 0.3s;
}

.site-footer__link:hover {
  color: var(--footer-text);
}

.site-footer__link:hover::after {
  width: 100%;
}

/* Links column */
.site-footer__col--links {
  display: flex;
  justify-content: center;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.footer-links__group {
  display: flex;
  flex-direction: column;
}

.footer-links__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--footer-text);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links__list a {
  color: var(--footer-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links__list a::before {
  content: '→';
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s;
  font-size: 12px;
  color: var(--footer-accent);
}

.footer-links__list a:hover {
  color: var(--footer-text);
  transform: translateX(4px);
}

.footer-links__list a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Social column */
.site-footer__col--social {
  display: flex;
  flex-direction: column;
}

.site-footer__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--footer-text);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.social-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--footer-border);
  background: var(--footer-surface);
  text-decoration: none;
  color: var(--footer-text);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.social-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.3s;
}

.social-card:hover {
  transform: translateX(8px);
  background: var(--footer-surface-hover);
  border-color: currentColor;
}

.social-card:hover::before {
  opacity: 1;
}

.seo-block {
  font-size: 0.1px;
  color: transparent;
  height: 1px;
  overflow: hidden;
}

.social-card--discord { color: #5865F2; }
.social-card--telegram { color: #26A5E4; }
.social-card--github { color: var(--footer-text); }

.social-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--footer-surface);
  border: 1px solid var(--footer-border);
  flex-shrink: 0;
  transition: all 0.3s;
}

.social-card:hover .social-card__icon {
  transform: scale(1.1);
  background: #000;
  color: #fff;
}

.social-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.social-card__name {
  font-weight: 700;
  font-size: 15px;
  color: var(--footer-text);
}

.social-card__count {
  font-size: 12px;
  color: var(--footer-text-muted);
}

/* Bottom bar */
.site-footer__bottom {
  border-top: 1px solid var(--footer-border);
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .site-footer__bottom {
  background: rgba(0, 0, 0, 0.03);
}

.site-footer__bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--footer-text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: status-pulse 2s infinite;
  opacity: 0.5;
}

@keyframes status-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}

.site-footer__version {
  font-size: 13px;
  color: var(--footer-text-muted);
  font-family: "Geologica", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  padding: 6px 12px;
  background: var(--footer-surface);
  border-radius: 8px;
  border: 1px solid var(--footer-border);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 360px;
}

.toast {
  background: rgba(17, 24, 17, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  color: var(--footer-text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid var(--footer-accent);
}

.toast.is-visible {
  transform: translateX(0);
}

/* Cookie notice */
.cookie {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: min(420px, calc(100vw - 40px));
  background: rgba(17, 24, 17, 0.98);
  border: 1px solid var(--footer-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: "Geologica", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.cookie.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie__content {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.cookie__icon {
  font-size: 40px;
  flex-shrink: 0;
  line-height: 1;
}

.cookie__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--footer-text);
}

.cookie__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--footer-text-muted);
  margin: 0;
}

.cookie__accent {
  color: var(--footer-accent);
  font-weight: 600;
}

.cookie__actions {
  display: flex;
  gap: 12px;
}

.cookie__btn {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--footer-border);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.cookie__btn--primary {
  background: var(--footer-accent);
  color: #07111f;
  border-color: var(--footer-accent);
}

.cookie__btn--primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.cookie__btn--secondary {
  background: transparent;
  color: var(--footer-text);
}

.cookie__btn--secondary:hover {
  background: var(--footer-surface-hover);
}

/* Responsive */
@media (max-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 60px 24px 40px;
  }
  
  .site-footer__col--social {
    grid-column: 1 / -1;
  }
  
  .social-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .social-card {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 20px;
  }
  
  .site-footer__col--brand {
    max-width: 100%;
  }
  
  .footer-links {
    gap: 32px;
  }
  
  .site-footer__legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .social-grid {
    flex-direction: column;
  }
  
  .social-card {
    min-width: auto;
  }
  
  .cookie {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }
  
  .cookie__actions {
    flex-direction: column;
  }
  
  .toast-container {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 20px;
    max-width: none;
  }
  
  .toast {
    transform: translateY(100%);
  }
  
  .toast.is-visible {
    transform: translateY(0);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .social-card,
  .footer-links__list a,
  .site-footer__link,
  .cookie,
  .toast {
    transition: none;
  }
  
  .status-indicator::after {
    animation: none;
  }
}