/* Project Dynasty Join wave (P51/D16) — legendary closer on the neutral base.
   Scoped to .pd-jw. The website sells the league; Discord owns application
   and review. League color stays an accent; the base stays neutral gray. */

/* Neutral field replaces the retired blue Join frame from the earlier theme. */
html body[data-view="join"] {
  background: var(--pd-page);
}

body[data-view="join"] #join:has(.pd-jw) {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pd-jw {
  --jw-surface: var(--pd-surface-base);
  --jw-raised: var(--pd-surface-interactive);
  --jw-ink: var(--pd-text-primary);
  --jw-muted: var(--pd-text-secondary);
  --jw-line: var(--pd-border);
  --jw-accent: #b3261e;
  --jw-accent-strong: #8f1d17;
  --jw-accent-soft: rgba(179, 38, 30, 0.1);
  display: grid;
  gap: clamp(var(--pd-space-5), 3vw, var(--pd-space-8));
  align-content: start;
}

html[data-theme="dark"] .pd-jw {
  --jw-accent: #ff8a80;
  --jw-accent-strong: #ffb3ab;
  --jw-accent-soft: rgba(255, 138, 128, 0.14);
}

.pd-jw a {
  color: inherit;
}

.pd-jw :is(a, button, input):focus-visible {
  outline: 2px solid var(--pd-focus);
  outline-offset: 3px;
}

/* ---- Split hero ---------------------------------------------------------- */

.pd-jw-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(var(--pd-space-5), 3vw, var(--pd-space-7));
  align-items: stretch;
}

.pd-jw-hero__copy {
  display: grid;
  gap: var(--pd-space-5);
  align-content: center;
  padding: clamp(var(--pd-space-5), 3vw, var(--pd-space-7));
  border: 1px solid var(--jw-line);
  border-radius: 20px;
  background: var(--jw-surface);
  box-shadow: var(--pd-shadow-sm);
}

.pd-jw-kicker {
  margin: 0;
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
  font-weight: 850;
  letter-spacing: var(--pd-tracking-label);
  text-transform: uppercase;
}

.pd-jw-hero h1 {
  margin: 0;
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.pd-jw-hero h1 em {
  color: var(--jw-accent);
  font-style: normal;
}

.pd-jw-hero__lede {
  max-width: 52ch;
  color: var(--jw-muted);
  font-size: var(--pd-text-md);
}

.pd-jw-hero__lede strong {
  color: var(--jw-ink);
}

.pd-jw-format {
  display: grid;
  gap: var(--pd-space-2);
  padding: var(--pd-space-4);
  border: 1px solid var(--jw-line);
  border-radius: 16px;
  background: var(--jw-raised);
}

.pd-jw-format > span {
  color: var(--jw-muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pd-jw-format__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--pd-space-2);
}

.pd-jw-format__grid span {
  display: grid;
  gap: 0.15rem;
  padding: var(--pd-space-2) var(--pd-space-3);
  border: 1px solid var(--jw-line);
  border-radius: 12px;
  background: var(--jw-surface);
}

.pd-jw-format__grid strong {
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: var(--pd-text-md);
  font-weight: 900;
}

.pd-jw-format__grid small {
  color: var(--jw-muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pd-jw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pd-space-3);
}

.pd-jw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--pd-touch-target);
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--pd-border-strong);
  border-radius: 999px;
  background: var(--jw-surface);
  color: var(--jw-ink);
  font-size: var(--pd-text-sm);
  font-weight: 850;
  text-decoration: none;
}

.pd-jw-btn:hover {
  border-color: var(--jw-accent);
  color: var(--jw-accent-strong);
}

.pd-jw-btn.is-primary {
  border-color: var(--jw-accent);
  background: var(--jw-accent);
  color: #fff;
}

.pd-jw-btn.is-primary:hover {
  background: var(--jw-accent-strong);
  color: #fff;
}

html[data-theme="dark"] .pd-jw-btn.is-primary {
  color: #1c0a08;
}

/* ---- Verified dynamic proof (hero right side) ---------------------------- */

.pd-jw-proof {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--jw-line);
  border-radius: 20px;
  background: var(--jw-surface);
  box-shadow: var(--pd-shadow-sm);
}

.pd-jw-proof__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--pd-space-3);
  padding: var(--pd-space-4) var(--pd-space-5);
  border-bottom: 1px solid var(--jw-line);
}

.pd-jw-proof__head strong {
  color: var(--jw-ink);
  font-size: var(--pd-text-sm);
  font-weight: 850;
}

.pd-jw-proof__head span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
  font-weight: 800;
}

