/* ==========================================================================
   footer.css — Pie de página
   ========================================================================== */

footer {
  background: var(--sage);
  color: #fff;
  padding: clamp(64px, 7vw, 88px) 0 clamp(28px, 3vw, 40px);
  overflow-x: clip;
  max-width: 100%;
  font-family: var(--sans);
}

footer .wrap {
  width: min(var(--maxw), calc(100% - (var(--frame-gutter) * 2)));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 48px) clamp(24px, 3vw, 40px);
  align-items: start;
  padding-bottom: clamp(36px, 4vw, 52px);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.foot-grid > div {
  min-width: 0;
}

.foot-brand {
  padding-right: clamp(0px, 2vw, 24px);
}

.foot-logo {
  width: clamp(108px, 9vw, 132px);
  height: auto;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  margin: 0 0 18px;
  line-height: 0;
}

.foot-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.foot-desc {
  font-size: .92rem;
  font-weight: var(--fw-body);
  max-width: 34ch;
  line-height: 1.65;
  letter-spacing: .01em;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin: 0;
  color: #fff;
}

footer h4 {
  color: #fff;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 14px;
  font-weight: 700;
  line-height: 1.15;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

footer ul a {
  font-size: .9rem;
  font-weight: var(--fw-body);
  line-height: 1.35;
  letter-spacing: .01em;
  color: #fff;
  text-decoration: none;
  transition: opacity .2s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
}

footer ul a:hover {
  color: #fff;
  opacity: .78;
}

.foot-social {
  margin-top: 8px;
  padding-top: 2px;
}

.foot-social-list {
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 8px !important;
  align-items: center;
}

.foot-social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: transparent;
  color: #fff;
  font-size: .92rem;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.foot-social-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .55);
  transform: translateY(-1px);
  opacity: 1;
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(22px, 2.5vw, 28px);
  font-size: .78rem;
  font-weight: var(--fw-body);
  letter-spacing: .015em;
  flex-wrap: wrap;
  gap: 12px 28px;
  line-height: 1.55;
  color: #fff;
}

.foot-bottom span {
  min-width: 0;
  max-width: 100%;
  color: #fff;
}

.foot-bottom a {
  color: #fff;
  text-decoration: none;
  transition: opacity .2s ease;
}

.foot-bottom a:hover {
  color: #fff;
  opacity: .78;
}

/* ---- Footer responsive ---- */
@media (max-width: 900px) {
  footer {
    padding: 56px 0 28px;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
    padding-bottom: 36px;
  }

  .foot-brand {
    grid-column: 1 / -1;
    max-width: 32rem;
    padding-right: 0;
  }

  footer h4 {
    margin-bottom: 12px;
    font-weight: 700;
  }

  footer ul {
    gap: 2px;
  }

  footer ul a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 10px;
  }

  footer ul a,
  .foot-desc {
    font-size: .88rem;
  }

  .foot-logo {
    width: 110px;
    margin-bottom: 14px;
  }

  .foot-social-list a {
    width: 44px;
    height: 44px;
    font-size: .95rem;
  }

  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  footer {
    padding: 64px 0 max(32px, env(safe-area-inset-bottom, 0px));
    text-align: center;
    background:
      radial-gradient(ellipse 90% 55% at 50% 0%, rgba(255, 255, 255, .1), transparent 58%),
      linear-gradient(180deg, #9f9f8c 0%, var(--sage) 38%, #9a9a87 100%);
  }

  footer .wrap {
    width: min(var(--maxw), calc(100% - 40px));
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 16px;
    padding-bottom: 36px;
    border-bottom-color: rgba(255, 255, 255, .22);
    justify-items: stretch;
  }

  .foot-brand {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 26rem;
    margin-inline: auto;
    padding: 0 0 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .foot-col {
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
  }

  .foot-logo {
    width: 128px;
    margin: 0 auto 18px;
  }

  .foot-desc {
    max-width: 34ch;
    margin-inline: auto;
    font-size: .9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .92);
  }

  footer h4 {
    font-size: .7rem;
    letter-spacing: .2em;
    margin: 0 0 10px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  footer h4::after {
    content: "";
    width: 28px;
    height: 1px;
    background: rgba(255, 255, 255, .45);
  }

  footer ul {
    align-items: center;
    gap: 0;
    width: 100%;
  }

  footer ul a {
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding-block: 5px;
    font-size: .88rem;
    letter-spacing: .01em;
    line-height: 1.35;
  }

  .foot-col-contact {
    grid-column: 1 / -1;
    max-width: 22rem;
    margin-inline: auto;
    margin-top: 4px;
  }

  .foot-social {
    margin-top: 10px;
    padding-top: 2px;
    width: 100%;
  }

  .foot-social-list {
    justify-content: center;
    gap: 12px !important;
  }

  .foot-social-list a {
    width: 46px;
    height: 46px;
    font-size: 1rem;
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .06);
  }

  .foot-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding-top: 24px;
    max-width: 28rem;
    margin-inline: auto;
  }

  .foot-bottom span {
    display: block;
    line-height: 1.65;
    color: rgba(255, 255, 255, .88);
  }

  .foot-bottom span:first-child {
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 600;
    color: #fff;
  }

  .foot-bottom span:last-child {
    font-size: .78rem;
    max-width: 22rem;
    margin-inline: auto;
    line-height: 1.8;
  }

  .foot-bottom a {
    display: inline;
    min-height: 0;
    padding-block: 0;
  }
}

@media (max-width: 560px) {
  footer {
    padding: 56px 0 max(28px, env(safe-area-inset-bottom, 0px));
  }

  footer .wrap {
    width: min(var(--maxw), calc(100% - 32px));
  }

  .foot-grid {
    gap: 24px 12px;
    padding-bottom: 32px;
  }

  .foot-logo {
    width: 118px;
  }

  .foot-desc {
    font-size: .88rem;
  }

  footer ul a {
    font-size: .84rem;
    padding-inline: 4px;
  }

  .foot-bottom {
    padding-top: 22px;
  }
}

@media (max-width: 400px) {
  footer .wrap {
    width: min(var(--maxw), calc(100% - 28px));
  }

  .foot-brand {
    max-width: 100%;
  }

  .foot-col-contact {
    max-width: 100%;
  }
}
