/* TCC footer: a TCC version of the Tarni Resources footer (Sam, 6 Nov 2026).
   Needs tokens.css first. Structure and motion follow Tarni's: the footer sits sticky under the page and is
   uncovered as the last section scrolls away; the last section's bottom corners round out, each part rises
   into place, then the wordmark paints in. Dark ground only.

   Polished 6 Nov 2026 to docs/polish-standard-2026-11-06.md: type roles A1, colour levels A2 (labels Meta, links
   Accent or heading off-white), states A4 (hover only on fine pointers, 2px Accent focus ring, pressed), 44px targets
   under 1080px. Motion timings live in footer.js's MOTION block.

   Page contract: the content above the footer must sit in <main> (or any element with .tcc-ft-above), and its
   last section must paint its own opaque background, or the footer shows through. */

main, .tcc-ft-above { position: relative; z-index: 1; }

.tcc-ft {
  --ft-ground: var(--tcc-ink);
  --ft-gut: var(--tcc-edge);
  --ft-ease: var(--tcc-easing-soft);
  --ft-body: clamp(17px, calc(16.625px + .0955vw), calc(18px + var(--tcc-up) * .01));   /* Body role: 17 at 393, 18 at 1440 */
  --ft-meta: 15px;                                                                         /* Meta role */
  --ft-c-head: var(--tcc-heading);     /* A2 Heading level */
  --ft-c-body: var(--tcc-on-dark-muted);
  --ft-c-meta: var(--tcc-text-muted);
  --ft-c-acc: var(--tcc-brand-hi);
  position: sticky; bottom: 0; z-index: 0; overflow: hidden;
  background: var(--ft-ground); color: var(--ft-c-body);
  font-family: var(--tcc-font-body); font-size: var(--ft-body); line-height: 1.55;
  /* paints the ground for 100px above the footer, behind the page, so the last section's rounded corners
     show the footer's black rather than the body's white (bench body is white; seen on film 6 Nov) */
  box-shadow: 0 -100px 0 0 var(--ft-ground);
  padding-top: clamp(64px, 9vh, 110px);
  -webkit-font-smoothing: antialiased;
}
/* taller than the window, it would hide its own top: it flows instead (set by footer.js) */
.tcc-ft.is-flow { position: relative; }

.tcc-ft__in {
  padding-left: max(var(--ft-gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--ft-gut), env(safe-area-inset-right, 0px));
}

/* closing call to action */
.tcc-ft__cta { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.tcc-ft__cta h2 {
  margin: 0; color: var(--tcc-heading);
  font-family: var(--tcc-font-heading); font-weight: 500;   /* Statement role: 45 at 393, 98 at 1440 */
  font-size: clamp(2.75rem, 1.6rem + 5vw, calc(6.5rem + var(--tcc-up) * .04));
  line-height: .95; letter-spacing: -0.035em; text-wrap: balance;
}
.tcc-ft__rot-pre { display: block; color: var(--ft-c-head); }
/* the rotator (after the homepage's tcc-rotator, Sam 6 Nov): every ending sits in the same grid cell, so the box is
   always as tall as the longest ending wraps at this width and nothing below moves when the line changes */
.tcc-ft__rot-stack { display: grid; color: var(--ft-c-acc); }
.tcc-ft__rot-line { grid-area: 1 / 1; text-wrap: balance; }
/* leaving: the whole line goes at once, 300ms, accelerating */
.tcc-ft__rot-w { display: inline-block; opacity: 0; filter: blur(12px);
  transition: opacity .3s cubic-bezier(.55,0,1,.45), filter .3s cubic-bezier(.55,0,1,.45); }
/* arriving: word by word, 90ms apart (the homepage's spacing), each 450ms on the arrive easing, after a 180ms lead
   so the old line has mostly cleared; most of each word's blur is gone in its first 150ms */
.tcc-ft__rot-line.is-on .tcc-ft__rot-w { opacity: 1; filter: none;
  transition: opacity .45s var(--tcc-easing-arrive), filter .45s var(--tcc-easing-arrive);
  transition-delay: calc(180ms + var(--i, 0) * 90ms); }

/* the closing actions (Tarni's): text links with a plain arrow that take a button ground on hover. Control text
   (Host Grotesk 600, the control scale's size), heading off-white, the arrow in Accent; never the TCC mark's arrow */
.tcc-ft__acts { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -1.1em; }
.tcc-ft__act {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: max(var(--tcc-control-touch), var(--tcc-control-h-lg));
  padding: 0 1.1em; border-radius: var(--tcc-radius-pill); border: 0;
  color: var(--ft-c-head); font-weight: 600; font-size: calc(16px + var(--tcc-up) * .01); line-height: 1; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s var(--ft-ease), color .2s var(--ft-ease), transform .16s var(--ft-ease);
}
.tcc-ft__ar { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--ft-c-acc); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .24s var(--ft-ease), stroke .2s var(--ft-ease); }
@media (hover: hover) and (pointer: fine) {
  .tcc-ft__act:hover { background: var(--tcc-brand); color: var(--tcc-text-on-brand); }
  .tcc-ft__act:hover .tcc-ft__ar { stroke: var(--tcc-text-on-brand); transform: translateX(4px); }
}
.tcc-ft__act:active { transform: scale(.97); }
.tcc-ft__act:active .tcc-ft__ar { transform: translateX(2px); }

