/**
 * Evident ICU Footer Foundation
 *
 * Purpose:
 * Consolidate the public footer into one coherent system:
 * - compact route map
 * - centered brand block
 * - entity/contact/start/notice disclosure grid
 * - bottom status/newsletter bar
 *
 * This file is loaded after legacy footer CSS and should become the migration
 * target for the shared @evident-technologies/layout-foundation footer pattern.
 */

:root {
  --ev-footer-shell: min(100% - clamp(2rem, 6vw, 7rem), 92rem);
  --ev-footer-gap: clamp(1.25rem, 3vw, 2.5rem);
  --ev-footer-card-bg: linear-gradient(180deg, rgba(10, 19, 32, 0.82), rgba(5, 12, 22, 0.92));
  --ev-footer-card-border: 1px solid rgba(148, 181, 225, 0.14);
  --ev-footer-card-radius: clamp(1.25rem, 3vw, 2rem);
  --ev-footer-muted: rgba(203, 213, 225, 0.72);
  --ev-footer-strong: rgba(246, 241, 222, 0.94);
}

/* One footer, one visual field. */
.site-footer {
  position: relative;
  isolation: isolate;
  margin-top: clamp(3rem, 8vw, 7rem);
  padding:
    clamp(2.5rem, 6vw, 5rem)
    0
    clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 12% 0%, rgba(96, 57, 86, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(45, 88, 145, 0.16), transparent 36rem),
    linear-gradient(180deg, rgba(7, 16, 28, 0.48), rgba(4, 10, 18, 0.96));
  border-top: 1px solid rgba(148, 181, 225, 0.10);
}

/* Keep footer internals on a consistent rail. */
.site-footer > *,
.site-footer__inner,
.site-footer__shell,
.site-footer__nav,
.site-footer__brand,
.site-footer__main,
.site-footer__disclosure,
.site-footer__bottom {
  width: var(--ev-footer-shell);
  max-width: var(--ev-footer-shell);
  margin-inline: auto;
}

