/*
  The approved footer layer, ported rule for rule from the reference build's global stylesheet
  (ndic-reference/css/styles.css:4784-4930, plus the one responsive rule at :518).

  WHY IT IS A FILE AND NOT PART OF styles.css. These rules live in the reference's global sheet, but
  ours is not byte-identical to it and is 8,296 lines with a history of a single unclosed at-rule
  gating 92% of the file. Keeping the approved footer here makes it inspectable and diffable against
  the reference the way home.css, about.css and px-shared.css already are, and none of these eleven
  class names existed anywhere in this build, so nothing collides.

  ONE DEVIATION FROM THE SOURCE. The reference writes the pattern as `url("../assets/images/...")`,
  correct from `css/styles.css`. This file sits one directory deeper, so the URL is absolute instead
  of `../../`. Same file, and it cannot break if this stylesheet is ever moved again.

  `.footer-shell .ndic-container { max-width: none }` is deliberate and is the reason the footer runs
  wider than the rest of the site. It is the approved behaviour, and it needs stating because this
  build adopted `--container-max: 1440px` site-wide on 2026-08-05 — without this override the footer
  would stop at 1440px, which the approved design does not do. Specificity (0,2,0 over 0,1,0) means
  it wins without !important.
*/

.footer-shell {
  position: relative;
  background-color: #1b2735;
  background-image:
    linear-gradient(
      180deg,
      rgba(27, 39, 53, 0.55) 0%,
      rgba(27, 39, 53, 0.82) 100%
    ),
    url("/assets/images/footer-pattern.png");
  background-size: cover, cover;
  background-position: center top, center top;
  background-repeat: no-repeat, no-repeat;
}

.footer-rule {
  height: 1px;
  width: min(45vw, 560px);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

.footer-address {
  font-size: 13.5px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 14px;
}
.footer-address span {
  display: block;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 3px;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition:
    color 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    transform 0.24s ease;
}
.footer-social:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}
.footer-social:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 16px;
}
.footer-col-links {
  display: grid;
  gap: 11px;
}
.footer-link {
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  text-wrap: pretty;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  margin-top: clamp(38px, 5vw, 60px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-copyright {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}
.footer-legal a {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-legal a:hover {
  color: #fff;
}

.footer-shell .ndic-container {
  max-width: none;
  padding-left: max(2%, 20px);
  padding-right: max(2%, 20px);
}

.footer-col {
  max-width: 320px;
}

/* styles.css:518 in the reference — the address column is not width-capped on desktop. */
@media (min-width: 1024px) {
  .footer-address {
    max-width: 100%;
  }
}

/*
  Scroll-to-top (reference styles.css:4928-4978, immediately after .footer-col — kept in the same
  place relative to its neighbours so this file stays diffable against the source). Pairs with the
  <scroll-top> element in footer.js.

  The button is always in the layout and only faded, so `pointer-events: none` in the hidden state
  is not cosmetic: without it an invisible 46px target sits over the bottom-right of every page and
  swallows clicks meant for whatever is underneath.
*/

.stt-btn {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 80;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  color: var(--color-brand-primary, #2c2e81);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    0 2px 8px rgba(15, 16, 40, 0.06),
    0 12px 26px rgba(15, 16, 40, 0.12);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.3s ease;
}

scroll-top.is-visible .stt-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.stt-btn:hover {
  background: var(--color-brand-primary, #2c2e81);
  color: #fff;
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(28, 30, 90, 0.18),
    0 16px 34px rgba(28, 30, 90, 0.22);
}

.stt-btn:active {
  transform: translateY(0) scale(0.96);
}

.stt-btn:focus-visible {
  outline: 3px solid rgba(44, 46, 129, 0.35);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .stt-btn {
    transition-duration: 0.01ms;
  }
}
