/* =========================
   FOOTER
========================= */
.footer {
  --footer-porcelain: #f2f4f5;
  --footer-ash: #b8bdc2;
  --footer-smoke: #747b82;
  --footer-ink: #111820;
  --footer-blueblack: #182331;
  --footer-brownbark: #2a211d;
  --footer-coal: #08090b;
  --footer-glass: rgba(17, 24, 32, 0.72);
  --footer-line: rgba(242, 244, 245, 0.16);
  --footer-shine: rgba(242, 244, 245, 0.2);

  font-family: inherit;
  margin-top: 120px;
  padding: 2px;
  z-index: 5;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(242, 244, 245, 0.22), transparent 27%),
    linear-gradient(300deg, rgba(42, 33, 29, 0.58), transparent 34%),
    linear-gradient(180deg, var(--footer-blueblack), var(--footer-coal));
  border: 1px solid var(--footer-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--footer-porcelain);
  box-shadow:
    0 18px 45px var(--shadow-soft),
    inset 0 1px 0 var(--footer-shine);
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(242, 244, 245, 0.09) 10px 11px, transparent 11px 22px),
    linear-gradient(0deg, transparent 0 10px, rgba(116, 123, 130, 0.08) 10px 11px, transparent 11px 22px);
  opacity: 0.26;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.footer:hover::before {
  opacity: 0.5;
  transform: translateX(8px);
}

.footer::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 16px;
  pointer-events: none;
  background:
    linear-gradient(180deg, var(--footer-shine), transparent 42%),
    radial-gradient(circle at 8% 18%, rgba(184, 189, 194, 0.22), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(42, 33, 29, 0.5), transparent 34%);
  opacity: 0.72;
}

.footer:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 244, 245, 0.26);
  box-shadow:
    0 22px 55px var(--shadow-soft),
    0 0 0 1px rgba(116, 123, 130, 0.18),
    inset 0 1px 0 var(--footer-shine);
}

/* =========================
   LAYOUT
========================= */
.footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  min-height: 82px;
  padding: 20px 24px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(242, 244, 245, 0.07), transparent 48%),
    linear-gradient(300deg, rgba(42, 33, 29, 0.28), transparent 55%),
    var(--footer-glass);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  font-family: var(--pixel-font);
  font-size: 9px;
  color: var(--footer-porcelain);
  border: 1px solid rgba(242, 244, 245, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 244, 245, 0.2), transparent 52%),
    rgba(24, 35, 49, 0.78);
  box-shadow:
    inset 0 1px 0 var(--footer-shine),
    4px 4px 0 rgba(42, 33, 29, 0.56);
  transition:
    transform 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.footer:hover .footer-mark {
  color: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow:
    inset 0 1px 0 var(--footer-shine),
    6px 6px 0 rgba(42, 33, 29, 0.68),
    -3px -3px 0 rgba(184, 189, 194, 0.12);
}

.footer-brand {
  font-family: var(--pixel-font);
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.35;
}

.footer-meta {
  font-size: 12px;
  line-height: 1.6;
  color: var(--footer-ash);
}

.footer-signal {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(242, 244, 245, 0.14);
  border-radius: 10px;
  background: rgba(8, 9, 11, 0.34);
  box-shadow: inset 0 1px 0 var(--footer-shine);
}

.footer-signal span {
  width: 8px;
  height: 8px;
  background: var(--footer-ash);
  opacity: 0.42;
  transition:
    height 0.32s ease,
    opacity 0.32s ease,
    transform 0.32s ease;
}

.footer-signal span:nth-child(2) {
  height: 14px;
}

.footer-signal span:nth-child(3) {
  height: 20px;
}

.footer:hover .footer-signal span {
  opacity: 0.9;
  transform: translateY(-2px);
}

.footer:hover .footer-signal span:nth-child(1) {
  height: 18px;
}

.footer:hover .footer-signal span:nth-child(2) {
  height: 26px;
}

.footer:hover .footer-signal span:nth-child(3) {
  height: 12px;
}

/* =========================
   LINKS
========================= */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  isolation: isolate;
  font-size: 13px;
  line-height: 1;
  position: relative;
  overflow: hidden;
  padding: 11px 12px;
  border: 1px solid rgba(242, 244, 245, 0.14);
  border-radius: 8px;
  color: var(--footer-porcelain);
  background: rgba(8, 9, 11, 0.28);
  box-shadow: inset 0 1px 0 var(--footer-shine);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease;
}

.footer-links a::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background:
    linear-gradient(110deg, transparent 0 35%, rgba(242, 244, 245, 0.22) 48%, transparent 62%),
    linear-gradient(180deg, rgba(184, 189, 194, 0.14), transparent);
  opacity: 0;
  transform: translateX(-50%);
  transition:
    opacity 0.25s ease,
    transform 0.45s ease;
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(50%);
}

.footer-links a:hover {
  transform: translateY(-3px);
  color: #ffffff;
  border-color: rgba(242, 244, 245, 0.34);
  background:
    linear-gradient(135deg, rgba(242, 244, 245, 0.1), transparent 55%),
    rgba(24, 35, 49, 0.78);
  box-shadow:
    0 10px 24px var(--shadow-soft),
    3px 3px 0 rgba(42, 33, 29, 0.48),
    inset 0 1px 0 var(--footer-shine);
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 2px;
  background: var(--footer-ash);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition:
    opacity 0.2s ease,
    transform 0.24s steps(4, end);
}

.footer-links a:hover::after {
  opacity: 0.9;
  transform: scaleX(1);
}

@media (max-width: 720px) {
  .footer {
    margin-top: 80px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
  }

  .footer-signal {
    display: none;
  }

  .footer-links {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-links a {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer,
  .footer::before,
  .footer-mark,
  .footer-signal span,
  .footer-links a,
  .footer-links a::before,
  .footer-links a::after {
    transition: none;
  }
}
