/**
 * @file
 * 3D glass footer styles.
 */

.puya-footer {
  --puya-footer-bg: #0c0c0e;
  --puya-footer-panel: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(0, 0, 0, 0.22) 100%
  );
  --puya-footer-edge: rgba(255, 255, 255, 0.14);
  --puya-footer-text: #f3f5f8;
  --puya-footer-muted: rgba(243, 245, 248, 0.62);
  --puya-footer-depth: 0 12px 36px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
  position: relative;
  color: var(--puya-footer-text);
  background:
    radial-gradient(90% 60% at 85% 0%, rgba(var(--bs-primary-rgb), 0.16), transparent 45%),
    radial-gradient(70% 50% at 10% 20%, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--puya-footer-bg) !important;
  border-top: 1px solid var(--puya-footer-edge);
  padding: 1.5rem 0 1.25rem;
}

html[data-bs-theme="light"] .puya-footer,
[data-bs-theme="light"] .puya-footer {
  --puya-footer-bg: #f3f5f8;
  --puya-footer-panel: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.55) 55%,
    rgba(15, 23, 42, 0.04) 100%
  );
  --puya-footer-edge: rgba(15, 23, 42, 0.1);
  --puya-footer-text: #1a1d24;
  --puya-footer-muted: rgba(26, 29, 36, 0.58);
  --puya-footer-depth: 0 12px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(15, 23, 42, 0.05);
  background:
    radial-gradient(90% 60% at 85% 0%, rgba(var(--bs-primary-rgb), 0.08), transparent 45%),
    var(--puya-footer-bg) !important;
}

.puya-footer a {
  color: var(--puya-footer-text) !important;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.puya-footer a:hover {
  color: var(--bs-primary) !important;
}

.puya-footer-shell {
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.puya-footer-panel,
.puya-footer-top,
.puya-footer-tile,
.puya-footer-newsletter,
.puya-footer-main,
.puya-footer-bottom {
  position: relative;
  border: 1px solid var(--puya-footer-edge);
  border-radius: 1rem;
  background: var(--puya-footer-panel);
  box-shadow: var(--puya-footer-depth);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.puya-footer-top::before,
.puya-footer-tile::before,
.puya-footer-newsletter::before,
.puya-footer-main::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.14) 0%,
    transparent 32%,
    transparent 70%,
    rgba(255, 255, 255, 0.04) 100%
  );
  opacity: 0.55;
}

/* —— Top strip (preserved content) —— */
.puya-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
}

.puya-footer-top__brand,
.puya-footer-top__links,
.puya-footer-top__social {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.puya-footer-top__brand img {
  max-height: 48px;
  width: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
}

.puya-footer-top__links {
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.puya-footer-top__sep {
  width: 1px;
  height: 1rem;
  background: var(--puya-footer-edge);
}

.puya-footer-top__social {
  gap: 0.35rem;
  justify-content: flex-end;
}

.puya-footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: 1px solid var(--puya-footer-edge);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.puya-footer-social:hover {
  transform: translateY(-2px);
  background: rgba(var(--bs-primary-rgb), 0.2);
  box-shadow: 0 8px 18px rgba(var(--bs-primary-rgb), 0.25);
}

.puya-footer-social img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* —— Category tiles —— */
.puya-footer-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.puya-footer-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0.9rem;
  min-height: 7.25rem;
  overflow: hidden;
}

.puya-footer-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--bs-primary-rgb), 0.45);
  box-shadow:
    0 16px 34px rgba(var(--bs-primary-rgb), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: var(--puya-footer-text) !important;
}

.puya-footer-tile__icon,
.puya-footer-tile__title,
.puya-footer-tile__meta {
  position: relative;
  z-index: 1;
}

.puya-footer-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.25), transparent 45%),
    rgba(var(--bs-primary-rgb), 0.9);
  box-shadow: 0 8px 16px rgba(var(--bs-primary-rgb), 0.28);
  font-size: 1rem;
}

.puya-footer-tile__title {
  font-size: 0.98rem;
  font-weight: 700;
}

.puya-footer-tile__meta {
  font-size: 0.78rem;
  color: var(--puya-footer-muted) !important;
}

/* —— Newsletter CTA —— */
.puya-footer-newsletter {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
  align-items: center;
}

.puya-footer-newsletter__copy,
.puya-footer-newsletter__panel {
  position: relative;
  z-index: 1;
}

.puya-footer-newsletter__title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.puya-footer-newsletter__lead {
  margin: 0 0 0.85rem;
  color: var(--puya-footer-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.puya-footer-newsletter__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--puya-footer-muted);
}

