/* ── 1. DESIGN TOKENS (scoped to footer) ─────────────────── */
.site-footer,
.footer-top-btn {
  /* Surfaces */
  --ft-bg:           #111827;
  --ft-surface:      #1a2233;
  --ft-surface-2:    #1f2a40;
  --ft-border:       rgba(255, 255, 255, 0.08);
  --ft-divider:      rgba(255, 255, 255, 0.06);

  /* Text */
  --ft-text:         #e2e8f0;
  --ft-text-muted:   #94a3b8;
  --ft-text-faint:   #475569;
  --ft-text-inverse: #0f172a;

  /* Accent (teal) */
  --ft-accent:       #2dd4bf;
  --ft-accent-hover: #5eead4;
  --ft-accent-dim:   rgba(45, 212, 191, 0.12);

  /* Heart */
  --ft-heart:        #f87171;

  /* Spacing */
  --ft-space-1:  0.25rem;
  --ft-space-2:  0.5rem;
  --ft-space-3:  0.75rem;
  --ft-space-4:  1rem;
  --ft-space-5:  1.25rem;
  --ft-space-6:  1.5rem;
  --ft-space-8:  2rem;
  --ft-space-10: 2.5rem;
  --ft-space-12: 3rem;
  --ft-space-16: 4rem;

  /* Type */
  --ft-text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --ft-text-sm:   clamp(0.875rem, 0.82rem + 0.28vw, 1rem);
  --ft-text-base: clamp(0.9375rem, 0.88rem + 0.28vw, 1.0625rem);
  --ft-text-lg:   clamp(1rem,     0.92rem + 0.4vw,  1.25rem);

  /* Radius */
  --ft-radius-sm:   0.375rem;
  --ft-radius-md:   0.5rem;
  --ft-radius-lg:   0.75rem;
  --ft-radius-full: 9999px;

  /* Transitions */
  --ft-ease: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --ft-shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
  --ft-shadow-md: 0 4px 16px rgba(0,0,0,0.45);
}

/* ── 2. FOOTER WRAPPER ────────────────────────────────────── */
.site-footer {
  background-color: var(--ft-bg);
  color: var(--ft-text);
  font-size: var(--ft-text-base);
  line-height: 1.65;
  border-top: 1px solid var(--ft-border);
  padding-block: clamp(var(--ft-space-10), 6vw, var(--ft-space-16));
}

/* ── 3. SHELL (max-width container) ──────────────────────── */
.site-footer .footer-shell {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(var(--ft-space-4), 4vw, var(--ft-space-8));
}

/* ── 4. GRID (4 columns → responsive) ────────────────────── */
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ft-space-8);
  align-items: start;
}

@media (max-width: 1024px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--ft-space-6);
  }
}

@media (max-width: 600px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--ft-space-8);
  }
}

/* ── 5. CARD (each column section) ───────────────────────── */
.site-footer .footer-card {
  display: flex;
  flex-direction: column;
  gap: var(--ft-space-4);
}

/* ── 6. BRAND COLUMN ──────────────────────────────────────── */
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: var(--ft-space-3);
  text-decoration: none;
  color: var(--ft-text);
  width: fit-content;
}

.site-footer .footer-brand:hover {
  color: var(--ft-accent);
}

.site-footer .footer-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--ft-accent-dim);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: var(--ft-radius-md);
  color: var(--ft-accent);
  flex-shrink: 0;
  transition: background-color var(--ft-ease), border-color var(--ft-ease);
}

.site-footer .footer-brand-mark svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.site-footer .footer-brand:hover .footer-brand-mark {
  background-color: rgba(45, 212, 191, 0.2);
  border-color: rgba(45, 212, 191, 0.4);
}

.site-footer .footer-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.site-footer .footer-brand-text strong {
  font-size: var(--ft-text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.site-footer .footer-brand-text span {
  font-size: var(--ft-text-xs);
  color: var(--ft-text-muted);
  font-weight: 400;
}

/* ── 7. ABOUT PARAGRAPH ──────────────────────────────────── */
.site-footer .footer-about {
  font-size: var(--ft-text-sm);
  color: var(--ft-text-muted);
  line-height: 1.7;
  max-width: 28ch;
}

/* ── 8. SOCIAL ICONS ─────────────────────────────────────── */
.site-footer .footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ft-space-2);
  margin-top: var(--ft-space-1);
}

.site-footer .footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--ft-radius-md);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ft-border);
  color: var(--ft-text-muted);
  text-decoration: none;
  transition: background-color var(--ft-ease), border-color var(--ft-ease), color var(--ft-ease), transform var(--ft-ease);
}

.site-footer .footer-social-link svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
  flex-shrink: 0;
}

.site-footer .footer-social-link:hover {
  background-color: var(--ft-accent-dim);
  border-color: rgba(45, 212, 191, 0.3);
  color: var(--ft-accent);
  transform: translateY(-2px);
}

.site-footer .footer-social-link:focus-visible {
  outline: 2px solid var(--ft-accent);
  outline-offset: 2px;
}

