/* Footer – v2: content on animated bg band; caption in solid black band. Order: left = project, middle = brand+socials, right = policy */

.w3s-footer {
  position: relative;
  overflow: hidden;
}

/* Main content band: no line, no solid background; footer right after section 4 */
.w3s-footer__band {
  padding: 5rem 1.5rem 5rem;
  background: transparent;
}

/* Same width as navbar for visual consistency */
.w3s-footer .w3s-footer__container {
  width: calc(100% - 160px);
  max-width: 1400px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* Grid: match v1 – center auto-sized so side columns get equal remaining space (less wrapping). */
.w3s-footer__content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  justify-items: center;
  align-items: start;
}

.w3s-footer__top-row {
  display: contents;
}

/* Desktop: center shrinks first on zoom/narrow; left/right keep min width so text doesn't wrap */
.w3s-footer__column.w3s-footer__brand {
  min-width: 0;
}

.w3s-footer__column:not(.w3s-footer__brand) {
  min-width: 200px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: left;
  justify-content: center;
}

.w3s-footer__column {
  text-align: center;
}

/* Match v1: 14px heading, no letter-spacing (v1 has none – reduces wrapping). */
.w3s-footer__heading {
  font-family: "Geom", system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.95);
  margin: 0 0 1rem;
  font-size: var(--fs-body);
}

/* Match v1: 12px body text so "Whitepaper (soon)" fits on one line like v1. */
.w3s-footer__text {
  font-family: inherit;
  color: rgba(226, 232, 240, 0.75);
  margin: 0 0 0.5rem;
  font-size: var(--fs-small);
}

.w3s-footer__text a {
  color: rgba(226, 232, 240, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
}

.w3s-footer__text a:hover {
  color: #39d091;
}

.w3s-footer__emoji {
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

.w3s-footer__heading .w3s-footer__emoji {
  font-size: 0.7em; /* match v1: compact bar aligned to heading line */
  letter-spacing: 0;
}

.w3s-footer__text .w3s-footer__emoji {
  font-size: 0.7em;
}

.w3s-footer__logo-image,
.w3s-footer__badge-image {
  height: 120px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* Don’t stretch: contain only, natural size */
.w3s-footer__brand-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.w3s-footer__social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: flex-start;
  margin-top: 0.75rem;
}

.w3s-footer .w3s-footer__social-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.w3s-footer .w3s-footer__social-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.w3s-footer .w3s-footer__social-btn:focus-visible {
  outline: 2px solid #39d091;
  outline-offset: 2px;
  border-radius: 8px;
}

.w3s-footer .w3s-footer__social-icon {
  width: clamp(24px, 2.5rem, 36px);
  height: clamp(24px, 2.5rem, 36px);
  max-width: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.w3s-footer .w3s-footer__social-btn--locked {
  position: relative;
  cursor: default;
}

.w3s-footer .w3s-footer__tooltip-locked {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid rgba(57, 208, 145, 0.5);
  color: rgba(226, 232, 240, 0.9);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.w3s-footer .w3s-footer__social-btn--locked:hover .w3s-footer__tooltip-locked {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.w3s-footer .w3s-footer__tooltip-locked.w3s-footer__tooltip-locked--visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Caption in solid black band at far bottom */
.w3s-footer__bottom {
  width: 100%;
  background: #000000;
  text-align: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(57, 208, 145, 0.2);
}

.w3s-footer__caption {
  margin: 0;
  color: rgba(226, 232, 240, 0.6);
  font-size: var(--fs-body);
}

/* Container: narrower on smaller viewports (align with navbar) */
@media (max-width: 1024px) {
  .w3s-footer .w3s-footer__container {
    width: calc(100% - 48px);
  }
}

/* Mobile (≤700px): only brand + socials + copyright; match v1 layout and sizing */
@media (max-width: 700px) {
  .w3s-footer__top-row {
    display: none;
  }

  .w3s-footer__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .w3s-footer__brand {
    order: 0;
    margin: 1rem 0;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .w3s-footer__brand-image {
    width: 280px;
    max-width: 80%;
    height: auto;
  }

  .w3s-footer__social {
    margin-top: 0.625rem;
    gap: 12px;
  }

  .w3s-footer__band {
    padding: 3rem 1.5rem 3rem;
  }
}

/* Tablet (701px–1024px): 2-col top row (project | policy), brand below centered */
@media (min-width: 701px) and (max-width: 1024px) {
  .w3s-footer__content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .w3s-footer__top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    justify-items: center;
  }

  .w3s-footer__column:not(.w3s-footer__brand) {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    width: 100%;
    max-width: 100%;
    min-width: min-content;
  }

  /* Keep "Opt-in Protection Policy" on one line; column grows to fit (no max-width cap). */
  .w3s-footer__column:not(.w3s-footer__brand) .w3s-footer__heading {
    white-space: nowrap;
  }

  .w3s-footer__brand {
    order: 3;
    margin-top: 1rem;
  }

  .w3s-footer__brand-image {
    width: clamp(280px, 50vw, 480px);
    height: auto;
  }

  .w3s-footer__logo-image,
  .w3s-footer__badge-image {
    height: 100px;
  }
}

/* Desktop (≥1025px): 3-col layout, center auto (v1: 1fr auto 1fr) so side cols have room */
@media (min-width: 1025px) {
  .w3s-footer__content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    gap: 2rem;
  }

  .w3s-footer__top-row {
    display: contents;
  }

  .w3s-footer__top-row > .w3s-footer__column:first-child {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
  }

  .w3s-footer__top-row > .w3s-footer__column:last-child {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
  }

  .w3s-footer__brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
  }

  .w3s-footer__column:not(.w3s-footer__brand) {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    justify-content: center;
  }

  .w3s-footer__brand-image {
    width: clamp(260px, 36vw, 420px);
    height: auto;
  }
}
