/* Join page (affiliate gate). Uses the colour tokens from styles.css. */
:root {
  --j-blue: #3b9eff;
  --j-cyan: #19b8d6;
  --j-red: #ef5b67;
  --j-amber: #f2b45a;
}

.join-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(59, 158, 255, 0.10), transparent 70%),
    radial-gradient(700px 400px at 90% 110%, rgba(242, 180, 90, 0.06), transparent 70%),
    var(--bg);
}

/* ---------- header ---------- */
.jtop { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; max-width: 1240px; margin: 0 auto; }
.jtop .brand { text-decoration: none; }

/* ---------- layout ---------- */
.jwrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 60px; display: grid; gap: 16px; }
.jcard {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 120px), var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px 38px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.jcard.center { text-align: center; display: grid; justify-items: center; gap: 12px; padding: 56px 32px; }
.jhead { text-align: center; display: grid; justify-items: center; gap: 12px; margin-bottom: 26px; }
.jhead h1, .jcard h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.lede { margin: 0; max-width: 560px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.lede code { font: 600 14px var(--mono); color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font: 700 11.5px var(--sans); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 6px 14px;
}
.badge svg { width: 15px; height: 15px; }
.badge.amber { color: var(--j-amber); background: var(--accent-bg); border-color: rgba(242, 180, 90, 0.35); }
.badge.good { color: var(--long); background: var(--long-bg); border-color: rgba(44, 192, 143, 0.35); }

.jpanel { border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px 26px; background: rgba(0, 0, 0, 0.12); position: relative; }

/* ---------- buttons ---------- */
.jbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 650 14.5px var(--sans); color: var(--text); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 22px; min-height: 44px;
  transition: transform 0.12s, filter 0.15s, background 0.15s, border-color 0.15s;
}
.jbtn svg { width: 16px; height: 16px; flex: none; }
.jbtn:hover { filter: brightness(1.08); }
.jbtn:active { transform: translateY(1px); }
.jbtn:disabled { opacity: 0.6; cursor: progress; }
.jbtn.sm { min-height: 36px; padding: 7px 16px; font-size: 13px; }
.jbtn.outline { background: transparent; border-color: var(--line-2); }
.jbtn.outline:hover { border-color: var(--muted); background: var(--panel-2); }
.jbtn.primary { background: linear-gradient(90deg, var(--j-blue), var(--j-cyan)); color: #06121c; }
.jbtn.amber { background: linear-gradient(180deg, #f6c46e, #e3962f); color: #1c1305; box-shadow: 0 8px 22px rgba(227, 150, 47, 0.25); }
.jbtn.red { background: linear-gradient(180deg, #f26e79, #d9434f); color: #fff; box-shadow: 0 8px 22px rgba(217, 67, 79, 0.25); }
.jbtn.done {
  flex: 1; min-height: 54px; font-size: 16px; color: #fff;
  background: linear-gradient(90deg, #2f86ff, var(--j-cyan));
  box-shadow: 0 12px 30px rgba(47, 134, 255, 0.28);
}
.jbtn.fake { pointer-events: none; }
.jbtn.wide { min-width: 320px; }
button.link { background: none; border: 0; padding: 0; color: var(--j-blue); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sign-in view ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.choice { display: grid; align-content: start; justify-items: start; gap: 10px; padding: 6px 26px; }
.choice + .choice { border-left: 1px dashed var(--line-2); }
.choice h2, .step h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--text); }
.choice p { margin: 0 0 6px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.demo-form { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.demo-form label { font-size: 12.5px; color: var(--muted); }
.demo-form em { color: var(--j-amber); font-style: normal; }
.demo-row { display: flex; gap: 8px; }
.demo-row input {
  flex: 1; min-width: 0; font: 600 15px var(--mono); color: var(--text); text-transform: uppercase;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
}
.jfine { margin: 18px auto 0; max-width: 620px; text-align: center; font-size: 12.5px; color: var(--dim); line-height: 1.55; }

.demo-banner { margin: 0; font-size: 13px; color: var(--j-amber); background: var(--accent-bg); border: 1px solid rgba(242, 180, 90, 0.3); border-radius: 12px; padding: 10px 14px; }
.demo-banner code { font-family: var(--mono); color: var(--text); }

.jnote { margin: 18px 0 0; font-size: 14px; line-height: 1.5; border-radius: 12px; padding: 11px 14px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); }
.jnote.bad { background: var(--short-bg); color: #f6b6bc; border-color: rgba(240, 96, 110, 0.35); }
.jnote.warn { background: var(--accent-bg); color: #f6d3a0; border-color: rgba(242, 180, 90, 0.35); }
.jnote.good { background: var(--long-bg); color: #9fe5cb; border-color: rgba(44, 192, 143, 0.35); }

/* ---------- join view ---------- */
.howto-btn {
  display: flex; align-items: center; gap: 9px; margin: -2px auto 26px;
  font: 600 14.5px var(--sans); color: var(--text); cursor: pointer;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 22px;
}
.howto-btn svg { width: 17px; height: 17px; color: var(--muted); }
.howto-btn:hover { border-color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { display: flex; flex-direction: column; gap: 16px; padding: 0 24px; min-width: 0; }
.step:first-child { padding-left: 4px; }
.step:last-child { padding-right: 4px; }
.step + .step { border-left: 1px dashed var(--line-2); }
.step-head { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--sans); color: #fff; background: var(--j-blue); box-shadow: 0 0 0 4px rgba(59, 158, 255, 0.15); }
.step-head p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.step-head b { color: var(--text); font-weight: 600; }
.amy-chip { white-space: nowrap; color: var(--j-amber); font-weight: 600; }
.step > .jbtn { align-self: stretch; }

.msgbox { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px 16px; display: grid; gap: 12px; position: relative; }
.msg-label { display: flex; align-items: center; gap: 8px; font: 700 11.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.msg-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--j-amber); }
.msg-text { font: 13.5px/1.6 var(--mono); color: var(--text); word-break: break-all; user-select: all; }
.msgbox .jbtn { width: 100%; }

.jactions { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.jactions .jbtn.outline { min-height: 54px; padding: 0 28px; }
.jsupport { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--dim); }
.jsupport a { color: var(--j-blue); }
.demo-tag { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--j-amber); }

/* ---------- illustrations (simplified, not real screenshots) ---------- */
.mock { background: #fff; color: #1d2433; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); font-family: var(--sans); position: relative; }
.mock-menu { width: 168px; align-self: center; padding: 12px 12px 10px; font-size: 11.5px; }
.mm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mm-top b { color: #1d2433; font-size: 13px; }
.mm-bell { width: 14px; height: 14px; border: 1.6px solid #7a8496; border-radius: 6px 6px 3px 3px; position: relative; }
.mm-bell i { position: absolute; top: -7px; right: -8px; font: 700 8px var(--sans); color: #fff; background: #e2394a; border-radius: 50%; width: 12px; height: 12px; display: grid; place-items: center; font-style: normal; }
.mock-menu ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 7px; }
.mock-menu li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #2a3243; }
.mock-menu li.on { color: #e2394a; }
.mock-menu .ico { width: 11px; height: 11px; border: 1.6px solid currentColor; border-radius: 3px; opacity: 0.8; }
.mm-amy { position: relative; text-align: center; font-weight: 700; color: #6d4bd8; background: linear-gradient(90deg, #ece6ff, #ffe6ef); border-radius: 999px; padding: 6px 8px; }

.tap { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #3b9eff; background: rgba(59, 158, 255, 0.25); right: 14px; top: 50%; margin-top: -9px; animation: tap 1.8s ease-out infinite; pointer-events: none; }
@keyframes tap { 0% { transform: scale(0.5); opacity: 1; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }

.mock-chat { width: 100%; max-width: 230px; align-self: center; font-size: 10.5px; overflow: hidden; }
.mc-head { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-bottom: 1px solid #eef0f4; }
.mc-back, .mc-x { color: #7a8496; font-size: 14px; line-height: 1; }
.mc-x { margin-left: auto; }
.mc-avatar { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #ffb48a, #ff7aa2); }
.mc-name { display: grid; line-height: 1.15; }
.mc-name small { color: #2cb67d; font-size: 9px; }
.mc-body { padding: 9px 10px; display: grid; gap: 7px; min-height: 92px; align-content: start; }
.mc-body p { margin: 0; padding: 6px 9px; border-radius: 10px; max-width: 88%; line-height: 1.35; }
.mc-in { background: #f0f2f6; justify-self: start; }
.mc-out { background: #3b82f6; color: #fff; justify-self: end; }
.mc-link { text-decoration: underline; opacity: 0.9; }
.mc-input { display: flex; align-items: center; gap: 8px; margin: 0 8px 8px; border: 1px solid #e2e6ee; border-radius: 10px; padding: 7px 8px; color: #7a8496; position: relative; }
.mc-input span:first-child { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-send { width: 18px; height: 18px; border-radius: 50%; background: #1d2433; color: #fff; display: grid; place-items: center; font-size: 10px; }
.mc-input .tap { right: 6px; }

/* ---------- walkthrough modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 9, 0.72); backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal-card { width: min(640px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; padding: 20px 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); }
.modal-sub { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--dim); }
.modal-x { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.slide { margin: 0; display: grid; gap: 14px; }
.stage { height: 250px; border-radius: 14px; background: radial-gradient(400px 200px at 50% 0%, rgba(59, 158, 255, 0.12), transparent), var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px; overflow: hidden; position: relative; }
.stage .msgbox.big { width: min(400px, 100%); }
.stage .mock-chat.big { max-width: 300px; font-size: 12px; }
.stage .mock-chat.big .mc-body { min-height: 120px; }
.mc-in.late { animation: appear 3.2s ease-out infinite; }
@keyframes appear { 0%, 45% { opacity: 0; transform: translateY(6px); } 60%, 100% { opacity: 1; transform: none; } }
.mock-pop { display: grid; gap: 6px; padding: 12px; width: 170px; font-size: 12px; }
.mock-pop span { border: 1px solid #e2e6ee; border-radius: 8px; padding: 7px 9px; position: relative; color: #445066; }
.mock-pop span.on { border-color: #3b82f6; color: #1d4ed8; font-weight: 600; }
.cursor.c1 { position: absolute; right: 28%; bottom: 22px; width: 14px; height: 14px; border-left: 2px solid #fff; border-top: 2px solid #fff; transform: rotate(-20deg); animation: cursor 2.6s ease-in-out infinite; }
@keyframes cursor { 0% { transform: translate(40px, 30px) rotate(-20deg); opacity: 0; } 40%, 80% { transform: translate(0, 0) rotate(-20deg); opacity: 1; } 100% { opacity: 0; } }
.slide figcaption { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.slide figcaption b { color: var(--text); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 12px; }
.dots { display: flex; gap: 7px; }
.dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--line-2); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--j-blue); width: 22px; border-radius: 99px; }

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--j-blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#welcome-id { color: var(--j-blue); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .jcard { padding: 30px 18px 22px; border-radius: 20px; }
  .jhead h1, .jcard h1 { font-size: 25px; }
  .steps, .split { grid-template-columns: 1fr; }
  .step, .step:first-child, .step:last-child, .choice { padding: 18px 2px; }
  .step + .step, .choice + .choice { border-left: 0; border-top: 1px dashed var(--line-2); }
  .jpanel { padding: 18px 16px; }
  .jactions { flex-direction: column-reverse; align-items: stretch; }
  .jtop { padding: 14px 16px; }
  .stage { height: 230px; }
  .stage.two .mock-pop { display: none; }
  .jbtn.wide { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tap, .cursor, .mc-in.late, .spinner { animation: none; }
}
