/**
 * AIA site footer — Components layer.
 *
 * Ported from mockups/footer/index.html. Every row rides the same 4-column
 * 1600px content grid the homepage uses, so the footer lines up with the
 * sections above it.
 *
 * Content comes from Appearance → Footer; the two link columns are the
 * "Footer Links One / Two" widget areas (see inc/aia-footer.php).
 */

.aia-ftr {
  --aia-ftr-gap: clamp(1.5rem, 2vw, 2.5rem);
  --aia-ftr-ease: cubic-bezier(0.625, 0.05, 0, 1);

  background: var(--aia-ink);
  color: var(--aia-paper);
  padding: 104px 0 40px;
  margin-top: auto;
}

.aia-ftr__inner {
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: 16px;
}

/* Every row shares the content grid. */
.aia-ftr__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--aia-ftr-gap);
}

/* ── brand row ───────────────────────────────────────────── */

.aia-ftr__row--brand {
  align-items: center;
  margin-bottom: 52px;
}

.aia-ftr__brand {
  grid-column: 1 / 3;
}

.aia-ftr__brand img {
  display: block;
  height: 56px;
  width: auto;
}

.aia-ftr__social {
  grid-column: 3 / 5;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 39px circle · 1px white ring · card-lift hover — the Keep In Touch atom. */
.aia-ftr__soc {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  border: 1px solid var(--aia-paper);
  color: var(--aia-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.aia-ftr__soc svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}

.aia-ftr__soc .ico-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.aia-ftr__soc .dot {
  fill: currentColor;
  stroke: none;
}

.aia-ftr__soc:hover,
.aia-ftr__soc:focus-visible {
  transform: translate(-4px, -4px);
  box-shadow: 4px 4px 0 0 var(--aia-paper);
}

.aia-ftr__soc:active {
  transform: translate(0, 0);
  box-shadow: none;
}

/* ── columns row ─────────────────────────────────────────── */

.aia-ftr__contact {
  grid-column: 1 / 3;
}

.aia-ftr__col--a {
  grid-column: 3 / 4;
}

.aia-ftr__col--b {
  grid-column: 4 / 5;
}

.aia-ftr__line {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 18px;
}

.aia-ftr__line svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.aia-ftr__line address,
.aia-ftr__line span {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--aia-paper);
}

/* Primary + secondary action, side by side. */
.aia-ftr__actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 34px;
}

/* The .matisse-btn "already open" paired variant: the pill starts contracted
   (--pill-rest) and hover nudges the arrow only (--shrink: 1, no scale).
   font-size needs !important because the base .matisse-btn rule in style.css
   sets it that way. */
.aia-ftr__btn.matisse-btn {
  --pill: var(--aia-red);
  --text: var(--aia-paper);
  --circle: var(--aia-paper);
  --arrow: var(--aia-ink);
  --pill-rest: -0.5em;
  --pill-hover: -0.5em;
  --shrink: 1;

  font-size: 1rem !important;
}

.aia-ftr__btn .matisse-btn__icon {
  transition: transform var(--dur, 0.6s) var(--aia-ftr-ease);
}

.aia-ftr__btn:hover .matisse-btn__icon,
.aia-ftr__btn:focus-visible .matisse-btn__icon {
  transform: translateY(-50%) translateX(3px);
}

.aia-ftr__sec {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Every text link in the footer: mist underline, all red on hover. The brand
   lockup, social circles and the primary button aren't text links. */
.aia-ftr__inner a:not(.aia-ftr__brand):not(.aia-ftr__soc):not(.matisse-btn) {
  color: var(--aia-paper);
  text-decoration: underline;
  text-decoration-color: var(--aia-mist);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.aia-ftr__inner a:not(.aia-ftr__brand):not(.aia-ftr__soc):not(.matisse-btn):hover,
.aia-ftr__inner a:not(.aia-ftr__brand):not(.aia-ftr__soc):not(.matisse-btn):focus-visible {
  color: var(--aia-red);
  text-decoration-color: var(--aia-red);
}

/* ── link-column widgets ─────────────────────────────────── */

.aia-ftr__navtitle {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--aia-paper);
}

.aia-ftr__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aia-ftr__menu li {
  margin: 0 0 18px;
}

.aia-ftr__menu a {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

/* ── bottom bar ──────────────────────────────────────────── */

.aia-ftr__bottom {
  margin-top: 56px;
  padding-top: 8px;
  border-top: 1px solid var(--aia-paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aia-ftr__bottom span,
.aia-ftr__bottom a {
  font-family: var(--font-base);
  font-size: 1rem;
  color: var(--aia-paper);
}

/* ── responsive ──────────────────────────────────────────── */

@media (max-width: 1024px) {
  .aia-ftr__brand {
    grid-column: 1 / 5;
  }

  .aia-ftr__social {
    grid-column: 1 / 5;
    justify-self: start;
    margin-top: 26px;
  }

  .aia-ftr__contact {
    grid-column: 1 / 5;
  }

  .aia-ftr__col--a {
    grid-column: 1 / 3;
    margin-top: 40px;
  }

  .aia-ftr__col--b {
    grid-column: 3 / 5;
    margin-top: 40px;
  }
}

@media (max-width: 640px) {
  .aia-ftr {
    padding-top: 64px;
  }

  .aia-ftr__col--a,
  .aia-ftr__col--b {
    grid-column: 1 / 5;
    margin-top: 34px;
  }

  .aia-ftr__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .aia-ftr__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aia-ftr__soc,
  .aia-ftr__btn .matisse-btn__icon {
    transition: none;
  }
}
