/* ============================================
   footer-column · Footer4Col for MicroSIS.ai
   Scoped prefix: .fc4-
   Standalone 4-Column Footer (replaces Meadow Rise footer)
   ============================================ */

.fc4-site-footer {
  margin-top: 4rem;
  width: 100%;
  background: var(--surface-alt, #F5F5F7);
  border-top: 1px solid var(--hairline-strong, rgba(0, 0, 0, 0.12));
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  padding: 4rem 0 2rem;
  color: var(--ink-secondary, #515154);
}

[data-theme="dark"] .fc4-site-footer {
  background: var(--surface-alt, #111216);
  border-top-color: var(--hairline-strong, rgba(255, 255, 255, 0.14));
}

.fc4-site-footer .footer-newsletter {
  padding-bottom: 2.5rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--hairline, rgba(0, 0, 0, 0.08));
}

.fc4-root {
  --fc4-ink: var(--ink-primary, #1D1D1F);
  --fc4-muted: var(--ink-secondary, #515154);
  --fc4-line: var(--hairline, rgba(0, 0, 0, 0.08));
  --fc4-accent: var(--accent, #0071E3);
  --fc4-surface: var(--surface-card, #FFFFFF);
  position: relative;
  width: 100%;
  padding-top: 0.5rem;
  color: var(--fc4-muted);
  font-family: var(--font-system, -apple-system, BlinkMacSystemFont, system-ui, sans-serif);
}

[data-theme="dark"] .fc4-root {
  --fc4-accent: var(--accent, #2997FF);
}

.fc4-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--fc4-ink);
}

.fc4-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
}

.fc4-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fc4-ink);
  line-height: 1.1;
}

.fc4-brand-name .fc4-brand-ai {
  color: var(--fc4-accent);
}

/* ---------- Layout ---------- */
.fc4-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.fc4-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fc4-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
}

.fc4-col {
  text-align: center;
  min-width: 0;
}

@media (min-width: 640px) {
  .fc4-brand {
    align-items: flex-start;
    text-align: left;
  }
  .fc4-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fc4-col {
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .fc4-root {
    padding-top: 0.5rem;
  }
  .fc4-top {
    grid-template-columns: minmax(220px, 1fr) minmax(0, 2.4fr);
    gap: 3rem;
  }
  .fc4-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ---------- Brand ---------- */
.fc4-logo-link {
  display: inline-flex;
  border-radius: 6px;
}

.fc4-logo {
  display: block;
  height: 2.5rem;
  width: auto;
}

.fc4-root .logo-for-dark { display: none; }
[data-theme="dark"] .fc4-root .logo-for-light { display: none; }
[data-theme="dark"] .fc4-root .logo-for-dark { display: block; }
.mrf-live-footer .fc4-root .logo-for-light { display: none; }
.mrf-live-footer .fc4-root .logo-for-dark { display: block; }

.fc4-desc {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fc4-muted);
}

@media (min-width: 640px) {
  .fc4-desc { max-width: 20rem; }
}

.fc4-social {
  display: flex;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.fc4-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: -0.375rem;
}

.fc4-icon {
  display: block;
  flex-shrink: 0;
}

/* ---------- Columns ---------- */
.fc4-heading {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--fc4-ink);
}

.fc4-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.fc4-link {
  color: var(--fc4-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.fc4-link:hover {
  color: var(--fc4-ink);
}

.fc4-link:focus-visible,
.fc4-logo-link:focus-visible {
  outline: 2px solid var(--fc4-accent);
  outline-offset: 3px;
  color: var(--fc4-ink);
}

.fc4-link-live,
.fc4-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
}

.fc4-contact span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fc4-icon-accent {
  color: var(--fc4-accent);
}

/* ---------- Live ping indicator ---------- */
.fc4-ping {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
  flex-shrink: 0;
}

.fc4-ping-wave,
.fc4-ping-dot {
  border-radius: 999px;
  background: var(--fc4-accent);
}

.fc4-ping-wave {
  position: absolute;
  inset: 0;
  opacity: 0.75;
  animation: fc4-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.fc4-ping-dot {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
}

.fc4-is-paused .fc4-ping-wave {
  animation-play-state: paused;
}

@keyframes fc4-ping {
  75%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ---------- Bottom bar ---------- */
.fc4-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fc4-line);
  font-size: 0.75rem;
  text-align: center;
}

.fc4-copy {
  margin: 0;
  color: var(--fc4-muted);
}

.fc4-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .fc4-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- Utilities ---------- */
.fc4-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .fc4-ping-wave {
    animation: none;
    opacity: 0;
  }
  .fc4-link {
    transition: none;
  }
}
