/* The sign-in and tester-request page. Built on front.css: the BONELAB buttons and icon tiles,
   the footer, and the fixed header over a full-bleed hero. The hero is a real clip from the game
   behind a dark wash, the pitch on the left, and one card on the right that holds whichever
   state you're in: signed out, asking to join, waiting, or banned. */

/* ---- The hero ---- */

.gate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 116px 0 150px;
}

.gate__media {
  position: absolute;
  inset: -3%;
  z-index: -2;
  animation: gate-drift 34s ease-in-out infinite alternate;
}
@keyframes gate-drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-2%); } }
.gate__still {
  position: absolute;
  inset: 0;
  background: url(/assets/reel/cabin-ambush-v1.jpg) center 45% / cover;
}
.gate__vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  opacity: 0;
  transition: opacity 1400ms var(--ease-out);
}
.gate.is-rolling .gate__vid.is-on { opacity: 1; }

/* Dark where the words are, lighter on the far side so the clip shows, a little of your color
   pooling under the card, and a fade into the page at the bottom. */
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 60% at 82% 64%, rgba(var(--blue-rgb, 45, 151, 248), .2), transparent 70%),
    linear-gradient(90deg, rgba(var(--ground-rgb), .93) 0%, rgba(var(--ground-rgb), .72) 36%, rgba(var(--ground-rgb), .3) 62%, rgba(var(--ground-rgb), .55) 100%),
    linear-gradient(180deg, rgba(var(--ground-rgb), .55) 0%, transparent 22%, transparent 64%, var(--ground) 100%);
}

.gate__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  align-items: center;
  gap: 40px 72px;
  width: 100%;
}

.gate-badge {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 8px 12px;
  border-radius: 10px;
  background: rgba(var(--plate-rgb), .82);
  box-shadow: inset 0 0 0 2px var(--blue);
  font: 800 13px var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}
.gate-badge::after { content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 0 10px 0 4px; background: var(--blue); }
.gate-badge svg { flex: none; width: 15px; height: 15px; color: var(--blue-bright); }

.gate__title {
  margin: 22px 0 0;
  font: 800 clamp(48px, 6.4vw, 100px)/.92 var(--display);
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .28), 0 10px 28px rgba(0, 0, 0, .35);
  text-wrap: balance;
}
.gate__title b { display: block; color: var(--blue); }
.gate__sub {
  max-width: 32em;
  margin: 22px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  text-wrap: balance;
}
.gate__pitch .enter:nth-child(2) { animation-delay: 150ms; }
.gate__pitch .enter:nth-child(3) { animation-delay: 240ms; }

/* ---- The card ---- */

.gate-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--dusk), var(--deep) 65%);
  box-shadow: inset 0 0 0 2px var(--rim), 0 30px 80px rgba(0, 0, 0, .5), 0 0 120px rgba(var(--blue-rgb, 45, 151, 248), .14);
  animation-delay: 320ms;
}
.gate-card::after { content: ""; position: absolute; top: 0; right: 0; width: 20px; height: 20px; border-radius: 0 var(--r-lg) 0 7px; background: var(--blue); }
.gate-card.swap-in { animation-delay: 0s; }

