/* Canonical site-wide footer: loaded after the page-specific reference styles. */
.home-page .global-footer.site-footer,
.inner-page .global-footer.site-footer,
.legal-page .global-footer.site-footer,
.privacy-page .global-footer.site-footer,
.cookie-policy-page .global-footer.site-footer,
.participant-policy-page .global-footer.site-footer {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  column-gap: clamp(28px, 3vw, 48px);
  row-gap: 0;
  padding-top: clamp(48px, 4.6vw, 68px);
}

.global-footer .footer-newsletter {
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(34px, 5.4vw, 88px);
  margin: 0;
  border-bottom: 0;
  padding-bottom: clamp(30px, 3vw, 42px);
}

.global-footer .footer-newsletter-copy .eyebrow { margin-bottom: 10px; }

.global-footer .footer-newsletter h2 {
  max-width: 20ch;
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 2.15vw, 2.48rem);
  font-weight: 450;
  letter-spacing: -.035em;
}

.global-footer .footer-newsletter-copy > p:last-child {
  max-width: 59ch;
  font-size: .86rem;
}

.global-footer .footer-newsletter-signup { padding-top: 0; }
.global-footer .footer-newsletter-form { grid-template-columns: minmax(0, 1fr) 146px; }

.global-footer .footer-newsletter-consent {
  max-width: none;
  gap: 10px;
  color: rgba(255,255,255,.69);
  font-size: .68rem;
  line-height: 1.55;
}

.global-footer .footer-newsletter-consent a {
  color: rgba(255,255,255,.94);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 170ms ease, text-decoration-color 170ms ease;
}

.global-footer .footer-newsletter-consent a:hover,
.global-footer .footer-newsletter-consent a:focus-visible {
  color: var(--white);
  text-decoration-color: var(--gold-light);
}

@media (min-width: 1121px) {
  .global-footer .footer-newsletter-consent,
  .global-footer .footer-newsletter-consent span { white-space: nowrap; }
}

.global-footer .footer-main-rule {
  position: relative;
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: clamp(28px, 3vw, 40px);
  background: linear-gradient(90deg, rgba(209,178,115,.78) 0 11%, rgba(255,255,255,.16) 11% 100%);
}

.global-footer .footer-main-rule span {
  position: absolute;
  top: 50%;
  left: 11%;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  background: var(--navy);
  transform: translate(-50%, -50%);
}

.global-footer .footer-brand-block,
.global-footer .footer-column {
  width: 100%;
  min-width: 0;
  align-self: start;
  padding-bottom: clamp(30px, 3.2vw, 44px);
}

.global-footer .footer-section-title,
.global-footer .footer-column h3 {
  margin: 0 0 16px;
  color: var(--gold-light);
  font-family: var(--font-mono, "Fragment Mono", monospace);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* The mobile enhancement replaces column titles with disclosure buttons.
   Keep those titles visible and non-interactive on wider screens. */
.global-footer .footer-column h3 .mobile-disclosure-toggle {
  display: inline-flex;
  width: auto;
  min-height: 0;
  align-items: center;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  pointer-events: none;
}
.global-footer .brand.footer-brand {
  max-width: 250px;
  gap: 2px;
  margin-bottom: 24px;
}
.global-footer .footer-brand .brand-logo-frame { width: clamp(178px, 13vw, 210px); }
.global-footer .footer-brand .brand-logo {
  width: 132.9%;
  max-width: none;
}
.global-footer .footer-brand .brand-slogan { margin-top: 0; line-height: 1.35; }
.global-footer .footer-contact-details { gap: 8px; }
.global-footer .footer-contact-details p { color: rgba(255,255,255,.67); }
.global-footer .footer-column {
  align-content: start;
  justify-self: stretch;
}

.global-footer .footer-column a,
.global-footer .footer-contact-details a {
  min-height: 31px;
  font-size: .83rem;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: color 170ms ease, text-decoration-color 170ms ease;
}

.global-footer .footer-column a:hover,
.global-footer .footer-column a:focus-visible,
.global-footer .footer-contact-details a:hover,
.global-footer .footer-contact-details a:focus-visible {
  color: var(--white);
  text-decoration-color: var(--gold-light);
}

.global-footer .footer-explore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px clamp(16px, 1.8vw, 28px);
}

.global-footer .footer-explore-grid a {
  display: inline-flex;
  width: fit-content;
  align-items: center;
}

.global-footer .footer-connect {
  display: grid;
  grid-auto-rows: min-content;
}

.global-footer .footer-connect a {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
}

.global-footer .footer-social-icon {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  box-sizing: border-box;
  border: 1px solid rgba(209,178,115,.34);
  padding: 5px;
  color: var(--gold-light);
  background: rgba(255,255,255,.025);
  stroke-width: 1.65;
  transition: border-color 170ms ease, background-color 170ms ease, transform 170ms ease;
}

.global-footer .footer-connect a:hover .footer-social-icon,
.global-footer .footer-connect a:focus-visible .footer-social-icon {
  border-color: rgba(209,178,115,.82);
  background: rgba(209,178,115,.09);
  transform: translateY(-1px);
}

.global-footer .footer-program-logos {
  display: grid;
  width: 100%;
  max-width: 214px;
  align-items: start;
  justify-items: start;
  gap: 9px;
}

