/* ==========================================================================
   FOOTER — Coded Contracting
   Requires base.css
   ========================================================================== */

.site-footer {
  position: relative;
  background-color: var(--c-footer-bg);
  color: var(--c-on-dark);
  padding-top: 88px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   1. TOP GRID
   Col widths derived from the 1440 comp: 1fr | 328px | 328px, 16px gap.
   That lands col 2 at x=728 and col 3 at x=1072, matching Figma.
   -------------------------------------------------------------------------- */

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr 328px 328px;
  gap: 56px 16px;
  padding-bottom: 60px;
}

/* --------------------------------------------------------------------------
   2. BRAND COLUMN
   -------------------------------------------------------------------------- */

.footer-brand {
  grid-row: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
}

.footer-brand__logo { margin-bottom: 44px; }
.footer-brand__logo svg { height: 164px; width: auto; }

/* Decorative angled lines. Replace with the Figma SVG export. */
.footer-brand__deco {
  position: absolute;
  left: calc(var(--container-pad) * -1);
  top: 200px;
  width: 610px;
  max-width: none;
  pointer-events: none;
}

.footer-contact {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: max-content;
  max-width: 100%;
  margin-top: auto;
}

.footer-contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 38px;
  padding-inline: 20px;
  border-radius: var(--btn-radius);
  background-color: var(--c-on-dark-soft);
  color: var(--c-on-dark);
  font-size: 16px;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.footer-contact__item svg { flex: none; color: var(--c-primary); }
.footer-contact__item:hover {
  background-color: var(--c-primary);
  color: var(--c-white);
}
.footer-contact__item:hover svg { color: var(--c-white); }

/* --------------------------------------------------------------------------
   3. LINK COLUMNS
   -------------------------------------------------------------------------- */

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: 12px;
}
.footer-col__title svg { flex: none; color: var(--c-primary); }

/* Two-tone rule: orange lead segment, then a light hairline */
.footer-col__rule {
  width: 200px;
  max-width: 100%;
  height: 2px;
  margin-bottom: 30px;
  background-image: linear-gradient(
    to right,
    var(--c-primary) 0 24px,
    rgba(255, 255, 255, 0.25) 24px
  );
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col__list a {
  display: inline-block;
  font-size: 16px;
  line-height: 1.25;
  color: var(--c-on-dark-70);
  transition: color var(--t-fast);
}
.footer-col__list a:hover { color: var(--c-primary); }

/* --------------------------------------------------------------------------
   4. LEGAL BAR
   -------------------------------------------------------------------------- */

.site-footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-block: 22px 30px;
  border-top: 1px solid var(--c-on-dark-line);
  font-size: 14px;
  color: var(--c-on-dark-60);
}

.site-footer__bottom .footer-credit { justify-self: end; }

.footer-legal,
.footer-social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-legal a,
.footer-social-links a { transition: color var(--t-fast); }
.footer-legal a:hover,
.footer-social-links a:hover { color: var(--c-primary); }

.footer-sep { color: var(--c-on-dark-60); }

.footer-credit { white-space: nowrap; }
.footer-credit a {
  color: var(--c-white);
  font-weight: 600;
  transition: color var(--t-fast);
}
.footer-credit a:hover { color: var(--c-primary); }

/* --------------------------------------------------------------------------
   5. MOBILE — 991.98px and below
   Column order changes: Quick Links / Services, then Industries / Resources.
   Headings centre over their rule.
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  .site-footer { padding-top: 48px; }

  .site-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
    padding-bottom: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .footer-brand__logo { margin-bottom: 28px; }
  .footer-brand__logo svg { height: 86px; }
  .footer-brand__deco { display: none; }

  .footer-contact {
    width: 100%;
    gap: 14px;
    margin-top: 0;
    margin-bottom: 12px;
  }
  .footer-contact__item { height: 44px; }

  /* Reorder the link columns for mobile */
  .footer-col--services   { order: 2; }
  .footer-col--industries { order: 3; }
  .footer-col--quick      { order: 1; }
  .footer-col--resources  { order: 4; }

  .footer-col__title {
    justify-content: center;
    font-size: 12px;
    margin-bottom: 10px;
  }
  .footer-col__title svg { display: none; }

  .footer-col__rule {
    width: 100%;
    margin-bottom: 24px;
  }

  .footer-col__list { gap: 10px; }

  .site-footer__bottom {
    grid-template-columns: 1fr auto;
    gap: 14px 16px;
    padding-block: 20px 28px;
  }

  .footer-legal { grid-column: 1 / -1; }
}
