/* A textured color field surrounds the inset footer, keeping its content quiet. */
.footer.footer-layered {
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(120px, 14vw, 200px) 24px 24px;
  border-top: 0;
  background: var(--surface-0);
}
.footer-layered .footer-ambient { display: none; }
.footer-light-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Nothing is painted at the top boundary; light grows out of the page black. */
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 7%, rgba(0,0,0,.06) 18%, rgba(0,0,0,.4) 38%, #000 76%);
}
.footer-light-glow {
  position: absolute;
  left: -24%;
  bottom: -38%;
  width: 104%;
  height: 152%;
  border-radius: 54% 46% 0 0;
  transform-origin: 45% 75%;
  background:
    radial-gradient(ellipse 32% 36% at 21% 78%, rgba(61, 114, 251, .95) 12%, rgba(61, 114, 251, .7) 38%, transparent 100%),
    radial-gradient(ellipse 20% 43% at 43% 91%, rgba(145, 87, 236, .92) 8%, transparent 100%),
    radial-gradient(ellipse 28% 23% at 12% 91%, rgba(59, 160, 192, .82) 16%, transparent 100%);
  /* Colour exists in the grain itself, with gaps that reveal the page background. */
  mask-image: var(--grain-texture);
  mask-mode: luminance;
  mask-size: 180px 180px;
  mask-repeat: repeat;
}
.footer-light-glow-secondary {
  left: auto;
  right: -24%;
  bottom: -27%;
  width: 98%;
  height: 184%;
  border-radius: 46% 54% 0 0;
  transform-origin: 65% 75%;
  background:
    radial-gradient(ellipse 29% 36% at 79% 76%, rgba(59, 160, 192, .94) 10%, rgba(59, 160, 192, .68) 36%, transparent 100%),
    radial-gradient(ellipse 24% 26% at 58% 89%, rgba(145, 87, 236, .92) 12%, transparent 100%);
  opacity: .85;
}
.footer-light-glow-left-alt {
  opacity: .38;
  bottom: -29%;
  height: 173%;
  background: radial-gradient(ellipse 23% 39% at 33% 70%, rgba(145, 87, 236, .95) 8%, transparent), radial-gradient(ellipse 31% 24% at 17% 87%, rgba(159, 232, 241, .68) 10%, transparent);
}
.footer-light-glow-right-alt {
  opacity: .46;
  bottom: -42%;
  height: 151%;
  background: radial-gradient(ellipse 34% 30% at 67% 71%, rgba(61, 114, 251, .94) 10%, transparent), radial-gradient(ellipse 22% 42% at 84% 83%, rgba(159, 126, 226, .88) 12%, transparent);
}
.footer.footer-layered > .footer-shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
.footer-layered .footer-panel {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius-frame, 32px);
  background: var(--surface-1);
}
.footer-layered .footer-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px 32px; margin-bottom: 24px; }
.footer-layered .footer-social { grid-column: 2; grid-row: 1; gap: 12px; }
.footer-navigation { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-navigation a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-1); font-size: 16px; text-decoration: none; }
.footer-navigation a:hover { color: var(--accent-primary); }
.footer-layered .footer-brand-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; max-width: 100%; }
.footer-layered .footer-brand-link .brand-logo-frame { width: 220px; max-width: 100%; }
.footer-layered .footer-brand p { color: var(--text-1); }
.footer-layered .footer-bottom { padding-top: 24px; border-top-color: var(--border); }
.footer-layered .footer-bottom p { color: var(--text-2); font-size: 14px; line-height: 1.75; }
.footer-layered .footer-credit a { color: var(--text-1); border-bottom-color: var(--border-strong); }
.footer-layered .footer-credit a:hover { color: var(--accent-primary); border-bottom-color: currentColor; }
.footer-layered .social-link { background: var(--surface-2); border-color: var(--border); color: var(--text-1); }
.footer-layered .social-link img { display: block; width: 22px; height: 22px; object-fit: contain; }
.footer-layered .footer-northbridge-mark { display: block; width: 22px; height: 22px; background: currentColor; mask: url('../images/experience/northbridge-orange.png') center / contain no-repeat; }
.footer-layered .social-link:hover { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff; }
.footer-layered a:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 5px; }
:root[data-theme='light'] .footer-light-field { opacity: .55; }
@media (max-width: 600px) {
  .footer.footer-layered { padding: 110px 16px 16px; }
  .footer-light-glow { width: 150%; left: -51%; }
  .footer-light-glow-secondary { width: 144%; left: auto; right: -47%; }
  .footer-layered .footer-panel { padding: 27px 18px; border-radius: var(--radius-frame, 28px); }
  .footer-layered .footer-brand p { font-size: 14px; line-height: 1.7; }
  .footer-layered .footer-bottom p { font-size: 13px; }
  .footer-layered .footer-content { grid-template-columns: minmax(0, 1fr); text-align: left; gap: 16px; }
  .footer-layered .footer-social { grid-column: 1; grid-row: auto; }
  .footer-navigation { gap: 4px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-layered .social-link { transition: none; }
  .footer-layered .social-link:hover { transform: none; }
}
