/* Footer — Ft5 statement as a closing call to action, the site map and the base line.
 *
 * The footer is the chrome's one ink surface: black, white and the electric blue.
 */

.site-footer {
  --color-focus: var(--color-blue-soft);
  --logo-dot: var(--color-blue);
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: var(--space-3xl) max(var(--space-lg), env(safe-area-inset-bottom));
  background-color: var(--color-ink);
  color: var(--color-paper);
  color-scheme: dark;
}

/* Moving gradient: a blue pool and a lime pool drift past each other on the ink, like the
 * About section. Kept faint so white and grey text stay crisp. Transform-only; paused
 * off-screen ([data-ambient], site.js) and still with reduced motion. */
.site-footer__pools {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.site-footer__pools::before,
.site-footer__pools::after {
  content: "";
  position: absolute;
  width: 70vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform;
}

.site-footer__pools::before {
  inset-block-start: -35%;
  inset-inline-start: -20%;
  background-image: radial-gradient(circle, color-mix(in oklch, var(--color-blue) 55%, transparent) 0 18%, transparent 62%);
  animation: footer-drift-a var(--dur-drift) var(--ease-in-out) infinite alternate;
}

.site-footer__pools::after {
  inset-block-end: -45%;
  inset-inline-end: -25%;
  background-image: radial-gradient(circle, color-mix(in oklch, var(--color-lime) 22%, transparent) 0 14%, transparent 60%);
  animation: footer-drift-b calc(var(--dur-drift) * 1.35) var(--ease-in-out) infinite alternate;
}

@keyframes footer-drift-a {
  50% {
    transform: translate(40%, 20%) scale(1.15);
  }

  to {
    transform: translate(70%, 40%) scale(0.95);
  }
}

@keyframes footer-drift-b {
  50% {
    transform: translate(-30%, -35%) scale(0.9);
  }

  to {
    transform: translate(-60%, -15%) scale(1.15);
  }
}

.site-footer.is-paused .site-footer__pools::before,
.site-footer.is-paused .site-footer__pools::after {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__pools::before,
  .site-footer__pools::after {
    animation: none;
  }
}

.site-footer__inner {
  display: grid;
  gap: var(--space-3xl);
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Closing call to action --------------------------------------------------
 * Mark, hashtag statement, one line, two direct buttons, location + studio time.
 * Left-aligned in one column, nothing inline — calm and easy to scan. */

.footer-cta {
  display: grid;
  justify-items: start;
  gap: var(--space-lg);
}

.footer-cta__mark {
  --logo-dot: var(--color-blue);
  color: var(--color-paper);
}

.footer-cta__mark {
  display: inline-block;
  perspective: 600px;
}

.footer-cta__logo {
  width: auto;
  height: 2.75rem;
}

/* The mark spins left–right without stopping, like a game's loading emblem: one steady
 * turn after another (linear, so there's no pause between turns). Off with reduced motion. */
@keyframes footer-mark-flip {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .footer-cta__logo {
    animation: footer-mark-flip 2.4s linear infinite;
  }
}

.site-footer .frame {
  --frame-color: color-mix(in oklch, var(--color-paper) 10%, transparent); /* faint white on ink */
}

.footer-statement {
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-style: normal;
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  overflow-wrap: anywhere; /* safety net; <wbr> already breaks it between words */
}

/* The tagline is a hashtag; the # takes the brand blue. */
.footer-statement__hash {
  margin-inline-end: 0.04em;
  color: var(--color-blue);
}

.footer-cta__lede {
  max-width: 46ch;
  color: var(--color-muted-dark);
  font-size: var(--text-md);
  line-height: 1.5;
}

.footer-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-block-start: var(--space-xs);
}

/* On the ink footer an ink fill would vanish: the blue button fills with paper, the light
 * one with brand blue. */
.site-footer .btn--primary {
  --btn-fill: var(--color-paper);
  --btn-fill-text: var(--color-ink);
}

.site-footer .btn--light {
  --btn-fill: var(--color-blue);
  --btn-fill-text: var(--color-paper);
}

/* Small, tracked, uppercase — where the studio is and what time it is there. */
.footer-cta__meta {
  margin-block-start: var(--space-sm);
  color: var(--color-muted-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.footer-cta__meta time {
  color: var(--color-paper);
}

/* Social links under the location line. */
.footer-cta__socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
}

.footer-cta__social {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2.75rem;
  color: var(--color-paper);
  font-weight: 700;
  text-decoration-color: transparent;
  white-space: nowrap;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}

.footer-cta__social svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  transition: rotate var(--dur-long) var(--ease-out);
}

.footer-cta__social-dot {
  fill: var(--color-blue);
  stroke: none;
}

.footer-cta__handle {
  color: var(--color-muted-dark);
  font-weight: 600;
}

@media (hover: hover) {
  .footer-cta__social:hover {
    text-decoration-color: currentColor;
  }

  .footer-cta__social:hover svg {
    rotate: -8deg;
  }
}

/* Site map — the "burger" ---------------------------------------------------
 * Top bun: Explore, one word per column.
 * Filling: Services · Packages · Visit · Follow, in the same four columns,
 * evenly spaced from the left edge to the right edge.
 * Bottom bun: the base line. */

.footer-burger {
  display: grid;
}

/* Top bun --------------------------------------------------------------------- */

/* Breathing room above the rule. (On the <nav>, not the <ul>: base.css resets
 * ul[role="list"] padding with a stronger selector.) */
.footer-explore {
  padding-block-end: var(--space-xl);
}

.footer-explore__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs) var(--space-lg);
}

