/* =============================================================================
   Scalient – Footer Styles
   Covers: newsletter banner, four-column grid, social links,
           contact list, footer nav, bottom bar, back-to-top.
   ============================================================================= */

/* ── 1. Site Footer wrapper ──────────────────────────────────────────────── */
.site-footer {
  position: relative;
  background-color: var(--clr-bg-secondary);
  border-top: 1px solid var(--clr-border);
  overflow: hidden;
}

/* ── 2. Newsletter Banner ────────────────────────────────────────────────── */
.footer-newsletter {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.12) 0%, rgba(0, 212, 170, 0.06) 100%);
  border-bottom: 1px solid var(--clr-border);
  padding: var(--sp-12) 0;
}

.footer-newsletter__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-10);
}

.footer-newsletter__text {
  flex: 1;
  max-width: 480px;
}

.footer-newsletter__title {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  margin-bottom: var(--sp-2);
  line-height: var(--lh-snug);
}

.footer-newsletter__sub {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  margin: 0;
}

/* Newsletter form inside the footer */
.footer-newsletter .newsletter-form {
  display: flex;
  gap: var(--sp-3);
  flex: 1;
  max-width: 440px;
}

.footer-newsletter .newsletter-form .form-input {
  flex: 1;
  min-width: 0;
  border-radius: var(--r-full);
  padding-inline: 1.5rem;
  height: 50px;
  font-size: var(--text-sm);
}

.footer-newsletter .newsletter-form .btn {
  white-space: nowrap;
  height: 50px;
  padding-inline: 1.5rem;
}

.footer-newsletter .newsletter-status {
  font-size: var(--text-sm);
  margin-top: var(--sp-3);
}

.footer-newsletter .newsletter-status--success {
  color: var(--clr-accent);
}

.footer-newsletter .newsletter-status--error {
  color: #ff6b6b;
}

/* ── 3. Footer Main Grid ─────────────────────────────────────────────────── */
.footer-main {
  padding: var(--sp-20) 0 var(--sp-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}

/* ── 4. Footer Columns ───────────────────────────────────────────────────── */
.footer-col__title {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-white);
  margin-bottom: var(--sp-5);
}

/* ── 5. Brand column ────────────────────────────────────────────────────── */
.footer-col--brand {
  padding-right: var(--sp-8);
}

/* Footer logo */
.footer-logo {
  display: inline-block;
  margin-bottom: var(--sp-5);
  text-decoration: none;
}

.footer-logo__img {
  height: 36px;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.footer-logo:hover .footer-logo__img {
  opacity: 1;
}

.footer-logo__text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.04em;
  color: var(--clr-white);
  background: var(--clr-gradient-cta);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-col__desc {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-6);
  max-width: 32ch;
}

/* ── 6. Contact list ────────────────────────────────────────────────────── */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
}

.footer-contact__icon {
  display: flex;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--clr-primary);
}

.footer-contact a {
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-contact a:hover {
  color: var(--clr-white);
}

.footer-contact address {
  font-style: normal;
}

/* ── 7. Footer Social ────────────────────────────────────────────────────── */
.footer-social {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  text-decoration: none;
  transition:
    color        var(--dur-fast) var(--ease-out),
    background   var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform    var(--dur-fast) var(--ease-out);
}

.footer-social__link:hover {
  color: var(--clr-white);
  background: rgba(108, 99, 255, 0.15);
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-2px);
}

/* ── 8. Footer Navigation ────────────────────────────────────────────────── */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  display: block;
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  line-height: 1.4;
}

.footer-nav a::before {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--clr-primary);
  border-radius: var(--r-full);
  transition: width var(--dur-base) var(--ease-out);
  flex-shrink: 0;
}

.footer-nav a:hover {
  color: var(--clr-white);
}

.footer-nav a:hover::before {
  width: 12px;
}

/* Current item in footer nav */
.footer-nav .current-menu-item > a,
.footer-nav .current_page_item > a {
  color: var(--clr-primary);
}

/* ── 9. Footer Bottom Bar ────────────────────────────────────────────────── */
.footer-bottom {
  border-top: 1px solid var(--clr-border);
  padding: var(--sp-6) 0;
}

.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

.footer-bottom__copy {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  margin: 0;
}

.footer-bottom__links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer-bottom__links a {
  font-size: var(--text-xs);
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-bottom__links a:hover {
  color: var(--clr-white);
}

.footer-bottom__sep {
  color: var(--clr-border-light);
  font-size: var(--text-xs);
}

/* ── 10. Back to Top ─────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: var(--r-full);
  background: rgba(108, 99, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(108, 99, 255, 0.6);
  color: var(--clr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition:
    opacity    var(--dur-base) var(--ease-out),
    visibility var(--dur-base),
    transform  var(--dur-base) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

/* Rotate the chevron-down icon to point up */
.back-to-top svg {
  transform: rotate(180deg);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--clr-primary);
  box-shadow: 0 0 24px var(--clr-primary-glow);
  transform: translateY(-3px);
}

.back-to-top:active {
  transform: translateY(0);
}

/* ── 11. Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-10);
  }

  .footer-col--brand {
    grid-column: 1 / -1;
    padding-right: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6) var(--sp-10);
    align-items: start;
  }

  .footer-col--brand .footer-logo,
  .footer-col--brand .footer-col__desc {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .footer-newsletter__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-6);
  }

  .footer-newsletter .newsletter-form {
    max-width: 100%;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .footer-col--brand {
    grid-column: auto;
    display: block;
  }

  .footer-col--brand .footer-logo,
  .footer-col--brand .footer-col__desc {
    grid-column: auto;
  }

  .footer-bottom__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
  }

  .footer-main {
    padding: var(--sp-12) 0 var(--sp-10);
  }
}

@media (max-width: 480px) {
  .footer-newsletter .newsletter-form {
    flex-direction: column;
  }

  .footer-newsletter .newsletter-form .btn {
    width: 100%;
    justify-content: center;
  }

  .back-to-top {
    bottom: var(--sp-5);
    right: var(--sp-5);
    width: 44px;
    height: 44px;
  }
}