/* ── 9. SECTION TITLE ────────────────────────────────────── */
.site-footer .footer-title {
  font-size: var(--ft-text-sm);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: var(--ft-space-1);
  padding-bottom: var(--ft-space-3);
  border-bottom: 1px solid var(--ft-divider);
}

/* ── 10. LINK LISTS ──────────────────────────────────────── */
.site-footer .footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ft-space-2);
}

.site-footer .footer-links li {
  display: flex;
  align-items: center;
}

.site-footer .footer-links a {
  font-size: var(--ft-text-sm);
  color: var(--ft-text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--ft-space-2);
  transition: color var(--ft-ease), gap var(--ft-ease);
  position: relative;
  padding-left: var(--ft-space-3);
}

.site-footer .footer-links a::before {
  content: '';
  position: absolute;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: var(--ft-radius-full);
  background-color: var(--ft-text-faint);
  transition: background-color var(--ft-ease), transform var(--ft-ease);
}

.site-footer .footer-links a:hover {
  color: var(--ft-accent);
  gap: var(--ft-space-3);
}

.site-footer .footer-links a:hover::before {
  background-color: var(--ft-accent);
  transform: scale(1.4);
}

.site-footer .footer-links a:focus-visible {
  outline: 2px solid var(--ft-accent);
  outline-offset: 2px;
  border-radius: var(--ft-radius-sm);
}

/* ── 11. CONTACT LIST ────────────────────────────────────── */
.site-footer .footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ft-space-4);
}

.site-footer .footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--ft-space-3);
}

.site-footer .footer-contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  background-color: var(--ft-accent-dim);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: var(--ft-radius-md);
  color: var(--ft-accent);
  margin-top: 0.1em;
  transition: background-color var(--ft-ease);
}

.site-footer .footer-contact-icon svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
  flex-shrink: 0;
}

.site-footer .footer-contact li:hover .footer-contact-icon {
  background-color: rgba(45, 212, 191, 0.2);
}

.site-footer .footer-contact-body {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.site-footer .footer-contact-body strong {
  font-size: var(--ft-text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.4;
}

.site-footer .footer-contact-body span,
.site-footer .footer-contact-body a {
  font-size: var(--ft-text-sm);
  color: var(--ft-text-muted);
  text-decoration: none;
  line-height: 1.5;
  transition: color var(--ft-ease);
}

.site-footer .footer-contact-body a:hover {
  color: var(--ft-accent);
}

.site-footer .footer-contact-body a:focus-visible {
  outline: 2px solid var(--ft-accent);
  outline-offset: 2px;
  border-radius: var(--ft-radius-sm);
}

/* ── 12. FOOTER BOTTOM BAR ───────────────────────────────── */
.site-footer .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ft-space-4);
  margin-top: var(--ft-space-10);
  padding-top: var(--ft-space-6);
  border-top: 1px solid var(--ft-divider);
}

/* ── 13. COPYRIGHT ───────────────────────────────────────── */
.site-footer .footer-copy {
  font-size: var(--ft-text-xs);
  color: var(--ft-text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ft-space-1);
  line-height: 1.6;
  max-width: none;
}

.site-footer .footer-copy strong {
  color: var(--ft-text);
  font-weight: 600;
}

.site-footer .footer-heart {
  display: inline-flex;
  align-items: center;
  color: var(--ft-heart);
  line-height: 1;
}

.site-footer .footer-heart svg {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
  animation: ft-heartbeat 2s ease-in-out infinite;
}

@keyframes ft-heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.2); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.15); }
  56%       { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-heart svg {
    animation: none;
  }
}

/* ── 14. MINI LEGAL LINKS ────────────────────────────────── */
.site-footer .footer-mini-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ft-space-1) var(--ft-space-4);
}

.site-footer .footer-mini-links a {
  font-size: var(--ft-text-xs);
  color: var(--ft-text-faint);
  text-decoration: none;
  transition: color var(--ft-ease);
  white-space: nowrap;
}

.site-footer .footer-mini-links a:hover {
  color: var(--ft-accent);
}

.site-footer .footer-mini-links a:focus-visible {
  outline: 2px solid var(--ft-accent);
  outline-offset: 2px;
  border-radius: var(--ft-radius-sm);
}

/* ── 15. BACK-TO-TOP BUTTON ──────────────────────────────── */
.footer-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background-color: var(--ft-accent);
  color: var(--ft-text-inverse);
  border: none;
  border-radius: var(--ft-radius-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color var(--ft-ease),
    box-shadow var(--ft-ease);
  box-shadow: var(--ft-shadow-sm);
}

.footer-top-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  flex-shrink: 0;
}

.footer-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.footer-top-btn:hover {
  background-color: var(--ft-accent-hover);
  box-shadow: var(--ft-shadow-md);
  transform: translateY(-3px);
}

.footer-top-btn:active {
  transform: translateY(0);
  box-shadow: var(--ft-shadow-sm);
}

.footer-top-btn:focus-visible {
  outline: 2px solid var(--ft-accent);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .footer-top-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* ── 16. RESPONSIVE BOTTOM BAR ───────────────────────────── */
@media (max-width: 600px) {
  .site-footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ft-space-3);
  }

  .site-footer .footer-mini-links {
    gap: var(--ft-space-1) var(--ft-space-3);
  }
}