/* ===================================================
   TaskMasters v2 — Footer
   Quiet Ledger design system.
   Loaded by footer.php.
   Depends on: tokens.css (must be loaded first).
   =================================================== */

.tm-v2-footer {
  position: relative;
  padding: clamp(64px, 8vh, 96px) 0 clamp(28px, 3vh, 36px);
  background: var(--tm-navy);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--tm-font-body);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tm-v2-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 56px);
}

.tm-v2-footer__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.2fr 0.9fr;
  gap: clamp(28px, 4vw, 56px);
  margin-bottom: clamp(40px, 5vh, 56px);
  align-items: start;
}

/* ── Columns ── */
.tm-v2-footer__col--brand .tm-v2-footer__brand {
  display: inline-block;
  text-decoration: none;
}

.tm-v2-footer__logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin-bottom: 14px;
}

.tm-v2-footer__tagline {
  margin: 0;
  max-width: 320px;
  font-family: var(--tm-font-display);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

/* ── Column heading ── */
.tm-v2-footer__heading {
  margin: 0 0 18px;
  font-family: var(--tm-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--tm-emerald);
}

/* ── Link lists ── */
.tm-v2-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tm-v2-footer__list li {
  margin-bottom: 10px;
}

.tm-v2-footer__list li:last-child {
  margin-bottom: 0;
}

.tm-v2-footer__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--tm-font-body);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.tm-v2-footer__list a:hover {
  color: #FFFFFF;
  transform: translateX(3px);
}

.tm-v2-footer__list--icons a {
  font-weight: 500;
}

.tm-v2-footer__contact-icon {
  color: var(--tm-emerald);
  font-size: 0.95rem;
  line-height: 1;
  transition: color 180ms ease;
}

.tm-v2-footer__list a:hover .tm-v2-footer__contact-icon {
  color: var(--tm-gold);
}

.tm-v2-footer__muted {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.88rem;
}

/* ── Audience toggle (stacked, footer-context) ── */
.tm-v2-footer-audience {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-v2-footer-audience__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--tm-radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.tm-v2-footer-audience__btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.20);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.tm-v2-footer-audience__btn.is-active {
  background: rgba(15, 157, 110, 0.10);
  border-color: rgba(15, 157, 110, 0.42);
  color: #FFFFFF;
  cursor: default;
}

.tm-v2-footer-audience__btn.is-active:hover {
  transform: none;
}

.tm-v2-footer-audience__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--tm-radius-md);
  background: rgba(15, 157, 110, 0.12);
  color: var(--tm-emerald);
  font-size: 1.05rem;
  line-height: 1;
}

.tm-v2-footer-audience__btn.is-active .tm-v2-footer-audience__icon {
  background: var(--tm-emerald);
  color: #FFFFFF;
}

.tm-v2-footer-audience__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tm-v2-footer-audience__title {
  font-family: var(--tm-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: inherit;
}

.tm-v2-footer-audience__sub {
  font-family: var(--tm-font-body);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.52);
}

.tm-v2-footer-audience__btn.is-active .tm-v2-footer-audience__sub {
  color: rgba(255, 255, 255, 0.68);
}

/* ── Footer Bottom ── */
.tm-v2-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: clamp(20px, 2.5vh, 28px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tm-v2-footer__copy,
.tm-v2-footer__tag {
  margin: 0;
  font-family: var(--tm-font-body);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.48);
}

.tm-v2-footer__tag {
  font-style: italic;
}

/* ── Screen-reader only ── */
.tm-v2-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .tm-v2-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }

  .tm-v2-footer__col--brand {
    grid-column: 1 / -1;
  }

  .tm-v2-footer__col--audience {
    grid-column: 1 / -1;
  }

  .tm-v2-footer-audience {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .tm-v2-footer-audience__btn {
    flex: 1 1 240px;
  }
}

@media (max-width: 560px) {
  .tm-v2-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .tm-v2-footer__col--brand,
  .tm-v2-footer__col--audience {
    grid-column: auto;
  }

  .tm-v2-footer-audience {
    flex-direction: row;
    gap: 8px;
  }

  .tm-v2-footer-audience__btn {
    flex: 1 1 0;
    padding: 10px 12px;
    gap: 10px;
  }

  .tm-v2-footer-audience__icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .tm-v2-footer-audience__title {
    font-size: 0.82rem;
  }

  .tm-v2-footer-audience__sub {
    font-size: 0.7rem;
  }

  .tm-v2-footer__list a:hover,
  .tm-v2-footer-audience__btn:hover {
    transform: none;
  }

  .tm-v2-footer__col--links .tm-v2-footer__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
  }

  .tm-v2-footer__col--links .tm-v2-footer__list li {
    margin-bottom: 0;
  }

  .tm-v2-footer__bottom {
    justify-content: center;
    text-align: center;
  }
}
