/* ==========================================================================
   Himalayan Trails — footer
   ========================================================================== */

.ht-footer {
  background: var(--ht-pine-950);
  color: var(--ht-text-inverse-muted);
  font-size: var(--ht-text-base);
}

/*
 * Explicit column counts per breakpoint. The previous auto-fit track list gave
 * the brand block a 1.4fr column that auto-fit then tried to sit columns beside
 * on a 375px screen, so the "Treks" heading landed on top of the brand name.
 */
.ht-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  padding-block: var(--ht-section-y-tight);
}

@media (min-width: 34rem) {
  .ht-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The brand paragraph reads better across the full width than squeezed into
     one half above three short link lists. */
  .ht-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 62rem) {
  .ht-footer__top {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  }

  .ht-footer__brand {
    grid-column: auto;
  }
}

.ht-footer__brand .ht-brand__name {
  color: var(--ht-text-inverse);
}

.ht-footer__brand .ht-brand__mark {
  color: var(--ht-clay-400);
}

.ht-footer__brand .ht-brand__tagline {
  color: var(--ht-pine-300);
}

.ht-footer__about {
  margin-top: var(--ht-space-5);
  max-width: 34ch;
  line-height: var(--ht-leading-relaxed);
}

.ht-footer__heading {
  margin-bottom: var(--ht-space-4);
  font-size: var(--ht-text-xs);
  font-weight: 600;
  letter-spacing: var(--ht-tracking-caps);
  text-transform: uppercase;
  color: var(--ht-text-inverse);
}

.ht-footer__list {
  display: grid;
  gap: var(--ht-space-3);
}

.ht-footer__list a {
  display: inline-block;
  padding-block: 0.125rem;
  transition: color var(--ht-duration-fast) var(--ht-ease);
}

.ht-footer__list a:hover {
  color: var(--ht-white);
}

.ht-footer__contact {
  display: grid;
  gap: var(--ht-space-4);
}

.ht-footer__contact a,
.ht-footer__contact p {
  display: flex;
  align-items: flex-start;
  gap: var(--ht-space-3);
  line-height: var(--ht-leading-normal);
}

.ht-footer__contact svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  color: var(--ht-clay-400);
}

.ht-footer__social {
  display: flex;
  gap: var(--ht-space-2);
  margin-top: var(--ht-space-5);
}

.ht-footer__social a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ht-border-inverse);
  border-radius: var(--ht-radius-sm);
  transition: background-color var(--ht-duration-fast) var(--ht-ease), color var(--ht-duration-fast) var(--ht-ease);
}

.ht-footer__social a:hover {
  background: rgb(255 255 255 / 0.1);
  color: var(--ht-white);
}

.ht-footer__social svg {
  width: 1.125rem;
  height: 1.125rem;
}

.ht-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ht-space-4);
  padding-block: var(--ht-space-6);
  border-top: 1px solid var(--ht-border-inverse);
  font-size: var(--ht-text-sm);
}

.ht-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ht-space-2) var(--ht-space-5);
}

.ht-footer__credit {
  max-width: 60ch;
  padding-bottom: var(--ht-space-6);
  font-size: var(--ht-text-xs);
  line-height: var(--ht-leading-normal);
  color: rgb(242 239 232 / 0.5);
}

/*
 * The floating buttons sit bottom-right. A full-width 5.5rem bottom padding
 * kept them off the links but read as a dead band under the footer on a phone.
 * Instead the legal row keeps the buttons' column clear — links wrap before
 * the buttons and nothing below them is empty.
 */
@media (max-width: 47.9375rem) {
  .ht-footer__bottom {
    padding-right: 5rem;
  }
}

@media (max-width: 47.9375rem) {
  .ht-footer__list a,
  .ht-footer__legal a {
    padding-block: 0.5rem;
  }
}

@media (max-width: 47.9375rem) {
  .ht-footer__contact a {
    padding-block: 0.5rem;
  }
}

.ht-footer__brand .ht-brand__logo {
  height: 3rem;
  max-width: 14rem;
}

.ht-footer__dev { display: inline-block; margin-left: 0.75rem; padding-left: 0.75rem; border-left: 1px solid var(--ht-border-inverse); }
.ht-footer__dev a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
