/* ==========================================================================
   VITALYS — FOOTER
   Sections: Variables, Footer, Columns, Logo, Navigation, Contact,
   Social Icons, Copyright, Animations, Responsive Breakpoints.
   Shares brand tokens (--font-nav, --color-accent, --ease-out-quart, etc.)
   already defined in navbar.css; only footer-specific tokens live here.
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  --footer-bg: #082c54;
  --footer-text-strong: #ffffff;
  --footer-text-muted: rgba(255, 255, 255, 0.8);
  --footer-text-soft: rgba(255, 255, 255, 0.75);
  --footer-text-faint: rgba(255, 255, 255, 0.65);
  --footer-divider: rgba(255, 255, 255, 0.15);
  --footer-social-bg: rgba(255, 255, 255, 0.1);

  --footer-padding-top: 80px;
  --footer-padding-bottom: 40px;

  --footer-logo-width: 170px;
  --footer-description-max-width: 350px;

  --footer-social-size: 46px;
  --footer-social-gap: 15px;
}

/* ==========================================================================
   2. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text-strong);
  padding-top: var(--footer-padding-top);
  padding-bottom: var(--footer-padding-bottom);
  font-family: var(--font-nav);
}

/* ==========================================================================
   3. COLUMNS
   ========================================================================== */
.footer-columns {
  margin-bottom: 10px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col-links {
  align-items: flex-start;
}

.footer-col-contact {
  align-items: flex-start;
}

/* ==========================================================================
   4. LOGO
   ========================================================================== */
.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.35s ease;
}

.footer-logo:hover,
.footer-logo:focus-visible {
  transform: scale(1.03);
}

.footer-logo img {
  display: block;
  width: var(--footer-logo-width);
  height: auto;
  /* Source logo is brand-blue on transparent; footer sits on a dark navy
     background, so the mark is forced to a clean white silhouette here
     without needing a second logo asset. */
  filter: brightness(0) invert(1);
}

.footer-logo:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 2px;
}

.footer-description {
  margin: 25px 0 0;
  max-width: var(--footer-description-max-width);
  font-size: 16px;
  line-height: 1.8;
  color: var(--footer-text-soft);
}

/* ==========================================================================
   5. NAVIGATION (center column)
   ========================================================================== */
.footer-heading {
  margin: 0 0 25px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 24px;
  color: var(--footer-text-strong);
}

.footer-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.footer-nav-link {
  display: inline-block;
  padding: 10px 0;
  font-family: var(--font-nav);
  font-size: 16px;
  font-weight: 500;
  color: var(--footer-text-muted);
  text-decoration: none;
  transition: color 0.35s ease, transform 0.35s ease;
}

.footer-nav-link:hover,
.footer-nav-link:focus-visible {
  color: var(--color-accent);
  transform: translateX(5px);
}

.footer-nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   6. CONTACT (right column)
   ========================================================================== */
address.footer-address {
  font-style: normal;
}

.footer-contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  line-height: 2;
  font-size: 16px;
  color: var(--footer-text-muted);
}

.footer-contact-item + .footer-contact-item {
  margin-top: 4px;
}

.footer-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  padding-top: 2px;
  font-size: 17px;
  color: var(--color-accent);
}

.footer-contact-link {
  color: var(--footer-text-muted);
  text-decoration: none;
  transition: color 0.35s ease;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: var(--color-accent);
}

/* ==========================================================================
   7. SOCIAL ICONS
   ========================================================================== */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--footer-social-gap);
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--footer-social-size);
  height: var(--footer-social-size);
  border-radius: 50%;
  background: var(--footer-social-bg);
  color: var(--footer-text-strong);
  font-size: 18px;
  text-decoration: none;
  transition: background-color 0.35s ease, transform 0.35s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  background: var(--color-accent);
  transform: translateY(-4px) rotate(8deg);
}

.footer-social-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ==========================================================================
   8. COPYRIGHT
   ========================================================================== */
.footer-divider {
  height: 1px;
  margin-top: 50px;
  margin-bottom: 30px;
  border: none;
  background: var(--footer-divider);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  text-align: center;
}

.footer-copyright,
.footer-legal {
  margin: 0;
  font-size: 15px;
  color: var(--footer-text-faint);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.footer-legal-link {
  color: var(--footer-text-faint);
  text-decoration: none;
  transition: color 0.35s ease;
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
  color: var(--footer-text-strong);
}

.footer-legal-divider {
  color: var(--footer-divider);
}

/* ==========================================================================
   9. ANIMATIONS
   ========================================================================== */
@keyframes footerFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Columns are fully visible by default. footer.js opts them into the
   hidden pre-animation state (.will-animate) only after confirming
   IntersectionObserver support and no reduced-motion preference — so a
   JS failure or a headless/no-scroll render never ships a blank footer. */
.footer-col.will-animate {
  opacity: 0;
  transform: translateY(30px);
}

.footer-col.will-animate.is-visible {
  animation: footerFadeUp 0.7s var(--ease-out-quart) both;
}

.footer-col-logo.is-visible {
  animation-delay: 0ms;
}

.footer-col-links.is-visible {
  animation-delay: 150ms;
}

.footer-col-contact.is-visible {
  animation-delay: 300ms;
}

@media (prefers-reduced-motion: reduce) {
  .footer-col.will-animate,
  .footer-col.will-animate.is-visible {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .footer-nav-link:hover,
  .footer-nav-link:focus-visible,
  .footer-social-link:hover,
  .footer-social-link:focus-visible,
  .footer-logo:hover,
  .footer-logo:focus-visible {
    transform: none;
  }
}

/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet: 768px–991px */
@media (min-width: 768px) and (max-width: 991.98px) {
  .footer-col-logo {
    margin-bottom: 20px;
  }
}

/* Mobile: below 768px */
@media (max-width: 767.98px) {
  .site-footer {
    padding-top: 60px;
    padding-bottom: 30px;
    text-align: center;
  }

  .footer-col {
    align-items: center;
  }

  .footer-description {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-contact-item {
    text-align: left;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-divider {
    margin-top: 40px;
    margin-bottom: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
  }
}
