/* LifeByLogic global footer v3. Transparent safety rail on the shared black canvas. */

.lbl-footer-after {
  --lbl-footer-accent: #5EC4C9;
  --lbl-footer-accent-ink: #0B0D12;
  --lbl-footer-text: var(--text, #F4F2ED);
  --lbl-footer-muted: var(--text-tertiary, #B4BAC8);
  --lbl-footer-subtle: var(--text-muted, #8E96A8);
  --lbl-footer-border: var(--border-subtle, rgba(244, 242, 237, 0.12));
  --lbl-footer-surface: rgba(255, 255, 255, 0.025);
  --lbl-footer-radius: 8px;
  position: relative;
  left: 50%;
  width: min(1200px, calc(100vw - 40px));
  transform: translateX(-50%);
  color: var(--lbl-footer-text);
  font-family: var(--font-body, "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.lbl-footer-after--compact {
  width: min(960px, calc(100vw - 40px));
}

.lbl-global-footer-standalone {
  margin: 0 auto;
  padding: clamp(48px, 7vw, 84px) 0 clamp(28px, 5vw, 56px);
  border-top: 1px solid rgba(244, 242, 237, 0.12);
}

/* Canonical newsletter and publication mark for premium report landings. */
.lbl-report-footer .footer-colophon {
  margin: 0 0 clamp(48px, 6vw, 72px);
  padding: 0 20px clamp(48px, 6vw, 72px);
  border-bottom: 1px solid rgba(244, 242, 237, 0.12);
  text-align: center;
}

.lbl-report-footer .footer-mark {
  margin: 0 0 22px;
}

.lbl-report-footer .footer-mark-svg {
  display: block;
  width: auto;
  height: clamp(28px, 3vw, 32px);
  margin: 0 auto;
  color: var(--text, #F4F2ED);
}

.lbl-report-footer .footer-motto {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-muted, #8E96A8);
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(14px, 13px + 0.2vw, 16px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
}

.lbl-footer-after *,
.lbl-footer-after *::before,
.lbl-footer-after *::after {
  box-sizing: border-box;
}

.lbl-footer-directory {
  margin: 0 0 clamp(36px, 5vw, 56px);
}

.lbl-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 52px);
}

.lbl-footer-group {
  min-width: 0;
  margin: 0;
  border: 0;
}

.lbl-footer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--lbl-footer-border);
  color: var(--lbl-footer-subtle);
  cursor: default;
  list-style: none;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: clamp(11px, 10px + 0.25vw, 13px);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.lbl-footer-summary::-webkit-details-marker {
  display: none;
}

.lbl-footer-summary::after {
  content: "";
  display: none;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.lbl-footer-list {
  display: grid;
  gap: 3px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.lbl-footer-link,
.lbl-footer-action,
.lbl-footer-meta-link,
.lbl-footer-social-link {
  border-radius: var(--lbl-footer-radius);
  color: var(--lbl-footer-muted);
  text-decoration: none;
  background-color: transparent;
  background-image: linear-gradient(var(--lbl-footer-accent), var(--lbl-footer-accent));
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition:
    background-size 420ms cubic-bezier(0.16, 1, 0.3, 1),
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.lbl-footer-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  font-size: clamp(14px, 13px + 0.2vw, 16px);
  line-height: 1.45;
}

.lbl-footer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.lbl-footer-meta-link,
.lbl-footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

@media (hover: hover) {
  .lbl-footer-link:hover,
  .lbl-footer-action:hover,
  .lbl-footer-meta-link:hover,
  .lbl-footer-social-link:hover {
    background-size: 100% 100%;
    color: var(--lbl-footer-accent-ink);
    transform: translateY(-1px);
  }
}

.lbl-footer-link:focus-visible,
.lbl-footer-action:focus-visible,
.lbl-footer-meta-link:focus-visible,
.lbl-footer-social-link:focus-visible {
  background-size: 100% 100%;
  color: var(--lbl-footer-accent-ink);
  outline: 2px solid #F4F2ED;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(94, 196, 201, 0.22);
}

.lbl-footer-link:active,
.lbl-footer-action:active,
.lbl-footer-meta-link:active,
.lbl-footer-social-link:active {
  background-size: 100% 100%;
  color: var(--lbl-footer-accent-ink);
  transform: none;
}

.lbl-footer-safety {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 18px 24px;
  margin: 0 0 clamp(30px, 4vw, 46px);
  padding: clamp(20px, 3vw, 30px) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.lbl-footer-safety-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  align-self: center;
  border: 1px solid var(--lbl-footer-accent);
  border-radius: 50%;
  color: var(--lbl-footer-accent);
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
}

.lbl-footer-safety-copy {
  width: min(100%, 66ch);
}

.lbl-footer-safety-title {
  margin: 0 0 5px;
  color: var(--lbl-footer-text);
  font-size: clamp(15px, 14px + 0.25vw, 17px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.lbl-footer-safety-copy p {
  max-width: 66ch;
  margin: 0 auto;
  color: var(--lbl-footer-muted);
  font-size: clamp(13px, 12px + 0.2vw, 15px);
  line-height: 1.6;
}

.lbl-footer-safety-copy .lbl-footer-privacy-note {
  margin-top: 8px;
  color: var(--lbl-footer-subtle);
  font-size: clamp(12px, 11px + 0.15vw, 13px);
}

.lbl-footer-safety-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: none;
  gap: 6px;
}

.lbl-footer-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--lbl-footer-border);
}

.lbl-footer-meta-copy {
  display: grid;
  gap: 10px;
  max-width: 78ch;
}

.lbl-footer-brand-line,
.lbl-footer-company-line {
  margin: 0;
}

.lbl-footer-brand-line {
  color: var(--lbl-footer-subtle);
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: clamp(11px, 10px + 0.2vw, 13px);
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.lbl-footer-company-line {
  color: var(--lbl-footer-muted);
  font-size: clamp(12px, 11px + 0.2vw, 14px);
  line-height: 1.65;
}

.lbl-footer-inline-link {
  display: inline-block;
  margin: -2px -3px;
  padding: 2px 3px;
  border-radius: 4px;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(94, 196, 201, 0.65);
  text-underline-offset: 3px;
  background-image: linear-gradient(var(--lbl-footer-accent), var(--lbl-footer-accent));
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 420ms cubic-bezier(0.16, 1, 0.3, 1), color 220ms ease;
}

@media (hover: hover) {
  .lbl-footer-inline-link:hover {
    background-size: 100% 100%;
    color: var(--lbl-footer-accent-ink);
    text-decoration-color: transparent;
  }
}

.lbl-footer-inline-link:focus-visible {
  background-size: 100% 100%;
  color: var(--lbl-footer-accent-ink);
  outline: 2px solid #F4F2ED;
  outline-offset: 2px;
  text-decoration-color: transparent;
}

.lbl-footer-meta-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.lbl-footer-legal,
.lbl-footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.lbl-footer-compact-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--lbl-footer-border);
}

.lbl-footer-meta--compact {
  align-items: center;
  padding-top: 0;
  border-top: 0;
}

.lbl-footer-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.lbl-footer-reveal-item {
  opacity: 1;
  transform: none;
}

@keyframes lbl-footer-scroll-reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progressive enhancement: unsupported browsers render the footer immediately. */
@supports (animation-timeline: view()) {
  .lbl-footer-reveal-item {
    animation-name: lbl-footer-scroll-reveal;
    animation-duration: 1ms;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 0% entry 42%;
  }
}

@media (max-width: 960px) {
  .lbl-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lbl-footer-meta {
    grid-template-columns: 1fr;
  }

  .lbl-footer-meta-actions {
    justify-items: start;
  }

  .lbl-footer-legal,
  .lbl-footer-social {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .lbl-footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .lbl-footer-group {
    border-bottom: 1px solid var(--lbl-footer-border);
  }

  .lbl-footer-group:first-child {
    border-top: 1px solid var(--lbl-footer-border);
  }

  .lbl-footer-summary {
    min-height: 52px;
    padding: 12px;
    border-bottom: 0;
    border-radius: var(--lbl-footer-radius);
    cursor: pointer;
    background-image: linear-gradient(var(--lbl-footer-accent), var(--lbl-footer-accent));
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 0% 100%;
    transition: background-size 420ms cubic-bezier(0.16, 1, 0.3, 1), color 220ms ease;
  }

  .lbl-footer-summary::after {
    display: block;
  }

  .lbl-footer-group[open] > .lbl-footer-summary::after {
    transform: rotate(-135deg);
  }

  @media (hover: hover) {
    .lbl-footer-summary:hover {
      background-size: 100% 100%;
      color: var(--lbl-footer-accent-ink);
    }
  }

  .lbl-footer-summary:focus-visible {
    background-size: 100% 100%;
    color: var(--lbl-footer-accent-ink);
    outline: 2px solid #F4F2ED;
    outline-offset: -2px;
  }

  .lbl-footer-list {
    gap: 2px;
    margin: 0;
    padding: 0 0 14px;
  }

  .lbl-footer-link,
  .lbl-footer-action,
  .lbl-footer-meta-link,
  .lbl-footer-social-link {
    min-height: 48px;
  }

  .lbl-footer-safety {
    grid-template-columns: 1fr;
  }

  .lbl-footer-safety-actions {
    grid-column: 1;
    display: grid;
    justify-self: center;
    justify-content: stretch;
    width: 100%;
    max-width: 390px;
  }

  .lbl-footer-action {
    justify-content: center;
  }

  .lbl-footer-meta-actions,
  .lbl-footer-legal,
  .lbl-footer-social {
    width: 100%;
  }

  .lbl-footer-meta-link,
  .lbl-footer-social-link {
    flex: 1 1 auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .lbl-footer-after *,
  .lbl-footer-after *::before,
  .lbl-footer-after *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .lbl-footer-reveal-item {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
