/* Site footer (shared by every page) */

/* No hard top edge: the footer fades in from the page background,
   and its glow/grid bleed upward so the two sections blend. */
.af-footer {
  position: relative;
  isolation: isolate;
  margin-top: 2rem;
  padding-top: 5rem;
  overflow-x: clip;
  overflow-y: visible;
  color: var(--text-secondary, #b7b7bb);
  font-family: var(--font-body, system-ui, sans-serif);
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 12, 0.6) 180px, #0b0b0d 420px);
  border-top: 0 !important;
}
/* soft accent haze sitting across the seam */
.af-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -160px;
  left: 50%;
  width: min(1400px, 140%);
  height: 520px;
  transform: translateX(-50%);
  background:
    radial-gradient(40% 45% at 50% 50%, rgba(var(--accent-rgb, 186, 151, 251), 0.16) 0%, transparent 100%),
    radial-gradient(70% 60% at 50% 55%, rgba(var(--accent-rgb, 186, 151, 251), 0.05) 0%, transparent 100%);
  filter: blur(20px);
  pointer-events: none;
}
.af-footer__glow {
  position: absolute;
  z-index: -1;
  top: -60px;
  left: 50%;
  width: 720px;
  height: 320px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb, 186, 151, 251), 0.3), transparent 70%);
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  animation: af-breathe 8s ease-in-out infinite;
}
@keyframes af-breathe {
  0%, 100% { opacity: 0.45; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.65; transform: translateX(-50%) scale(1.08); }
}
.af-footer__grid-bg {
  position: absolute;
  z-index: -1;
  top: -120px;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  /* fades in from nothing above the seam, strongest around the CTA, gone by the bottom */
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, #000 30%, #000 45%, transparent 85%),
    radial-gradient(60% 100% at 50% 30%, #000 0%, transparent 80%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(180deg, transparent 0%, #000 30%, #000 45%, transparent 85%),
    radial-gradient(60% 100% at 50% 30%, #000 0%, transparent 80%);
          mask-composite: intersect;
  pointer-events: none;
}

.af-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ---------- CTA ---------- */
.af-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 3.25rem;
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid rgba(var(--accent-rgb, 186, 151, 251), 0.2);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(var(--accent-rgb, 186, 151, 251), 0.16) 0%, transparent 60%),
    rgba(255, 255, 255, 0.025);
  box-shadow: 0 24px 60px -36px rgba(var(--accent-rgb, 186, 151, 251), 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.af-cta__title {
  font-family: "Clash Display", var(--font-body, system-ui, sans-serif);
  margin: 0 0 4px;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.af-cta__sub { margin: 0; font-size: 14px; color: var(--text-muted, #8a8a90); }
.af-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.af-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.af-btn svg { width: 17px; height: 17px; }
.af-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb, 186, 151, 251), 0.45);
  background: rgba(var(--accent-rgb, 186, 151, 251), 0.1);
}
.af-btn--primary {
  color: var(--text-on-accent, #0b0b0d);
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--cl-accent, #ba97fb)) 80%, #fff 20%), var(--accent, var(--cl-accent, #ba97fb)));
  box-shadow: 0 10px 26px -10px rgba(var(--accent-rgb, 186, 151, 251), 0.8);
}
.af-btn--primary:hover {
  color: var(--text-on-accent, #0b0b0d);
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--cl-accent, #ba97fb)) 80%, #fff 20%), var(--accent, var(--cl-accent, #ba97fb)));
  filter: brightness(1.06);
  box-shadow: 0 14px 32px -10px rgba(var(--accent-rgb, 186, 151, 251), 0.95);
}

/* ---------- Main ---------- */
.af-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 2.75rem;
}
.af-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.af-brand__logo img {
  height: 30px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb, 186, 151, 251), 0.55));
}
.af-brand__logo:hover { color: #fff; }
.af-brand__tag {
  max-width: 320px;
  margin: 14px 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted, #8a8a90);
}

.af-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #d4d4d8;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.af-status svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.af-status:hover { color: #fff; border-color: rgba(34, 197, 94, 0.4); }
.af-status:hover svg { transform: translateX(2px); }
.af-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: af-pulse 2s ease-out infinite;
}
@keyframes af-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

.af-socials { display: flex; gap: 10px; margin-top: 20px; }
.af-social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.af-social svg { width: 17px; height: 17px; }
.af-social:hover {
  color: #fff;
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb, 186, 151, 251), 0.5);
  background: rgba(var(--accent-rgb, 186, 151, 251), 0.14);
  box-shadow: 0 10px 22px -10px rgba(var(--accent-rgb, 186, 151, 251), 0.8);
}

.af-col { display: flex; flex-direction: column; gap: 11px; }
.af-col__title {
  margin: 4px 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}
