/*
 * The footer, 2026-09-15.
 *
 * A dark closing band: the brand and its two actions, four link columns
 * (explore, shops, help, policies), and the name set huge along the bottom
 * edge. The name is an SVG with textLength, so it fills the width exactly at
 * every screen size without measuring anything in script.
 */

.site-footer {
  background:
    radial-gradient(40% 55% at 0% 0%, rgb(47 184 148 / 22%) 0%, transparent 70%),
    radial-gradient(35% 45% at 100% 30%, rgb(245 165 36 / 12%) 0%, transparent 70%),
    linear-gradient(180deg, #06342f 0%, #04241f 100%);
  color: #e9f3ef;
  display: grid;
  gap: 48px 64px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  overflow: hidden;
  padding: 80px max(5%, calc((100% - 1240px) / 2)) 0;
  position: relative;
}

.site-footer a {
  color: rgb(233 243 239 / 80%);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.site-footer a:hover {
  color: #fff;
}

/* --- brand ---------------------------------------------------------------- */

/* The wordmark PNG carries a lot of empty canvas; the shared .wordmark crop
   from the header trims it, and the paper chip keeps its colours readable on
   the dark ground. */
.footer-logo {
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 16px 34px -20px rgb(0 0 0 / 60%);
  display: inline-flex;
  padding: 12px 18px;
}

.site-footer .footer-logo .wordmark {
  height: 48px;
  width: 212px;
}

.footer-tagline {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-top: 26px;
}

.footer-about {
  color: rgb(233 243 239 / 72%);
  font-size: 15px;
  line-height: 1.65;
  margin-top: 10px;
  max-width: 340px;
}

.footer-status {
  align-items: center;
  color: rgb(233 243 239 / 72%);
  display: flex;
  font-size: 13px;
  gap: 10px;
  margin-top: 18px;
}

.footer-status .status-dot {
  animation: footer-pulse 2.4s ease-in-out infinite;
  background: var(--mint);
}

.footer-cta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.site-footer .footer-cta .button {
  color: var(--teal-deep);
}

.site-footer .footer-ghost {
  border: 1px solid rgb(233 243 239 / 35%);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
}

.site-footer .footer-ghost:hover {
  background: rgb(255 255 255 / 10%);
  border-color: #fff;
}

/* --- link columns ---------------------------------------------------------- */

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

.site-footer .footer-heading {
  color: var(--lime);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.footer-links ul {
  display: grid;
  gap: 13px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 15px;
  position: relative;
}

.footer-links a:not(.footer-icon-link)::after {
  background: var(--lime);
  bottom: -4px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
  width: 100%;
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.footer-icon-link {
  align-items: flex-start;
  display: inline-flex;
  gap: 8px;
  overflow-wrap: anywhere;
}

.footer-icon-link svg {
  color: var(--mint);
  flex-shrink: 0;
  height: 19px;
  margin-top: 1px;
  width: 19px;
}

/* --- social, giant name, base --------------------------------------------- */

.footer-social {
  align-items: baseline;
  border-top: 1px solid rgb(233 243 239 / 14%);
  color: rgb(233 243 239 / 72%);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 8px 18px;
  grid-column: 1 / -1;
  padding-top: 26px;
}

.site-footer .footer-social .footer-heading {
  margin: 0;
}

.footer-giant {
  grid-column: 1 / -1;
  margin: -8px 0 -2px;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, rgb(0 0 0 / 25%) 100%);
  mask-image: linear-gradient(180deg, #000 45%, rgb(0 0 0 / 25%) 100%);
  user-select: none;
}

.footer-giant svg {
  display: block;
  height: auto;
  width: 100%;
}

.footer-giant text {
  font-family: Perks, Arial, sans-serif;
  font-size: 150px;
  font-weight: 800;
  letter-spacing: -2px;
}

/* On a phone one line of the name is barely taller than a heading, so it
   stacks into two lines and gets four times the height. */
.footer-giant .giant-stacked {
  display: none;
}

.giant-stacked text {
  font-size: 262px;
  letter-spacing: -6px;
}

.footer-base {
  align-items: center;
  border-top: 1px solid rgb(233 243 239 / 14%);
  color: rgb(233 243 239 / 66%);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px 28px;
  grid-column: 1 / -1;
  justify-content: space-between;
  padding: 20px 0 max(26px, env(safe-area-inset-bottom));
}

.site-footer .back-to-top {
  color: #fff;
  font-weight: 700;
}

@keyframes footer-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(47 184 148 / 55%);
  }
  50% {
    box-shadow: 0 0 0 6px rgb(47 184 148 / 0%);
  }
}

/* The name rises into place as it scrolls into view, where supported. The
   range ends when it has fully entered: it sits at the very bottom of the
   page, so a range reaching further would never finish. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .footer-giant {
      animation: footer-rise linear both;
      animation-range: entry 0% entry 100%;
      animation-timeline: view();
    }
  }
}

@keyframes footer-rise {
  from {
    opacity: 0.2;
    translate: 0 30%;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* --- narrower screens ---------------------------------------------------- */

@media (max-width: 960px) {
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .site-footer {
    gap: 40px;
    padding: 60px 20px 0;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-base {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-giant .giant-wide {
    display: none;
  }

  .footer-giant .giant-stacked {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-status .status-dot {
    animation: none;
  }

  .site-footer a,
  .footer-links a::after,
  .site-footer .footer-ghost {
    transition: none;
  }
}
