/* Responsive site directory — compact, truthful, and independent of app navigation. */

.footer {
  --footer-rule: rgba(255, 255, 255, 0.13);
  --footer-muted: #a1a1aa;
  margin-top: clamp(40px, 7vw, 88px) !important;
  padding: clamp(40px, 6vw, 72px) max(24px, calc((100vw - 1280px) / 2)) calc(112px + env(safe-area-inset-bottom)) !important;
  color: var(--text-primary, #fff);
  background: #181a1a !important;
  border-top: 1px solid var(--footer-rule) !important;
}

.footer-directory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 76px);
  max-width: 1100px;
  margin: 0 auto clamp(34px, 5vw, 58px);
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.footer-column h2 {
  margin: 0 0 12px;
  color: #fff;
  font: 700 0.72rem/1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-column a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: #d4d4d8;
  font-size: 0.84rem;
  font-weight: 520;
  line-height: 1.35;
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer-column a:hover { color: #ffc500; text-decoration: underline; }
}

.footer-column a:focus-visible,
.footer-socials a:focus-visible {
  outline: 2px solid var(--pl-cyan, #22d3ee);
  outline-offset: 3px;
}

.footer-base {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--footer-rule);
  color: var(--footer-muted);
  font-size: 0.76rem;
}

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

.footer .footer-logo {
  flex: 0 0 auto;
  color: #fff !important;
  font: 750 0.8rem/1 "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.footer-data { text-align: center; }

.footer-socials {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.footer-socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #f4f4f5;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.footer-socials svg { width: 19px; height: 19px; fill: currentColor; }

@media (hover: hover) and (pointer: fine) {
  .footer-socials a:hover {
    color: #ffc500;
    border-color: rgba(255, 197, 0, 0.42);
    background: rgba(255, 197, 0, 0.06);
  }
}

.footer .footer-disclaimer {
  max-width: 760px;
  margin: 20px auto 0;
  color: #818187;
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

:root.light-mode .footer {
  --footer-rule: rgba(30, 30, 32, 0.16);
  --footer-muted: #5f6064;
  color: #18181b;
  background: #e9eae7 !important;
}

:root.light-mode .footer-column h2,
:root.light-mode .footer .footer-logo { color: #18181b !important; }
:root.light-mode .footer-column a { color: #3f3f46; }
:root.light-mode .footer-socials a { color: #27272a; }
:root.light-mode .footer .footer-disclaimer { color: #66676b; }

@media (max-width: 760px) {
  .footer {
    padding: 36px 20px calc(112px + env(safe-area-inset-bottom)) !important;
  }

  .footer-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 22px;
    margin-bottom: 34px;
  }

  .footer-column a { width: 100%; min-height: 44px; font-size: 0.9rem; }

  .footer-base {
    grid-template-columns: 1fr auto;
    gap: 12px 18px;
    align-items: start;
  }

  .footer-brand-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .footer-data { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .footer-socials { grid-column: 2; grid-row: 1; }
  .footer .footer-disclaimer { margin-top: 22px; text-align: left; }
}

@media (max-width: 380px) {
  .footer-directory { grid-template-columns: 1fr; gap: 26px; }
  .footer-base { grid-template-columns: 1fr; }
  .footer-data,
  .footer-socials { grid-column: 1; grid-row: auto; }
  .footer-socials { justify-content: flex-start; margin-left: -12px; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-column a,
  .footer-socials a { transition-duration: 0.01ms; }
}
