/* ============================================================
   GLOBAL FOOTER  —  single source of truth
   Styles components/footer.html. This is the ONLY stylesheet
   that styles the footer; every page that includes the footer
   links this file. Do not duplicate these rules elsewhere.
   Black & white, matches the marketing / guides aesthetic.
============================================================ */

.global-footer {
  background: #000;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
  z-index: 5;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Top: brand + link columns ---------- */

.footer-top {
  padding: 5rem 0 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: start;
}

/* Brand column */
.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.footer-logo-img {
  height: 32px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.footer-logo:hover .footer-logo-img {
  transform: scale(1.03);
}

.footer-description {
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.75;
  font-size: 0.95rem;
  max-width: 340px;
  margin: 0;
}

/* Link columns */
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 1.4rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a::before {
  content: '';
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer-links a:hover::before {
  width: 12px;
}

/* "Latest Guides" variant — titles can be long, so let them wrap
   cleanly (up to 2 lines) without the hover arrow / horizontal shift. */
.footer-links--guides a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.4;
  width: auto;
}

.footer-links--guides a::before {
  display: none;
}

.footer-links--guides a:hover {
  transform: none;
}

/* ---------- Bottom: credit + legal links ---------- */

.footer-bottom {
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-credit {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  margin: 0;
}

.footer-credit a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-credit a:hover {
  color: #fff;
}

.footer-legal {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: #fff;
}

.footer-legal-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  flex: none;
}

/* Keyboard focus — the footer sits on black, so use a light ring. */
.footer-links a:focus-visible,
.footer-legal a:focus-visible,
.footer-credit a:focus-visible,
.footer-logo:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .footer-brand {
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  .footer-top {
    padding: 3.5rem 0 3rem;
  }
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .footer-bottom-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .footer-legal {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .footer-container {
    padding: 0 1.25rem;
  }
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
