/* Site footer and the navbar's hide state. Loaded after the other sheets on every page. */
:root {
  --footer-bg: #062D6E;
  --footer-text: var(--ink-light);
  --footer-soft: var(--brand-pale);
  --footer-icon-hover: #0A4494;
  --wordmark-from: #3380F0;
  --wordmark-to: #7FB2FA;
}

/* Its own stacking level, so no fixed page layer can ever take a click meant for the footer. */
.footer {
  position: relative;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(32px, 4vw, 56px) 16px clamp(24px, 2.5vw, 32px);
  overflow: hidden;
  background: var(--footer-bg);
  color: var(--footer-soft);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

.footer p { margin: 0; }
.footer a { color: inherit; text-decoration: none; }

.footer a:focus-visible {
  outline: 2px solid var(--footer-text);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 28vw, not 33vw: "Boltools" is 3.385em wide here, and 33vw would run off every screen under ~1600px. */
.footer__wordmark {
  position: relative;
  font-size: clamp(80px, 28vw, 480px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.82;
  white-space: nowrap;
  /* Its font box is far taller than its line, and at large sizes it reaches over the links below. */
  pointer-events: none;
}

/* Inline on purpose: its paint area is the full font height, so line-height 0.82 cannot crop the
   gradient. The padding gives back the last letter's negative tracking for the same reason. */
.footer__word {
  padding-right: 0.06em;
  background: linear-gradient(100deg, var(--wordmark-from), var(--wordmark-to), var(--wordmark-from)) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: footer-gradient 12s ease-in-out infinite alternate;
}

@keyframes footer-gradient {
  to { background-position: 100% 0; }
}

.footer__wave {
  position: absolute;
  inset: -0.15em 0;
  width: 100%;
  height: calc(100% + 0.3em);
  pointer-events: none;
}

.footer__tagline {
  color: var(--footer-text);
  font-size: clamp(20px, 2.4vw, 32px);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__links a:hover { color: var(--footer-text); }

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

.footer__social { display: flex; gap: 8px; }

.footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.footer__social a:hover { background: var(--footer-icon-hover); }
.footer__social a:focus-visible { border-radius: 50%; }

.footer__social svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer__maker {
  color: var(--footer-text);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 700;
  white-space: nowrap;
}

.footer__maker a { transition: opacity var(--duration-fast) var(--ease-out); }
.footer__maker a:hover { opacity: 0.75; }

/* Inline-flex keeps the 44px tap height without stretching the maker line itself. */
.footer__maker a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 479px) {
  .footer__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 320px;
  }
}

/* ---------- Navbar hide ---------- */

/* Repeats the base transitions because a transition list replaces, it does not add. */
.nav {
  transition: background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-ink) var(--ease-out),
    visibility var(--duration-ink);
}

/* visibility, not just transform: a hidden navbar must not catch clicks or keyboard focus. */
.nav.nav--hidden {
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .footer__word { animation: none; }
  .nav { transition: none; }
}