.global-footer .footer-program-logo {
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transition: opacity 170ms ease, transform 170ms ease;
}

.global-footer .footer-program-logo:hover {
  opacity: .92;
  transform: translateY(-1px);
}

.global-footer .footer-program-logo:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

.global-footer .footer-program-logos .footer-program-logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  padding: 0;
  background: transparent;
  object-fit: initial;
  object-position: initial;
}

.global-footer .footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 2.2vw, 36px);
  border-top-color: rgba(255,255,255,.17);
  padding: 24px 0 27px;
}

.global-footer .footer-bottom > p { justify-self: start; }

.global-footer .footer-legal-links {
  display: flex;
  justify-self: end;
  align-items: center;
  justify-content: flex-end;
  gap: 8px clamp(13px, 1.5vw, 22px);
}

.global-footer .footer-legal-links a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  white-space: nowrap;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.floating-back-top {
  position: fixed;
  z-index: 1100;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(209,178,115,.72);
  border-radius: 999px;
  padding: 7px 17px 7px 8px;
  color: #fff;
  background: rgba(12,19,52,.94);
  box-shadow: 0 14px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  font: 600 .75rem/1 var(--font-body, "IBM Plex Sans", sans-serif);
  letter-spacing: .045em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 220ms ease, transform 220ms ease, border-color 170ms ease, background-color 170ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.floating-back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.floating-back-top:hover,
.floating-back-top:focus-visible {
  border-color: var(--gold-light, #d1b273);
  background: rgba(19,29,68,.98);
  outline: none;
}

.floating-back-top:focus-visible {
  box-shadow: 0 0 0 3px rgba(209,178,115,.22), 0 14px 34px rgba(0,0,0,.3);
}

.floating-back-top-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-light, #d1b273);
  background: rgba(209,178,115,.1);
  transition: transform 170ms ease, background-color 170ms ease;
}

.floating-back-top-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.floating-back-top:hover .floating-back-top-icon,
.floating-back-top:focus-visible .floating-back-top-icon {
  background: rgba(209,178,115,.16);
  transform: translateY(-2px);
}

/* The legal navigation intentionally contains five links. Hide any duplicates
   injected by a previously cached page script. */
.global-footer .footer-legal-links a:nth-of-type(n + 6) {
  display: none !important;
}

@media (max-width: 1120px) {
  .home-page .global-footer.site-footer,
  .inner-page .global-footer.site-footer,
  .legal-page .global-footer.site-footer,
  .privacy-page .global-footer.site-footer,
  .cookie-policy-page .global-footer.site-footer,
  .participant-policy-page .global-footer.site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(32px, 6vw, 64px);
  }

  .global-footer .footer-newsletter { grid-template-columns: 1fr; gap: 24px; }

  .global-footer .footer-bottom {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .global-footer .footer-legal-links {
    justify-self: end;
    justify-content: flex-end;
  }

  .global-footer .footer-brand-block,
  .global-footer .footer-column {
    border-bottom: 1px solid rgba(255,255,255,.11);
    padding-top: 2px;
  }

  .global-footer .footer-connect,
  .global-footer .footer-programs { padding-top: 30px; }
}

@media (max-width: 680px) {
  .home-page .global-footer.site-footer,
  .inner-page .global-footer.site-footer,
  .legal-page .global-footer.site-footer,
  .privacy-page .global-footer.site-footer,
  .cookie-policy-page .global-footer.site-footer,
  .participant-policy-page .global-footer.site-footer {
    grid-template-columns: 1fr;
    padding: 42px 20px 0;
  }

  .global-footer .footer-newsletter { gap: 22px; padding-bottom: 30px; }
  .global-footer .footer-newsletter h2 { max-width: 18ch; font-size: clamp(1.75rem, 8vw, 2.2rem); }
  .global-footer .footer-newsletter-form { grid-template-columns: 1fr; }
  .global-footer .footer-main-rule { margin-bottom: 0; }

  .global-footer .footer-brand-block,
  .global-footer .footer-column { padding: 25px 0; }

  .global-footer .footer-brand-block { padding-top: 28px; }
  .global-footer .footer-section-title { margin-bottom: 12px; }
  .global-footer .footer-column h3 { margin-bottom: 12px; }
  .global-footer .footer-column h3 .mobile-disclosure-toggle {
    display: flex;
    width: 100%;
    min-height: 50px;
    pointer-events: auto;
  }
  .global-footer .footer-explore-grid { gap: 1px 20px; }

  .global-footer .footer-column a,
  .global-footer .footer-contact-details a { min-height: 44px; }

  .global-footer .footer-program-logos {
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .global-footer .footer-program-logo { min-height: 0; }
  .global-footer .footer-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 0 28px;
  }
  .global-footer .footer-bottom p { margin-bottom: 0; }

  .global-footer .footer-legal-links {
    display: grid;
    width: 100%;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 4px 16px;
  }

  .global-footer .footer-legal-links a { min-height: 42px; white-space: normal; }
  .floating-back-top {
    bottom: max(14px, env(safe-area-inset-bottom));
    min-height: 46px;
  }
}

@media (min-width: 681px) and (max-width: 760px) {
  .global-footer .footer-column h3 .mobile-disclosure-toggle {
    display: flex;
    width: 100%;
    min-height: 50px;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-back-top,
  .floating-back-top-icon { transition: none; }
}
