/* Krignal site footer — fully scoped; safe to include on any page */
#site-footer {
  --sf-bg: oklch(14% 0.006 280);
  --sf-gold: oklch(72% 0.13 74);
  --sf-foreground: oklch(96% 0.008 80);
  --sf-gold-foreground: oklch(14% 0.006 280);
  --sf-font: "Poppins", system-ui, sans-serif;
  --sf-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;

  width: 100%;
  background: var(--sf-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 5rem 1.5rem 2rem;
  font-family: var(--sf-font);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  #site-footer {
    padding: 5rem 4rem 2rem;
  }
}

#site-footer .footer-inner {
  max-width: 1440px;
  margin: 0 auto;
}

#site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 2rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  #site-footer .footer-grid {
    grid-template-columns: 5fr 2fr 3fr 2fr;
  }
}

#site-footer .footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

#site-footer .footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

#site-footer .footer-logo-box {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#site-footer .footer-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#site-footer .footer-brand-name {
  font-family: var(--sf-font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sf-foreground);
  line-height: 1;
}

#site-footer .footer-brand-desc {
  font-family: var(--sf-font);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  line-height: 1.65;
  max-width: 320px;
  margin: 0;
}

#site-footer .footer-col-title {
  font-family: var(--sf-font);
  font-weight: 500;
  color: var(--sf-gold);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}

#site-footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#site-footer .footer-links a {
  font-family: var(--sf-font);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s;
}

#site-footer .footer-links a:hover {
  color: var(--sf-gold);
}

#site-footer .footer-bottom {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  #site-footer .footer-bottom {
    flex-direction: row;
  }
}

#site-footer .footer-copy {
  font-family: var(--sf-mono);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#site-footer .footer-legal {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

#site-footer .footer-legal a {
  font-family: var(--sf-font);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s;
}

#site-footer .footer-legal a:hover {
  color: var(--sf-gold);
}

#back-to-top {
  --sf-gold: oklch(72% 0.13 74);
  --sf-gold-foreground: oklch(14% 0.006 280);

  position: fixed;
  bottom: 1.5rem;
  left: 1rem;
  z-index: 9998;
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid color-mix(in oklab, var(--sf-gold) 45%, transparent);
  background: rgba(20, 18, 14, 0.8);
  color: var(--sf-gold);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    opacity 0.3s ease;
}

#back-to-top:hover {
  transform: translateY(-2px);
  background: var(--sf-gold);
  color: var(--sf-gold-foreground);
}

#back-to-top[hidden] {
  display: none;
}

@media (min-width: 640px) {
  #back-to-top {
    bottom: 2rem;
    left: 1.5rem;
  }
}
