/* ============================================================
   FOOTER — ink slab that closes the paper page
   Loads after style.css, so these rules refine the base footer.
============================================================ */

footer {
  position: relative;
  overflow: hidden;
  border-top: none;
  background: var(--ink);
  padding: 84px var(--gutter) 34px;
  color: var(--ink-muted);
}

/* clay hairline across the very top edge */
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(226, 101, 58, 0.45) 22%,
    var(--accent) 50%,
    rgba(226, 101, 58, 0.45) 78%,
    transparent 100%);
  z-index: 1;
}

/* warm glow bleeding in from the top-right corner */
footer::after {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 101, 58, 0.16), transparent 66%);
  pointer-events: none;
}

/* ------------------------------------------------------------
   GRID
------------------------------------------------------------ */
.footer-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 48px 32px;
}

/* brand column */
.footer-grid .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-text);
}

.footer-grid .logo::before {
  content: "";
  width: 11px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

/* the markup carries an inline muted colour here, so it needs !important */
.footer-grid > div:first-child p {
  color: var(--ink-muted) !important;
  font-size: 14.5px !important;
  line-height: 1.8;
  max-width: 34ch !important;
  margin-top: 18px;
}

/* ------------------------------------------------------------
   COLUMN HEADINGS
------------------------------------------------------------ */
.footer-grid h5 {
  position: relative;
  font-family: var(--font-body);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--ink-text);
  margin: 0 0 22px;
  padding-bottom: 12px;
}

.footer-grid h5::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 22px;
  height: 1px;
  background: var(--accent);
}

/* ------------------------------------------------------------
   LINKS
------------------------------------------------------------ */
.footer-grid a {
  display: flex;
  align-items: center;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 13px;
  border-radius: 2px;
  transition: color 0.22s ease, transform 0.22s ease;
}

.footer-grid a::before {
  content: "";
  width: 0;
  height: 1px;
  margin-right: 0;
  background: var(--accent);
  transition: width 0.22s ease, margin-right 0.22s ease;
}

.footer-grid a:hover {
  color: var(--ink-text);
}

.footer-grid a:hover::before {
  width: 14px;
  margin-right: 9px;
}

.footer-grid a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   BOTTOM BAR
------------------------------------------------------------ */
.footer-bottom {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.footer-bottom span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.footer-bottom span:last-child::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ba86d;
  box-shadow: 0 0 0 3px rgba(75, 168, 109, 0.20);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------ */
@media (max-width: 900px) {
  footer { padding: 60px var(--gutter) 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 26px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  footer { padding: 48px var(--gutter) 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid .logo { font-size: 23px; }
  .footer-bottom {
    margin-top: 36px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
