/* ==========================================================================
   FOOTER.CSS — Site Footer
   toilet-cubicle.co.uk — petrol-deep surface, white headings, grey-300 body,
   lime hover on links (BRAND.md §1 usage patterns)
   ========================================================================== */

/* -------------------------------------------------------------------------
   Footer Container
   ------------------------------------------------------------------------- */

.site-footer {
  background-color: var(--color-petrol-deep);
  color: var(--color-grey-300);
  padding-block: var(--sp-8) var(--sp-4);
}

/* -------------------------------------------------------------------------
   Footer Layout
   ------------------------------------------------------------------------- */

.footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-2);
}

@media (min-width: 576px) {
  .footer__inner {
    padding-inline: var(--sp-3);
  }
}

@media (min-width: 768px) {
  .footer__inner {
    padding-inline: var(--sp-4);
  }
}

/* Grid: stacks on mobile, 2-up on small screens, 4 columns on desktop */
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

@media (min-width: 576px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1.25fr;
    gap: var(--sp-4);
  }
}

/* -------------------------------------------------------------------------
   Brand Column — lockup, tagline, endorsement
   ------------------------------------------------------------------------- */

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: var(--sp-2);
  text-decoration: none;
}

.footer__logo:hover {
  text-decoration: none;
}

.footer__logo:focus-visible {
  outline: 2px solid var(--color-lime);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer__logo-mark {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  color: var(--color-white);
  white-space: nowrap;
}

.footer__logo-tld {
  font-weight: var(--weight-medium);
  color: var(--color-grey-400);
}

.footer__tagline {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-grey-300);
  margin-bottom: var(--sp-3);
}

/* Parent-brand endorsement — mono, uppercase, lime hover on dark (✓) */
.footer__endorsement {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  line-height: var(--leading-snug);
  color: var(--color-grey-400);
}

.footer__endorsement a {
  color: var(--color-white);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__endorsement a:hover {
  color: var(--color-lime);
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Link Columns
   ------------------------------------------------------------------------- */

/* Column heading */
.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-white);
  margin-bottom: var(--sp-1);
}

.footer__links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Links — grey-300, lime hover (allowed on petrol-deep, BRAND.md §1).
   44px row height keeps comfortable touch targets. */
.footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--color-grey-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-lime);
  text-decoration: underline;
}

.footer__link:focus-visible {
  outline: 2px solid var(--color-lime);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Generic fallback for bare footer text */
.site-footer p {
  color: var(--color-grey-300);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* -------------------------------------------------------------------------
   Footer Bottom Bar — copyright + legal
   ------------------------------------------------------------------------- */

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--color-grey-400);
  text-align: center;
  margin: 0;
}

.footer__bottom-link {
  font-size: var(--text-xs);
  color: var(--color-grey-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__bottom-link:hover {
  color: var(--color-lime);
  text-decoration: underline;
}

/* Group of legal links on the right of the bottom bar (Privacy · paneltech) */
.footer__bottom-links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Registered-company line — small print under the bottom bar (local-SEO NAP) */
.footer__legal {
  margin: var(--sp-2) 0 0;
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
  color: var(--color-grey-400);
  text-align: center;
}
