/* FOOTER
   Portiert aus layout/Footer.module.css — Klassennamen auf BEM umgestellt,
   Regeln und Tokens unverändert. */

.footer {
  padding-block: var(--section-padding-block) var(--spacing-8);
  background-color: var(--theme-footer-bg);
  color: var(--theme-footer-text);
}

/* ==========================================================================
   SOCIAL
   ========================================================================== */

.footer__social-section {
  margin-block-end: var(--spacing-16);
}

.footer__social-title {
  margin-block-end: var(--spacing-6);
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2-computed);
}

/* Spaltenzahl folgt der Kanalzahl: `auto-fit` verteilt die vorhandenen
   Kacheln gleichmäßig, ohne dass eine feste Zahl gepflegt werden muss.
   GROOVY hat drei Kanäle, das MAX-Theme hatte vier — mit einer festen
   Spaltenzahl bliebe hier eine Lücke stehen. */
.footer__social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--grid-gutter-tight);
}

.footer__social-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-4);
  height: 100%;
  padding: var(--spacing-5) var(--spacing-6);
  background-color: var(--background-secondary);
  border-radius: var(--theme-card-radius);
  color: var(--text-primary);
  transition:
    background-color var(--motion-duration-base) var(--motion-ease),
    color var(--motion-duration-base) var(--motion-ease),
    transform var(--motion-duration-base) var(--motion-ease);
}

.footer__social-tile:hover {
  background-color: var(--brand-primary-500);
  color: var(--color-white);
  transform: translateY(-4px);
}

.footer__social-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.footer__social-name {
  font-family: var(--brand-font-title);
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-bold);
}

.footer__social-handle {
  font-size: var(--font-size-tiny);
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer__social-icon {
  display: block;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.footer__social-icon svg {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   FUSSZEILE
   ========================================================================== */

.footer__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--spacing-8);
  padding-block-start: var(--spacing-8);
  border-block-start: var(--border-width-thin) solid var(--border-subtle);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-3);
}

/* Breite Wortmarke — im Footer etwas größer als in der Navigation, weil
   dort mehr Fläche ist. Farbe über `currentColor`, siehe grv_logo(). */
.footer__logo {
  display: block;
  height: 2.25rem;
  width: auto;
  color: var(--text-primary);
}

/* Dieselbe Bewegung wie in der Kopfzeile — siehe header.css. Kein
   `will-change` hier: Der Footer steht im normalen Fluss und wird nicht bei
   jedem Scrollframe ohnehin schon neu gezeichnet. */
@media (prefers-reduced-motion: no-preference) {
  .footer__logo {
    filter: url("#grv-liquid-logo");
  }
}

.footer__copyright {
  font-size: var(--font-size-tiny);
  color: var(--text-muted);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-6);
}

.footer__legal-link {
  font-size: var(--font-size-small);
  color: var(--theme-footer-link);
  transition: color var(--motion-duration-fast) var(--motion-ease);
}

.footer__legal-link:hover {
  color: var(--theme-footer-link-hover);
}

.footer__to-top {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-2);
  font-family: var(--brand-font-title);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-bold);
  color: var(--text-brand);
}

.footer__to-top-arrow {
  display: inline-block;
  transition: transform var(--motion-duration-base) var(--ease-spring);
}

.footer__to-top:hover .footer__to-top-arrow {
  transform: translateY(-0.25em);
}

/* ==========================================================================
   PLATTFORM-HINWEIS
   ========================================================================== */

.footer__powered-by {
  display: flex;
  align-items: center;
  margin-block-start: var(--spacing-8);
}

/* Der Link umschließt nur das Logo — `inline-block`, damit seine Fläche nicht
   über die Bildbreite hinausgeht und der Fokusrahmen eng anliegt. */
.footer__taptic-link {
  display: inline-block;
  border-radius: var(--brand-radius);
  transition: opacity var(--motion-duration-fast) var(--motion-ease);
}

.footer__taptic-link:hover {
  opacity: 0.7;
}

/* Das SVG enthält den kleinen Zusatz "SPONSORED BY" — unter dieser Höhe
   ist er nicht mehr lesbar. */
.footer__taptic-logo {
  height: 3.25rem;
  width: auto;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .footer__bottom {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: var(--spacing-6);
  }

  .footer__legal {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .footer__legal {
    gap: var(--spacing-4);
  }
}