.pd-jw-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--pd-status-live-text);
  box-shadow: 0 0 0 4px var(--jw-accent-soft);
}

.pd-jw-reel {
  display: grid;
  grid-template-rows: minmax(12rem, 1fr) auto;
  min-height: 18rem;
}

.pd-jw-reel__stage {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--pd-surface-premium);
}

.pd-jw-reel__stage video {
  width: 100%;
  height: 100%;
  max-height: 24rem;
  object-fit: cover;
}

.pd-jw-reel__brand {
  display: grid;
  gap: var(--pd-space-3);
  justify-items: center;
  padding: var(--pd-space-6);
  color: var(--pd-text-inverse);
  text-align: center;
}

.pd-jw-reel__brand img {
  width: min(9rem, 40%);
  height: auto;
}

.pd-jw-reel__brand strong {
  font-family: var(--pd-font-display);
  font-size: var(--pd-text-lg);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.pd-jw-reel__brand small {
  color: var(--pd-gray-400);
  font-size: var(--pd-text-xs);
  font-weight: 750;
}

.pd-jw-reel__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--pd-space-3);
  padding: var(--pd-space-3) var(--pd-space-5);
  border-top: 1px solid var(--jw-line);
  background: var(--jw-raised);
}

.pd-jw-reel__meta {
  display: grid;
  min-width: 0;
}

.pd-jw-reel__meta small {
  overflow: hidden;
  color: var(--jw-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pd-jw-reel__meta strong {
  overflow: hidden;
  color: var(--jw-ink);
  font-size: var(--pd-text-sm);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-jw-reel__controls {
  display: inline-flex;
  align-items: center;
  gap: var(--pd-space-2);
}

.pd-jw-reel__controls b {
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
  font-weight: 850;
}

.pd-jw-reel__controls button {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--jw-line);
  border-radius: 999px;
  background: var(--jw-surface);
  color: var(--jw-ink);
  cursor: pointer;
}

.pd-jw-proof__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pd-space-3);
  padding: var(--pd-space-5);
}

.pd-jw-fact {
  display: grid;
  gap: 0.15rem;
  padding: var(--pd-space-3) var(--pd-space-4);
  border: 1px solid var(--jw-line);
  border-radius: 14px;
  background: var(--jw-raised);
}

.pd-jw-fact strong {
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}

.pd-jw-fact small {
  color: var(--jw-muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pd-jw-proof__note {
  grid-column: 1 / -1;
  padding: 0.55rem 0.75rem;
  border: 1px dashed var(--jw-line);
  border-radius: 12px;
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
  text-align: center;
}

/* ---- Sections ------------------------------------------------------------ */

.pd-jw-section {
  display: grid;
  gap: var(--pd-space-4);
}

.pd-jw-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--pd-space-3);
}

.pd-jw-section-head h2 {
  margin: var(--pd-space-1) 0 0;
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.pd-jw-section-head p {
  max-width: 62ch;
  color: var(--jw-muted);
  font-size: var(--pd-text-sm);
}

/* Path into Discord */

.pd-jw-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pd-space-3);
}

.pd-jw-step {
  display: grid;
  gap: var(--pd-space-2);
  align-content: start;
  padding: var(--pd-space-4);
  border: 1px solid var(--jw-line);
  border-radius: 16px;
  background: var(--jw-surface);
  box-shadow: var(--pd-shadow-sm);
}

.pd-jw-step b {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--jw-accent);
  border-radius: 999px;
  background: var(--jw-accent-soft);
  color: var(--jw-accent-strong);
  font-family: var(--pd-font-mono);
  font-size: var(--pd-text-xs);
  font-weight: 900;
}

.pd-jw-step strong {
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: var(--pd-text-md);
  font-weight: 900;
}

.pd-jw-step p {
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
}

.pd-jw-step__note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--jw-line);
  border-radius: 12px;
  background: var(--jw-raised);
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
  font-weight: 750;
}

/* Origin + systems */

.pd-jw-origin {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: var(--pd-space-5);
  align-items: center;
  padding: clamp(var(--pd-space-5), 3vw, var(--pd-space-7));
  border: 1px solid var(--jw-line);
  border-radius: 20px;
  background: var(--jw-raised);
}

.pd-jw-origin h2 {
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 0.95;
}

.pd-jw-origin__copy {
  display: grid;
  gap: var(--pd-space-3);
}

.pd-jw-origin__copy p {
  color: var(--jw-muted);
  font-size: var(--pd-text-sm);
}

.pd-jw-origin__copy strong {
  color: var(--jw-ink);
  font-weight: 850;
}

.pd-jw-systems {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pd-space-3);
}