/* columns */
.tcc-ft__grid {
  position: relative; display: grid; gap: 32px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, .6fr) minmax(0, .9fr);
  margin-top: clamp(44px, 7vh, 80px); padding-top: 30px;
}
.tcc-ft h3 {   /* Label role, Meta colour (the labels are not interactive) */
  margin: 0 0 14px; font-family: var(--tcc-font-body); font-weight: 600; line-height: 1.3;
  color: var(--ft-c-meta); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.tcc-ft__off { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 20px 40px; }
.tcc-ft__off p { margin: 0; font-size: var(--ft-meta); line-height: 1.5; color: var(--ft-c-meta); }   /* addresses: Meta */
.tcc-ft__off b { display: block; margin-bottom: 2px; color: var(--ft-c-head); font-weight: 500; font-size: var(--ft-body); line-height: 1.4; }

/* the text-link style (A3): Accent, 500, 1px underline at .2em; hover lifts to white and thickens the line */
.tcc-ft__dir, .tcc-ft__links--sub .tcc-ft__tl {
  color: var(--ft-c-acc); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: .2em; text-decoration-color: currentColor;
  transition: color .2s var(--ft-ease), text-decoration-thickness .2s var(--ft-ease);
}
.tcc-ft__dir { display: inline-flex; align-items: center; min-height: var(--tcc-control-touch); font-size: var(--ft-meta); }
@media (hover: hover) and (pointer: fine) {
  .tcc-ft__dir:hover, .tcc-ft__links--sub .tcc-ft__tl:hover { color: var(--tcc-text); text-decoration-thickness: 2px; }
}
.tcc-ft__dir:active, .tcc-ft__links a:active, .tcc-ft__base a:active { opacity: .7; }

.tcc-ft__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tcc-ft__links a {   /* site links: Body size, 500, heading off-white; hover goes Accent and draws the line (Tarni's) */
  position: relative; display: inline-block; color: var(--ft-c-head); text-decoration: none;
  font-size: var(--ft-body); font-weight: 500; line-height: 1.4;
  transition: color .2s var(--ft-ease), opacity .16s var(--ft-ease);
}
.tcc-ft__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .24s var(--ft-ease); }
@media (hover: hover) and (pointer: fine) {
  .tcc-ft__links a:hover { color: var(--ft-c-acc); }
  .tcc-ft__links a:hover::after { transform: scaleX(1); }
}
.tcc-ft__links--sub .tcc-ft__tl::after { content: none; }
.tcc-ft__hours { margin: 14px 0 0; font-size: var(--ft-meta); line-height: 1.5; color: var(--ft-c-meta); }

