/*
 * Global site footer component.
 * This is an independent clean-room implementation, written directly
 * from a written specification document describing the required
 * selectors, custom-property inputs, and declared values. No footer
 * stylesheet (current or prior) was read, viewed, or consulted while
 * writing this file.
 *
 * Styles the footer landmark: brand block, a multi-column link grid,
 * a contact block, and a closing legal/copyright bar. All colors and
 * type sizing are pulled from shared custom properties so the footer
 * follows the active site palette and skin rather than hard-coded
 * values.
 */

/* Footer landmark ---------------------------------------------------- */

.site-footer {
  color: var(--ocf-footer-body);
  background: var(--ocf-footer-bg);
  border-top-width: 1px;
  border-top-style: solid;
  border-top-color: var(--ocf-border-light);
}

/* Column grid --------------------------------------------------------- */

.footer-grid {
  gap: 2rem;
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
  display: grid;
}

/* Applied alongside .footer-grid when the Service Areas column is
   dropped, so the remaining columns share the freed-up space. */
.footer-grid--no-areas {
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
}

/* Brand block ----------------------------------------------------------- */

.footer-logo-img {
  margin-bottom: 1rem;
  width: auto;
  max-height: 3rem;
}

.footer-brand-name {
  font-weight: var(--font-weight-bold);
  color: var(--ocf-footer-heading);
  display: block;
}

.footer-brand-desc {
  max-width: 28ch;
  margin-top: 0.75rem;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
}

/* Social links — legacy markup, not emitted by the current footer
   template. Kept implemented to spec in case the markup is reinstated;
   there is nothing on the live proof site to render these today. */

.footer-social-links {
  margin-top: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
  display: flex;
}

.footer-social-link {
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  background: color-mix(in srgb, var(--ocf-bg-alt) 62%, transparent);
  color: var(--ocf-footer-heading);
  border-radius: 999px;
  border-color: var(--ocf-border);
  border-style: solid;
  border-width: 1px;
  height: 2.25rem;
  width: 2.25rem;
  place-items: center;
  display: inline-grid;
}

.footer-social-link:hover, .footer-social-link:focus-visible {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--ocf-footer-heading) 8%, var(--ocf-bg-alt));
  color: var(--ocf-footer-heading);
  border-color: color-mix(in srgb, var(--ocf-footer-heading) 34%, var(--ocf-border));
}

.footer-social-link svg {
  stroke: none;
  fill: currentColor;
  height: 1.05rem;
  width: 1.05rem;
}

/* Link columns (Services / Service Areas / Pages / Contact) ------------- */

.footer-heading {
  font-weight: var(--font-weight-bold);
  color: var(--ocf-footer-heading);
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0.75rem;
  margin-left: 0;
}

/* .footer-hours is legacy markup (see note above the social-link block);
   only .footer-link-list is emitted by the current template. */
.footer-link-list, .footer-hours {
  font-size: var(--font-label-size);
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.45rem;
  display: grid;
}

.footer-hours li {
  gap: 1rem;
  justify-content: space-between;
  display: flex;
}

/* Contact block ----------------------------------------------------------- */

.footer-contact-links {
  font-size: var(--font-label-size);
  margin-top: 0;
  gap: 0.5rem;
  display: grid;
}

.footer-contact-links a, .footer-address {
  align-items: start;
  gap: 0.55rem;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  display: grid;
}

.footer-contact-links svg, .footer-address svg {
  flex: 0 0 auto;
  margin-top: 0.16em;
  height: 1.05rem;
  width: 1.05rem;
}

/* Address icon runs slightly larger than the phone/email icons and
   needs its own nudge to stay optically aligned with the address text;
   must follow the shared svg rule above so it wins the tie-break. */
.footer-address svg {
  margin-top: 0.08em;
  margin-left: -0.03rem;
  height: 1.16rem;
  width: 1.16rem;
}

/* Legal / copyright bar --------------------------------------------------- */

.footer-bottom {
  font-size: var(--font-label-size);
  color: var(--ocf-footer-body);
  border-top-color: var(--ocf-border-light);
  border-top-style: solid;
  border-top-width: 1px;
  padding-top: 1.25rem;
  margin-top: 2rem;
  gap: 1rem;
  justify-content: space-between;
  display: flex;
}

.footer-bottom-links {
  gap: 1rem;
  display: flex;
}

/* Responsive column collapse ----------------------------------------------- */

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

@media (max-width: 640px) {
  .footer-grid, .footer-bottom {
    grid-template-columns: 1fr;
    display: grid;
  }
}