.pd-jw-system {
  display: grid;
  gap: var(--pd-space-2);
  padding: var(--pd-space-4);
  border: 1px solid var(--jw-line);
  border-radius: 14px;
  background: var(--jw-surface);
}

.pd-jw-system strong {
  color: var(--jw-ink);
  font-size: var(--pd-text-sm);
  font-weight: 850;
}

.pd-jw-system span {
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
}

.pd-jw-system__viz {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 1.6rem;
}

.pd-jw-system__viz i {
  width: 0.42rem;
  border-radius: 2px;
  background: var(--pd-border-strong);
}

.pd-jw-system__viz i:nth-child(odd) {
  height: 55%;
}

.pd-jw-system__viz i:nth-child(even) {
  height: 95%;
}

.pd-jw-system__viz i:nth-child(3n) {
  height: 75%;
  background: var(--jw-accent);
}

.pd-jw-system__viz--bars i {
  height: 100%;
}

/* Discord closer */

.pd-jw-discord {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  gap: var(--pd-space-5);
  align-items: center;
  padding: clamp(var(--pd-space-5), 3vw, var(--pd-space-7));
  border: 1px solid var(--pd-gray-800);
  border-radius: 20px;
  background: var(--pd-surface-premium);
  color: var(--pd-text-inverse);
}

.pd-jw-discord__mark {
  display: none;
}

.pd-jw-discord h2 {
  color: #fff;
  font-family: var(--pd-font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
}

.pd-jw-discord p {
  max-width: 56ch;
  margin-top: var(--pd-space-2);
  color: var(--pd-gray-400);
  font-size: var(--pd-text-sm);
}

.pd-jw-discord__counts {
  display: flex;
  gap: var(--pd-space-3);
}

.pd-jw-discord__counts span {
  display: grid;
  min-width: 5rem;
  padding: var(--pd-space-3) var(--pd-space-4);
  border: 1px solid var(--pd-gray-700);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.pd-jw-discord__counts strong {
  color: #fff;
  font-family: var(--pd-font-display);
  font-size: 1.6rem;
  font-weight: 900;
}

.pd-jw-discord__counts small {
  color: var(--pd-gray-400);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pd-jw-discord .pd-jw-btn {
  border-color: var(--pd-gray-600);
  background: transparent;
  color: #fff;
}

.pd-jw-discord .pd-jw-btn.is-primary {
  border-color: #fff;
  background: #fff;
  color: var(--pd-gray-950);
}

.pd-jw-discord .pd-jw-btn:hover {
  border-color: #fff;
  color: #fff;
}

.pd-jw-discord .pd-jw-btn.is-primary:hover {
  color: var(--pd-gray-950);
}

/* Review outcomes */

.pd-jw-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--jw-line);
  border-radius: 18px;
  background: var(--jw-surface);
}

.pd-jw-outcomes__head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--pd-space-3);
  padding: var(--pd-space-5);
  border-bottom: 1px solid var(--jw-line);
}

.pd-jw-outcomes__head h2 {
  margin: var(--pd-space-1) 0 0;
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
}

.pd-jw-outcome {
  display: grid;
  gap: var(--pd-space-2);
  align-content: start;
  min-height: 9rem;
  padding: var(--pd-space-5);
  border-right: 1px solid var(--jw-line);
}

.pd-jw-outcome:last-child {
  border-right: 0;
}

.pd-jw-outcome small {
  color: var(--jw-muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pd-jw-outcome strong {
  color: var(--jw-ink);
  font-family: var(--pd-font-display);
  font-size: var(--pd-text-lg);
  font-weight: 900;
}

.pd-jw-outcome p {
  color: var(--jw-muted);
  font-size: var(--pd-text-xs);
}

.pd-jw-outcome__link {
  margin-top: auto;
  color: var(--jw-accent-strong);
  font-size: var(--pd-text-xs);
  font-weight: 850;
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 64rem) {
  .pd-jw-hero {
    grid-template-columns: 1fr;
  }

  .pd-jw-systems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-jw-discord {
    grid-template-columns: 1fr;
  }

  .pd-jw-discord__counts {
    flex-wrap: wrap;
  }
}

@media (max-width: 43.75rem) {
  .pd-jw-format__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-jw-path,
  .pd-jw-outcomes,
  .pd-jw-systems {
    grid-template-columns: 1fr;
  }

  .pd-jw-outcome {
    border-right: 0;
    border-bottom: 1px solid var(--jw-line);
  }

  .pd-jw-outcome:last-child {
    border-bottom: 0;
  }

  .pd-jw-origin {
    grid-template-columns: 1fr;
  }

  .pd-jw-hero__copy {
    padding: var(--pd-space-5);
  }
}