/* legal line: Meta. Its one link stays Meta with a hairline underline so it reads as a link without lifting the row */
.tcc-ft__base { position: relative; margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  font-size: var(--ft-meta); line-height: 1.5; color: var(--ft-c-meta); }
.tcc-ft__base a { color: var(--ft-c-meta); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
  text-decoration-color: rgba(255,255,255,.3); transition: color .2s var(--ft-ease), text-decoration-color .2s var(--ft-ease); }
@media (hover: hover) and (pointer: fine) { .tcc-ft__base a:hover { color: var(--tcc-text); text-decoration-color: currentColor; } }

/* focus (A4): one ring everywhere, 2px Accent at 3px */
.tcc-ft a:focus-visible { outline: 2px solid var(--ft-c-acc); outline-offset: 3px; border-radius: 4px; }
.tcc-ft .tcc-ft__act:focus-visible { border-radius: var(--tcc-radius-pill); }

/* the wordmark: very large, one flat tone (cyan at low strength on black), partly below the window's bottom edge;
   it paints itself in when the footer opens. Never rotated. */
.tcc-ft__mark {
  position: relative; display: block; width: 100%; height: auto; overflow: visible;
  margin-top: clamp(20px, 3vh, 40px);
  margin-bottom: calc(-1 * (100vw - 2 * var(--ft-gut)) * 233.56 / 1700 * .18);
}
.tcc-ft__mark g { fill: var(--tcc-brand); fill-opacity: .17; }
.tcc-ft__mark path { transition: transform 1s var(--tcc-easing-arrive), opacity .8s var(--tcc-easing-arrive); }
.tcc-ft.js .tcc-ft__mark path { transform: translateY(14px); opacity: 0; }
.tcc-ft.js.is-marked .tcc-ft__mark path { transform: none; opacity: 1; }

/* phone and short windows (the footer flows): each part rises once as it enters, triggered, not scrubbed */
.tcc-ft.js.is-flow [data-ft], .tcc-ft.js.is-flow .tcc-ft__grid > div {
  transition: transform .8s var(--tcc-easing-arrive), opacity .55s var(--tcc-easing-arrive); }
.tcc-ft.js.is-flow [data-ft]:not(.is-up), .tcc-ft.js.is-flow .tcc-ft__grid > div:not(.is-up) { transform: translateY(32px); opacity: 0; }

@media (max-width: 1080px) {
  .tcc-ft__grid { grid-template-columns: 1fr 1fr; }
  .tcc-ft__grid > div:first-child { grid-column: 1 / -1; }
  /* touch widths: every link is a 44px target */
  .tcc-ft__links { gap: 0; }
  .tcc-ft__links a { display: inline-flex; align-items: center; min-height: var(--tcc-control-touch); }
  .tcc-ft__links a::after { bottom: 9px; }
  .tcc-ft__base a { display: inline-flex; align-items: center; min-height: var(--tcc-control-touch); }
}
@media (max-width: 720px) {
  .tcc-ft__grid { gap: 36px 20px; }
  .tcc-ft__grid > div:last-child { grid-column: 1 / -1; }
  .tcc-ft__off { grid-template-columns: 1fr; }
  .tcc-ft__base { flex-direction: column; align-items: flex-start; }
  /* the legal line stacks: the company and the ABN each take a line, so the separator would dangle */
  .tcc-ft__base > span:first-child { display: flex; flex-direction: column; }
  .tcc-ft__sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tcc-ft *, .tcc-ft *::after { transition: none !important; }
  .tcc-ft.js .tcc-ft__mark path { transform: none; opacity: 1; }
  .tcc-ft.js [data-ft], .tcc-ft.js .tcc-ft__grid > div { transform: none !important; opacity: 1 !important; }
}

/* screen-reader-only text (the Directions links name their gym) */
.tcc-ft__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tcc-ft__social { margin-top: 10px; }
.tcc-ft__nw { white-space: nowrap; }
