/* ==========================================================================
   Section 12b: Site footer
   ========================================================================== */

/* Block ------------------------------------------------------------------ */
.site-footer {
  position: relative;
  padding-top: var(--space-8);
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(640px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: var(--gradient);
  opacity: 0.7;
}

/* Grid ------------------------------------------------------------------- */
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  padding-bottom: var(--space-7);
}

@media (min-width: 600px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
    gap: var(--space-6);
  }
}

.site-footer__col { min-width: 0; }

.site-footer__heading {
  margin-bottom: var(--space-4);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
}

/* Brand ------------------------------------------------------------------ */
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.site-footer__logo-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--gradient);
  color: var(--text);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.35);
}
.site-footer__logo-mark svg { width: 22px; height: 22px; }

.site-footer__brand-name {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-footer__desc {
  max-width: 36ch;
  margin-bottom: var(--space-5);
}

.site-footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.site-footer__social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.site-footer__social svg { width: 18px; height: 18px; }
.site-footer__social:hover {
  color: var(--text);
  border-color: var(--secondary);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}

/* Links ------------------------------------------------------------------ */
.site-footer__links {
  display: grid;
  gap: var(--space-3);
}

.site-footer__link {
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
  overflow-wrap: anywhere;
}
.site-footer__link:hover { color: var(--secondary); }

/* Newsletter ------------------------------------------------------------- */
.site-footer__text { margin-bottom: var(--space-4); }

.site-footer__newsletter { margin-bottom: var(--space-5); }

.site-footer__newsletter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.site-footer__input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 11px 16px;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-footer__input::placeholder { color: var(--text-dim); }
.site-footer__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

.site-footer__subscribe { flex: 0 0 auto; }

@media (max-width: 380px) {
  .site-footer__subscribe { flex: 1 1 100%; }
}

.site-footer__newsletter-msg {
  margin: var(--space-2) 0 0;
  min-height: 1.4em;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--success);
}

.site-footer__contact {
  display: grid;
  gap: var(--space-3);
}
.site-footer__contact li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.site-footer__contact svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--secondary);
}

/* Bottom bar ------------------------------------------------------------- */
.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
}

.site-footer__copy { margin: 0; color: var(--text-dim); }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
}

.site-footer__top { font-weight: 600; color: var(--text); }