.gate-card__head { display: flex; align-items: center; gap: 16px; }
.gate-card__mark { flex: none; width: 56px; height: 56px; border-radius: 13px; }
.gate-card__mark img { width: 28px; height: 28px; }
.gate-card__title {
  margin: 0;
  font: 800 27px/1.05 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #fff;
  text-wrap: balance;
}
.gate-state + .gate-card__title { margin-top: 14px; }
.gate-card__text { margin: 14px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--text-4); }
.gate-card__go { width: 100%; margin-top: 22px; }
.gate-card__go + .gate-card__go, .gate-ask + .gate-card__go { margin-top: 12px; }
.gate-card__fine { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.gate-card__fine a { color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }
.gate-card__fine a:hover { color: #fff; }

/* Why a ban happened, set apart so it doesn't read like the rest of the card. */
.gate-card__why {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(240, 89, 106, .08);
  box-shadow: inset 3px 0 0 var(--bad);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

/* Who you're signed in as, and where you stand. */
.gate-who { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 18px; }
.gate-who img { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--sink); box-shadow: 0 0 0 2px var(--rim); }
.gate-who div { min-width: 0; }
.gate-who b { display: block; overflow: hidden; font: 700 18px var(--display); color: #fff; white-space: nowrap; text-overflow: ellipsis; }
.gate-who span { display: block; font-size: 13px; color: var(--muted); }

.gate-state {
  --tone: 245, 178, 74;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 6px 12px 6px 10px;
  border-radius: 8px;
  background: rgba(var(--tone), .12);
  box-shadow: inset 0 0 0 2px rgba(var(--tone), .42);
  font: 800 12px var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgb(var(--tone));
}
.gate-state--no { --tone: 240, 89, 106; }
.gate-state i { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

/* Asking to join. */
.gate-ask { margin-top: 20px; }
.gate-ask__label { display: block; font-size: 14px; font-weight: 700; color: var(--text-2); }
.gate-ask__label span { font-weight: 500; color: var(--muted); }
.gate-ask__msg {
  display: block;
  width: 100%;
  min-height: 92px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--sink);
  box-shadow: inset 0 0 0 2px var(--rim);
  color: var(--text);
  font: 15px/1.5 var(--body);
  resize: vertical;
  transition: box-shadow 180ms var(--ease-out);
}
.gate-ask__msg::placeholder { color: var(--faint); }
.gate-ask__msg:hover { box-shadow: inset 0 0 0 2px var(--rim-hover); }
.gate-ask__msg:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px rgba(var(--blue-rgb, 45, 151, 248), .28); }
.gate-ask .blb { margin-top: 12px; }

/* The spinner CZ.busy puts in a button while it waits. */
.gate-page .blb.loading, .accts__row.loading { pointer-events: none; opacity: .85; }
.gate-page .blb .spin, .accts__row .spin { flex: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* Other accounts signed in here. */
.accts { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.accts__label { margin-bottom: 8px; font: 800 11px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.accts__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(var(--sink-rgb), .7);
  box-shadow: inset 0 0 0 1px var(--rim-soft);
  color: var(--text);
  font: 600 14px var(--body);
  text-align: left;
  cursor: pointer;
  transition: box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.accts__row:hover { background: var(--hover); box-shadow: inset 0 0 0 2px var(--blue); }
.accts__row img { flex: none; width: 26px; height: 26px; border-radius: 50%; }
.accts__row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accts__has { flex: none; padding: 3px 8px; border-radius: 6px; background: rgba(55, 210, 138, .14); color: #6fe0a8; font: 800 11px var(--display); font-style: normal; letter-spacing: .06em; text-transform: uppercase; }
.accts__add { display: inline-block; padding: 6px 2px; font-size: 13px; font-weight: 600; color: var(--text-4); text-decoration: underline; text-underline-offset: 2px; }
.accts__add:hover { color: #fff; }

.gate-out {
  display: block;
  margin: 16px auto 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: 800 12px var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.gate-out:hover { color: #fff; background: rgba(255, 255, 255, .06); }

/* ---- What you get: one strip, pulled up over the bottom of the hero ---- */

.gate-perks { position: relative; z-index: 2; margin-top: -92px; }
.gate-perks__title {
  margin: 0 0 14px;
  font: italic 600 13px var(--body);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-4);
}
.gate-perks__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.gate-perk {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 24px 28px;
  background: var(--bg-2);
  transition: var(--rise-t), background-color 220ms var(--ease-out);
}
.gate-perk:nth-child(2) { --i: 1; }
.gate-perk:nth-child(3) { --i: 2; }
.gate-perk:nth-child(4) { --i: 3; }
.gate-perk:hover { background: var(--raise); }
.gate-perk:hover .bltile::after { width: 18px; height: 18px; }
.gate-perk .bltile { flex: none; width: 54px; height: 54px; border-radius: 12px; }
.gate-perk .bltile::after { width: 12px; height: 12px; border-radius: 0 12px 0 4px; }
.gate-perk .bltile svg { width: 26px; height: 26px; }
.gate-perk h3 { margin: 3px 0 0; font: 800 19px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: #fff; }
.gate-perk p { margin: 7px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--text-4); }

/* ---- Footer ---- */

.gate-foot { margin-top: 80px; }

/* ---- Smaller screens ---- */

@media (max-width: 1040px) {
  .gate { min-height: 0; padding-top: 112px; }
  .gate__in { grid-template-columns: minmax(0, 1fr); }
  .gate-card { max-width: 520px; }
  .gate::before {
    background:
      radial-gradient(70% 40% at 50% 80%, rgba(var(--blue-rgb, 45, 151, 248), .16), transparent 70%),
      linear-gradient(180deg, rgba(var(--ground-rgb), .72) 0%, rgba(var(--ground-rgb), .8) 50%, var(--ground) 100%);
  }
  .gate-perks__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .gate { padding: 96px 0 110px; }
  .gate__title { font-size: clamp(38px, 11.5vw, 54px); }
  .gate__sub { margin-top: 16px; font-size: 17px; }
  .gate-card { padding: 24px 20px; }
  .gate-card__head { gap: 14px; }
  .gate-card__mark { width: 48px; height: 48px; }
  .gate-card__title { font-size: 23px; }
  .gate-perks { margin-top: -70px; }
  .gate-perks__list { grid-template-columns: minmax(0, 1fr); }
  .gate-perk { padding: 20px 18px 22px; }
}

/* ---- One card in the middle of the footage, nothing else to read. */
.gate__in { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; }
.gate-card { width: min(460px, 100%); max-width: 460px; text-align: center; justify-items: center; }
.gate-card .gate-badge { margin: 0 auto 14px; }
.gate-card__title { margin: 0 0 10px; font: 800 clamp(26px, 3.4vw, 34px)/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.gate-card__go { width: 100%; }
.gate-page #userSlot { display: none; }

/* The signed-out card: the name, the one fact, the one button. */
.gate-card__logo { width: 100%; margin: 6px 0 16px; line-height: 0; text-align: center; }
.gate-card__logo img { display: block; margin: 0 auto; width: min(300px, 78%); height: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45)); }
.gate-card__only { margin: 0 auto 26px; padding: 8px 16px; font-size: 13px; letter-spacing: .16em; }
.gate-card__only svg { width: 14px; height: 14px; }
/* Discord's own color, so it reads as Discord at a glance. */
.blb.gate-card__discord { background: #5865F2; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16), 0 10px 26px rgba(88, 101, 242, .35); color: #fff; }
.blb.gate-card__discord:hover, .blb.gate-card__discord:focus-visible { background: #4752C4; }
.blb.gate-card__discord::after { background: #8891F7; }

/* The card can be dragged around (locked-page.js). */
@media (pointer: fine) {
  .gate-card { cursor: grab; }
  .gate-card :is(a, button, input, textarea, label) { cursor: pointer; }
  .gate-card textarea, .gate-card input { cursor: text; }
}
.gate-card.is-dragging {
  cursor: grabbing;
  user-select: none;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6);
}
.gate-card.is-returning { transition: translate 420ms cubic-bezier(0.22, 1, 0.36, 1); }
