/* Ash Legion Join. Black and gold, matching the API registration page.
   Sits inside the site's own header and footer. Motion is short and respects reduced-motion. */

.ash-join {
  --j-bg: rgba(0, 0, 0, 0.6);
  --j-panel: #111111;
  --j-ink: #f2f2f2;
  --j-muted: #b3b0a4;
  --j-gold: #c9a227;
  --j-rule: rgba(201, 162, 39, 0.35);
  --j-danger: #d32f2f;
  --j-ok: #7fb89a;
  color: var(--j-ink);
  font-family: var(--wp--preset--font-family--roboto, "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 16px;
  line-height: 1.5;
  max-width: 640px;
  margin-inline: auto;
  padding-block: 24px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}
.ash-join *, .ash-join *::before, .ash-join *::after { box-sizing: border-box; }
.ash-join a { color: var(--j-gold); }
.ash-join a:focus-visible, .ash-join button:focus-visible, .ash-join input:focus-visible,
.ash-join [tabindex="0"]:focus-visible {
  outline: 2px solid var(--j-gold);
  outline-offset: 3px;
}
.ash-join h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.15; margin: 4px 0 10px; text-wrap: balance; }
.ash-join h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--j-gold); margin: 26px 0 10px; }
.ash-join p { margin: 0 0 12px; }

.ash-join-card {
  background: var(--j-bg);
  border: 1px solid var(--j-rule);
  border-radius: 0 10px 10px 10px;
  padding: 22px 22px 24px;
}
.ash-join-card--center { text-align: center; }

.ash-join-kicker {
  display: inline-block;
  font: 600 12px/1 "Roboto Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--j-gold);
  margin: 0 0 6px;
}
.ash-join-lede { color: var(--j-muted); margin: 0 0 18px; }
.ash-join-hint { display: block; font-size: 13px; color: var(--j-muted); margin-top: 2px; }

