.footer {
  margin-top: 3rem;
  padding: 4rem 0 2rem;
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-title {
  margin: 0 0 1.5rem;
  color: var(--footer-text);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-brand p {
  margin: 0;
}

.footer-brand .logo {
  align-items: flex-start;
}

.footer-brand .logo img {
  display: block;
  width: auto;
  max-width: min(100%, 13.75rem);
  height: auto;
}

.footer-brand .logo__tag {
  color: var(--footer-muted);
}

.footer-brand .brand-text {
  margin-top: 1rem;
  color: var(--footer-muted);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.75;
}

.footer-links-grid,
.footer-links-list {
  display: grid;
  gap: 0.75rem;
}

.footer-links-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links-list a,
.footer-links-grid a {
  color: var(--footer-text);
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-store-links {
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--footer-bg) 88%, var(--footer-text));
  color: var(--footer-text);
}

.footer-newsletter {
  position: relative;
}

.footer-newsletter input {
  background: color-mix(in srgb, var(--footer-bg) 88%, var(--footer-text));
  color: var(--footer-text);
}

.footer-newsletter button {
  position: absolute;
  top: 0.75rem;
  right: 0.65rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--footer-border);
}

.footer-meta p {
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.75rem;
  line-height: 1.8;
  text-align: center;
}

.footer-meta a {
  color: var(--footer-text);
  font-weight: 700;
}

.footer-meta a:hover {
  color: var(--color-primary);
}

.store-badges {
  display: flex;
  gap: 1rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7.5rem;
  height: 2.5rem;
  border: 1px solid var(--footer-border);
  color: var(--footer-text);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.store-badge:hover {
  border-color: var(--color-primary);
  color: #fff;
  background: #ffffff0a;
}

[data-theme-mode="dark"] .footer {
  background: var(--footer-bg);
  color: var(--footer-text);
}

[data-theme-mode="dark"] .footer-meta {
  border-color: var(--footer-border);
}

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

@media (min-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 639px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 539px) {
  .store-badges {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}
