/* ==========================================================================
   METRIX LAB - footer.css  (section: #footer, page order 8)
   Minimalist dark-grey footer: brand + tagline, newsletter, social,
   sitemap columns, legal bottom bar. All rules scoped under #footer.
   Uses contract tokens only; no hardcoded palette hex.
   ========================================================================== */

#footer {
  position: relative;
  overflow: hidden;
  background-color: var(--color-surface);
  border-top: 1px solid var(--border-color-soft);
  color: var(--color-text-body);
  font-family: var(--font-body);
}

/* decorative top glow */
#footer .footer__glow {
  position: absolute;
  top: -40%;
  left: 50%;
  width: min(900px, 120%);
  height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, var(--color-accent-tint), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
  z-index: var(--z-decor);
}

#footer .footer__inner {
  position: relative;
  z-index: var(--z-content);
  padding-top: var(--section-padding-y-sm);
  padding-bottom: var(--space-2xl);
}

/* ===== TOP: brand + newsletter ===== */
#footer .footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
}

/* ----- brand block ----- */
#footer .footer__brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}
#footer .footer__logo {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 12px rgba(234, 88, 12, 0.40));
}
#footer .footer__wordmark {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  line-height: 1;
}
#footer .footer__wordmark-accent {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-accent); /* true brand orange fallback */
}
/* forced-colors: gradient bg is dropped in HC mode - keep the wordmark visible */
@media (forced-colors: active) {
  #footer .footer__wordmark-accent {
    -webkit-text-fill-color: currentColor;
    background: none;
    color: CanvasText;
  }
}
#footer .footer__tagline {
  margin: var(--space-lg) 0 0;
  max-width: 34ch;
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
}

/* ----- social ----- */
#footer .footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
}
#footer .footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--color-grey-500);
  background-color: var(--color-surface-2);
  transition:
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
#footer .footer__social-link svg {
  width: 1.2rem;
  height: 1.2rem;
}
#footer .footer__social-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background-color: var(--color-accent-tint);
  box-shadow: var(--glow-orange-sm);
  transform: translateY(-3px);
}

/* ----- newsletter ----- */
#footer .footer__news-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
#footer .footer__news-copy {
  margin: var(--space-sm) 0 var(--space-lg);
  max-width: 42ch;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}
#footer .footer__form { margin: 0; }
#footer .footer__field {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  padding: var(--space-2xs);
  padding-left: var(--space-sm);
  background-color: var(--color-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
#footer .footer__field:focus-within {
  border-color: var(--color-accent);
  box-shadow: var(--glow-orange-sm);
}
#footer .footer__field-icon {
  display: inline-flex;
  flex: none;
  color: var(--color-grey-500);
}
#footer .footer__field-icon svg { width: 1.15rem; height: 1.15rem; }
#footer .footer__input {
  flex: 1 1 9rem;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  padding: 0.6rem 0.25rem;
  outline: none;
}
#footer .footer__input::placeholder { color: var(--color-text-faint); }
#footer .footer__submit { flex: none; }

/* form feedback (footer.js) */
#footer .footer__form-note {
  margin: var(--space-sm) 0 0;
  min-height: 1.1em;
  font-size: var(--fs-xs);
  color: var(--color-accent-soft);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
#footer .footer__form-note.is-active {
  opacity: 1;
  transform: none;
}
#footer .footer__form-note.is-error { color: var(--color-accent); }

/* ===== divider ===== */
#footer .footer__divider {
  margin-block: var(--space-2xl);
}

/* ===== SITEMAP ===== */
#footer .footer__sitemap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}
#footer .footer__col-title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-text-muted); /* WCAG AA: h2 landmarks must be legible */
}
#footer .footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
#footer .footer__link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  line-height: 1.2;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
#footer .footer__link:hover {
  color: var(--color-accent);
  transform: translateX(3px);
}

/* ===== BOTTOM BAR ===== */
#footer .footer__bottom {
  position: relative;
  z-index: var(--z-content);
  border-top: 1px solid var(--border-color-soft);
  background-color: var(--color-surface-2);
}
#footer .footer__bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  text-align: center;
}
#footer .footer__legal {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--color-text-muted); /* WCAG AA on the #1A1A1A bottom bar */
}
#footer .footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}
#footer .footer__legal-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--fs-xs);
  transition: color var(--dur-fast) var(--ease-out);
}
#footer .footer__legal-link:hover { color: var(--color-accent); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (min-width: 640px) {
  #footer .footer__sitemap {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  #footer .footer__inner {
    padding-top: var(--section-padding-y);
  }
  #footer .footer__top {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
  }
  #footer .footer__sitemap {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3xl);
  }
  #footer .footer__bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  #footer .footer__top {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* ==========================================================================
   REDUCED MOTION - kill transforms/auto-motion, keep everything visible
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  #footer .footer__social-link:hover,
  #footer .footer__link:hover {
    transform: none;
  }
  #footer .footer__form-note {
    opacity: 1;
    transform: none;
  }
}
