/* ============================================================
   POINTR — JOIN PAGE STYLES
   /join  —  Full-screen multi-step form
   ============================================================ */

/* ============================================================
   LAYOUT
   ============================================================ */

.join-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow: hidden; /* prevent scroll between steps */
  width: 100%;
}

/* ============================================================
   HEADER (logo only)
   ============================================================ */

.join-header {
  padding: 1.75rem var(--page-gutter);
  flex-shrink: 0;
}

.join-header a {
  text-decoration: none;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar-wrap {
  padding: 0 var(--page-gutter) 0;
  flex-shrink: 0;
}

.progress-track {
  width: 100%;
  height: 2px;
  background: rgba(217,217,217,0.35);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  /* background: linear-gradient(90deg, var(--color-grad-a), var(--color-grad-b)); */
  background: darkgrey;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

.progress-label {
  margin-top: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

/* ============================================================
   HERO INTRO  (screen 5 — "Your voice matters")
   Shown before form starts
   ============================================================ */

.join-intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2xl) var(--page-gutter);
  text-align: center;
  gap: var(--sp-xl);
}

/* Large ring SVG in intro */
.intro-ring-wrap {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-ring-svg {
  width: 100%;
  height: 100%;
  animation: ring-spin var(--dur-spin) linear 2;
  transform-origin: center;
}

.join-intro-title {
  font-size: var(--text-h1);
  font-weight: var(--fw-regular);
  color: var(--color-text);
}

.join-intro-sub {
  font-size: var(--text-body);
  color: var(--color-text-mid);
  line-height: var(--lh-base);
  max-width: 42ch;
}

/* Join / CTA button — filled red pill */
/*.btn-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 3.5rem;
  border-radius: var(--radius-card); /* 25 */
  /* background: var(--color-cta);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--fw-medium);
  cursor: pointer;
  border: none;
  transition:
    transform var(--dur-mid) ease,
    box-shadow var(--dur-mid) ease,
    opacity var(--dur-mid) ease;
  min-width: 12rem;
} */

.btn-join-wrap {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-pill);
  padding: 2px;
  background: linear-gradient(135deg, var(--color-grad-a), var(--color-grad-b), var(--color-grad-c));
  will-change: transform;
}

.btn-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 2rem;
  border-radius: calc(var(--radius-pill) - 2px);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  background: #ffffff;
  border: none;
  cursor: pointer;
  min-width: 12rem;
}

.btn-join:active { transform: none }
/* ── Spinning border on mobile (replaces GSAP bounce) ── */
@property --join-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes join-border-spin {
  from { --join-angle: 0deg; }
  to   { --join-angle: 360deg; }
}

.btn-join-wrap {
      background: conic-gradient(
      from var(--join-angle),
      var(--color-grad-a),
      var(--color-grad-b),
      var(--color-grad-c),
      var(--color-grad-a)
  );
  animation: join-border-spin 3s linear infinite;
}

/* ============================================================
   FORM CONTAINER
   ============================================================ */

.join-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl) var(--page-gutter) var(--sp-2xl);
  width: 100%;
}

/* ============================================================
   STEP TRANSITIONS
   Each .form-step is absolutely stacked
   JS removes .step-active and adds .step-exit / .step-enter
   ============================================================ */

.form-steps-container {
  position: relative;
  width: 100%;
  min-height: 320px;
  display: flex;
  justify-content: center;
}

.form-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Active step — visible */
.form-step.step-active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
  position: relative; /*take up space*/
}

/* Exiting step — slides down and fades */
/* Exiting step — pointer-events off, GSAP handles opacity/transform */
.form-step.step-exit {
  pointer-events: none;
}


/* ============================================================
   STEP QUESTION LABEL
   ============================================================ */

.step-question {
  font-size: 1.375rem;   /* between h2 and body */
  font-weight: var(--fw-regular);
  color: var(--color-text);
  margin-bottom: 1.75rem;
  line-height: var(--lh-tight);
}

