/* ============================================================================
   FOOTER — the pit exit. Its own rhythm: no --sp-section, a hairline instead.
   ========================================================================= */

.footer {
  position: relative;
  z-index: var(--z-content);
  isolation: isolate;
  overflow: hidden; /* the ghost wordmark bleeds off the bottom, nothing scrolls */
}

.footer__rule {
  margin-bottom: clamp(40px, 4.5vw, 72px);
}

/* ---------------------------------------------------------------- layout */
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(40px, 5vw, 104px);
  padding-bottom: clamp(40px, 4.5vw, 64px);
}

/* ---------------------------------------------------------------- brand */
.footer__mark {
  display: inline-block;
  font-family: var(--f-display);
  font-size: clamp(2rem, 2.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.footer__tagline {
  margin-top: var(--sp-3);
  color: var(--text-faint);
}
.footer__blurb {
  margin-top: var(--sp-4);
  max-width: 34ch;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.footer__contact {
  display: grid;
  justify-items: start;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
  list-style: none;
}
.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  /* the phone and email are the two things a customer on a phone actually taps —
     they get a real 26px target, not a 19px line of text (WCAG 2.5.8) */
  min-height: 26px;
  padding-block: 3px;
  font-family: var(--f-hud);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-soft);
  transition: color var(--t-fast);
}
.footer__contact svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-faint);
  transition: color var(--t-fast);
}
.footer__contact a:hover,
.footer__contact a:focus-visible {
  color: var(--text);
}
.footer__contact a:hover svg,
.footer__contact a:focus-visible svg {
  color: var(--cy);
}

.footer__socials {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  list-style: none;
}

/* ---------------------------------------------------------------- columns */
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 56px);
}
.footer__col-title {
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-hud);
  font-size: var(--fs-hud);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--track-wide);
  color: var(--text-dim);
}
.footer__list {
  display: grid;
  gap: 10px;
  margin-top: var(--sp-4);
  list-style: none;
}
.footer__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  /* WCAG 2.5.8: a link in a nav list is not "inline in a sentence", so it owes
     a 24px target. The padding is what buys it — the text alone is ~19px. */
  min-height: 26px;
  padding-block: 3px;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  transition: color var(--t-fast);
}
/* the tick reserves its width — hover scales it, so no text ever shifts */
.footer__link::before {
  content: "";
  width: 10px;
  height: 1px;
  flex: none;
  background: var(--text-ghost);
  transform-origin: left center;
  scale: 0.4 1;
  transition: scale var(--t-fast) var(--ease-out), background var(--t-fast);
}
.footer__link:hover,
.footer__link:focus-visible {
  color: var(--text);
}
.footer__link:hover::before,
.footer__link:focus-visible::before {
  background: var(--cy);
  scale: 1 1;
}

/* ---------------------------------------------------------------- bottom bar */
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-6);
  padding-block: var(--sp-5) clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--line);
}
.footer__copy {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.footer__built {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--f-hud);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--text-ghost);
}
.footer__built::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  rotate: 45deg;
  background: var(--text-ghost);
}

.footer__top,
.footer__motion {
  --cut: 8px;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 11px 16px;
  clip-path: var(--clip-bevel);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--f-hud);
  font-size: var(--fs-hud);
  font-weight: 700;
  letter-spacing: var(--track-hud);
  color: var(--text-soft);
  transition: color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

/* the motion switch: quiet at rest, lime once it is actually holding motion off */
.footer__motion svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.footer__motion:hover {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.footer__motion[aria-pressed="true"] {
  color: var(--li);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--li) 55%, transparent);
}
/* clip-path eats the outline — ring it from the inside */
.footer__motion:focus-visible,
.footer__top:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--cy);
}
.footer__top svg {
  width: 14px;
  height: 14px;
  flex: none;
  transition: translate var(--t-fast) var(--ease-out);
}
.footer__top:hover,
.footer__top:focus-visible {
  color: var(--cy);
  background: color-mix(in oklab, var(--cy) 10%, transparent);
  box-shadow: inset 0 0 0 1px var(--line-hot);
}
.footer__top:hover svg,
.footer__top:focus-visible svg {
  translate: 2px -2px;
}
/* clip-path eats the outline — draw focus as a ring instead */
.footer__top:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--cy);
}

/* ---------------------------------------------------------------- flourish
   Oversized wordmark bleeding off the bottom edge. 4% — felt, never read.   */
.footer__ghost {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: -1;
  translate: -50% 28%;
  font-family: var(--f-display);
  font-size: clamp(6rem, 21vw, 17rem);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--text);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}

/* ============================================================== responsive */
@media (max-width: 1100px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: clamp(40px, 6vw, 64px);
  }
}

@media (max-width: 700px) {
  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-6) var(--sp-5);
  }
  .footer__bar {
    justify-content: flex-start;
  }
  .footer__built {
    order: 3;
    flex-basis: 100%;
  }
}
