/* ICT extras: sticky mobile join bar, cursor spotlight on cards, giant footer wordmark.
   Loaded right after ict-theme.css; ict-extras.js builds the bar and drives the spotlight.
   Uses the theme tokens (--ict-chrome*, --line, --ink, --muted, --f-*) from ict-theme.css. */

/* ---------- 1. Sticky join bar (phones) ---------- */
.ict-joinbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70; /* above the sticky header bar (60), below the picker and dialogs */
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line, #1c1c22);
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  transform: translate3d(0, calc(100% + 2px), 0);
  visibility: hidden;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    visibility 0s linear 0.45s;
}
.ict-joinbar.is-shown {
  transform: none;
  visibility: visible;
  transition:
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    visibility 0s;
}
.ict-joinbar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  min-height: 44px;
  margin: 0 auto;
}
.ict-joinbar__count {
  display: grid;
  flex: none;
  gap: 4px;
  margin: 0;
  padding-left: 2px;
  line-height: 1;
}
.ict-joinbar__count[hidden] {
  display: none;
}
.ict-joinbar__count b {
  font: 600 16px/1 var(--f-body, "Inter", sans-serif);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #f5f5f7);
}
.ict-joinbar__count span {
  font: 400 9.5px/1 var(--f-mono, ui-monospace, monospace);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted, #86868b);
}
.ict-joinbar__btn {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ict-chrome-edge, rgba(200, 190, 255, 0.24));
  border-radius: 999px;
  background: var(--ict-chrome, #918ca5);
  color: var(--ict-chrome-ink, #0a0a0c);
  font: 600 15px/1 var(--f-body, "Inter", sans-serif);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 12px 30px -16px rgba(180, 170, 255, 0.4);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, background 0.25s;
}
.ict-joinbar__btn:hover {
  background: var(--ict-chrome-hover, #9d98b1);
}
.ict-joinbar__btn:active {
  transform: scale(0.98);
}
.ict-joinbar__btn:focus-visible {
  outline: 2px solid var(--ink, #f5f5f7);
  outline-offset: 3px;
}
.ict-joinbar__btn .fa-discord {
  font-size: 17px;
  color: var(--ict-discord-icon, #4b33c4);
}
@media (max-width: 350px) {
  .ict-joinbar__inner {
    gap: 12px;
  }
  .ict-joinbar__btn {
    padding: 0 12px;
    font-size: 14px;
  }
}
@media (min-width: 701px) {
  .ict-joinbar {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ict-joinbar,
  .ict-joinbar.is-shown {
    transform: none;
    opacity: 0;
    transition: opacity 0.2s, visibility 0s linear 0.2s;
  }
  .ict-joinbar.is-shown {
    opacity: 1;
    transition: opacity 0.2s, visibility 0s;
  }
}

/* ---------- 2. Cursor spotlight on cards (mouse / trackpad only) ----------
   ict-extras.js tags the card with .ict-spot plus --a (uses ::after) or --b (::before,
   when the card already uses ::after), and writes --mx / --my on pointermove.
   One layer does both: a soft fill inside, and through the mask a brighter ring on the
   card's 1px border near the cursor. */
@media (hover: hover) and (pointer: fine) {
  .ict-spot--rel {
    position: relative;
  }
  .ict-spot--a::after,
  .ict-spot--b::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 2;
    border: 1px solid transparent;
    border-radius: inherit;
    background: radial-gradient(
      240px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255, 255, 255, 0.34),
      rgba(255, 255, 255, 0.1) 40%,
      transparent 72%
    ) border-box;
    /* interior at ~20% (a ~7% white glow), the border ring at full strength */
    -webkit-mask:
      linear-gradient(rgba(0, 0, 0, 0.8) 0 0) padding-box,
      linear-gradient(#000 0 0) border-box;
    -webkit-mask-composite: xor;
    mask:
      linear-gradient(rgba(0, 0, 0, 0.8) 0 0) padding-box exclude,
      linear-gradient(#000 0 0) border-box;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
  }
  /* cards that clip their overflow: keep the ring just inside the edge */
  .ict-spot--inner.ict-spot--a::after,
  .ict-spot--inner.ict-spot--b::before {
    inset: 0;
  }
  .ict-spot--a.is-spot-on::after,
  .ict-spot--b.is-spot-on::before {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ict-spot--a::after,
  .ict-spot--b::before {
    transition: none;
  }
}

/* ---------- 4. Giant footer wordmark ----------
   Sits below the footer content, cropped by the footer's bottom edge. */
.footer-wordmark {
  display: block;
  height: 0.62em;
  margin: clamp(36px, 5vw, 72px) 0 0;
  overflow: hidden;
  font: 500 clamp(64px, 20vw, 380px) / 1 var(--f-display, "Cinzel", serif);
  letter-spacing: 0.1em;
  text-indent: 0.1em; /* balance the trailing tracking so the word stays centred */
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  /* the gradient spans this cropped box, so it stays solid down to the cut edge */
  background: linear-gradient(180deg, #ffffff 0%, #dcdce2 40%, #9a9aa2 75%, #6e6e76 100%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.075;
  user-select: none;
  pointer-events: none;
}
/* the wordmark is the footer's bottom edge, so it replaces the bottom padding */
:root[data-ui-theme] .site-footer:has(> .footer-wordmark) {
  padding-bottom: 0;
}
