/* ============================================================================
   CLUB CNFP — Join Us Page Styles
   Matches HORIZON·9 design system: Work Sans, navy/blue/gold, pill buttons
   ============================================================================ */

/* ====== HEADER ====== */
.page-joinus {
  background: var(--bg-1);
}

.ju-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 32px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ju-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1600px;
  margin: 0 auto;
}

.ju-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.3s ease;
}
.ju-back:hover { color: var(--text); }
.ju-back svg { flex-shrink: 0; }

.ju-logo-text {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 2px;
}
.ju-logo-text .accent { color: var(--blue); }

.ju-header-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1.5px solid rgba(53, 52, 248, 0.2);
  border-radius: 50px;
}

/* ====== MAIN LAYOUT ====== */
.ju-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ====== LEFT VISUAL PANEL ====== */
.ju-visual {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.ju-visual-bg {
  position: absolute;
  inset: 0;
}

.ju-visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ju-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 21, 89, 0.25) 0%,
    rgba(14, 21, 89, 0.5) 40%,
    rgba(14, 21, 89, 0.88) 100%
  );
}

.ju-visual-content {
  position: relative;
  z-index: 2;
  padding: 64px 48px;
  width: 100%;
}

.ju-visual-badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1.5px solid rgba(201, 162, 39, 0.4);
  border-radius: 50px;
  margin-bottom: 20px;
}

.ju-visual-title {
  font-family: var(--font);
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}

.ju-visual-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin-bottom: 36px;
}

.ju-visual-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ju-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.ju-perk-icon { font-size: 1.2rem; }

.ju-perk-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
}

/* ====== RIGHT FORM SECTION ====== */
.ju-form-section {
  padding: 100px 48px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.ju-form-wrap {
  max-width: 540px;
  width: 100%;
}

.ju-form-header {
  margin-bottom: 36px;
}

.ju-form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.ju-form-title {
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.ju-form-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ====== FIELDS (inherit from style.css base, refine here) ====== */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.req { color: var(--blue); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-2);
  border: 2px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: 0.3s ease;
}

.field input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(53, 52, 248, 0.08);
}

.field input::placeholder {
  color: #b0b0b0;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 10px;
}

/* Validation */
.field.error input {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.04);
}

.error-msg {
  font-size: 0.78rem;
  color: #e74c3c;
  margin-top: 4px;
  display: none;
}

.field.error .error-msg { display: block; }

/* ====== FILE UPLOAD ====== */
.upload-zone {
  border: 2px dashed rgba(53, 52, 248, 0.2);
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(53, 52, 248, 0.02);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--blue);
  background: rgba(53, 52, 248, 0.05);
}

.upload-zone.drag-over {
  transform: scale(1.01);
}

.upload-icon {
  margin-bottom: 12px;
  color: var(--blue);
  opacity: 0.5;
}

.upload-text {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.upload-link {
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.upload-formats {
  font-size: 0.75rem;
  color: #b0b0b0;
}

/* Upload preview */
.upload-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(53, 52, 248, 0.04);
  border: 2px solid rgba(53, 52, 248, 0.15);
  border-radius: 12px;
  margin-top: 10px;
}

.upload-preview-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--blue);
}

.upload-filename {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-filesize {
  font-size: 0.75rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.upload-remove {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-light);
  border-radius: 6px;
  transition: 0.2s ease;
  flex-shrink: 0;
}

.upload-remove:hover {
  background: rgba(231, 76, 60, 0.08);
  color: #e74c3c;
}

.field-upload.error .upload-zone,
.field-motivation.error .upload-zone,
.field-photo.error .upload-zone {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.03);
}

/* ====== SUBMIT BUTTON ====== */
.ju-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.btn-join {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-join:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(53, 52, 248, 0.25);
}

.btn-join:active {
  transform: translateY(0);
}

.btn-join:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-join-loader {
  display: none;
  align-items: center;
  gap: 8px;
}

.btn-join-loader:not([hidden]) {
  display: flex;
}

.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ju-legal {
  font-size: 0.75rem;
  color: #b0b0b0;
  line-height: 1.6;
  margin-top: 14px;
  text-align: center;
}

/* ====== SUCCESS STATE ====== */
.ju-success {
  text-align: center;
  padding: 60px 0;
  animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.ju-success-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.ju-success-title {
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.ju-success-text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto 28px;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-back-home:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .ju-main {
    grid-template-columns: 1fr;
  }

  .ju-visual {
    position: relative;
    height: 50vh;
    min-height: 360px;
  }

  .ju-visual-perks {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ju-form-section {
    padding: 48px 24px 60px;
  }
}

@media (max-width: 600px) {
  .ju-header { padding: 0 16px; }

  .ju-header-badge { display: none; }

  .ju-visual-content { padding: 32px 24px; }

  .ju-visual-title {
    font-size: 2rem;
  }

  .ju-visual-perks {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ju-perk { padding: 10px 12px; }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ju-form-section {
    padding: 36px 16px 48px;
  }

  .upload-zone { padding: 28px 16px; }
}