/* Route map should be compact, not a second full page. */
.footer-nav,
.site-footer__nav,
.site-footer__links,
.site-footer__route-map {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: var(--ev-footer-card-border);
  border-radius: var(--ev-footer-card-radius);
  background: rgba(8, 17, 29, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.footer-nav h2,
.footer-nav h3,
.footer-nav__heading,
.site-footer__heading {
  margin: 0 0 0.75rem;
  color: var(--ev-footer-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-nav ul,
.site-footer__links ul,
.site-footer__route-map ul {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Footer links become small route chips. */
.footer-nav a,
.site-footer__links a,
.site-footer__route-map a,
.footer-disclosure__link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  width: max-content;
  max-width: 100%;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(148, 181, 225, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(226, 232, 240, 0.78);
  text-decoration: none;
  line-height: 1.15;
}

.footer-nav a:hover,
.footer-nav a:focus-visible,
.site-footer__links a:hover,
.site-footer__links a:focus-visible,
.footer-disclosure__link:hover,
.footer-disclosure__link:focus-visible {
  color: rgba(246, 241, 222, 0.96);
  border-color: rgba(107, 169, 255, 0.34);
  background: rgba(67, 123, 210, 0.10);
  outline: none;
}

/* Brand block should separate sections, not become its own giant footer. */
.site-footer__brand,
.footer-brand,
.footer-persona,
.footer-persona-banner {
  display: grid;
  place-items: center;
  gap: 0.85rem;
  padding: clamp(1.75rem, 5vw, 3.25rem) 0 clamp(1.25rem, 4vw, 2.25rem);
  text-align: center;
}

.site-footer__brand img,
.footer-brand img,
.footer-persona img,
.footer-persona-banner img {
  width: min(18rem, 72vw);
  height: auto;
}

.site-footer__tagline,
.footer-brand__tagline,
.footer-persona__tagline {
  max-width: 54ch;
  margin: 0;
  color: var(--ev-footer-muted);
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  line-height: 1.6;
}

/* Disclosure panel becomes the core footer card. */
.footer-disclosure,
.site-footer__disclosure,
.site-footer__info {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(0, 1fr)
    minmax(0, 1.15fr)
    minmax(0, 1.45fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: var(--ev-footer-card-border);
  border-radius: var(--ev-footer-card-radius);
  background: var(--ev-footer-card-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 1.5rem 4rem rgba(0, 0, 0, 0.22);
}

.footer-disclosure h2,
.footer-disclosure h3,
.footer-disclosure__heading,
.site-footer__disclosure h2,
.site-footer__disclosure h3 {
  margin: 0 0 0.75rem;
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-disclosure p,
.footer-disclosure li,
.footer-disclosure address,
.site-footer__disclosure p,
.site-footer__disclosure li {
  color: var(--ev-footer-muted);
  line-height: 1.6;
}

.footer-disclosure strong,
.site-footer__disclosure strong {
  color: rgba(241, 245, 249, 0.9);
}

.footer-disclosure ol,
.footer-disclosure ul,
.site-footer__disclosure ol,
.site-footer__disclosure ul {
  margin-block: 0;
  padding-left: 1.15rem;
}

.footer-disclosure ol li + li,
.footer-disclosure ul li + li {
  margin-top: 0.45rem;
}

/* Bottom bar: status, copyright, newsletter, all one row when space allows. */
.site-footer__bottom,
.footer-bottom,
.footer-legal {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.85fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding-top: clamp(1rem, 3vw, 1.75rem);
  color: rgba(203, 213, 225, 0.72);
}

.site-footer__status,
.footer-status,
.footer-development-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.site-footer__status::before,
.footer-development-note::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #56d991;
  box-shadow: 0 0 0.85rem rgba(86, 217, 145, 0.6);
}

/* Newsletter area should not dominate. */
.site-footer form,
.footer-newsletter,
.footer-subscribe {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
}

.site-footer input[type="email"],
.footer-newsletter input,
.footer-subscribe input {
  min-width: 0;
  width: min(100%, 16rem);
  border: 1px solid rgba(148, 181, 225, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(241, 245, 249, 0.92);
  padding: 0.75rem 1rem;
}

.site-footer button,
.footer-newsletter button,
.footer-subscribe button {
  border-radius: 999px;
  white-space: nowrap;
}

/* Reduce excess vertical dead zones from legacy footer sections. */
.site-footer section,
.site-footer .footer-section {
  margin-block: 0;
}

.site-footer hr,
.footer-divider {
  width: var(--ev-footer-shell);
  margin: clamp(1.25rem, 3vw, 2rem) auto;
  border: 0;
  border-top: 1px solid rgba(148, 181, 225, 0.10);
}

@media (max-width: 980px) {
  .footer-disclosure,
  .site-footer__disclosure,
  .site-footer__info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-nav,
  .site-footer__nav,
  .site-footer__links,
  .site-footer__route-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__bottom,
  .footer-bottom,
  .footer-legal {
    grid-template-columns: 1fr;
  }

  .site-footer form,
  .footer-newsletter,
  .footer-subscribe {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .site-footer {
    margin-top: clamp(2rem, 8vw, 4rem);
  }

  .footer-disclosure,
  .site-footer__disclosure,
  .site-footer__info,
  .footer-nav,
  .site-footer__nav,
  .site-footer__links,
  .site-footer__route-map {
    grid-template-columns: 1fr;
    border-radius: 1.25rem;
  }

  .footer-nav ul,
  .site-footer__links ul,
  .site-footer__route-map ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-nav a,
  .site-footer__links a,
  .site-footer__route-map a,
  .footer-disclosure__link {
    width: 100%;
    justify-content: center;
  }

  .site-footer form,
  .footer-newsletter,
  .footer-subscribe {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-footer input[type="email"],
  .footer-newsletter input,
  .footer-subscribe input {
    width: 100%;
  }
}
