/* Site footer. Mirror of main's stripe treatment but dark:
   hash pattern in the gutters (on a dark base), solid dark-gradient
   inside the centered content strip. */
.site-footer {
  position: relative;
  isolation: isolate;
  padding-block: 4rem 2rem;
  color: var(--on-dark-muted-foreground);
  font-size: var(--fs-sm);

  /* Gutter bg: dark surface + faded dark hash pattern */
  background-color: var(--surface-dark-999);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 9px,
      color-mix(in oklch, var(--on-dark-foreground) 5%, transparent) 9px,
      color-mix(in oklch, var(--on-dark-foreground) 5%, transparent) 10px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 9px,
      color-mix(in oklch, var(--on-dark-foreground) 3.5%, transparent) 9px,
      color-mix(in oklch, var(--on-dark-foreground) 3.5%, transparent) 10px
    );

  /* Local overrides so descendants read the dark-context palette */
  --color-foreground: var(--on-dark-foreground);
  --color-muted-foreground: var(--on-dark-muted-foreground);
  --color-border: var(--on-dark-border);
  --color-accent: var(--on-dark-accent);
  --color-accent-foreground: var(--on-dark-accent-foreground);
  --color-primary: var(--on-dark-foreground);
  --color-primary-foreground: var(--surface-dark-950);
}

/* Frosted dark-glass strip inside the container. Softens the hash
   behind it instead of hiding it with a solid fill. */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--gutter);
  right: var(--gutter);
  background: color-mix(in oklch, var(--surface-dark-999) 70%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 720px) {
  .site-footer::before {
    left: 0;
    right: 0;
  }
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 3fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.site-footer__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-foreground);
}

.site-footer__brand-mark {
  color: var(--color-secondary);
  font-size: 1rem;
}

.site-footer__blurb {
  margin: 1rem 0 0;
  max-width: 30ch;
  color: var(--color-muted-foreground);
}

.site-footer__certs {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-footer__certs li {
  display: inline-flex;
  align-items: center;
}
.site-footer__certs img {
  height: 2.75rem;
  width: auto;
  max-width: 7rem;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity var(--dur-fast) var(--ease);
}
.site-footer__certs li:hover img {
  opacity: 1;
}

/* Chip modifier: light pill background for badges whose artwork
   includes dark ink and wouldn't read on the dark footer. */
.site-footer__certs-item--chip {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 0.375rem 0.625rem;
}
.site-footer__certs-item--chip img {
  opacity: 1;
  height: 2rem;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

/* Column heading mirrors the slim mega-menu's muted header bar:
   uppercase label, teal status dot, subtle tint + hairline underline. */
.site-footer__heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-muted-foreground);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.375rem;
  padding: 0.5rem 0.625rem 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.site-footer__heading::before {
  content: "";
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 999px;
  background: var(--brand-teal);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand-teal) 18%, transparent);
  flex-shrink: 0;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Items echo the slim mega-menu link rows: rounded hover surface with
   a trailing chevron that fades in, adapted to the dark footer. */
.site-footer__links a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4375rem 0.625rem;
  color: var(--color-muted-foreground);
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}
.site-footer__links a::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-left: auto;
  align-self: center;
  border-top: 1.5px solid currentcolor;
  border-right: 1.5px solid currentcolor;
  transform: rotate(45deg) translateX(-2px);
  color: var(--color-muted-foreground);
  opacity: 0;
  transition:
    opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--color-foreground);
  background: color-mix(in oklch, var(--on-dark-foreground) 6%, transparent);
  outline: none;
}
.site-footer__links a:hover::after,
.site-footer__links a:focus-visible:after {
  opacity: 1;
  transform: rotate(45deg) translateX(0);
  color: var(--brand-teal);
}

/* Legal row. A divider line sits above via ::before, clipped to the
   same inset as the footer strip so it doesn't run off into the
   gutters where the hash pattern shows. */
.site-footer__legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  position: relative;
  flex-wrap: wrap;
}

.site-footer__legal::before {
  content: "";
  position: absolute;
  top: 0;
  /* Inset by the container's own padding so the divider lines up with
     the footer strip's inner edges instead of poking out into the
     gutters where the hash pattern shows. */
  left: var(--container-pad);
  right: var(--container-pad);
  height: 1px;
  background: var(--color-border);
}

.site-footer__copyright {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--color-muted-foreground);
}

.site-footer__legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.site-footer__legal-links a {
  font-size: var(--fs-xs);
  color: var(--color-muted-foreground);
}
.site-footer__legal-links a:hover { color: var(--color-foreground); }

/* Responsive */
@media (max-width: 960px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .site-footer__columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .site-footer__columns {
    grid-template-columns: 1fr;
  }
}
