/* BRAINDANCE · Footer
   The signature: the Contact thread spreads into the top edge, the official logo leads, a ghost BRAINDANCE lights up at the very end.
   Restrained motion; everything is visible at once with reduced motion. */

.site-footer { position: relative; z-index: 2; background: var(--obsidian); overflow: hidden; isolation: isolate; }
/* static grain */
.site-footer::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* top edge: spreads from the point where the Contact thread ends */
.ft-edge { position: relative; height: 2px; }
.ft-edge i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--border) 0, var(--lime) var(--ex, 75%), var(--border) 100%);
  clip-path: inset(0 var(--er, 0px) 0 var(--el, 0px)); }

/* columns */
.ft-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; padding-top: clamp(72px, 8vw, 120px); }
.ft-brand { grid-column: 1 / span 4; display: grid; gap: 22px; align-content: start; }
.ft-logo { display: inline-block; justify-self: start; overflow: hidden; }
.ft-logo img { width: clamp(150px, 13vw, 204px); height: auto; transition: transform 1100ms var(--ease-out), clip-path 1100ms var(--ease-out); clip-path: inset(0 0 0 0); }
.js .ft-brand:not(.is-in) .ft-logo img { clip-path: inset(100% 0 0 0); transform: translateY(18%); }
.ft-logo:focus-visible { outline-offset: 6px; }
.ft-tagline { margin: 0; font-size: 16.5px; color: var(--text-2); max-width: 26ch; }

.ft-col { grid-column: span 3; display: grid; gap: 18px; align-content: start; }
.ft-svc { grid-column: span 2; }
.ft-head { margin: 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; }
.ft-col a, .ft-write { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 40px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-stretch: 104%; font-size: 18px; letter-spacing: -.01em; transition: color var(--dur-ui) var(--ease-out); }
.ft-n { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--muted); min-width: 18px; transition: color var(--dur-ui) var(--ease-out); }
.ft-col a:hover, .ft-write:hover { color: var(--lime); }
.ft-col a:hover .ft-n { color: var(--lime); }

/* hover arrow ↗ drawn from nothing */
.ft-arr { width: 12px; height: 12px; flex-shrink: 0; opacity: 0; transform: translate(-6px, 6px); transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23C5FF38' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M2 10 10 2M4 2h6v6'/%3E%3C/svg%3E") center / contain no-repeat; }
a:hover > .ft-arr, a:focus-visible > .ft-arr { opacity: 1; transform: none; }
.ft-write .ft-arr { opacity: 1; transform: none; }
.ft-write:hover .ft-arr { transform: translate(3px, -3px); }

/* column reveal */
[data-ft-reveal] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.ft-grid > :nth-child(2) { transition-delay: 80ms; } .ft-grid > :nth-child(3) { transition-delay: 160ms; } .ft-grid > :nth-child(4) { transition-delay: 240ms; }
.js .ft-col:not(.is-in) { opacity: 0; transform: translateY(24px); }

/* ghost wordmark */
.ft-word { margin-top: clamp(64px, 8vw, 120px); text-align: center; white-space: nowrap; line-height: .8; user-select: none;
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%; font-size: 11.4vw; letter-spacing: -.05em; }
.ft-word span { color: rgba(245, 245, 242, .04); transition: color 700ms var(--ease-out); }
.ft-word span.on { color: rgba(245, 245, 242, .12); }

/* bottom bar */
.ft-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px)); }
.ft-copy { margin: 0; font-size: 14px; color: var(--text-2); }
.ft-top { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.ft-top-icon { position: relative; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--border-strong); display: grid; place-items: center; overflow: hidden; color: var(--lime); transition: box-shadow var(--dur-ui) var(--ease-out); }
.ft-top-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 420ms var(--ease-out); }
.ft-top-icon svg + svg { position: absolute; transform: translateY(30px); }
.ft-top:hover .ft-top-icon { box-shadow: inset 0 0 0 1.5px var(--lime); }
.ft-top:hover .ft-top-icon svg:first-child { transform: translateY(-30px); }
.ft-top:hover .ft-top-icon svg + svg { transform: translateY(0); }

/* tablet */
@media (max-width: 1023px) {
  .ft-brand { grid-column: 1 / -1; }
  .ft-col, .ft-svc { grid-column: span 4; }
}
/* mobile */
@media (max-width: 639px) {
  .ft-grid { row-gap: 40px; }
  .ft-logo img { width: 104px; }
  .ft-col, .ft-svc { grid-column: span 6; }
  .ft-contact { grid-column: 1 / -1 !important; }
  .ft-col a, .ft-write { font-size: 17px; min-height: 44px; }
  .ft-word { margin-top: 56px; }
  .ft-bar { flex-direction: column-reverse; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .js .ft-brand:not(.is-in) .ft-logo img { clip-path: none; transform: none; }
  .js .ft-col:not(.is-in) { opacity: 1; transform: none; }
  .ft-word span { color: rgba(245, 245, 242, .12); }
  .ft-edge i { clip-path: none; }
}

/* wordmark particles (js/footer-particles.js): canvas over the word band, never takes input or layout space */
.ft-word { position: relative; z-index: 1; cursor: default; }
.ft-particles { position: absolute; left: 0; z-index: 2; pointer-events: none; }
.ft-word.is-dissolving span { transition: color 700ms var(--ease-out), opacity 420ms var(--ease-out); }
