/* ==========================================================================
   Footer — burst + note, socials, "Start a project", vertical rights, marquee
   Reference: css-layout §15, js-motion §5 (footer marquee) and §7 (Footer).
   ========================================================================== */

.footer {
  --footer-marquee-h: calc(.76rem + 11px); /* 1 line at lh 1 + 2 × 5px padding + 1px border */
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-bottom: calc(5rem + var(--footer-marquee-h));
}

/* Bottom fade into black (ref .gradient) */
.footer::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 50vw;
  background: linear-gradient(180deg, transparent, var(--ink));
  pointer-events: none;
}

.footer__grid {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.footer__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Mobile: a plain row under the CTA */
.footer__rights {
  order: 1;
  margin-top: 3.5rem;
  color: var(--smoke);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Note: the paragraph starts at the burst's centre (ref .sun-box)
   -------------------------------------------------------------------------- */
.footer__note {
  position: relative;
  left: .45rem;
  margin-bottom: 5rem;
}

/* [data-reveal] — placed with left, never transform */
.footer__note .burst {
  position: relative;
  left: -4.6rem;
  width: 10rem;
  color: var(--pearl);
}

.footer__note svg { animation: nct-rotate 28s linear infinite; } /* ref 10s; slowed so text over it stays calm */

.footer__note p {
  position: absolute;
  top: 50%;
  left: 0;
  white-space: nowrap;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Socials + CTA
   -------------------------------------------------------------------------- */
.footer__social { margin-bottom: 8rem; }

.footer__social a {
  display: inline-block;
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--pearl);
  transition: color .4s linear;
}
.footer__social a:focus-visible { color: var(--champagne); }

.footer__cta {
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--champagne);
}

/* --------------------------------------------------------------------------
   Bottom marquee
   -------------------------------------------------------------------------- */
.marquee--bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 5px 0;
  border-top: 1px solid var(--hair);
  font-size: .76rem;                /* ref h6 */
  transition: color .4s linear;
}
.marquee--bottom .marquee__item { margin-right: 0; } /* the slash margins space the loop evenly */
.marquee--bottom:focus-visible {
  outline-offset: -3px;             /* sits on the page's last pixel; keep the ring inside */
  color: var(--champagne);
}

.marquee__slash { margin: 0 .4rem; }

@media (hover: hover) {
  .footer__social a:hover,
  .marquee--bottom:hover { color: var(--champagne); }
}

/* --------------------------------------------------------------------------
   ≥768: rights as vertical text bottom-left, content in the right half
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .footer__grid { flex-direction: row; }

  .footer__main {
    flex: 0 0 50%;
    margin-left: auto;
    align-items: flex-start;
    text-align: left;
  }

  /* Visually identical to the ref's rotate(-90deg), but the box shrink-wraps the
     rotated text so it can sit exactly in the bottom-left corner. */
  .footer__rights {
    order: 0;
    align-self: flex-end;
    margin: 0 0 0 var(--gutter);
    writing-mode: vertical-rl;
    text-align: start;
    transform: rotate(180deg);
  }

  .footer__note { left: 0; }

  .footer__note .burst {
    left: -10rem;
    width: 20rem;
  }
}

@media (min-width: 992px) {
  .footer__cta { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .footer__note svg { animation: none; }
}
