/**
 * Site-wide footer — matches index.html markup.
 * Loaded separately so the footer always renders even if platform-enhancements.css is delayed.
 */
footer.footer {
  display: block;
  visibility: visible;
  position: relative;
  z-index: 2;
  width: 100%;
  clear: both;
  background: var(--dark-light, #080c14);
  padding: 80px 5% 30px;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--dark-border, #182030);
  box-sizing: border-box;
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}
.footer-brand {
  max-width: 350px;
}
.footer a.footer-logo {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text, #e8ecf4);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.footer .footer-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-1, linear-gradient(135deg, #00d4ff, #7b2fff));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--dark, #04060b);
  flex-shrink: 0;
}
.footer .footer-logo .logo-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.footer .footer-logo .logo-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-1, linear-gradient(135deg, #00d4ff, #7b2fff));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer .footer-logo .logo-sub {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-secondary, #a8b0c4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-brand p {
  color: var(--text-secondary, #a8b0c4);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}
.footer-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-social a {
  width: 45px;
  height: 45px;
  background: var(--dark-card, #0c1018);
  border: 1px solid var(--dark-border, #182030);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #a8b0c4);
  text-decoration: none;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.footer-social a:hover {
  background: var(--primary, #00d4ff);
  color: var(--dark, #04060b);
  border-color: var(--primary, #00d4ff);
}
.footer-column h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text, #e8ecf4);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li {
  margin-bottom: 0.75rem;
}
.footer-links a {
  color: var(--text-secondary, #a8b0c4);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}
.footer-links a:hover {
  color: var(--primary, #00d4ff);
}
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--dark-border, #182030);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom-left {
  flex: 1;
  min-width: min(100%, 22rem);
}
.footer-bottom-left .jm-footer-tagline {
  color: var(--text-secondary, #8892a4);
  font-size: 0.82rem;
  margin-top: 0.4rem;
}
.footer-bottom p {
  color: var(--text-secondary, #a8b0c4);
  font-size: 0.9rem;
  margin: 0;
}
.footer-legal {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-legal a {
  color: var(--text-secondary, #a8b0c4);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-legal a:hover {
  color: var(--primary, #00d4ff);
}

.footer .jm-footer-contact-plain {
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand {
    max-width: none;
  }
  .footer-social {
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-legal {
    justify-content: center;
  }
  .footer .jm-footer-contact-plain {
    text-align: center;
    align-items: center;
  }
  .footer .footer-logo {
    justify-content: center;
  }
  .footer .footer-logo .logo-text-block {
    text-align: center;
    align-items: center;
  }
}

/* Extra bottom space when mobile sticky CTA is visible (platform-enhancements.css) */
@media (max-width: 768px) {
  body:has(.jm-sticky-cta.jm-sticky-cta--visible) footer.footer {
    padding-bottom: max(4.35rem, calc(env(safe-area-inset-bottom) + 3.5rem)) !important;
  }
}