.af-link {
  position: relative;
  align-self: flex-start;
  font-size: 14px;
  color: var(--text-muted, #8a8a90);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}
.af-link::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, var(--cl-accent, #ba97fb));
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.af-link:hover { color: #fff; transform: translateX(4px); }
.af-link:hover::before { opacity: 1; transform: translate(0, -50%); }

/* ---------- Bottom ---------- */
.af-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--text-muted, #8a8a90);
}
.af-powered { margin-left: auto; color: var(--text-muted, #8a8a90); text-decoration: none; transition: color 0.2s ease; }
.af-powered:hover { color: #fff; }
.af-powered strong { color: var(--cl-accent, var(--accent, #ba97fb)); font-weight: 600; }
.af-top {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.af-top svg { width: 16px; height: 16px; }
.af-top:hover { color: #fff; transform: translateY(-2px); border-color: rgba(var(--accent-rgb, 186, 151, 251), 0.5); }

/* Big faded brand name */
.af-wordmark {
  position: relative;
  height: 0.8em;
  margin-top: -0.5rem;
  overflow: hidden;
  text-align: center;
  font-family: "Clash Display", var(--font-body, system-ui, sans-serif);
  font-size: clamp(4rem, 17vw, 15rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 85%);
  -webkit-background-clip: text;
          background-clip: text;
  pointer-events: none;
  user-select: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .af-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .af-brand { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .af-footer { padding-top: 3.5rem; }
  .af-cta { margin: 0 0 2.5rem; }
  .af-cta__actions, .af-btn { width: 100%; }
  .af-btn { justify-content: center; }
  .af-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .af-powered { margin-left: 0; }
  .af-bottom { flex-direction: column; align-items: flex-start; position: relative; }
  .af-top { position: absolute; right: 0; top: 18px; }
}

/* =====================================================================
   Motion layer (driven by scripts/footer.js). Everything below only
   kicks in once the script adds .af-anim, so the footer still looks
   right without JS.
   ===================================================================== */

/* ---------- 3D tilt card ---------- */
.af-cta-stage { perspective: 1100px; margin: 0 0 3.25rem; }
.af-cta-stage > .af-cta { margin: 0; }
.af-anim .af-cta {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  will-change: transform;
}
.af-anim .af-cta__text { transform: translateZ(18px); }
.af-anim .af-cta__actions { transform: translateZ(26px); }

/* cursor spotlight inside the card */
.af-cta__spot {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb, 186, 151, 251), 0.2), transparent 60%);
  opacity: var(--spot, 0);
  pointer-events: none;
}
/* border that lights up where the cursor is */
.af-cta__edge {
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb, 186, 151, 251), 0.95), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: var(--spot, 0);
  pointer-events: none;
}
/* glossy sheen that slides with the tilt */
.af-cta__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.af-cta__sheen::before {
  content: "";
  position: absolute;
  top: -50%;
  left: calc(var(--sx, -60) * 1%);
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: rotate(20deg);
  opacity: var(--spot, 0);
}
/* slow rotating aurora behind the card */
.af-cta-stage { position: relative; }
.af-cta-stage::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  z-index: -1;
  border-radius: 40px;
  background: conic-gradient(from var(--af-angle, 0deg), rgba(var(--accent-rgb, 186, 151, 251), 0.35), transparent 30%, rgba(var(--accent-rgb, 186, 151, 251), 0.2) 55%, transparent 80%, rgba(var(--accent-rgb, 186, 151, 251), 0.35));
  filter: blur(40px);
  opacity: 0.45;
  animation: af-spin 14s linear infinite;
  pointer-events: none;
}
@property --af-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes af-spin { to { --af-angle: 360deg; } }

/* Discord button shimmer */
.af-btn--primary { position: relative; overflow: hidden; }
.af-btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: af-shimmer 4.5s ease-in-out infinite;
}
@keyframes af-shimmer {
  0%, 65% { left: -60%; }
  100% { left: 130%; }
}

/* ---------- Magnetic buttons ---------- */
.af-anim .af-social,
.af-anim .af-top {
  transform: translate3d(var(--mgx, 0px), var(--mgy, 0px), 0);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.af-anim .af-social:hover,
.af-anim .af-top:hover { transform: translate3d(var(--mgx, 0px), var(--mgy, 0px), 0); }
.af-social svg, .af-top svg { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.af-social:hover svg { transform: scale(1.15); }
.af-top:hover svg { transform: translateY(-2px); }

/* ---------- Wordmark spotlight ---------- */
.af-anim .af-wordmark {
  background:
    radial-gradient(380px circle at var(--wx, 50%) var(--wy, 40%), rgba(var(--accent-rgb, 186, 151, 251), calc(var(--wspot, 0) * 0.55)), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 85%);
  -webkit-background-clip: text;
          background-clip: text;
}

/* ---------- Scroll reveal ---------- */
.af-anim .af-reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.9s ease;
  transition-delay: calc(var(--d, 0) * 90ms);
}
.af-anim .af-reveal.is-in { opacity: 1; transform: none; filter: none; }
/* the tilt stage keeps its own transform on the card, so reveal the stage */
.af-anim .af-wordmark.af-reveal { transform: translateY(40%); }
.af-anim .af-wordmark.af-reveal.is-in { transform: none; }