.footer-explore__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

/* A blue dot slides in before the word on hover — the same move as the menu links. */
.footer-explore__link::before {
  content: "";
  width: 0.22em;
  height: 0.22em;
  margin-inline-end: -0.22em;
  border-radius: 50%;
  background-color: var(--color-blue);
  scale: 0;
  transition:
    scale var(--dur-short) var(--ease-out),
    margin var(--dur-short) var(--ease-out);
}

.footer-explore__link:focus-visible::before {
  scale: 1;
  margin-inline-end: 0.3em;
}

@media (hover: hover) {
  .footer-explore__link:hover::before {
    scale: 1;
    margin-inline-end: 0.3em;
  }
}

/* Filling ---------------------------------------------------------------------- */

/* Equal columns: one on small phones, two on wider phones, four on desktop.
 * The two wrappers span the full row and pass the columns through with subgrid,
 * so all four groups share one set of tracks. */
.footer-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl) var(--space-lg);
  padding-block: var(--space-xl);
  border-block-start: var(--rule-hair) solid var(--color-rule-dark);
}

.footer-map,
.footer-aside {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  row-gap: var(--space-xl);
}

@media (min-width: 30rem) {
  .footer-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Desktop: the whole burger is one grid of four content-width columns, spread
 * with space-between — the first column starts at © and the last ends at
 * "Terms of service", and the three gaps between them are equal. The Explore
 * row and the filling pass these tracks through with subgrid, so each Explore
 * word stands over its group. */
@media (min-width: 48rem) {
  .footer-burger {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    column-gap: var(--space-lg);
  }

  .footer-explore,
  .footer-explore__list,
  .footer-index,
  .footer-base {
    grid-column: 1 / -1;
  }

  .footer-explore,
  .footer-explore__list,
  .footer-index {
    display: grid;
    grid-template-columns: subgrid;
  }

  .footer-explore__list {
    align-items: center;
  }

  .footer-map {
    grid-column: 1 / 3;
  }

  .footer-aside {
    grid-column: 3 / 5;
  }
}

/* Inside each column the text reads left-aligned, flush with the Explore word above. */
.footer-group {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--space-sm);
  text-align: start;
}

/* Group titles: the same small tracked label as the location line above. */
.footer-group__title {
  color: var(--color-muted-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-group__list {
  display: grid;
  justify-items: start;
  gap: var(--space-2xs);
}

.footer-group__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-xs);
}

/* Inline-block with padding: a 44px touch target on phones, a comfortable row on desktop. */
.footer-link {
  display: inline-block;
  padding-block: 0.625rem;
  font-weight: 600;
  line-height: var(--leading-snug);
  text-decoration-color: transparent;
  white-space: nowrap;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}

/* Links that leave the site (maps, social) carry a small arrow. */
.footer-link[rel~="noopener"]::after {
  content: " \2197"; /* ↗ */
  color: var(--color-muted-dark);
}

.footer-link[aria-current="page"] {
  text-decoration-color: var(--color-blue-soft);
}

@media (pointer: fine) {
  .footer-link {
    padding-block: 0.3125rem;
  }
}

@media (hover: hover) {
  .footer-link:hover {
    text-decoration-color: currentColor;
  }
}

.footer-address {
  color: var(--color-paper);
  line-height: var(--leading-body);
}

/* Base line ----------------------------------------------------------------- */

/* © on the left, the ringed 0 · 1 · 2 in the middle, legal links in the right-hand corner.
 * On phones the three stack, centred. */
.footer-base {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  padding-block-start: var(--space-lg);
  border-block-start: var(--rule-hair) solid var(--color-rule-dark);
  color: var(--color-muted-dark);
  font-size: var(--text-sm);
  text-align: center;
}

@media (min-width: 48rem) {
  .footer-base {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    text-align: start;
  }

  .footer-base > :first-child {
    justify-self: start;
  }

  .footer-base__legal {
    justify-self: end;
  }
}

.footer-base__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: var(--space-lg);
}

/* The management's numbers: three ringed badges, like the patches on a band's jumpsuits. */
.footer-base__crew {
  display: flex;
  gap: var(--space-xs);
}

.footer-base__badge {
  width: 2rem;
  height: 2rem;
  fill: var(--color-paper);
  transition:
    rotate var(--dur-reveal) var(--ease-out),
    fill var(--dur-short) var(--ease-out);
}

@media (hover: hover) {
  .footer-base__badge:hover {
    rotate: 1turn;
    fill: var(--color-blue);
  }
}

.footer-base__link {
  display: inline-block;
  padding-block: 0.75rem;
  text-decoration-color: transparent;
  white-space: nowrap;
  transition:
    color var(--dur-short) var(--ease-out),
    text-decoration-color var(--dur-short) var(--ease-out);
}

@media (pointer: fine) {
  .footer-base__link {
    padding-block: var(--space-2xs);
  }
}

@media (hover: hover) {
  .footer-base__link:hover {
    color: var(--color-paper);
    text-decoration-color: currentColor;
  }
}
