/* ==========================================================================
   TechAbbot – site footer
   Markup: partials/footer.html (generated by tools/build-footer.js)
   Behaviour: js/footer.js (keeps the copyright year current; nothing else)

   Light part: the link directory, latest insights, where we work.
   Dark navy part: company identity, social links, legal bar.

   Directory columns
     below 480px     1 column
     480px and up    2 columns
     768px and up    3 columns
     1180px and up   6 columns (the contact column a little wider)

   Every rule is scoped to .site-footer / .footer__*.
   ========================================================================== */

.site-footer {
  --f-navy: #07172D;
  --f-navy-2: #102A43;
  --f-blue: #0871A7;
  --f-green: #39C78B;
  --f-text: #253746;
  --f-muted: #56687A;
  --f-line: #DDE6EC;

  color: var(--f-text);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}

.site-footer ul,
.site-footer dl,
.site-footer dd,
.site-footer p,
.site-footer address {
  margin: 0;
  padding: 0;
  list-style: none;
  font-style: normal;
}

/* Light part ------------------------------------------------------------------ */

.site-footer__main {
  padding-block: clamp(44px, 5vw, 72px) clamp(32px, 3.6vw, 48px);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #26965E, var(--f-blue)) 1;
  background: var(--c-bg-alt);
}

.footer__heading {
  margin: 0;
  color: var(--f-navy);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Directory */

.footer__directory {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px 24px;
}

.footer__col { min-width: 0; }

.footer__links {
  display: grid;
  gap: 2px;
  margin-top: 12px !important;
}

.footer__links a {
  display: inline-block;
  padding-block: 6px;
  color: var(--f-muted);
}

.footer__links a:hover,
.footer__contact a:hover { color: var(--f-blue); }

.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Contact and headquarters */

.footer__contact {
  display: grid;
  gap: 14px;
  margin-top: 16px !important;
}

.footer__contact dt {
  color: var(--f-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.footer__contact dd {
  margin-top: 3px !important;
  color: var(--f-text);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.footer__contact a {
  display: inline-block;
  padding-block: 4px;
  color: var(--f-text);
}

.footer__contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--f-blue) !important;
  font-weight: 700;
}

.footer__contact-link::after,
.footer__more::after {
  content: "\2192";
  margin-left: 8px;
  transition: transform var(--ease);
}

.footer__contact-link:hover::after,
.footer__more:hover::after { transform: translateX(4px); }

/* Latest insights: a white band, set apart from the directory. */

.footer__insights {
  margin-top: clamp(32px, 3.8vw, 52px);
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid var(--f-line);
  border-radius: 16px;
  background: var(--c-bg);
}

.footer__insights-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
}

.footer__more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--f-blue) !important;
  font-weight: 700;
}

.footer__articles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 6px !important;
}

.footer-article {
  min-width: 0;
  padding-block: 14px;
  border-top: 1px solid var(--f-line);
}

.footer-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  color: var(--f-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.footer-article__category {
  color: #1F7D4E;
  font-weight: 700;
  text-transform: uppercase;
}

.footer-article__meta > * + *::before {
  content: "\00B7";
  margin-inline: 7px;
  color: var(--f-muted);
}

.footer-article__title {
  display: inline-block;
  margin-top: 4px;
  padding-block: 2px;
  color: var(--f-navy) !important;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.footer-article__title:hover {
  color: var(--f-blue) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Where we work */

.footer__presence {
  display: grid;
  gap: 16px 40px;
  margin-top: clamp(26px, 3vw, 40px);
  padding-top: clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--f-line);
}

.footer__presence-copy p {
  max-width: 44em;
  margin-top: 8px !important;
  color: var(--f-muted);
  line-height: 1.6;
}

.footer__countries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__countries li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--f-line);
  border-radius: 999px;
  background: var(--c-bg);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.footer__countries img {
  display: block;
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
}

/* Dark part ------------------------------------------------------------------- */

.site-footer__base {
  background: var(--f-navy);
  color: #C2D0DF;
}

.site-footer__base :focus-visible {
  outline-color: #fff;
  outline-offset: 3px;
}

.footer__identity {
  display: grid;
  gap: 24px 48px;
  padding-block: clamp(28px, 3.4vw, 44px);
}

.footer__logo {
  display: block;
  width: auto;
  height: 44px;
}

.footer__about p {
  max-width: 46em;
  margin-top: 14px !important;
  color: #C2D0DF;
  line-height: 1.6;
}

.footer__heading--light { color: #fff; }

.footer__social-list {
  display: flex;
  gap: 10px;
  margin-top: 12px !important;
}

.footer__social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(194, 208, 223, 0.35);
  border-radius: 12px;
  color: #fff;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.footer__social-list svg {
  display: block;
  fill: currentColor;
}

.footer__social-list a:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #1F8549, var(--f-blue));
  transform: translateY(-2px);
}

/* Legal bar */

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-block: 14px;
  border-top: 1px solid rgba(194, 208, 223, 0.18);
  font-size: 0.8125rem;
}

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.footer__legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #C2D0DF;
}

.footer__legal-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Layout ------------------------------------------------------------------ */

@media (min-width: 480px) {
  .footer__directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 640px) {
  .footer__articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(20px, 2.6vw, 36px);
  }
}

@media (min-width: 768px) {
  .footer__directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .footer__identity {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .footer__presence {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }

  .footer__countries { justify-content: flex-end; }
}

@media (min-width: 1180px) {
  .footer__directory {
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.450fr);
    gap: 24px;
  }

  .footer__articles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .footer-article {
    padding: 4px 0 4px clamp(14px, 1.6vw, 22px);
    border-top: 0;
    border-left: 1px solid var(--f-line);
  }

  .footer-article:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .footer__articles { margin-top: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .footer__social-list a:hover { transform: none; }
}