/* Forms */
.ash-join-form { display: grid; gap: 16px; }
.ash-join-form--inline { margin-top: 14px; text-align: left; }
.ash-join-form label { display: grid; gap: 4px; font-size: 15px; font-weight: 500; }
.ash-join-form input[type="text"],
.ash-join-form input[type="email"],
.ash-join-form input[type="password"],
.ash-join-form input[type="file"] {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  background: #111111;
  color: var(--j-ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0 6px 6px 6px;
  font: inherit;
}
.ash-join-form input:focus { border-color: var(--j-gold); }
.ash-join-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ash-join-fieldset legend { font-weight: 600; padding: 0; margin-bottom: 4px; }

/* Honeypot: off-screen for people, present in the form for bots */
.ash-join-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.ash-join-btn {
  display: inline-block;
  justify-self: start;
  background: transparent;
  border: 2px solid var(--j-gold);
  color: var(--j-gold);
  padding: 11px 20px;
  border-radius: 0 6px 6px 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.ash-join-btn:hover, .ash-join-btn:focus-visible { background: var(--j-gold); color: #111111; text-decoration: none; }
.ash-join-btn--quiet { border-color: rgba(255, 255, 255, 0.4); color: var(--j-ink); }
.ash-join-btn--quiet:hover, .ash-join-btn--quiet:focus-visible { background: rgba(255, 255, 255, 0.15); color: var(--j-ink); }
.ash-join-btn--small { padding: 7px 12px; font-size: 13px; }
.ash-join-alt { margin-top: 16px; font-size: 14px; color: var(--j-muted); }
.ash-join-cta { margin-top: 22px; }

/* Messages */
.ash-join-msg {
  padding: 10px 14px;
  margin: 0 0 14px;
  background: rgba(0, 0, 0, 0.45);
  border-left: 3px solid var(--j-gold);
  border-radius: 0 6px 6px 6px;
}
.ash-join-msg--error { border-left-color: var(--j-danger); }
.ash-join-msg--ok { border-left-color: var(--j-ok); }

/* Face picker: 10 faces across on wide screens, 5 on phones */
.ash-join-faces {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 4px;
}
@media (min-width: 560px) {
  .ash-join-faces { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
.ash-join-face { position: relative; display: block; cursor: pointer; }
.ash-join-face input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ash-join-face img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.ash-join-face:hover img { transform: scale(1.06); }
.ash-join-face input:checked + img { border-color: var(--j-gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.35); }
.ash-join-face input:focus-visible + img { outline: 2px solid var(--j-gold); outline-offset: 3px; }

/* Sent, expired, welcome */
.ash-join-welcome { display: flex; gap: 16px; align-items: center; }
.ash-join-badge {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--j-gold);
}
.ash-join-welcome > div { min-width: 0; }
.ash-join-codename { font-size: clamp(22px, 5vw, 28px); }

/* CLASSIFIED stamp: slams in once, then stays still */
.ash-join-stamp {
  display: inline-block;
  font: 700 11px/1 "Roboto Mono", ui-monospace, monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--j-danger);
  border: 2px solid var(--j-danger);
  padding: 4px 6px 3px;
  transform: rotate(-4deg);
  margin-right: 6px;
  vertical-align: 4px;
  animation: ash-join-stamp 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes ash-join-stamp {
  from { transform: rotate(-4deg) scale(1.6); opacity: 0; }
  to { transform: rotate(-4deg) scale(1); opacity: 1; }
}

/* Redaction bar: clears on hover or keyboard focus */
.ash-join-redact {
  background: #111111;
  color: transparent;
  padding: 0 6px;
  border-radius: 2px;
  cursor: help;
  transition: color 0.2s ease, background 0.2s ease;
}
.ash-join-redact:hover, .ash-join-redact:focus { background: transparent; color: var(--j-gold); }

/* Objectives */
.ash-join-objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ash-join-obj {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 6px 6px 6px;
}
.ash-join-obj strong { display: block; font-weight: 600; }
.ash-join-obj span:not(.ash-join-tick) { display: block; font-size: 14px; color: var(--j-muted); }
.ash-join-obj > div { min-width: 0; }
.ash-join-tick {
  width: 18px;
  height: 18px;
  border: 2px solid var(--j-gold);
  border-radius: 50%;
}
.ash-join-obj.is-done .ash-join-tick { background: var(--j-gold); }
.ash-join-obj.is-done strong { color: var(--j-muted); text-decoration: line-through; }
.ash-join-steps { padding-left: 20px; margin: 0 0 18px; color: var(--j-ink); }
.ash-join-steps li { margin-bottom: 6px; }

@media (max-width: 480px) {
  .ash-join-card { padding: 18px 16px 20px; }
  .ash-join-welcome { flex-direction: column; text-align: center; }
  .ash-join-obj { grid-template-columns: 22px minmax(0, 1fr); }
  .ash-join-obj .ash-join-btn { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .ash-join *, .ash-join *::before, .ash-join *::after { animation: none !important; transition: none !important; }
}

/* Join 1.1 additions */
.ash-join .ash-join-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.ash-join .ash-join-soon { margin-left: auto; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--j-muted, #b5b5b5); }
.ash-join .ash-join-stamp { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.ash-join .ash-join-prompt { border: 1px solid var(--j-gold); border-radius: 6px; padding: 14px 16px; margin: 0 0 18px; }
.ash-join .ash-join-prompt .ash-join-lede { margin: 0 0 10px; }
.ash-join .ash-join-prompt .ash-join-hint { margin: 0 0 14px; }
/* Yes and Dismiss sit on one line, same height, same top edge. Each form adds no box of its own. */
.ash-join .ash-join-btns { align-items: center; }
.ash-join .ash-join-btns > form { margin: 0; padding: 0; display: contents; }
.ash-join .ash-join-btns > .ash-join-btn { margin: 0; }
.ash-join .ash-join-prompt .ash-join-btns { margin-top: 0; }
/* Faces are square tiles. The initial shows the same tile style when a member has no face. */
.ash-join .bc-avatar { border-radius: 0; object-fit: cover; display: block; }
.ash-join .bc-avatar--initial { border: 2px solid var(--j-gold); font-family: "Oswald", sans-serif; font-weight: 600; }
.ash-join .ash-join-done { margin-top: 18px; display: grid; gap: 10px; justify-items: start; }
.ash-join .ash-join-done .ash-join-hint { margin: 0; }
.ash-join .ash-join-pickrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.ash-join .ash-join-pickrow .ash-join-hint { margin: 0; }

/* Upload Avatar: a box that opens in place, closed by default */
.ash-join-obj--avatar { display: block; padding: 0; }
.ash-join .ash-join-upload { margin: 0; }
.ash-join .ash-join-obj-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; cursor: pointer; list-style: none; }
.ash-join .ash-join-obj-row::-webkit-details-marker { display: none; }
.ash-join .ash-join-obj-row strong { display: block; font-weight: 600; }
.ash-join-obj.is-done .ash-join-obj-row strong { color: var(--j-muted); text-decoration: line-through; }
.ash-join .ash-join-upload-box { padding: 0 12px 12px 46px; }
.ash-join .ash-join-upload-box > form { margin: 0; }
.ash-join .ash-join-upload-box > form > .ash-join-hint { display: block; margin: 0 0 10px; font-size: 14px; color: var(--j-muted); }
