/* Footer — matches Website Screens/Footer/Desktop-V2 (1440px) and Mobile-V2 (410px) */

.footer {
  background: var(--black);
  color: var(--white);
  padding: clamp(46px, 4vw, 56px) var(--gutter) clamp(42px, 3vw, 44px);
}

.footer__inner {
  max-width: 1680px;
  margin: 0 auto;
}

/* ---------- Top: blurb, contact, link columns ---------- */

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "blurb"
    "contact"
    "nav";
}

.footer__blurb   { grid-area: blurb; }
.footer__contact { grid-area: contact; }
.footer__nav     { grid-area: nav; margin-top: 120px; }

.footer__blurb {
  max-width: 45ch;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 20px;
  text-transform: uppercase;
}

.footer__contact {
  margin-top: 56px;
}

.footer__contact-label {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
}

.footer__email {
  display: inline-block;
  font-family: var(--font-display);
  /* Shrinks on narrow phones so it never wraps or overflows */
  font-size: min(37px, 8.7vw);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* Phones: Account and Connect stack on the left, Navigate on the right */
.footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "account  navigate"
    "connect  navigate";
  column-gap: 24px;
  row-gap: 44px;
  align-items: start;
}

.footer__col--account  { grid-area: account; }
.footer__col--connect  { grid-area: connect; }
.footer__col--navigate { grid-area: navigate; }

.footer__heading {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.footer__links a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 21px;
  color: var(--white);
  opacity: 0.8;
  text-decoration: none;
}

/* ---------- Logo ---------- */

.footer__logo {
  display: block;
  margin-top: 96px;
}

.footer__logo img {
  width: 100%;
  height: auto;
}

/* ---------- Bottom: copyright + legal ---------- */

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-top: 20px;
}

.footer__copyright {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
}

.footer__legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.footer__legal a {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Hover / focus ---------- */

.footer a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* Link columns sit at 80% opacity and go to 100% on hover */
.footer__links a:hover,
.footer__links a:focus-visible {
  opacity: 1;
}

.footer__legal a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__email:hover {
  color: var(--beige);
}

.footer a:focus-visible {
  outline: 1px solid var(--beige);
  outline-offset: 4px;
}

/* ---------- Very small phones ---------- */

@media (max-width: 359px) {
  .footer__legal {
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 24px;
    row-gap: 12px;
  }
}

/* ---------- Tablet (640–959px) ---------- */
/* Same stacked order as phones, but the three link columns sit side by side
   at their natural width instead of stretching across the screen. */

@media (min-width: 640px) {
  .footer__nav {
    grid-template-columns: auto auto auto;
    grid-template-areas: "account connect navigate";
    justify-content: start;
    column-gap: clamp(48px, 9vw, 96px);
    row-gap: 0;
    margin-top: 80px;
  }

  .footer__logo {
    margin-top: 80px;
  }
}

/* Copyright on the left, legal links on the right */
@media (min-width: 720px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    margin-top: clamp(32px, 4.4vw, 64px);
  }

  .footer__copyright {
    text-align: left;
  }

  .footer__legal {
    width: auto;
    gap: clamp(32px, 5vw, 72px);
  }
}

/* ---------- Desktop ---------- */

@media (min-width: 960px) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "blurb   nav"
      "contact contact";
    column-gap: 48px;
    align-items: start;
  }

  /* Contact always sits below both the blurb and the link columns */
  .footer__contact {
    margin-top: 30px;
  }

  .footer__nav {
    margin-top: 0;
    grid-template-columns: auto auto auto;
    grid-template-areas: "account connect navigate";
    column-gap: clamp(48px, 7.6vw, 110px);
  }

  .footer__logo {
    margin-top: clamp(96px, 12.8vw, 184px);
  }

  .footer__copyright {
    font-size: 15px;
  }
}