/* ============================================================
   TEXT INPUT  (steps 1, 2, 4)
   Underline style, minimal
   ============================================================ */

.input-underline {
  width: 100%;
  max-width: 400px;
  border: none;
  border-bottom: 1.5px solid #CCCCCC;
  border-radius: 0;
  padding: 0.625rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: transparent;
  outline: none;
  transition: border-color var(--dur-mid) ease;
  display: block;
}

.input-underline::placeholder {
  color: var(--color-text-xlt);
  font-style: normal;
}

.input-underline:focus {
  border-bottom-color: var(--color-grad-a);
}

.input-underline.has-error {
  border-bottom-color: var(--color-cta);
}

.input-error-msg {
  margin-top: 0.375rem;
  font-size: var(--text-xs);
  color: var(--color-cta);
  min-height: 1em;
}

/* ============================================================
   OK BUTTON  (gradient filled pill)
   ============================================================ */

.btn-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--color-grad-b), var(--color-cta-sec));
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  cursor: pointer;
  border: none;
  margin-top: 1.5rem;
  min-width: 4rem;
  transition:
    opacity var(--dur-mid) ease,
    transform var(--dur-mid) ease,
    box-shadow var(--dur-mid) ease;
}

/* .btn-ok:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236,69,141,0.3);
} */

.btn-ok:active { transform: translateY(0); }

.btn-ok:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   PILL SELECT  (steps 3, 5, 6)
   Multi-select and single-select lettered pills
   ============================================================ */

.pill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
  max-width: 380px;
}

.pill-item {
  display: flex;
  align-items: center;
}

.pill-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(217,217,217,1);
  background: rgba(217,217,217,0.20);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text);
  text-align: left;
  transition:
    border-color var(--dur-mid) ease,
    background var(--dur-mid) ease,
    transform var(--dur-fast) ease;
  position: relative;
}

.pill-btn:hover {
  background: rgba(217,217,217,0.35);
}

/* Letter badge */
.pill-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  border: 1.5px solid rgba(217,217,217,0.6);
  background: transparent;
  font-size: 0.75rem;
  color: var(--color-text-light);
  flex-shrink: 0;
  transition: border-color var(--dur-mid) ease, color var(--dur-mid) ease;
}

.pill-text {
  flex: 1;
}

/* Selected state */
.pill-btn[aria-pressed="true"],
.pill-btn.selected {
  border-color: var(--color-text);
  background: rgba(217,217,217,0.10);
}

.pill-btn[aria-pressed="true"] .pill-letter,
.pill-btn.selected .pill-letter {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* ON SELECT bullet circle (radio style) */
.pill-btn[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  right: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text);
}

/* ============================================================
   FOOTNOTE (step 6 price tier)
   ============================================================ */

.step-footnote {
  margin-top: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-text-xlt);
}

/* ============================================================
   THANK YOU SCREEN
   ============================================================ */

.join-thankyou {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2xl) var(--page-gutter);
  text-align: center;
  gap: var(--sp-xl);
  /* hidden until JS shows it */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.join-thankyou.visible {
  opacity: 1;
  transform: translateY(0);
}

.thankyou-title {
  font-size: var(--text-h1);
  font-weight: var(--fw-regular);
  color: var(--color-text);
}

.thankyou-sub {
  font-size: var(--text-body);
  color: var(--color-text-mid);
  line-height: var(--lh-base);
}

/* ============================================================
   SUBMIT LOADING SPINNER  (inline in btn-ok)
   ============================================================ */

.btn-ok .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  margin-left: 0.5rem;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-ok.loading .spinner { display: inline-block; }
.btn-ok.loading .btn-label { opacity: 0.7; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  .join-intro-title { font-size: 1.75rem; }
  .step-question    { font-size: 1.125rem; }
  .join-form-wrap   { padding-bottom: var(--sp-xl); }
  .pill-list        { max-width: 100%; }
  .input-underline  { max-width: 100%; }
}
