/* Free-membership box on the guide pages (template-parts/join-box.php): the full dark box,
   the member version and the light one-line strip (.jn--inline) */

.jn {
  --jn-night: #1a0f2e;
  --jn-night-2: #2a1845;
  --jn-gold: #D4A574;
  --jn-gold-light: #E8C9A1;

  container-type: inline-size;
  position: relative;
  margin: 2.4em 0;
  padding: 34px 34px 30px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(212, 165, 116, 0.28), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(124, 143, 214, 0.16), transparent 60%),
    linear-gradient(150deg, var(--jn-night-2), var(--jn-night) 70%);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(26, 15, 46, 0.2);
}

/* Star dust */
.jn::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 34% 78%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 56% 14%, rgba(232, 201, 161, 0.6), transparent 60%),
    radial-gradient(1px 1px at 72% 62%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1px 1px at 88% 88%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 6% 92%, rgba(232, 201, 161, 0.45), transparent 60%);
  pointer-events: none;
}

.jn > * { position: relative; }

/* Chart wheel in the top corner, with the sign's glyph at its centre */
.jn > .jn__wheel {
  position: absolute;
  top: -56px;
  right: -56px;
  width: 250px;
  height: 250px;
  stroke: rgba(212, 165, 116, 0.26);
  stroke-width: 1;
  pointer-events: none;
}

.jn__wheel .jn__aspects { stroke: rgba(232, 201, 161, 0.5); stroke-dasharray: 3 3; }
.jn__wheel .jn__planet { fill: var(--jn-gold); stroke: none; opacity: 0.7; }

.jn > .jn__glyph {
  position: absolute;
  top: 69px;
  right: 69px;
  font-size: 2.6rem;
  line-height: 1;
  color: rgba(232, 201, 161, 0.55);
  transform: translate(50%, -50%);
  pointer-events: none;
}

.jn .jn__eyebrow {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jn-gold);
}

.jn .jn__title {
  margin: 0 0 12px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.12;
  color: #fff;
  text-wrap: balance;
}

.jn .jn__lead {
  margin: 0;
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

/* Three steps */
.jn .jn__steps {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.jn .jn__steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 165, 116, 0.22);
  border-radius: 14px;
}

.jn .jn__num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--jn-night);
  background: var(--jn-gold);
  border-radius: 50%;
}

.jn .jn__steps strong {
  font-size: 0.98rem;
  line-height: 1.3;
  color: #fff;
}

.jn .jn__steps li > span:last-child {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

.jn .jn__vision {
  margin: 20px 0 0;
  padding-left: 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--jn-gold-light);
  border-left: 2px solid var(--jn-gold);
}

/* Button and sign-in line */
.jn .jn__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 24px;
}

.jn .jn__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: var(--jn-night);
  text-decoration: none;
  background: var(--jn-gold);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(212, 165, 116, 0.35);
  transition: background 0.15s, transform 0.15s;
}

.jn .jn__btn:hover {
  color: var(--jn-night);
  text-decoration: none;
  background: var(--jn-gold-light);
  transform: translateY(-1px);
}

.jn .jn__btn:focus-visible,
.jn a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.jn .jn__fine {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.jn .jn__fine a,
.jn .jn__link {
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}

.jn .jn__fine a:hover,
.jn .jn__link:hover { color: var(--jn-gold-light); text-decoration-color: currentColor; }

/* Wide boxes: the steps side by side, text clear of the wheel */
@container (min-width: 620px) {
  .jn__head { padding-right: 130px; }
  .jn .jn__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jn .jn__steps li { align-content: start; }
}

/* Members, and the one-line strip: text and button side by side, wrapping when narrow */
.jn--member,
.jn--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 24px 28px;
}

.jn--member .jn__body,
.jn--inline .jn__body { flex: 1 1 300px; min-width: 0; }

.jn--member .jn__title { font-size: clamp(1.4rem, 2.6vw, 1.7rem); margin-bottom: 6px; }
.jn--member .jn__lead { font-size: 0.94rem; }
.jn--member .jn__actions,
.jn--inline .jn__actions { margin-top: 0; }

.jn--inline {
  margin: 1.6em 0;
  padding: 18px 22px;
  color: #2D2A32;
  background: #FBF4EC;
  border: 1px solid #EFDCC7;
  border-left: 4px solid var(--jn-gold);
  border-radius: 16px;
  box-shadow: none;
}

.jn--inline::before { content: none; }

.jn--inline .jn__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: var(--jn-gold);
  background: var(--jn-night);
  border-radius: 50%;
}

.jn--inline .jn__title {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--jn-night);
}

.jn--inline .jn__lead {
  font-size: 0.93rem;
  line-height: 1.55;
  color: #4A4550;
}

.jn--inline .jn__btn {
  padding: 12px 22px;
  font-size: 0.95rem;
  color: #fff;
  background: var(--jn-night);
  box-shadow: none;
}

.jn--inline .jn__btn:hover { color: #fff; background: var(--jn-night-2); }
.jn--inline .jn__btn:focus-visible,
.jn--inline a:focus-visible { outline-color: var(--jn-night); }
.jn--inline .jn__link { color: var(--jn-night); text-decoration-color: rgba(26, 15, 46, 0.35); }
.jn--inline .jn__link:hover { color: #7A5230; }

@media (max-width: 600px) {
  .jn { padding: 28px 20px 24px; border-radius: 18px; }
  .jn > .jn__wheel { top: -70px; right: -80px; width: 210px; height: 210px; opacity: 0.7; }
  .jn > .jn__glyph { top: 35px; right: 25px; font-size: 2rem; }
  .jn .jn__lead { font-size: 0.94rem; line-height: 1.6; }
  .jn .jn__steps { gap: 10px; margin-top: 20px; }
  .jn .jn__steps li { padding: 12px 14px; }
  .jn .jn__steps li > span:last-child { font-size: 0.86rem; line-height: 1.5; }
  .jn .jn__vision { margin-top: 16px; font-size: 0.86rem; }
  .jn .jn__actions { flex-direction: column; align-items: stretch; margin-top: 20px; text-align: center; }
  .jn--member,
  .jn--inline { padding: 20px 18px; }
  .jn--member .jn__actions,
  .jn--inline .jn__actions { flex: 1 1 100%; margin-top: 0; }
  .jn--inline .jn__icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .jn .jn__btn { transition: none; }
}