.puya-footer-newsletter__stats li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.puya-footer-newsletter__stats i {
  color: var(--bs-primary);
}

.puya-footer-newsletter__panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--puya-footer-edge);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="light"] .puya-footer-newsletter__panel,
[data-bs-theme="light"] .puya-footer-newsletter__panel {
  background: rgba(255, 255, 255, 0.55);
}

.puya-footer-newsletter__panel-lead {
  margin: 0 0 0.15rem;
  font-size: 0.84rem;
  color: var(--puya-footer-muted);
}

.puya-footer-newsletter__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid var(--puya-footer-edge);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.puya-footer-newsletter__btn--primary {
  color: #fff !important;
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.95), rgba(var(--bs-primary-rgb), 0.7));
  box-shadow: 0 10px 22px rgba(var(--bs-primary-rgb), 0.28);
}

.puya-footer-newsletter__btn:hover {
  transform: translateY(-2px);
  color: #fff !important;
}

.puya-footer-newsletter__note {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--puya-footer-muted);
  line-height: 1.5;
}

/* —— Main brand + columns —— */
.puya-footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) 1.55fr;
  gap: 1.35rem;
  padding: 1.35rem 1.4rem;
}

/* Soften legacy site-footer link force-white inside glass footer */
.puya-footer .content a,
.puya-footer a {
  text-decoration: none;
}

.puya-footer-brand,
.puya-footer-cols {
  position: relative;
  z-index: 1;
}

.puya-footer-brand__head {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  color: var(--puya-footer-text) !important;
}

.puya-footer-brand__mark {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: contain;
  border-radius: 0.7rem;
  background: rgba(var(--bs-primary-rgb), 0.12);
  box-shadow: 0 8px 18px rgba(var(--bs-primary-rgb), 0.18);
}

.puya-footer-brand__name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.puya-footer-brand__text {
  margin: 0 0 1rem;
  color: var(--puya-footer-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 28rem;
}

.puya-footer-brand__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.puya-footer-brand__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: 1px solid var(--puya-footer-edge);
  background: rgba(255, 255, 255, 0.06);
  color: var(--puya-footer-text) !important;
}

.puya-footer-brand__social a:hover {
  background: rgba(var(--bs-primary-rgb), 0.85);
  color: #fff !important;
  transform: translateY(-2px);
}

.puya-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.puya-footer-col__title {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.puya-footer-col__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.puya-footer-col__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--puya-footer-muted) !important;
}

.puya-footer-col__list a:hover {
  color: var(--bs-primary) !important;
}

.puya-footer-col__list--starred a i {
  font-size: 0.7rem;
  color: var(--bs-primary);
  opacity: 0.9;
}

.puya-footer-lang-sep {
  margin: 0 0.35rem;
  color: var(--puya-footer-muted);
}

/* —— Bottom bar —— */
.puya-footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
}

.puya-footer-bottom__copy,
.puya-footer-bottom__tagline {
  margin: 0;
  font-size: 0.78rem;
  color: var(--puya-footer-muted);
}

.puya-footer-bottom__copy {
  justify-self: start;
}

.puya-footer-bottom__tagline {
  justify-self: end;
  text-align: end;
}

.puya-footer-topbtn {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--puya-footer-edge);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18), transparent 45%),
    rgba(var(--bs-primary-rgb), 0.88);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(var(--bs-primary-rgb), 0.28);
}

.puya-footer-topbtn:hover {
  transform: translateY(-2px);
  color: #fff !important;
}

@media (max-width: 1199.98px) {
  .puya-footer-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .puya-footer-newsletter,
  .puya-footer-main {
    grid-template-columns: 1fr;
  }

  .puya-footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .puya-footer-bottom {
    grid-template-columns: 1fr;
    border-radius: 1rem;
    text-align: center;
  }

  .puya-footer-bottom__copy,
  .puya-footer-bottom__tagline,
  .puya-footer-topbtn {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .puya-footer-tiles,
  .puya-footer-cols {
    grid-template-columns: 1fr;
  }

  .puya-footer-top {
    justify-content: center;
    text-align: center;
  }

  .puya-footer-top__social {
    justify-content: center;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .puya-footer-top,
  .puya-footer-tile,
  .puya-footer-newsletter,
  .puya-footer-main,
  .puya-footer-bottom {
    background: #17171a;
  }

  html[data-bs-theme="light"] .puya-footer-top,
  html[data-bs-theme="light"] .puya-footer-tile,
  html[data-bs-theme="light"] .puya-footer-newsletter,
  html[data-bs-theme="light"] .puya-footer-main,
  html[data-bs-theme="light"] .puya-footer-bottom {
    background: #ffffff;
  }
}
