/* Flickering footer — adapted from FlickeringFooter for WordPress */

.site-footer--flicker {
  position: relative;
  width: 100%;
  margin-top: 0;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 0;
  background: var(--paper);
  color: var(--muted);
  border-top: 0;
  overflow: hidden;
}

.site-footer--flicker .footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem 3rem;
  width: min(100% - 2.5rem, 72rem);
  margin: 0 auto;
  padding: 0 0 1.5rem;
}

.site-footer--flicker .footer-brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
  max-width: 22rem;
}

.site-footer--flicker .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.site-footer--flicker .footer-brand:hover {
  opacity: .75;
  color: var(--ink);
}

.site-footer--flicker .footer-brand__wordmark {
  display: block;
  height: 1.65rem;
  width: auto;
}

.site-footer--flicker .footer-brand span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}

.site-footer--flicker .footer-tagline {
  margin: 0;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: -.01em;
  color: var(--muted);
}

.site-footer--flicker .footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.site-footer--flicker .footer-social__link,
.site-footer--flicker .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  background: transparent;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.site-footer--flicker .footer-social__link:hover,
.site-footer--flicker .theme-toggle:hover {
  background: var(--paper-2);
  border-color: color-mix(in srgb, var(--ink) 18%, var(--line));
  color: var(--ink);
}

.site-footer--flicker .footer-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.75rem 2.5rem;
  flex: 1 1 28rem;
  max-width: 36rem;
  padding-top: .25rem;
}

.site-footer--flicker .footer-col {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 7.5rem;
}

.site-footer--flicker .footer-col__label {
  margin: 0 0 .45rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.site-footer--flicker .footer-col__item a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 450;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer--flicker .footer-col__item a:hover {
  color: var(--ink);
}

.site-footer--flicker .footer-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  opacity: 0;
  transform: translateX(0);
  transition:
    opacity .3s ease,
    transform .3s ease,
    border-color var(--transition-fast);
}

.site-footer--flicker .footer-col__item a:hover .footer-chevron {
  opacity: 1;
  transform: translateX(.2rem);
  border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
}

.site-footer--flicker .footer-copy {
  width: min(100% - 2.5rem, 72rem);
  margin: 0 auto 1.25rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .01em;
}

.site-footer--flicker .footer-flicker {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 12rem;
  margin-top: 3.5rem;
}

.site-footer--flicker .footer-flicker__fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    transparent 0%,
    transparent 40%,
    var(--paper) 100%
  );
}

.site-footer--flicker .footer-flicker__canvas-wrap {
  position: absolute;
  inset: 0 1.5rem;
  overflow: hidden;
}

.site-footer--flicker .footer-flicker__canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body:has(.home-flow) .site-footer--flicker {
  background: var(--paper);
  border-top: 0;
}

@media (min-width: 768px) {
  .site-footer--flicker .footer-flicker {
    height: 16rem;
    margin-top: 5rem;
  }

  .site-footer--flicker .footer-top {
    flex-wrap: nowrap;
    align-items: center;
  }
}

@media (max-width: 720px) {
  .site-footer--flicker .footer-columns {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    gap: 1.5rem 2rem;
  }

  .site-footer--flicker .footer-flicker {
    margin-top: 2.5rem;
    height: 10rem;
  }

  .site-footer--flicker .footer-flicker__canvas-wrap {
    inset: 0 .75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer--flicker .footer-chevron {
    transition: none;
  }
}
