:root {
  --magenta: #e0117f;
  --magenta-light: #ff3da0;
  --magenta-dim: rgba(224, 17, 127, 0.15);
  --navy: #0a0616;
  --navy-border: rgba(255, 255, 255, 0.07);
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --head: 'Syne', sans-serif;
}

/* Match index footer background regardless of page body/legacy styles */
footer {
  position: relative;
  isolation: isolate;
  background-color: rgba(0, 0, 0, 0.4) !important;
  background-image: none !important;
  border-top: 1px solid var(--navy-border);
  padding: 4rem 0 2rem;
  color: var(--white);
}

footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--navy);
  z-index: -1;
}

/* Reset legacy style.css footer grid rules */
footer .row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  font-size: inherit !important;
  width: 100% !important;
  margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
  margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
}

footer .row > [class*='col-'] {
  width: auto !important;
  max-width: 100%;
  margin-left: 0 !important;
  text-align: left !important;
}

footer .container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
  padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
}

footer .nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

footer .nav-logo img {
  height: 36px;
  width: auto;
}

footer .nav-logo span {
  font-family: var(--head);
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 280px;
  margin-top: 0.75rem;
}

.footer-col h5 {
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-left: 0;
  margin-bottom: 0;
}

.footer-col ul li {
  list-style: none;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  line-height: normal;
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul a:hover {
  color: var(--magenta-light);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.newsletter-form input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--navy-border);
  border-radius: 6px;
  color: var(--white);
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  flex: 1;
  min-width: 0;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input:focus {
  border-color: rgba(224, 17, 127, 0.4);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.newsletter-form button {
  background: var(--magenta);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0.65rem 1.1rem;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--magenta-light);
}

.footer-bottom {
  border-top: 1px solid var(--navy-border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--navy-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--magenta-dim);
  border-color: rgba(224, 17, 127, 0.3);
  color: var(--magenta-light);
}

@media (max-width: 767px) {
  footer {
    padding: 3rem 0 1.5rem;
  }

  footer .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
}
