/* /css/main-website/footer.css
   ==========================================================================
   GFC – Main Website Footer
   --------------------------------------------------------------------------
   Supports:
   - /partials/en/main-website/footer.html
   - /partials/de/main-website/footer.html
   - Compact brand and project-status communication
   - Legal modal controls
   - Links to the central project documentation
   ========================================================================== */


/* ==========================================================================
   1. FOOTER FOUNDATION
   ========================================================================== */

.site-footer {
  --gfc-footer-bg: var(--ft-bg, #050913);
  --gfc-footer-surface: var(
    --ft-surface,
    rgba(255, 255, 255, 0.04)
  );
  --gfc-footer-surface-soft: rgba(255, 255, 255, 0.018);
  --gfc-footer-border: var(
    --ft-border,
    rgba(255, 255, 255, 0.11)
  );
  --gfc-footer-text: var(
    --ft-text,
    var(--text, #f5f7fb)
  );
  --gfc-footer-muted: var(
    --ft-muted,
    var(--muted, #a9b2c3)
  );
  --gfc-footer-accent: var(
    --ft-accent,
    var(--accent, #5cc8ff)
  );
  --gfc-footer-radius: var(--ft-radius, 18px);
  --gfc-footer-radius-small: var(--ft-radius-sm, 11px);
  --gfc-footer-line-height: var(--ft-lh, 1.6);

  position: relative;
  isolation: isolate;
  overflow: clip;
  border-block-start: 1px solid var(--gfc-footer-border);
  background:
    radial-gradient(
      1100px 380px at 18% -10%,
      rgba(92, 200, 255, 0.11),
      transparent 62%
    ),
    radial-gradient(
      760px 300px at 84% 0%,
      rgba(98, 230, 167, 0.055),
      transparent 60%
    ),
    var(--gfc-footer-bg);
  color: var(--gfc-footer-text);
  font-family: var(--ft-font, inherit);
  line-height: var(--gfc-footer-line-height);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.11;
  background-image:
    radial-gradient(
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px
    );
  background-position: -5px -5px;
  background-size: 28px 28px;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  z-index: -1;
  inline-size: min(700px, 80%);
  block-size: 1px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(92, 200, 255, 0.48),
      rgba(98, 230, 167, 0.35),
      transparent
    );
  transform: translateX(-50%);
}


/* ==========================================================================
   2. FOOTER LAYOUT
   ========================================================================== */

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(300px, 0.8fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
  min-inline-size: 0;
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.footer-brand,
.footer-nav {
  min-inline-size: 0;
  border: 1px solid var(--gfc-footer-border);
  border-radius: var(--gfc-footer-radius);
  background:
    linear-gradient(
      180deg,
      var(--gfc-footer-surface),
      var(--gfc-footer-surface-soft)
    );
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.footer-brand {
  padding: clamp(1.15rem, 2.6vw, 1.65rem);
}

.footer-nav {
  display: flex;
  align-items: center;
  padding: clamp(1rem, 2.4vw, 1.45rem);
}


/* ==========================================================================
   3. BRAND BLOCK
   ========================================================================== */

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-inline-size: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  inline-size: 44px;
  block-size: 44px;
  place-items: center;
  border: 1px solid rgba(92, 200, 255, 0.22);
  border-radius: 13px;
  background:
    linear-gradient(
      145deg,
      rgba(92, 200, 255, 0.14),
      rgba(98, 230, 167, 0.05)
    );
  color: var(--gfc-footer-accent);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.055em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand-text {
  display: grid;
  gap: 0.18rem;
  min-inline-size: 0;
}

.brand-name {
  overflow-wrap: anywhere;
  color: var(--gfc-footer-text);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  font-weight: 850;
  line-height: 1.22;
  text-wrap: balance;
}

.brand-abbr {
  max-inline-size: 54ch;
  color: var(--gfc-footer-muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.footer-brand p {
  max-inline-size: 76ch;
}

.footer-brand .claim {
  margin: 0.95rem 0 0;
}

.footer-brand .claim + p {
  margin-block-start: 0.65rem;
}

.footer-brand .muted {
  color: var(--gfc-footer-muted);
}

.footer-brand .small {
  font-size: 0.87rem;
  line-height: 1.58;
}

/* External social links: larger touch targets without turning them into buttons. */
.footer-brand a[target="_blank"] {
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
  padding-inline: 0.2rem;
  border-radius: 6px;
  touch-action: manipulation;
}

.footer-brand a[target="_blank"]:focus-visible {
  outline: var(
    --focus-ring,
    3px solid rgba(92, 200, 255, 0.72)
  );
  outline-offset: 2px;
}


/* ==========================================================================
   4. FOOTER NAVIGATION
   ========================================================================== */

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  inline-size: 100%;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links > li {
  min-inline-size: 0;
}

.footer-links > .sep,
.footer-links > .separator {
  display: none;
}

.site-footer .link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--gfc-footer-radius-small);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  color: var(--gfc-footer-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.25;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  overflow-wrap: anywhere;
  transition:
    transform 150ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.site-footer .link-btn:hover {
  border-color: rgba(92, 200, 255, 0.26);
  background: rgba(92, 200, 255, 0.08);
  color: var(--gfc-footer-accent);
  transform: translateY(-1px);
}

.site-footer .link-btn:focus-visible {
  outline: var(
    --focus-ring,
    3px solid rgba(92, 200, 255, 0.72)
  );
  outline-offset: var(--focus-offset, 3px);
  border-color: transparent;
}

.site-footer button.link-btn {
  font-family: inherit;
}

.site-footer .footer-transparency-link {
  border-color: rgba(92, 200, 255, 0.16);
  background:
    linear-gradient(
      135deg,
      rgba(92, 200, 255, 0.09),
      rgba(92, 200, 255, 0.025)
    );
}


/* ==========================================================================
   5. ACCESSIBILITY HELPERS
   ========================================================================== */

.site-footer .visually-hidden {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* ==========================================================================
   6. TABLET
   ========================================================================== */

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding-block: 1.65rem;
  }

  .footer-brand,
  .footer-nav {
    padding: 1.15rem;
  }

  .footer-nav {
    align-items: stretch;
  }

  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ==========================================================================
   7. MOBILE
   ========================================================================== */

@media (max-width: 640px) {
  .footer-inner {
    padding-block: 1.35rem;
  }

  .footer-brand,
  .footer-nav {
    border-radius: 15px;
  }

  .brand-row {
    align-items: flex-start;
  }

  .brand-mark {
    inline-size: 40px;
    block-size: 40px;
    border-radius: 11px;
    font-size: 0.8rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-abbr {
    font-size: 0.82rem;
  }

  .footer-brand .small {
    font-size: 0.84rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .link-btn {
    min-block-size: 44px;
    padding: 0.68rem 0.72rem;
    font-size: 0.88rem;
  }
}


/* ==========================================================================
   8. SMALL MOBILE
   ========================================================================== */

@media (max-width: 430px) {
  .footer-brand,
  .footer-nav {
    padding: 1rem;
  }

  .site-footer .link-btn {
    justify-content: flex-start;
  }
}

/* Keep the compact two-column link grid on 375–430px devices. */
@media (max-width: 360px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   9. LIGHT COLOR SCHEME
   ========================================================================== */

@media (prefers-color-scheme: light) {
  .site-footer {
    --gfc-footer-bg: var(--ft-bg, #f4f7fa);
    --gfc-footer-surface: rgba(255, 255, 255, 0.9);
    --gfc-footer-surface-soft: rgba(248, 250, 252, 0.88);
    --gfc-footer-border: rgba(14, 24, 42, 0.12);
    --gfc-footer-text: var(--ft-text, var(--text, #111827));
    --gfc-footer-muted: var(--ft-muted, var(--muted, #5f6b7d));
    --gfc-footer-accent: var(--ft-accent, var(--accent, #087aaa));

    background:
      radial-gradient(
        1000px 360px at 18% -10%,
        rgba(20, 135, 190, 0.1),
        transparent 62%
      ),
      radial-gradient(
        760px 300px at 84% 0%,
        rgba(30, 170, 110, 0.05),
        transparent 60%
      ),
      var(--gfc-footer-bg);
  }

  .site-footer::before {
    opacity: 0.07;
    background-image:
      radial-gradient(
        rgba(14, 24, 42, 0.1) 1px,
        transparent 1px
      );
  }

  .footer-brand,
  .footer-nav {
    box-shadow:
      0 14px 34px rgba(14, 24, 42, 0.075),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .brand-mark {
    border-color: rgba(20, 135, 190, 0.2);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 7px 18px rgba(14, 24, 42, 0.07);
  }

  .site-footer .link-btn:hover {
    border-color: rgba(20, 135, 190, 0.24);
    background: rgba(20, 135, 190, 0.075);
  }

  .site-footer .footer-transparency-link {
    border-color: rgba(20, 135, 190, 0.15);
    background:
      linear-gradient(
        135deg,
        rgba(20, 135, 190, 0.075),
        rgba(20, 135, 190, 0.02)
      );
  }
}


/* ==========================================================================
   9B. EXPLICIT DARK PAGE OVERRIDE
   ========================================================================== */

html[data-color-scheme="dark"] .site-footer {
  --gfc-footer-bg: #0b0d12;
  --gfc-footer-surface: rgba(255, 255, 255, 0.05);
  --gfc-footer-surface-soft: rgba(255, 255, 255, 0.018);
  --gfc-footer-border: rgba(255, 255, 255, 0.12);
  --gfc-footer-text: #eaf2f7;
  --gfc-footer-muted: rgba(234, 242, 247, 0.75);
  --gfc-footer-accent: #5cc8ff;

  background:
    radial-gradient(
      1100px 380px at 18% -10%,
      rgba(92, 200, 255, 0.11),
      transparent 62%
    ),
    radial-gradient(
      760px 300px at 84% 0%,
      rgba(98, 230, 167, 0.055),
      transparent 60%
    ),
    var(--gfc-footer-bg);
}

html[data-color-scheme="dark"] .site-footer::before {
  opacity: 0.11;
  background-image:
    radial-gradient(
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px
    );
}

html[data-color-scheme="dark"] .footer-brand,
html[data-color-scheme="dark"] .footer-nav {
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-color-scheme="dark"] .brand-mark {
  border-color: rgba(92, 200, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

html[data-color-scheme="dark"] .site-footer .link-btn:hover {
  border-color: rgba(92, 200, 255, 0.26);
  background: rgba(92, 200, 255, 0.08);
}

html[data-color-scheme="dark"] .site-footer .footer-transparency-link {
  border-color: rgba(92, 200, 255, 0.16);
  background:
    linear-gradient(
      135deg,
      rgba(92, 200, 255, 0.09),
      rgba(92, 200, 255, 0.025)
    );
}


/* ==========================================================================
   9C. WHITEPAPER – FORCE CONSISTENT DARK FOOTER
   ========================================================================== */

.gfc-whitepaper-page .site-footer {
  --gfc-footer-bg: #0b0d12;
  --gfc-footer-surface: rgba(255, 255, 255, 0.05);
  --gfc-footer-surface-soft: rgba(255, 255, 255, 0.018);
  --gfc-footer-border: rgba(255, 255, 255, 0.12);
  --gfc-footer-text: #eaf2f7;
  --gfc-footer-muted: rgba(234, 242, 247, 0.75);
  --gfc-footer-accent: #5cc8ff;

  background:
    radial-gradient(
      1100px 380px at 18% -10%,
      rgba(92, 200, 255, 0.11),
      transparent 62%
    ),
    radial-gradient(
      760px 300px at 84% 0%,
      rgba(98, 230, 167, 0.055),
      transparent 60%
    ),
    var(--gfc-footer-bg);
}

.gfc-whitepaper-page .site-footer::before {
  opacity: 0.11;
  background-image:
    radial-gradient(
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px
    );
}

.gfc-whitepaper-page .footer-brand,
.gfc-whitepaper-page .footer-nav {
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gfc-whitepaper-page .brand-mark {
  border-color: rgba(92, 200, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.gfc-whitepaper-page .site-footer .link-btn:hover {
  border-color: rgba(92, 200, 255, 0.26);
  background: rgba(92, 200, 255, 0.08);
}

.gfc-whitepaper-page .site-footer .footer-transparency-link {
  border-color: rgba(92, 200, 255, 0.16);
  background:
    linear-gradient(
      135deg,
      rgba(92, 200, 255, 0.09),
      rgba(92, 200, 255, 0.025)
    );
}

/* ==========================================================================
   10. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .site-footer .link-btn {
    transition: none;
  }

  .site-footer .link-btn:hover {
    transform: none;
  }
}


/* ==========================================================================
   11. FORCED COLORS
   ========================================================================== */

@media (forced-colors: active) {
  .site-footer {
    border-block-start: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .site-footer::before,
  .site-footer::after {
    display: none;
  }

  .footer-brand,
  .footer-nav,
  .brand-mark {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-footer .link-btn {
    border: 1px solid ButtonText;
    background: Canvas;
    color: CanvasText;
  }

  .site-footer .link-btn:hover,
  .site-footer .link-btn:focus-visible {
    background: Highlight;
    color: HighlightText;
  }
}


/* ==========================================================================
   12. PRINT
   ========================================================================== */

@media print {
  .site-footer {
    border-block-start: 1px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .site-footer::before,
  .site-footer::after {
    display: none !important;
  }

  .footer-inner {
    display: block !important;
    padding-block: 1rem !important;
  }

  .footer-brand {
    border: 1px solid #000000 !important;
    background: none !important;
    color: #000000 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .footer-brand,
  .footer-brand .muted,
  .brand-name,
  .brand-abbr {
    color: #000000 !important;
  }

  .brand-mark {
    border-color: #000000 !important;
    background: none !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  .footer-nav {
    display: none !important;
  }
}